* key_handler: add a callback for key events
Add a callback for key events. This includes complete events such as
Shift, not just text events.
A default handler is provided for backwards compatibility.
Signed-off-by: Sean Cross <sean@xobs.io>
* fix: EventQueue::dispatch blocks until some events are available (#265)
use non blocking alternative as documented in EventQueue
Co-authored-by: vemoo <berublan@gmail.com>
* Added not-yet-working draft implementation of proper X11 support for reading correct typed characters
* Made shift work for capital letters with X11, but compose key is still broken
* Compose key and numpad now work correctly in X11
* XIM and XIC are now freed when a window destructor runs
* Ran cargo fmt on x11.rs
* Removed commented-out empty-string
Closes#200
* KeyHandler: Updated return type to Vec on get_keys
* Window: Updated Window structs get_keys return type across all currently supported OS's
* Updated return type of get_keys of Window, and updated the docs for all related functions
* Docs: Corrected incorrect variable ident in docs post update
* Resolved error resulting from get_keys return type change
* Formatting: Ran cargo fmt
Co-authored-by: Zij-IT <elijah.reed@hartvigsen.xyz>
The `SelectObject()` call accepts a `HGDIOBJ` which is typecast to a
`std::os::raw::c_void` when building using libstd, and is its own thing
when building with std disabled:
winapi/0.3.9/src/winapi/lib.rs.html:
#[cfg(feature = "std")]
pub use std::os::raw::c_void;
#[cfg(not(feature = "std"))]
pub enum c_void {}
This patch uses `HGDIOBJ` as the typecast as necessary.
Signed-off-by: Sean Cross <sean@xobs.io>
The xkbcommon_sys crate seems to have been updated today, and now the minifb project won't compile.
We can fix this by updating XKB_KEYMAP_FORMAT_TEXT_v1 to XKB_KEYMAP_FORMAT_TEXT_V1.
* WindowOptions: add none flag
* windows: support none flag
Signed-off-by: rupansh <rupanshsekar@hotmail.com>
* os: implement none flags for other operating systems
redox, posix
not applicable on OSX
* WindowOptions: document none option
Signed-off-by: rupansh-arch <rupanshsekar@hotmail.com>
* change pointer type to plattform specific type as the cast is otherwise broken on ARM (and maybe other) platform.
* shrink the line changed in previous commit to make linter happy
Co-authored-by: Peter Hasse <peter.hasse@fokus.fraunhofer.de>
* Added always on top functionality for Windows
* Added always on top functionality for Windows
* Made topmost method in Window public so that the topmost attribute can be defined either at or after creation time as opposed to just at creation time. This allows the topmost functionality to be toggled during the programs runtime as opposed to only at window creation
Most of this was taken from #159. This does not include the API addition of adding a topmost call on Window.
That should probably be in another PR. And the doc fixes as well.
Used implementation from https://github.com/emoon/rust_minifb/pull/159#discussion_r401374050
Co-authored-by: phillvancejr <phillipvancejr@gmail.com>
Co-authored-by: Daniel Collin <daniel@collin.com>
Co-authored-by: phillvancejr <phillipvancejr@gmail.com>
Co-authored-by: Daniel Collin <daniel@collin.com>