Typedefs | Enumerations
Events

Detailed Description

Event definitions.

All updates to the view happen via events, which are dispatched to the view's PuglEventFunc by Pugl. Most events map directly to one from the underlying window system, but some are constructed by Pugl itself so there is not necessarily a direct correspondence.

Typedefs

typedef uint32_t PuglMods
 
typedef uint32_t PuglEventFlags
 

Enumerations

enum  PuglMod
 
enum  PuglKey
 
enum  PuglEventType
 
enum  PuglEventFlag
 
enum  PuglCrossingMode
 

Typedef Documentation

◆ PuglMods

typedef uint32_t PuglMods

Bitwise OR of PuglMod values.

◆ PuglEventFlags

typedef uint32_t PuglEventFlags

Bitwise OR of PuglEventFlag values.

Enumeration Type Documentation

◆ PuglMod

enum PuglMod

Keyboard modifier flags.

Enumerator
PUGL_MOD_SHIFT 

Shift key.

PUGL_MOD_CTRL 

Control key.

PUGL_MOD_ALT 

Alt/Option key.

PUGL_MOD_SUPER 

Mod4/Command/Windows key.

◆ PuglKey

enum PuglKey

Keyboard key codepoints.

All keys are identified by a Unicode code point in PuglEventKey::key. This enumeration defines constants for special keys that do not have a standard code point, and some convenience constants for control characters. Note that all keys are handled in the same way, this enumeration is just for convenience when writing hard-coded key bindings.

Keys that do not have a standard code point use values in the Private Use Area in the Basic Multilingual Plane (U+E000 to U+F8FF). Applications must take care to not interpret these values beyond key detection, the mapping used here is arbitrary and specific to Pugl.

Enumerator
PUGL_KEY_BACKSPACE 
PUGL_KEY_ESCAPE 
PUGL_KEY_DELETE 
PUGL_KEY_F1 
PUGL_KEY_F2 
PUGL_KEY_F3 
PUGL_KEY_F4 
PUGL_KEY_F5 
PUGL_KEY_F6 
PUGL_KEY_F7 
PUGL_KEY_F8 
PUGL_KEY_F9 
PUGL_KEY_F10 
PUGL_KEY_F11 
PUGL_KEY_F12 
PUGL_KEY_LEFT 
PUGL_KEY_UP 
PUGL_KEY_RIGHT 
PUGL_KEY_DOWN 
PUGL_KEY_PAGE_UP 
PUGL_KEY_PAGE_DOWN 
PUGL_KEY_HOME 
PUGL_KEY_END 
PUGL_KEY_INSERT 
PUGL_KEY_SHIFT 
PUGL_KEY_SHIFT_L 
PUGL_KEY_SHIFT_R 
PUGL_KEY_CTRL 
PUGL_KEY_CTRL_L 
PUGL_KEY_CTRL_R 
PUGL_KEY_ALT 
PUGL_KEY_ALT_L 
PUGL_KEY_ALT_R 
PUGL_KEY_SUPER 
PUGL_KEY_SUPER_L 
PUGL_KEY_SUPER_R 
PUGL_KEY_MENU 
PUGL_KEY_CAPS_LOCK 
PUGL_KEY_SCROLL_LOCK 
PUGL_KEY_NUM_LOCK 
PUGL_KEY_PRINT_SCREEN 
PUGL_KEY_PAUSE 

◆ PuglEventType

The type of a PuglEvent.

Enumerator
PUGL_NOTHING 

No event.

PUGL_BUTTON_PRESS 

Mouse button pressed.

PUGL_BUTTON_RELEASE 

Mouse button released.

PUGL_CONFIGURE 

View moved and/or resized.

PUGL_EXPOSE 

View exposed and must be redrawn.

PUGL_CLOSE 

View will be closed.

PUGL_KEY_PRESS 

Key pressed.

PUGL_KEY_RELEASE 

Key released.

PUGL_TEXT 

Character entered.

PUGL_ENTER_NOTIFY 

Pointer entered view.

PUGL_LEAVE_NOTIFY 

Pointer left view.

PUGL_MOTION_NOTIFY 

Pointer moved.

PUGL_SCROLL 

Scrolled.

PUGL_FOCUS_IN 

Keyboard focus entered view.

PUGL_FOCUS_OUT 

Keyboard focus left view.

◆ PuglEventFlag

Common flags for all event types.

Enumerator
PUGL_IS_SEND_EVENT 

Event is synthetic.

◆ PuglCrossingMode

Reason for a PuglEventCrossing.

Enumerator
PUGL_CROSSING_NORMAL 

Crossing due to pointer motion.

PUGL_CROSSING_GRAB 

Crossing due to a grab.

PUGL_CROSSING_UNGRAB 

Crossing due to a grab release.