diff options
author | Benji Dial <benji6283@gmail.com> | 2021-03-04 19:11:42 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-03-04 19:11:42 -0500 |
commit | 406af09ade55553e2b064506c3ba3c89bd965d73 (patch) | |
tree | dd6da93bc329d6b1097aa1afcde2af19491dfc8e /src/shared | |
parent | 86af7f631080bc4b45846bd7f382c4cedcbec2b4 (diff) | |
download | portland-os-406af09ade55553e2b064506c3ba3c89bd965d73.tar.gz |
start of a c++ widget toolkit, c++ runtime
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/include/winact.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/shared/include/winact.h b/src/shared/include/winact.h index 8b32d00..9486efc 100644 --- a/src/shared/include/winact.h +++ b/src/shared/include/winact.h @@ -3,6 +3,12 @@ #include <keypack.h> +struct mouse_packet { + uint16_t y; + uint16_t x; + enum mouse_button {LEFT, RIGHT, MIDDLE} which; +}; + struct window_action { enum { NOT_READY, @@ -15,14 +21,7 @@ struct window_action { } action_type; union { struct key_packet as_key; - struct { - //0, 0 is upper-left-most pixel not counting border - //packets are also sent for the border pixels, - // so this may be a negative value in those cases - int16_t y; - int16_t x; - enum mouse_button {LEFT, RIGHT, MIDDLE} which; - } as_mouse; + struct mouse_packet as_mouse; }; } __attribute__ ((__packed__)); |