mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[input] Add broadcast event for application window changes
This is the first step in the long-sought goal of allowing the window size to change, but is required for passing on getting window position and size information (though size is in viddef, it makes sense to pass both together).
This commit is contained in:
parent
f5b8fb0220
commit
52c5f0545b
2 changed files with 9 additions and 0 deletions
|
@ -33,6 +33,11 @@
|
|||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
typedef struct {
|
||||
int xpos, ypos;
|
||||
int xlen, ylen;
|
||||
} IE_app_window_event_t;
|
||||
|
||||
typedef enum {
|
||||
ies_shift = 1,
|
||||
ies_capslock = 2,
|
||||
|
@ -84,6 +89,7 @@ typedef enum {
|
|||
ie_none,
|
||||
ie_gain_focus,
|
||||
ie_lose_focus,
|
||||
ie_app_window,
|
||||
ie_add_device,
|
||||
ie_remove_device,
|
||||
ie_mouse,
|
||||
|
@ -97,12 +103,14 @@ typedef enum {
|
|||
#define IE_broadcast_events (0 \
|
||||
| (1 << ie_add_device) \
|
||||
| (1 << ie_remove_device) \
|
||||
| (1 << ie_app_window) \
|
||||
)
|
||||
|
||||
typedef struct IE_event_s {
|
||||
IE_event_type type;
|
||||
uint64_t when;
|
||||
union {
|
||||
IE_app_window_event_t app_window;
|
||||
IE_mouse_event_t mouse;
|
||||
IE_key_event_t key;
|
||||
IE_axis_event_t axis;
|
||||
|
|
|
@ -543,6 +543,7 @@ qwaq_input_event_handler (const IE_event_t *ie_event, void *_res)
|
|||
case ie_none:
|
||||
case ie_gain_focus:
|
||||
case ie_lose_focus:
|
||||
case ie_app_window:
|
||||
return 0;
|
||||
case ie_add_device:
|
||||
event.what = qe_dev_add;
|
||||
|
|
Loading…
Reference in a new issue