From 406af09ade55553e2b064506c3ba3c89bd965d73 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 4 Mar 2021 19:11:42 -0500 Subject: start of a c++ widget toolkit, c++ runtime --- src/shared/include/winact.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/shared/include') 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 +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__)); -- cgit v1.2.3