diff --git a/Cargo.lock b/Cargo.lock index 60f667f6..a8958685 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,6 +44,11 @@ name = "android_glue" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "android_log-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "approx" version = "0.3.2" @@ -111,6 +116,16 @@ name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "calloop" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cast" version = "0.2.3" @@ -131,10 +146,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cgl" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -196,13 +210,13 @@ dependencies = [ [[package]] name = "cocoa" -version = "0.18.5" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -228,29 +242,41 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.6.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "core-graphics" -version = "0.17.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "core-video-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "criterion" version = "0.3.3" @@ -349,6 +375,21 @@ dependencies = [ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "derivative" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "dlib" version = "0.4.2" @@ -380,7 +421,7 @@ dependencies = [ "chrono 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", "clipboard 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "egui 0.1.2", - "glium 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glium 0.27.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", "webbrowser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -409,7 +450,7 @@ version = "0.1.0" dependencies = [ "egui 0.1.2", "egui_glium 0.1.0", - "glium 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glium 0.27.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -444,6 +485,20 @@ name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "getrandom" version = "0.1.14" @@ -459,16 +514,6 @@ name = "gimli" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "gl_generator" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "gl_generator" version = "0.13.1" @@ -480,49 +525,54 @@ dependencies = [ ] [[package]] -name = "gleam" -version = "0.6.19" +name = "gl_generator" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "glium" -version = "0.24.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin 0.24.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "takeable-option 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "glutin" -version = "0.20.1" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cocoa 0.18.5 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cgl 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cocoa 0.20.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_egl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin_emscripten_sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_gles2_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_glx_sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_wgl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -534,6 +584,11 @@ dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "glutin_emscripten_sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "glutin_gles2_sys" version = "0.1.4" @@ -578,6 +633,14 @@ name = "instant" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itertools" version = "0.9.0" @@ -591,6 +654,11 @@ name = "itoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "js-sys" version = "0.3.42" @@ -599,6 +667,15 @@ dependencies = [ "wasm-bindgen 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "khronos_api" version = "3.1.0" @@ -609,6 +686,11 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazycell" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.2.72" @@ -706,6 +788,84 @@ dependencies = [ "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mio" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ndk" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_enum 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ndk-glue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ndk-sys" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "net2" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "nix" version = "0.14.1" @@ -744,6 +904,26 @@ dependencies = [ "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num_enum" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num_enum_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "objc" version = "0.2.7" @@ -806,12 +986,11 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -826,15 +1005,14 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -873,6 +1051,14 @@ dependencies = [ "web-sys 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro-hack" version = "0.5.16" @@ -1085,12 +1271,9 @@ dependencies = [ ] [[package]] -name = "smallvec" -version = "0.6.13" +name = "slab" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "smallvec" @@ -1099,7 +1282,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smithay-client-toolkit" -version = "0.4.6" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "andrew 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1108,9 +1291,8 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-protocols 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-protocols 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1131,6 +1313,11 @@ dependencies = [ "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "takeable-option" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "textwrap" version = "0.11.0" @@ -1157,6 +1344,14 @@ dependencies = [ "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ttf-parser" version = "0.6.2" @@ -1248,42 +1443,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wayland-client" -version = "0.21.13" +version = "0.23.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "calloop 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "downcast-rs 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-scanner 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-scanner 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wayland-commons" -version = "0.21.13" +version = "0.23.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wayland-protocols" -version = "0.21.13" +version = "0.23.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-scanner 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-scanner 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wayland-scanner" -version = "0.21.13" +version = "0.23.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1293,7 +1489,7 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.21.13" +version = "0.23.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dlib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1323,6 +1519,11 @@ name = "widestring" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi" version = "0.3.9" @@ -1332,6 +1533,11 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1352,28 +1558,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winit" -version = "0.19.5" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cocoa 0.18.5 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cocoa 0.20.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-video-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "dispatch 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "instant 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smithay-client-toolkit 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", + "smithay-client-toolkit 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "x11-dl 2.18.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "x11-clipboard" version = "0.3.3" @@ -1419,6 +1640,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ahash 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b1d27b53c9b0be4ee14c0777359f77f39e7d6d127b07a9f60fdd43850f8ec3" "checksum andrew 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" "checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" +"checksum android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" "checksum approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" @@ -1428,22 +1650,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum bstr 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" "checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +"checksum calloop 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7aa2097be53a00de9e8fc349fea6d76221f398f5c4fa550d420669906962d160" "checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" "checksum cc 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "55e7ec0b74fe5897894cbc207092c577e87c52f8a59e8ca8d97ef37551f60a49" +"checksum cgl 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" "checksum chrono 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" "checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" "checksum clipboard 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "25a904646c0340239dcf7c51677b33928bf24fdf424b79a57909c0109075b2e7" "checksum clipboard-win 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3a093d6fed558e5fe24c3dfc85a68bb68f1c824f440d3ba5aca189e2998786b" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cloudabi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -"checksum cocoa 0.18.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1706996401131526e36b3b49f0c4d912639ce110996f3ca144d78946727bce54" +"checksum cocoa 0.20.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0c49e86fc36d5704151f5996b7b3795385f50ce09e3be0f47a0cfde869681cf8" "checksum const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" "checksum const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" -"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" -"checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" +"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +"checksum core-graphics 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +"checksum core-video-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" "checksum criterion 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "70daa7ceec6cf143990669a04c7df13391d55fb27bd4079d252fca774ba244d8" "checksum criterion-plot 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d" "checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" @@ -1452,31 +1676,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" "checksum csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" "checksum csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +"checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +"checksum dispatch 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" "checksum dlib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" "checksum downcast-rs 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" -"checksum gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39a23d5e872a275135d66895d954269cf5e8661d234eb1c2480f4ce0d586acbd" "checksum gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a" -"checksum gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cae10d7c99d0e77b4766e850a60898a17c1abaf01075531f1066f03dc7dc5fc5" -"checksum glium 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "213290166315d0ff3cf48dd76a31f3ad57c934182d3e87aeec890f2747226a21" -"checksum glutin 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6e5cc17ac6cb35704f434faaa5bb5e4254a66f50853976c7e6f00aee09ff1bf2" +"checksum gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +"checksum glium 0.27.0 (registry+https://github.com/rust-lang/crates.io-index)" = "030bb23a12fac7e589b002c5e131e89348df88f91b56e3f3dbc4249527eeebf9" +"checksum glutin 0.24.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a9666c8fd9afd008f6559e2468c35e11aad1d110d525bb3b354e4138ec0e20f" "checksum glutin_egl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772edef3b28b8ad41e4ea202748e65eefe8e5ffd1f4535f1219793dbb20b3d4c" +"checksum glutin_emscripten_sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80de4146df76e8a6c32b03007bc764ff3249dcaeb4f675d68a06caf1bac363f1" "checksum glutin_gles2_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07e853d96bebcb8e53e445225c3009758c6f5960d44f2543245f6f07b567dae0" "checksum glutin_glx_sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "08c243de74d6cf5ea100c788826d2fb9319de315485dd4b310811a663b3809c3" "checksum glutin_wgl_sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a93dba7ee3a0feeac0f437141ff25e71ce2066bcf1a706acab1559ffff94eb6a" "checksum half 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177" "checksum hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" "checksum instant 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485" +"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" "checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +"checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" "checksum js-sys 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)" = "52732a3d3ad72c58ad2dc70624f9c17b46ecd0943b9a4f1ee37c4c18c5d983e2" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f8082297d534141b30c8d39e9b1773713ab50fdbe4ff30f750d063b3bfd701" "checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" "checksum libloading 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2cadb8e769f070c45df05c78c7520eb4cd17061d4ab262e43cfc68b4d00ac71c" @@ -1490,10 +1722,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" "checksum memoffset 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" "checksum miniz_oxide 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" +"checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +"checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" +"checksum ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" +"checksum ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" +"checksum net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)" = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" "checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" "checksum num-integer 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" "checksum num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +"checksum num_enum 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" +"checksum num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" "checksum objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" "checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" "checksum objc_id 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" @@ -1502,13 +1743,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ordered-float 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3741934be594d77de1c8461ebcbbe866f585ea616a9753aa78f2bdc69f0e4579" "checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" "checksum owned_ttf_parser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" +"checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" "checksum parking_lot 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +"checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" "checksum parking_lot_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" "checksum plotters 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0d1685fbe7beba33de0330629da9d955ac75bd54f33d7b79f9a895590124f6bb" +"checksum proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" "checksum proc-macro-hack 0.5.16 (registry+https://github.com/rust-lang/crates.io-index)" = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" @@ -1536,14 +1778,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" "checksum serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)" = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3" "checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" -"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" -"checksum smithay-client-toolkit 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2ccb8c57049b2a34d2cc2b203fa785020ba0129d31920ef0d317430adaf748fa" +"checksum smithay-client-toolkit 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "421c8dc7acf5cb205b88160f8b4cc2c5cfabe210e43b2f80f009f4c1ef910f1d" "checksum stb_truetype 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" "checksum syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b" +"checksum takeable-option 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "36ae8932fcfea38b7d3883ae2ab357b0d57a02caaa18ebb4f5ece08beaec4aa0" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" "checksum tinytemplate 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" "checksum ttf-parser 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" "checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" @@ -1556,19 +1800,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wasm-bindgen-macro 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "eb071268b031a64d92fc6cf691715ca5a40950694d8f683c5bb43db7c730929e" "checksum wasm-bindgen-macro-support 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "cf592c807080719d1ff2f245a687cbadb3ed28b2077ed7084b47aba8b691f2c6" "checksum wasm-bindgen-shared 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "72b6c0220ded549d63860c78c38f3bcc558d1ca3f4efa74942c536ddbbb55e87" -"checksum wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "49963e5f9eeaf637bfcd1b9f0701c99fd5cd05225eb51035550d4272806f2713" -"checksum wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "40c08896768b667e1df195d88a62a53a2d1351a1ed96188be79c196b35bb32ec" -"checksum wayland-protocols 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "4afde2ea2a428eee6d7d2c8584fdbe8b82eee8b6c353e129a434cd6e07f42145" -"checksum wayland-scanner 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3828c568714507315ee425a9529edc4a4aa9901409e373e9e0027e7622b79e" -"checksum wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "520ab0fd578017a0ee2206623ba9ef4afe5e8f23ca7b42f6acfba2f4e66b1628" +"checksum wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" +"checksum wayland-commons 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" +"checksum wayland-protocols 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" +"checksum wayland-scanner 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93b02247366f395b9258054f964fe293ddd019c3237afba9be2ccbe9e1651c3d" +"checksum wayland-sys 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d94e89a86e6d6d7c7c9b19ebf48a03afaac4af6bc22ae570e9a24124b75358f4" "checksum web-sys 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)" = "8be2398f326b7ba09815d0b403095f34dd708579220d099caae89be0b32137b2" "checksum webbrowser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a83a4b8838569b89d2a3e7353995088e3b80c420a1269cd3d92ba8196875fc16" "checksum widestring 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a763e303c0e0f23b0da40888724762e802a8ffefbc22de4127ef42493c2ea68c" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1e96eb4bb472fa43e718e8fa4aef82f86cd9deac9483a1e1529230babdb394a8" +"checksum winit 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ccbf7ddb6627828eace16cacde80fc6bf4dbb3469f88487262a02cf8e7862" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x11-clipboard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89bd49c06c9eb5d98e6ba6536cf64ac9f7ee3a009b2f53996d405b3944f6bcea" "checksum x11-dl 2.18.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" "checksum xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de" diff --git a/egui/README.md b/egui/README.md index 0283d73f..c962a997 100644 --- a/egui/README.md +++ b/egui/README.md @@ -95,6 +95,7 @@ Add extremely quick animations for some things, maybe 2-3 frames. For instance: * [ ] Draw as flame graph * [ ] Draw as hotmap * [ ] Change `width.min(max_width)` to `width.at_most(max_width)` +* [ ] Egui icon ### Names and structure * [ ] Rename things to be more consistent with Dear ImGui diff --git a/egui/src/input.rs b/egui/src/input.rs index a834f0ba..237ee9fe 100644 --- a/egui/src/input.rs +++ b/egui/src/input.rs @@ -37,6 +37,22 @@ pub struct RawInput { pub events: Vec, } +impl RawInput { + /// Helper: move volatile (deltas and events), clone the rest + pub fn take(&mut self) -> RawInput { + RawInput { + mouse_down: self.mouse_down, + mouse_pos: self.mouse_pos, + scroll_delta: std::mem::take(&mut self.scroll_delta), + screen_size: self.screen_size, + pixels_per_point: self.pixels_per_point, + time: self.time, + seconds_since_midnight: self.seconds_since_midnight, + events: std::mem::take(&mut self.events), + } + } +} + /// What egui maintains #[derive(Clone, Debug, Default)] pub struct InputState { diff --git a/egui/src/lib.rs b/egui/src/lib.rs index 95f8e68f..b1e61c42 100644 --- a/egui/src/lib.rs +++ b/egui/src/lib.rs @@ -42,6 +42,7 @@ pub mod widgets; pub use { containers::*, context::Context, + examples::ExampleApp, id::Id, input::*, layers::*, diff --git a/egui_glium/Cargo.toml b/egui_glium/Cargo.toml index 298e75e2..6b444c06 100644 --- a/egui_glium/Cargo.toml +++ b/egui_glium/Cargo.toml @@ -10,6 +10,6 @@ egui = { path = "../egui", features = ["with_serde"] } chrono = { version = "0.4" } clipboard = "0.5" -glium = "0.24" +glium = "0.27" serde_json = "1" webbrowser = "0.5" diff --git a/egui_glium/src/lib.rs b/egui_glium/src/lib.rs index 31f84420..b2d3ffaa 100644 --- a/egui_glium/src/lib.rs +++ b/egui_glium/src/lib.rs @@ -1,6 +1,7 @@ #![deny(warnings)] #![warn(clippy::all)] #![allow(clippy::single_match)] +#![allow(deprecated)] // TODO: remove mod painter; pub use painter::Painter; @@ -8,7 +9,7 @@ pub use painter::Painter; use { clipboard::{ClipboardContext, ClipboardProvider}, egui::*, - glium::glutin::{self, VirtualKeyCode}, + glium::glutin::{self, event::VirtualKeyCode}, }; pub fn init_clipboard() -> Option { @@ -21,88 +22,101 @@ pub fn init_clipboard() -> Option { } } -pub fn input_event( - event: glutin::Event, +pub fn input_to_egui( + event: glutin::event::WindowEvent, clipboard: Option<&mut ClipboardContext>, raw_input: &mut RawInput, running: &mut bool, ) { - use glutin::WindowEvent::*; + use glutin::event::WindowEvent::*; match event { - glutin::Event::WindowEvent { event, .. } => match event { - CloseRequested | Destroyed => *running = false, + CloseRequested | Destroyed => *running = false, - Resized(glutin::dpi::LogicalSize { width, height }) => { - raw_input.screen_size = vec2(width as f32, height as f32); - } - MouseInput { state, .. } => { - raw_input.mouse_down = state == glutin::ElementState::Pressed; - } - CursorMoved { position, .. } => { - raw_input.mouse_pos = Some(pos2(position.x as f32, position.y as f32)); - } - CursorLeft { .. } => { - raw_input.mouse_pos = None; - } - ReceivedCharacter(ch) => { - if !should_ignore_char(ch) { - if ch == '\r' { - raw_input.events.push(Event::Text("\n".to_owned())); - } else { - raw_input.events.push(Event::Text(ch.to_string())); - } + Resized(physical_size) => { + raw_input.screen_size = + egui::vec2(physical_size.width as f32, physical_size.height as f32) + / raw_input.pixels_per_point.unwrap(); + } + + ScaleFactorChanged { + scale_factor, + new_inner_size, + } => { + raw_input.pixels_per_point = Some(scale_factor as f32); + raw_input.screen_size = + egui::vec2(new_inner_size.width as f32, new_inner_size.height as f32) + / (scale_factor as f32); + } + + MouseInput { state, .. } => { + raw_input.mouse_down = state == glutin::event::ElementState::Pressed; + } + CursorMoved { position, .. } => { + raw_input.mouse_pos = Some(pos2( + position.x as f32 / raw_input.pixels_per_point.unwrap(), + position.y as f32 / raw_input.pixels_per_point.unwrap(), + )); + } + CursorLeft { .. } => { + raw_input.mouse_pos = None; + } + ReceivedCharacter(ch) => { + if !should_ignore_char(ch) { + if ch == '\r' { + raw_input.events.push(Event::Text("\n".to_owned())); + } else { + raw_input.events.push(Event::Text(ch.to_string())); } } - KeyboardInput { input, .. } => { - if let Some(virtual_keycode) = input.virtual_keycode { - // TODO: If mac - if input.modifiers.logo && virtual_keycode == VirtualKeyCode::Q { - *running = false; - } + } + KeyboardInput { input, .. } => { + if let Some(virtual_keycode) = input.virtual_keycode { + // TODO: If mac + if input.modifiers.logo() && virtual_keycode == VirtualKeyCode::Q { + *running = false; + } - match virtual_keycode { - VirtualKeyCode::Paste => { - if let Some(clipboard) = clipboard { - match clipboard.get_contents() { - Ok(contents) => { - raw_input.events.push(Event::Text(contents)); - } - Err(err) => { - eprintln!("Paste error: {}", err); - } + match virtual_keycode { + VirtualKeyCode::Paste => { + if let Some(clipboard) = clipboard { + match clipboard.get_contents() { + Ok(contents) => { + raw_input.events.push(Event::Text(contents)); + } + Err(err) => { + eprintln!("Paste error: {}", err); } } } - VirtualKeyCode::Copy => raw_input.events.push(Event::Copy), - VirtualKeyCode::Cut => raw_input.events.push(Event::Cut), - _ => { - if let Some(key) = translate_virtual_key_code(virtual_keycode) { - raw_input.events.push(Event::Key { - key, - pressed: input.state == glutin::ElementState::Pressed, - }); - } + } + VirtualKeyCode::Copy => raw_input.events.push(Event::Copy), + VirtualKeyCode::Cut => raw_input.events.push(Event::Cut), + _ => { + if let Some(key) = translate_virtual_key_code(virtual_keycode) { + raw_input.events.push(Event::Key { + key, + pressed: input.state == glutin::event::ElementState::Pressed, + }); } } } } - MouseWheel { delta, .. } => { - match delta { - glutin::MouseScrollDelta::LineDelta(x, y) => { - raw_input.scroll_delta = vec2(x, y) * 24.0; - } - glutin::MouseScrollDelta::PixelDelta(delta) => { - // Actually point delta - raw_input.scroll_delta = vec2(delta.x as f32, delta.y as f32); - } + } + MouseWheel { delta, .. } => { + match delta { + glutin::event::MouseScrollDelta::LineDelta(x, y) => { + let line_height = 24.0; // TODO + raw_input.scroll_delta = vec2(x, y) * line_height; + } + glutin::event::MouseScrollDelta::PixelDelta(delta) => { + // Actually point delta + raw_input.scroll_delta = vec2(delta.x as f32, delta.y as f32); } } - // TODO: HiDpiFactorChanged - _ => { - // dbg!(event); - } - }, - _ => (), + } + _ => { + // dbg!(event); + } } } @@ -126,7 +140,7 @@ fn should_ignore_char(chr: char) -> bool { } } -pub fn translate_virtual_key_code(key: glutin::VirtualKeyCode) -> Option { +pub fn translate_virtual_key_code(key: VirtualKeyCode) -> Option { use VirtualKeyCode::*; Some(match key { @@ -157,15 +171,15 @@ pub fn translate_virtual_key_code(key: glutin::VirtualKeyCode) -> Option glutin::MouseCursor { +pub fn translate_cursor(cursor_icon: egui::CursorIcon) -> glutin::window::CursorIcon { match cursor_icon { - CursorIcon::Default => glutin::MouseCursor::Default, - CursorIcon::PointingHand => glutin::MouseCursor::Hand, - CursorIcon::ResizeHorizontal => glutin::MouseCursor::EwResize, - CursorIcon::ResizeNeSw => glutin::MouseCursor::NeswResize, - CursorIcon::ResizeNwSe => glutin::MouseCursor::NwseResize, - CursorIcon::ResizeVertical => glutin::MouseCursor::NsResize, - CursorIcon::Text => glutin::MouseCursor::Text, + CursorIcon::Default => glutin::window::CursorIcon::Default, + CursorIcon::PointingHand => glutin::window::CursorIcon::Hand, + CursorIcon::ResizeHorizontal => glutin::window::CursorIcon::EwResize, + CursorIcon::ResizeNeSw => glutin::window::CursorIcon::NeswResize, + CursorIcon::ResizeNwSe => glutin::window::CursorIcon::NwseResize, + CursorIcon::ResizeVertical => glutin::window::CursorIcon::NsResize, + CursorIcon::Text => glutin::window::CursorIcon::Text, } } @@ -190,7 +204,8 @@ pub fn handle_output( display .gl_window() - .set_cursor(translate_cursor(output.cursor_icon)); + .window() + .set_cursor_icon(translate_cursor(output.cursor_icon)); } // ---------------------------------------------------------------------------- diff --git a/egui_glium/src/painter.rs b/egui_glium/src/painter.rs index 349acaf5..bcb3d457 100644 --- a/egui_glium/src/painter.rs +++ b/egui_glium/src/painter.rs @@ -233,7 +233,7 @@ impl Painter { let index_buffer = glium::IndexBuffer::new(display, PrimitiveType::TrianglesList, &indices).unwrap(); - let pixels_per_point = display.gl_window().get_hidpi_factor() as f32; + let pixels_per_point = display.gl_window().window().scale_factor() as f32; let (width_pixels, height_pixels) = display.get_framebuffer_dimensions(); let width_points = width_pixels as f32 / pixels_per_point; let height_points = height_pixels as f32 / pixels_per_point; diff --git a/egui_web/src/lib.rs b/egui_web/src/lib.rs index 1d2dc962..3c763497 100644 --- a/egui_web/src/lib.rs +++ b/egui_web/src/lib.rs @@ -127,6 +127,7 @@ impl Backend { // ---------------------------------------------------------------------------- +// TODO: Just use RawInput? /// Data gathered between frames. /// Is translated to `egui::RawInput` at the start of each frame. #[derive(Default)] diff --git a/example_glium/Cargo.toml b/example_glium/Cargo.toml index 5d89a275..127518e5 100644 --- a/example_glium/Cargo.toml +++ b/example_glium/Cargo.toml @@ -8,7 +8,6 @@ edition = "2018" [dependencies] egui = { path = "../egui", features = ["with_serde"] } egui_glium = { path = "../egui_glium" } +glium = "0.27" serde = { version = "1", features = ["derive"] } serde_json = "1" - -glium = "0.24" diff --git a/example_glium/src/main.rs b/example_glium/src/main.rs index a74d3436..93267111 100644 --- a/example_glium/src/main.rs +++ b/example_glium/src/main.rs @@ -1,11 +1,12 @@ #![deny(warnings)] #![warn(clippy::all)] -use std::time::{Duration, Instant}; +use std::time::Instant; use { - egui::{examples::ExampleApp, paint::TextStyle, widgets::*, *}, + egui::{examples::ExampleApp, pos2, vec2, Pos2, Vec2}, glium::glutin, + glutin::dpi::PhysicalPosition, }; #[derive(Default, serde::Deserialize, serde::Serialize)] @@ -40,21 +41,30 @@ fn main() { // TODO: combine let memory_path = "egui.json"; let settings_json_path: &str = "window.json"; - let app_json_path: &str = "example_app.json"; + let app_json_path: &str = "egui_example_app.json"; - let mut example_app: ExampleApp = read_json(app_json_path).unwrap_or_default(); + let mut egui_example_app: ExampleApp = read_json(app_json_path).unwrap_or_default(); let mut window_settings: Window = read_json(settings_json_path).unwrap_or_default(); - let mut events_loop = glutin::EventsLoop::new(); - let window = glutin::WindowBuilder::new().with_title("Egui example"); - let context = glutin::ContextBuilder::new(); - let display = glium::Display::new(window, context, &events_loop).unwrap(); + let event_loop = glutin::event_loop::EventLoop::new(); + let window = glutin::window::WindowBuilder::new() + .with_decorations(true) + .with_resizable(true) + .with_title("Egui glium example") + .with_transparent(false); + let context = glutin::ContextBuilder::new() + .with_depth_buffer(0) + .with_srgb(true) + .with_stencil_buffer(0) + .with_vsync(true); + let display = glium::Display::new(window, context, &event_loop).unwrap(); let size = window_settings.size.unwrap_or_else(|| vec2(1024.0, 800.0)); display .gl_window() - .set_inner_size(glutin::dpi::LogicalSize { + .window() + .set_inner_size(glutin::dpi::PhysicalSize { width: size.x as f64, height: size.y as f64, }); @@ -62,15 +72,14 @@ fn main() { if let Some(pos) = window_settings.pos { display .gl_window() - .set_position((pos.x as f64, pos.y as f64).into()); + .window() + .set_outer_position(PhysicalPosition::new(pos.x as f64, pos.y as f64)); } - let pixels_per_point = display.gl_window().get_hidpi_factor() as f32; + let pixels_per_point = display.gl_window().window().scale_factor() as f32; - let mut ctx = profile("initializing emilib", Context::new); - let mut painter = profile("initializing painter", || { - egui_glium::Painter::new(&display) - }); + let mut ctx = egui::Context::new(); + let mut painter = egui_glium::Painter::new(&display); let mut raw_input = egui::RawInput { screen_size: { @@ -83,97 +92,96 @@ fn main() { // used to keep track of time for animations let start_time = Instant::now(); - let mut running = true; - let mut frame_start = Instant::now(); let mut frame_times = egui::MovementTracker::new(1000, 1.0); let mut clipboard = egui_glium::init_clipboard(); egui_glium::read_memory(&ctx, memory_path); - while running { - { - // Keep smooth frame rate because vsync doesn't work on mac - let frame_duration = frame_start.elapsed(); - if frame_duration < Duration::from_millis(16) { - std::thread::sleep(Duration::from_millis(16) - frame_duration); + event_loop.run(move |event, _, control_flow| { + *control_flow = glutin::event_loop::ControlFlow::Wait; + + match event { + glutin::event::Event::RedrawRequested(_) => { + let egui_start = Instant::now(); + raw_input.time = start_time.elapsed().as_nanos() as f64 * 1e-9; + raw_input.seconds_since_midnight = Some(egui_glium::local_time_of_day()); + + let mut ui = ctx.begin_frame(raw_input.take()); + egui_example_app.ui(&mut ui, ""); + { + use egui::*; + let mut ui = ui.centered_column(ui.available().width().min(480.0)); + ui.set_layout(Layout::vertical(Align::Min)); + ui.add(label!("Egui running inside of Glium").text_style(TextStyle::Heading)); + if ui.add(Button::new("Quit")).clicked { + *control_flow = glutin::event_loop::ControlFlow::Exit; + } + + ui.add( + label!( + "CPU usage: {:.2} ms (excludes painting)", + 1e3 * frame_times.average().unwrap_or_default() + ) + .text_style(TextStyle::Monospace), + ); + ui.add( + label!( + "FPS: {:.1}", + 1.0 / frame_times.mean_time_interval().unwrap_or_default() + ) + .text_style(TextStyle::Monospace), + ); + } + + let (output, paint_jobs) = ctx.end_frame(); + + frame_times.add( + raw_input.time, + (Instant::now() - egui_start).as_secs_f64() as f32, + ); + + painter.paint_jobs(&display, paint_jobs, ctx.texture()); + egui_glium::handle_output(output, &display, clipboard.as_mut()); + + display.gl_window().window().request_redraw(); // TODO: only if needed (new events etc) } - frame_start = Instant::now(); + glutin::event::Event::WindowEvent { event, .. } => { + let mut running = true; + egui_glium::input_to_egui(event, clipboard.as_mut(), &mut raw_input, &mut running); + if !running { + *control_flow = glutin::event_loop::ControlFlow::Exit; + } + } + glutin::event::Event::LoopDestroyed => { + // Save state to disk: + window_settings.pos = display + .gl_window() + .window() + .outer_position() + .ok() + .map(|p| pos2(p.x as f32, p.y as f32)); + window_settings.size = Some(vec2( + display.gl_window().window().inner_size().width as f32, + display.gl_window().window().inner_size().height as f32, + )); + + if let Err(err) = egui_glium::write_memory(&ctx, memory_path) { + eprintln!("ERROR: Failed to save egui state: {}", err); + } + + serde_json::to_writer_pretty( + std::fs::File::create(app_json_path).unwrap(), + &egui_example_app, + ) + .unwrap(); + + serde_json::to_writer_pretty( + std::fs::File::create(settings_json_path).unwrap(), + &window_settings, + ) + .unwrap(); + } + _ => (), } - - { - raw_input.time = start_time.elapsed().as_nanos() as f64 * 1e-9; - raw_input.seconds_since_midnight = Some(egui_glium::local_time_of_day()); - raw_input.scroll_delta = vec2(0.0, 0.0); - raw_input.events.clear(); - events_loop.poll_events(|event| { - egui_glium::input_event(event, clipboard.as_mut(), &mut raw_input, &mut running) - }); - } - - let egui_start = Instant::now(); - let mut ui = ctx.begin_frame(raw_input.clone()); // TODO: avoid clone - example_app.ui(&mut ui, ""); - let mut ui = ui.centered_column(ui.available().width().min(480.0)); - ui.set_layout(Layout::vertical(Align::Min)); - ui.add(label!("Egui running inside of Glium").text_style(TextStyle::Heading)); - if ui.add(Button::new("Quit")).clicked { - running = false; - } - - ui.add( - label!( - "CPU usage: {:.2} ms (excludes painting)", - 1e3 * frame_times.average().unwrap_or_default() - ) - .text_style(TextStyle::Monospace), - ); - ui.add( - label!( - "FPS: {:.1}", - 1.0 / frame_times.mean_time_interval().unwrap_or_default() - ) - .text_style(TextStyle::Monospace), - ); - - let (output, paint_jobs) = ctx.end_frame(); - - frame_times.add( - raw_input.time, - (Instant::now() - egui_start).as_secs_f64() as f32, - ); - - painter.paint_jobs(&display, paint_jobs, ctx.texture()); - egui_glium::handle_output(output, &display, clipboard.as_mut()); - } - - // Save state to disk: - window_settings.pos = display - .gl_window() - .get_position() - .map(|p| pos2(p.x as f32, p.y as f32)); - window_settings.size = display - .gl_window() - .get_inner_size() - .map(|size| vec2(size.width as f32, size.height as f32)); - - if let Err(err) = egui_glium::write_memory(&ctx, memory_path) { - eprintln!("ERROR: Failed to save egui state: {}", err); - } - - serde_json::to_writer_pretty(std::fs::File::create(app_json_path).unwrap(), &example_app) - .unwrap(); - - serde_json::to_writer_pretty( - std::fs::File::create(settings_json_path).unwrap(), - &window_settings, - ) - .unwrap(); -} - -fn profile(name: &str, action: impl FnOnce() -> R) -> R { - let start = Instant::now(); - let r = action(); - let elapsed = start.elapsed(); - eprintln!("{}: {} ms", name, elapsed.as_millis()); - r + }); }