Update to euclid 0.8

This commit is contained in:
Martin Robinson 2016-08-11 00:29:19 +02:00 committed by Anthony Ramine
parent b7facf41cb
commit 6259df5e2d
56 changed files with 538 additions and 558 deletions

168
ports/cef/Cargo.lock generated
View file

@ -5,10 +5,10 @@ dependencies = [
"cocoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"compositing 0.0.1",
"devtools 0.0.1",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin_app 0.0.1",
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
"layers 0.3.1 (git+https://github.com/servo/rust-layers)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@ -76,13 +76,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "azure"
version = "0.4.6"
source = "git+https://github.com/servo/rust-azure#4d72934a73820653986d9b11da759f5955a13e44"
version = "0.6.2"
source = "git+https://github.com/servo/rust-azure#6e028b5fafc1dad4cd48e233a9760cb67937d487"
dependencies = [
"cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -90,8 +91,8 @@ dependencies = [
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-skia 0.20130412.10 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-skia 0.20130412.19 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -178,27 +179,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "canvas"
version = "0.0.1"
dependencies = [
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"azure 0.6.2 (git+https://github.com/servo/rust-azure)",
"canvas_traits 0.0.1",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"util 0.0.1",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
name = "canvas_traits"
version = "0.0.1"
dependencies = [
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"azure 0.6.2 (git+https://github.com/servo/rust-azure)",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -206,7 +207,7 @@ dependencies = [
"plugins 0.0.1",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -261,13 +262,13 @@ name = "compositing"
version = "0.0.1"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.6.2 (git+https://github.com/servo/rust-azure)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
"layers 0.3.1 (git+https://github.com/servo/rust-layers)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
@ -281,7 +282,7 @@ dependencies = [
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender 0.1.0 (git+https://github.com/servo/webrender)",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -293,17 +294,17 @@ dependencies = [
"canvas_traits 0.0.1",
"compositing 0.0.1",
"devtools_traits 0.0.1",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
"layers 0.3.1 (git+https://github.com/servo/rust-layers)",
"layout_traits 0.0.1",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
"offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@ -313,7 +314,7 @@ dependencies = [
"style_traits 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -569,7 +570,7 @@ dependencies = [
[[package]]
name = "euclid"
version = "0.7.1"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -663,13 +664,13 @@ name = "gfx"
version = "0.0.1"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"azure 0.6.2 (git+https://github.com/servo/rust-azure)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gfx_traits 0.0.1",
@ -677,7 +678,7 @@ dependencies = [
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
"layers 0.3.1 (git+https://github.com/servo/rust-layers)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -692,7 +693,7 @@ dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"simd 0.1.0 (git+https://github.com/huonw/simd)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
@ -702,7 +703,7 @@ dependencies = [
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
"xi-unicode 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -710,11 +711,11 @@ dependencies = [
name = "gfx_traits"
version = "0.0.1"
dependencies = [
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.6.2 (git+https://github.com/servo/rust-azure)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
"layers 0.3.1 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1",
"plugins 0.0.1",
"profile_traits 0.0.1",
@ -762,10 +763,10 @@ version = "0.0.1"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"compositing 0.0.1",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
"layers 0.3.1 (git+https://github.com/servo/rust-layers)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
@ -927,12 +928,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "io-surface"
version = "0.2.1"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
@ -994,23 +995,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "layers"
version = "0.2.6"
source = "git+https://github.com/servo/rust-layers#79fca9ca5f2b7bded94dd34637a251967a9b0247"
version = "0.3.1"
source = "git+https://github.com/servo/rust-layers#c1965cf7a265f758c34e57413506f508969248a0"
dependencies = [
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"io-surface 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"io-surface 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-skia 0.20130412.10 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-skia 0.20130412.19 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1019,11 +1019,11 @@ name = "layout"
version = "0.0.1"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"azure 0.6.2 (git+https://github.com/servo/rust-azure)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
@ -1051,7 +1051,7 @@ dependencies = [
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -1059,8 +1059,8 @@ name = "layout_thread"
version = "0.0.1"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.6 (git+https://github.com/servo/rust-azure)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.6.2 (git+https://github.com/servo/rust-azure)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
@ -1082,7 +1082,7 @@ dependencies = [
"style 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -1097,7 +1097,7 @@ dependencies = [
"script_traits 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -1260,7 +1260,7 @@ dependencies = [
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -1297,7 +1297,7 @@ dependencies = [
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1420,12 +1420,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "offscreen_gl_context"
version = "0.1.9"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1727,7 +1727,7 @@ dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1744,7 +1744,7 @@ dependencies = [
"msg 0.0.1",
"net_traits 0.0.1",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"open 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_macros 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1769,7 +1769,7 @@ dependencies = [
"util 0.0.1",
"uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"video-metadata 0.1.3 (git+https://github.com/GuillaumeGomez/video-metadata-rs)",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
"xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1782,7 +1782,7 @@ dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1810,16 +1810,16 @@ dependencies = [
"canvas_traits 0.0.1",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
"layers 0.3.1 (git+https://github.com/servo/rust-layers)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
"offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1904,7 +1904,7 @@ dependencies = [
"devtools 0.0.1",
"devtools_traits 0.0.1",
"env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1928,7 +1928,7 @@ dependencies = [
"util 0.0.1",
"webdriver_server 0.0.1",
"webrender 0.1.0 (git+https://github.com/servo/webrender)",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
@ -1941,28 +1941,29 @@ dependencies = [
[[package]]
name = "servo-fontconfig"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig-sys 2.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig-sys 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-fontconfig-sys"
version = "2.11.3"
version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-freetype-sys"
version = "2.4.11"
version = "4.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1997,19 +1998,20 @@ dependencies = [
[[package]]
name = "servo-skia"
version = "0.20130412.10"
version = "0.20130412.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"io-surface 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"io-surface 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig-sys 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-glutin 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -2079,7 +2081,7 @@ dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2110,7 +2112,7 @@ name = "style_traits"
version = "0.0.1"
dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2292,7 +2294,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2409,7 +2411,7 @@ name = "webdriver_server"
version = "0.0.1"
dependencies = [
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2428,14 +2430,14 @@ dependencies = [
[[package]]
name = "webrender"
version = "0.1.0"
source = "git+https://github.com/servo/webrender#e2e8d91f24de961bfd6b53338e2403bc0c675aab"
source = "git+https://github.com/servo/webrender#2c25e910b2a1f0399c57a077085d5cc3451f4499"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2443,25 +2445,25 @@ dependencies = [
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
"webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
name = "webrender_traits"
version = "0.2.0"
source = "git+https://github.com/servo/webrender_traits#a26ebe4da490cc1fb60d830c73cbefb135b768b1"
version = "0.2.1"
source = "git+https://github.com/servo/webrender_traits#75d40708694949a2e092ff4c344f952e3afbaa55"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
]

View file

@ -17,7 +17,7 @@ opt-level = 3
[dependencies]
compositing = {path = "../../components/compositing"}
devtools = {path = "../../components/devtools"}
euclid = "0.7.1"
euclid = "0.8.2"
gleam = "0.2.8"
glutin_app = {path = "../glutin"}
layers = {git = "https://github.com/servo/rust-layers"}

View file

@ -11,8 +11,8 @@ use types::{cef_mouse_button_type_t, cef_mouse_event, cef_rect_t, cef_key_event,
use wrappers::CefWrap;
use compositing::windowing::{WindowEvent, MouseWindowEvent};
use euclid::point::Point2D;
use euclid::size::Size2D;
use euclid::point::TypedPoint2D;
use euclid::size::TypedSize2D;
use libc::{c_double, c_int};
use msg::constellation_msg::{self, KeyModifiers, KeyState};
use script_traits::{MouseButton, TouchEventType};
@ -384,7 +384,7 @@ full_cef_class_impl! {
.get_render_handler()
.get_view_rect(this.downcast().browser.borrow().clone().unwrap(), &mut rect);
}
let size = Size2D::typed(rect.width as u32, rect.height as u32);
let size = TypedSize2D::new(rect.width as u32, rect.height as u32);
this.downcast().send_window_event(WindowEvent::Resize(size));
}}
@ -443,7 +443,7 @@ full_cef_class_impl! {
cef_mouse_button_type_t::MBT_MIDDLE => MouseButton::Middle,
cef_mouse_button_type_t::MBT_RIGHT => MouseButton::Right,
};
let point = Point2D::typed((*event).x as f32, (*event).y as f32);
let point = TypedPoint2D::new((*event).x as f32, (*event).y as f32);
if mouse_up != 0 {
this.downcast().send_window_event(WindowEvent::MouseWindowEventClass(
MouseWindowEvent::Click(button_type, point)))
@ -457,7 +457,7 @@ full_cef_class_impl! {
_mouse_exited: c_int [c_int],)
-> () {{
let event: &cef_mouse_event = event;
let point = Point2D::typed((*event).x as f32, (*event).y as f32);
let point = TypedPoint2D::new((*event).x as f32, (*event).y as f32);
this.downcast().send_window_event(WindowEvent::MouseWindowMoveEventClass(point))
}}
@ -469,8 +469,8 @@ full_cef_class_impl! {
let event: &cef_mouse_event = event;
let delta_x: c_int = delta_x;
let delta_y: c_int = delta_y;
let delta = Point2D::typed(delta_x as f32, delta_y as f32);
let origin = Point2D::typed((*event).x as i32, (*event).y as i32);
let delta = TypedPoint2D::new(delta_x as f32, delta_y as f32);
let origin = TypedPoint2D::new((*event).x as i32, (*event).y as i32);
this.downcast().send_window_event(WindowEvent::Scroll(delta,
origin,
TouchEventType::Move))

View file

@ -49,7 +49,7 @@ pub static mut DISPLAY: *mut c_void = 0 as *mut c_void;
#[derive(Clone)]
pub struct Window {
cef_browser: RefCell<Option<CefBrowser>>,
size: TypedSize2D<DevicePixel,u32>
size: TypedSize2D<u32, DevicePixel>
}
#[cfg(target_os="macos")]
@ -89,7 +89,7 @@ impl Window {
Rc::new(Window {
cef_browser: RefCell::new(None),
size: Size2D::typed(width, height)
size: TypedSize2D::new(width, height)
})
}
@ -171,7 +171,7 @@ impl Window {
}
impl WindowMethods for Window {
fn framebuffer_size(&self) -> TypedSize2D<DevicePixel,u32> {
fn framebuffer_size(&self) -> TypedSize2D<u32, DevicePixel> {
let browser = self.cef_browser.borrow();
match *browser {
None => self.size,
@ -180,8 +180,8 @@ impl WindowMethods for Window {
self.size
} else {
let mut rect = cef_rect_t::zero();
rect.width = self.size.width.get() as i32;
rect.height = self.size.height.get() as i32;
rect.width = self.size.width as i32;
rect.height = self.size.height as i32;
if cfg!(target_os="macos") {
// osx relies on virtual pixel scaling to provide sizes different from actual
// pixel size on screen. other platforms are just 1.0 unless the desktop/toolkit says otherwise
@ -202,23 +202,23 @@ impl WindowMethods for Window {
}
}
Size2D::typed(rect.width as u32, rect.height as u32)
TypedSize2D::new(rect.width as u32, rect.height as u32)
}
}
}
}
fn size(&self) -> TypedSize2D<ScreenPx,f32> {
fn size(&self) -> TypedSize2D<f32, ScreenPx> {
let browser = self.cef_browser.borrow();
match *browser {
None => Size2D::typed(400.0, 300.0),
None => TypedSize2D::new(400.0, 300.0),
Some(ref browser) => {
let mut rect = cef_rect_t::zero();
browser.get_host()
.get_client()
.get_render_handler()
.get_view_rect((*browser).clone(), &mut rect);
Size2D::typed(rect.width as f32, rect.height as f32)
TypedSize2D::new(rect.width as f32, rect.height as f32)
}
}
}
@ -252,7 +252,7 @@ impl WindowMethods for Window {
}
}
fn scale_factor(&self) -> ScaleFactor<ScreenPx,DevicePixel,f32> {
fn scale_factor(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel> {
if cfg!(target_os="macos") {
let browser = self.cef_browser.borrow();
match *browser {

View file

@ -4,7 +4,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1",
"gecko_string_cache 0.2.20",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -140,7 +140,7 @@ dependencies = [
[[package]]
name = "euclid"
version = "0.7.1"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -354,7 +354,7 @@ dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1",
"gecko_string_cache 0.2.20",
@ -381,7 +381,7 @@ name = "style_traits"
version = "0.0.1"
dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -453,7 +453,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -12,7 +12,7 @@ crate-type = ["staticlib"]
[dependencies]
app_units = "0.2.5"
env_logger = "0.3"
euclid = "0.7.1"
euclid = "0.8.2"
gecko_bindings = {version = "0.0.1", path = "gecko_bindings"}
gecko_string_cache = {path = "string_cache"}
lazy_static = "0.2"

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use euclid::Size2D;
use euclid::size::TypedSize2D;
use gecko_bindings::bindings::RawServoStyleSet;
use num_cpus;
@ -56,7 +55,7 @@ lazy_static! {
impl PerDocumentStyleData {
pub fn new() -> PerDocumentStyleData {
// FIXME(bholley): Real window size.
let window_size: TypedSize2D<ViewportPx, f32> = Size2D::typed(800.0, 600.0);
let window_size: TypedSize2D<f32, ViewportPx> = TypedSize2D::new(800.0, 600.0);
let device = Device::new(MediaType::Screen, window_size);
let (new_anims_sender, new_anims_receiver) = channel();

View file

@ -11,7 +11,7 @@ path = "lib.rs"
[dependencies]
bitflags = "0.7"
compositing = {path = "../../components/compositing"}
euclid = "0.7.1"
euclid = "0.8.2"
gleam = "0.2.8"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
log = "0.3.5"

View file

@ -10,7 +10,7 @@ use compositing::windowing::{MouseWindowEvent, WindowNavigateMsg};
use compositing::windowing::{WindowEvent, WindowMethods};
use euclid::scale_factor::ScaleFactor;
use euclid::size::TypedSize2D;
use euclid::{Size2D, Point2D};
use euclid::{Size2D, Point2D, TypedPoint2D};
#[cfg(target_os = "windows")] use gdi32;
use gleam::gl;
use glutin;
@ -108,12 +108,12 @@ pub struct Window {
}
#[cfg(not(target_os = "windows"))]
fn window_creation_scale_factor() -> ScaleFactor<ScreenPx, DevicePixel, f32> {
fn window_creation_scale_factor() -> ScaleFactor<f32, ScreenPx, DevicePixel> {
ScaleFactor::new(1.0)
}
#[cfg(target_os = "windows")]
fn window_creation_scale_factor() -> ScaleFactor<ScreenPx, DevicePixel, f32> {
fn window_creation_scale_factor() -> ScaleFactor<f32, ScreenPx, DevicePixel> {
let hdc = unsafe { user32::GetDC(::std::ptr::null_mut()) };
let ppi = unsafe { gdi32::GetDeviceCaps(hdc, winapi::wingdi::LOGPIXELSY) };
ScaleFactor::new(ppi as f32 / 96.0)
@ -122,9 +122,9 @@ fn window_creation_scale_factor() -> ScaleFactor<ScreenPx, DevicePixel, f32> {
impl Window {
pub fn new(is_foreground: bool,
window_size: TypedSize2D<ScreenPx, u32>,
window_size: TypedSize2D<u32, ScreenPx>,
parent: Option<glutin::WindowID>) -> Rc<Window> {
let win_size: TypedSize2D<DevicePixel, u32> =
let win_size: TypedSize2D<u32, DevicePixel> =
(window_size.as_f32() * window_creation_scale_factor())
.as_uint().cast().expect("Window size should fit in u32");
let width = win_size.to_untyped().width;
@ -203,7 +203,7 @@ impl Window {
None => {}
Some(listener) => {
(*listener).handle_event_from_nested_event_loop(
WindowEvent::Resize(Size2D::typed(width, height)));
WindowEvent::Resize(TypedSize2D::new(width, height)));
}
}
}
@ -297,7 +297,7 @@ impl Window {
debug!("Keyboard input without virtual key.");
}
Event::Resized(width, height) => {
self.event_queue.borrow_mut().push(WindowEvent::Resize(Size2D::typed(width, height)));
self.event_queue.borrow_mut().push(WindowEvent::Resize(TypedSize2D::new(width, height)));
}
Event::MouseInput(element_state, mouse_button, pos) => {
if mouse_button == MouseButton::Left ||
@ -306,7 +306,7 @@ impl Window {
Some((x, y)) => {
self.mouse_pos.set(Point2D::new(x, y));
self.event_queue.borrow_mut().push(
WindowEvent::MouseWindowMoveEventClass(Point2D::typed(x as f32, y as f32)));
WindowEvent::MouseWindowMoveEventClass(TypedPoint2D::new(x as f32, y as f32)));
self.handle_mouse(mouse_button, element_state, x, y);
}
None => {
@ -319,7 +319,7 @@ impl Window {
Event::MouseMoved(x, y) => {
self.mouse_pos.set(Point2D::new(x, y));
self.event_queue.borrow_mut().push(
WindowEvent::MouseWindowMoveEventClass(Point2D::typed(x as f32, y as f32)));
WindowEvent::MouseWindowMoveEventClass(TypedPoint2D::new(x as f32, y as f32)));
}
Event::MouseWheel(delta, phase) => {
let (dx, dy) = match delta {
@ -334,12 +334,12 @@ impl Window {
let phase = glutin_phase_to_touch_event_type(touch.phase);
let id = TouchId(touch.id as i32);
let point = Point2D::typed(touch.location.0 as f32, touch.location.1 as f32);
let point = TypedPoint2D::new(touch.location.0 as f32, touch.location.1 as f32);
self.event_queue.borrow_mut().push(WindowEvent::Touch(phase, id, point));
}
Event::TouchpadPressure(pressure, stage) => {
let m = self.mouse_pos.get();
let point = Point2D::typed(m.x as f32, m.y as f32);
let point = TypedPoint2D::new(m.x as f32, m.y as f32);
let phase = glutin_pressure_stage_to_touchpad_pressure_phase(stage);
self.event_queue.borrow_mut().push(WindowEvent::TouchpadPressure(point, pressure, phase));
}
@ -371,8 +371,8 @@ impl Window {
dy = 0.0;
}
let mouse_pos = self.mouse_pos.get();
let event = WindowEvent::Scroll(Point2D::typed(dx as f32, dy as f32),
Point2D::typed(mouse_pos.x as i32, mouse_pos.y as i32),
let event = WindowEvent::Scroll(TypedPoint2D::new(dx as f32, dy as f32),
TypedPoint2D::new(mouse_pos.x as i32, mouse_pos.y as i32),
phase);
self.event_queue.borrow_mut().push(event);
}
@ -387,10 +387,11 @@ impl Window {
ElementState::Pressed => {
self.mouse_down_point.set(Point2D::new(x, y));
self.mouse_down_button.set(Some(button));
MouseWindowEvent::MouseDown(MouseButton::Left, Point2D::typed(x as f32, y as f32))
MouseWindowEvent::MouseDown(MouseButton::Left, TypedPoint2D::new(x as f32, y as f32))
}
ElementState::Released => {
let mouse_up_event = MouseWindowEvent::MouseUp(MouseButton::Left, Point2D::typed(x as f32, y as f32));
let mouse_up_event = MouseWindowEvent::MouseUp(MouseButton::Left,
TypedPoint2D::new(x as f32, y as f32));
match self.mouse_down_button.get() {
None => mouse_up_event,
Some(but) if button == but => {
@ -399,7 +400,7 @@ impl Window {
pixel_dist.y * pixel_dist.y) as f64).sqrt();
if pixel_dist < max_pixel_dist {
self.event_queue.borrow_mut().push(WindowEvent::MouseWindowEventClass(mouse_up_event));
MouseWindowEvent::Click(MouseButton::Left, Point2D::typed(x as f32, y as f32))
MouseWindowEvent::Click(MouseButton::Left, TypedPoint2D::new(x as f32, y as f32))
} else {
mouse_up_event
}
@ -671,17 +672,17 @@ fn create_window_proxy(window: &Window) -> Option<glutin::WindowProxy> {
}
impl WindowMethods for Window {
fn framebuffer_size(&self) -> TypedSize2D<DevicePixel, u32> {
fn framebuffer_size(&self) -> TypedSize2D<u32, DevicePixel> {
let scale_factor = self.window.hidpi_factor() as u32;
// TODO(ajeffrey): can this fail?
let (width, height) = self.window.get_inner_size().expect("Failed to get window inner size.");
Size2D::typed(width * scale_factor, height * scale_factor)
TypedSize2D::new(width * scale_factor, height * scale_factor)
}
fn size(&self) -> TypedSize2D<ScreenPx, f32> {
fn size(&self) -> TypedSize2D<f32, ScreenPx> {
// TODO(ajeffrey): can this fail?
let (width, height) = self.window.get_inner_size().expect("Failed to get window inner size.");
Size2D::typed(width as f32, height as f32)
TypedSize2D::new(width as f32, height as f32)
}
fn client_window(&self) -> (Size2D<u32>, Point2D<i32>) {
@ -722,12 +723,12 @@ impl WindowMethods for Window {
}
#[cfg(not(target_os = "windows"))]
fn scale_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32> {
fn scale_factor(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel> {
ScaleFactor::new(self.window.hidpi_factor())
}
#[cfg(target_os = "windows")]
fn scale_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32> {
fn scale_factor(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel> {
let hdc = unsafe { user32::GetDC(::std::ptr::null_mut()) };
let ppi = unsafe { gdi32::GetDeviceCaps(hdc, winapi::wingdi::LOGPIXELSY) };
ScaleFactor::new(ppi as f32 / 96.0)