Expand description
This crate uses glfw-passthrough
crate as a window backend for egui.
Re-exports§
pub use glfw;
Structs§
- Glfw
Backend - This is the window backend for egui using
glfw
You can configure most of it at startup usingGlfwConfig
. - Glfw
Config - The configuration struct for Glfw Backend creation
Functions§
- egui_
to_ glfw_ cursor - This converts egui’s cursor icon into glfw’s cursor which can be set by glfw. we can get some sample cursor images and use them in place of missing icons (like diagonal resizing cursor)
- emscripten_
cancel_ ⚠main_ loop - emscripten_
get_ ⚠device_ pixel_ ratio - emscripten_
get_ ⚠element_ css_ size - emscripten_
run_ ⚠script_ int - emscripten_
set_ ⚠element_ css_ size - emscripten_
set_ ⚠main_ loop - glfw_
to_ egui_ action - will return true if pressed, false if released and None if repeat
this allows us to use
unwrap_or_default
to get pressed as false when we get a key repeat event - glfw_
to_ egui_ modifers - glfw_
to_ egui_ pointer_ button - layout_
based_ glfw_ to_ egui_ key - glfw separates keys into two categories.
- layout_
independent_ glfw_ to_ egui_ key - a function to get the matching egui key event for a given glfw key. egui does not support all the keys provided here. This just matches the enum to map to the relevant egui key.
- set_
main_ loop_ callback
Type Aliases§
- Glfw
Callback - Signature of Glfw callback function inside
GlfwConfig
- Window
Callback - This is the signature for window callback inside new function of
GlfwBackend