1
0
Fork 0
Commit graph

338 commits

Author SHA1 Message Date
Micah Johnston cd0d5215d0 remove unused code from windows backend 2020-12-12 17:06:50 -06:00
Micah Johnston 7ff31ea6f7 ensure title lives long enough to pass it to CreateWindowEx; also validate it as a CString 2020-12-08 23:16:34 -06:00
Micah Johnston 30c34db12e set default arrow cursor on window class rather than null 2020-12-07 01:16:08 -06:00
Micah Johnston 2faea075b1 call on_frame on WM_TIMER events 2020-12-07 01:03:55 -06:00
Micah Johnston 365cc8c018 allow DefWindowProc to be called in the case of WM_PAINT 2020-12-07 01:03:55 -06:00
Micah Johnston ab0cb10a22 call DefWindowProc in the case of WM_SYSKEYDOWN. makes alt-f4 work.
if we call DefWindowProc for non-system events, pressing alt or f10 puts
focus on the (nonexistent) dropdown menu until the next click or
keystroke, so we only call it in the case of WM_SYSKEYDOWN.
2020-12-07 01:03:41 -06:00
micah 08e56bd5ae remove unnecessary dependencies (log, libc) 2020-12-05 18:01:33 -06:00
william light db1725a33b
Merge pull request #67 from greatest-ape/macos-flags-changed
macOS: handle changed flags
2020-12-05 02:01:23 +01:00
Joakim Frostegård 19b6a2f701 macOS: handle changed flags
This enables catching pressed modifier keys with no other
keys pressed
2020-12-05 01:48:26 +01:00
william light a13b3af3d1
Merge pull request #66 from greatest-ape/macos-dpi
macOS: always use scale=1.0 with WindowScalePolicy::SystemScaleFactor
2020-12-04 23:43:52 +01:00
Joakim Frostegård edbc26aa4a macOS: always use scale=1.0 with WindowScalePolicy::SystemScaleFactor 2020-12-04 23:38:17 +01:00
william light 67cdd7bdfc
Merge pull request #65 from BillyDM/master
implement try_send_message for Linux
2020-12-04 22:41:57 +01:00
Billy Messenger f696c7d14d implement try_send_message for Linux 2020-12-04 15:29:55 -06:00
william light 72d55c9dba
Split WindowHandle and add try_send_message method (#61)
* Add WindowHandle::try_send_message, implement it on macOS

* Add Send constraint to WindowHandler::Message

* Assert at compile-time that WindowHandle is Sync

* macOS: remove runtime timer, use frame timer instead

* Use wait-free spsc message chan; split off AppRunner from WindowHandle

* Add comment to WindowState static assertions code

* Clean up

* Split off AppRunner from WindowHandle on Windows and Linux

* README: add messages milestone row, add check mark to macOS column

* macOS: add and use MESSAGE_QUEUE_LEN constant

* macOS: clean up
2020-12-04 21:49:05 +01:00
Joakim Frostegård 1aebdfb331 Move MESSAGE_QUEUE_LEN const from macOS module to crate root 2020-12-04 21:46:55 +01:00
Joakim Frostegård dd1955285e macOS: clean up 2020-12-04 20:03:55 +01:00
Joakim Frostegård 2273a2c07c macOS: add and use MESSAGE_QUEUE_LEN constant 2020-12-04 20:03:55 +01:00
Joakim Frostegård f6593d0371 README: add messages milestone row, add check mark to macOS column 2020-12-04 20:03:55 +01:00
Joakim Frostegård 35a03aff17 Split off AppRunner from WindowHandle on Windows and Linux 2020-12-04 20:03:55 +01:00
Joakim Frostegård c1d04b978e Clean up 2020-12-04 20:03:55 +01:00
Joakim Frostegård 60244c3888 Add comment to WindowState static assertions code 2020-12-04 20:03:55 +01:00
Joakim Frostegård 1c81921688 Use wait-free spsc message chan; split off AppRunner from WindowHandle 2020-12-04 20:03:55 +01:00
Joakim Frostegård 99fdbff4e2 macOS: remove runtime timer, use frame timer instead 2020-12-04 20:03:55 +01:00
Joakim Frostegård 1ea32123ed Assert at compile-time that WindowHandle is Sync 2020-12-04 20:03:55 +01:00
Joakim Frostegård b79a7fbcf5 Add Send constraint to WindowHandler::Message 2020-12-04 20:03:55 +01:00
Joakim Frostegård 35a9841b29 Add WindowHandle::try_send_message, implement it on macOS 2020-12-04 20:03:55 +01:00
glowcoil 6f81e28d90
Merge pull request #63 from glowcoil/remove-x11-prints
remove print on unhandled event (produces too much spam)
2020-12-03 23:08:06 -06:00
Micah Johnston 0cbcf989df remove print on unhandled event (produces too much spam) 2020-12-03 23:05:51 -06:00
Micah Johnston 3f34a70fa8 windows mouse events 2020-11-30 10:10:40 -06:00
glowcoil 3db2bdee17
Merge pull request #57 from greatest-ape/windows-keyboard
Add windows keyboard event support with druid code
2020-11-28 18:23:02 -06:00
glowcoil 307e82c7b2
Merge pull request #59 from greatest-ape/unify-platforms
Unify platform APIs with wrapper Window and WindowHandle
2020-11-28 11:58:15 -06:00
Joakim Frostegård dd87afefd9 api unification: impl HasRawWindowHandle on wrapper Window 2020-11-27 00:34:09 +01:00
Joakim Frostegård 1ddd6fa47e api unification: return shared WindowHandle in platform code 2020-11-24 20:41:55 +01:00
Joakim Frostegård a8c7c707d2 unify platforms: simplify imports 2020-11-23 22:26:27 +01:00
Joakim Frostegård 6450bff368 api unification: add Linux support 2020-11-23 22:24:25 +01:00
Joakim Frostegård 185bd62447 api unification: make cross-platform Window hold a reference 2020-11-23 22:09:33 +01:00
Joakim Frostegård f9226c366e platform api unification: support Windows 2020-11-23 20:26:17 +01:00
Joakim Frostegård 4ba64d8f86 Add cross-platform Window wrapper, currently only macOS support 2020-11-23 20:05:36 +01:00
Joakim Frostegård ff09c3a256
macOS: add timer triggering WindowHandler::on_frame (#58)
* macOS: add simple NSTimer that triggers WindowHandler::on_frame

* macOS: invalidate frame timer when releasing view

* macOS: clean up
2020-11-23 14:38:32 +01:00
Joakim Frostegård 06578c64c9 README: mark basic event handling as working on Windows 2020-11-23 08:44:11 +01:00
Joakim Frostegård bdd0f8f562 Add windows keyboard event support with code from druid 2020-11-23 08:43:09 +01:00
william light 726632624c
README.md: we do in fact have parent window support on Linux 2020-11-16 22:08:16 +01:00
william light 808094db22
Merge pull request #56 from greatest-ape/macos-keyboard
Add support for macOS and X11 key events with code from druid
2020-11-14 18:03:09 +01:00
Joakim Frostegård 71b27cf473 README: fix error in milestone checkmarks 2020-11-14 17:46:50 +01:00
Joakim Frostegård d36f289663 README: mark events and parenting as solved for macOS and Linux 2020-11-14 17:46:50 +01:00
Joakim Frostegård f8c994a23c README: add Linux installation prerequisites 2020-11-14 17:46:50 +01:00
Joakim Frostegård dd3f85b347 Cargo.toml: set default-features = false for keyboard-types 2020-11-14 17:46:12 +01:00
Joakim Frostegård 0a6a0bdffd Use keyboard_types::KeyboardEvent directly instead of wrapping it 2020-11-14 17:46:12 +01:00
Joakim Frostegård 546b0d6eae Use keyboard-types types directly instead of druid wrappers 2020-11-14 17:46:12 +01:00
Joakim Frostegård 86b2aff624 Attempt to fix linux build 2020-11-14 17:46:12 +01:00