PatchworkOS
Loading...
Searching...
No Matches

Desktop Window Manager Events. More...

Data Structures

struct  event_screen_info_t
 Screen Info event. More...
 
struct  event_surface_new_t
 Surface New event. More...
 
struct  event_kbd_t
 Keyboard event. More...
 
struct  event_mouse_t
 Mouse event. More...
 
struct  event_report_t
 Report event. More...
 
struct  gevent_attach_t
 Global Attach event. More...
 
struct  gevent_detach_t
 Global Detach event. More...
 
struct  levent_redraw_t
 Library Redraw event. More...
 
struct  levent_action_t
 Library Action event. More...
 
struct  levent_force_action_t
 Library Force Action event. More...
 
struct  event_t
 Event structure. More...
 

Macros

#define EVENT_SCREEN_INFO   0
 
#define EVENT_SURFACE_NEW   1
 
#define EVENT_KBD   2
 
#define EVENT_MOUSE   3
 
#define EVENT_TIMER   4
 
#define EVENT_CURSOR_ENTER   5
 
#define EVENT_CURSOR_LEAVE   6
 
#define EVENT_REPORT   7
 
#define GEVENT_ATTACH   128
 
#define GEVENT_DETACH   129
 
#define GEVENT_REPORT   130
 
#define GEVENT_KBD   131
 
#define GEVENT_MOUSE   132
 
#define DWM_MAX_EVENT   256
 
#define LEVENT_INIT   256
 
#define LEVENT_DEINIT   257
 
#define LEVENT_REDRAW   258
 
#define LEVENT_ACTION   259
 
#define LEVENT_QUIT   260
 
#define LEVENT_FORCE_ACTION   261
 
#define LEVENT_INTERNAL_WAKE   512
 
#define UEVENT_START   1024
 
#define UEVENT_END   65535
 
#define EVENT_MAX_DATA   128
 Maximum size of event data.
 

Typedefs

typedef uint16_t event_type_t
 Event type.
 
typedef uint64_t event_bitmask_t[4]
 Event bitmask type.
 
typedef event_mouse_t event_cursor_enter_t
 Cursor Enter event.
 
typedef event_mouse_t event_cursor_leave_t
 Cursor Leave event.
 
typedef event_report_t gevent_report_t
 Global Report event.
 
typedef event_kbd_t gevent_kbd_t
 Global Keyboard event.
 
typedef event_mouse_t gevent_mouse_t
 Global Mouse event.
 

Enumerations

enum  report_flags_t {
  REPORT_NONE = 0 ,
  REPORT_RECT = 1 << 0 ,
  REPORT_IS_VISIBLE = 1 << 1 ,
  REPORT_IS_FOCUSED = 1 << 2 ,
  REPORT_NAME = 1 << 3
}
 Report flags. More...
 
enum  action_type_t {
  ACTION_NONE = 0 ,
  ACTION_RELEASE ,
  ACTION_PRESS ,
  ACTION_CANCEL
}
 Action type. More...
 

Detailed Description

Desktop Window Manager Events.

Macro Definition Documentation

◆ DWM_MAX_EVENT

#define DWM_MAX_EVENT   256

Definition at line 97 of file event.h.

◆ EVENT_CURSOR_ENTER

#define EVENT_CURSOR_ENTER   5

Definition at line 87 of file event.h.

◆ EVENT_CURSOR_LEAVE

#define EVENT_CURSOR_LEAVE   6

Definition at line 88 of file event.h.

◆ EVENT_KBD

#define EVENT_KBD   2

Definition at line 84 of file event.h.

◆ EVENT_MAX_DATA

#define EVENT_MAX_DATA   128

Maximum size of event data.

Definition at line 263 of file event.h.

◆ EVENT_MOUSE

#define EVENT_MOUSE   3

Definition at line 85 of file event.h.

◆ EVENT_REPORT

#define EVENT_REPORT   7

Definition at line 89 of file event.h.

◆ EVENT_SCREEN_INFO

#define EVENT_SCREEN_INFO   0

Definition at line 82 of file event.h.

◆ EVENT_SURFACE_NEW

#define EVENT_SURFACE_NEW   1

Definition at line 83 of file event.h.

◆ EVENT_TIMER

#define EVENT_TIMER   4

Definition at line 86 of file event.h.

◆ GEVENT_ATTACH

#define GEVENT_ATTACH   128

Definition at line 91 of file event.h.

◆ GEVENT_DETACH

#define GEVENT_DETACH   129

Definition at line 92 of file event.h.

◆ GEVENT_KBD

#define GEVENT_KBD   131

Definition at line 94 of file event.h.

◆ GEVENT_MOUSE

#define GEVENT_MOUSE   132

Definition at line 95 of file event.h.

◆ GEVENT_REPORT

#define GEVENT_REPORT   130

Definition at line 93 of file event.h.

◆ LEVENT_ACTION

#define LEVENT_ACTION   259

Definition at line 102 of file event.h.

◆ LEVENT_DEINIT

#define LEVENT_DEINIT   257

Definition at line 100 of file event.h.

◆ LEVENT_FORCE_ACTION

#define LEVENT_FORCE_ACTION   261

Definition at line 104 of file event.h.

◆ LEVENT_INIT

#define LEVENT_INIT   256

Definition at line 99 of file event.h.

◆ LEVENT_INTERNAL_WAKE

#define LEVENT_INTERNAL_WAKE   512

Definition at line 106 of file event.h.

◆ LEVENT_QUIT

#define LEVENT_QUIT   260

Definition at line 103 of file event.h.

◆ LEVENT_REDRAW

#define LEVENT_REDRAW   258

Definition at line 101 of file event.h.

◆ UEVENT_END

#define UEVENT_END   65535

Definition at line 109 of file event.h.

◆ UEVENT_START

#define UEVENT_START   1024

Definition at line 108 of file event.h.

Typedef Documentation

◆ event_bitmask_t

typedef uint64_t event_bitmask_t[4]

Event bitmask type.

Used to decide what events will be received by a display, only applicable to events sent by the DWM. By default events 0-127 inclusive are received (the first uint64_t is by default UINT64_MAX)

Definition at line 80 of file event.h.

◆ event_cursor_enter_t

Cursor Enter event.

Sent when the cursor enters a surface.

Definition at line 165 of file event.h.

◆ event_cursor_leave_t

Cursor Leave event.

Sent when the cursor leaves a surface.

Definition at line 172 of file event.h.

◆ event_type_t

Event type.

Used to identify the type of an event.

Events are divided into 4 categories:

  • Standard events (0-127): Sent by the DWM to ONLY the display or surface that the event is targeted at, sent by default.
  • Global events (128-255): Sent by the DWM to all displays, not sent by default.
  • Library events (256-511): Sent by the libpatchwork library to elements using the library, cant be subscribed to or unsubscribed from.
  • Internal Library events (512-1023): Used internally by libpatchwork, should not be used by programs.
  • User events (1024-65535): Defined by individual programs, cant be subscribed to or unsubscribed from.

TODO: Global events are a security mess, when per-process namespaces stabilize we should consider if this could be done better.

Definition at line 72 of file event.h.

◆ gevent_kbd_t

Global Keyboard event.

Sent when a key is pressed or released regardless of which display is focused.

Definition at line 217 of file event.h.

◆ gevent_mouse_t

Global Mouse event.

Sent when the mouse is moved or a button is pressed or released regardless of which display is focused or where the cursor is.

Definition at line 225 of file event.h.

◆ gevent_report_t

Global Report event.

Sent when any surface's information changes.

Definition at line 210 of file event.h.

Enumeration Type Documentation

◆ action_type_t

Action type.

Used to specify the type of an action event.

Enumerator
ACTION_NONE 
ACTION_RELEASE 
ACTION_PRESS 
ACTION_CANCEL 

Definition at line 47 of file event.h.

◆ report_flags_t

Report flags.

Used to specify what information changed in a report event.

Enumerator
REPORT_NONE 
REPORT_RECT 
REPORT_IS_VISIBLE 
REPORT_IS_FOCUSED 
REPORT_NAME 

Definition at line 33 of file event.h.