|
LMMS
|
Classes | |
| struct | PuglAnyEvent |
| Common header for all event structs. More... | |
| struct | PuglConfigureEvent |
| struct | PuglExposeEvent |
| struct | PuglFocusEvent |
| struct | PuglKeyEvent |
| struct | PuglTextEvent |
| struct | PuglCrossingEvent |
| struct | PuglButtonEvent |
| struct | PuglMotionEvent |
| struct | PuglScrollEvent |
| struct | PuglClientEvent |
| struct | PuglTimerEvent |
| struct | PuglDataOfferEvent |
| struct | PuglDataEvent |
| union | PuglEvent |
Typedefs | |
| typedef uint32_t | PuglMods |
| Bitwise OR of PuglMod values. | |
| typedef uint32_t | PuglEventFlags |
| Bitwise OR of PuglEventFlag values. | |
| typedef PuglAnyEvent | PuglCreateEvent |
| typedef PuglAnyEvent | PuglDestroyEvent |
| typedef PuglAnyEvent | PuglMapEvent |
| typedef PuglAnyEvent | PuglUnmapEvent |
| typedef PuglAnyEvent | PuglUpdateEvent |
| typedef PuglAnyEvent | PuglCloseEvent |
| typedef PuglAnyEvent | PuglLoopEnterEvent |
| typedef PuglAnyEvent | PuglLoopLeaveEvent |
All updates to the view happen via events, which are dispatched to the view's event function. 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.
| typedef PuglAnyEvent PuglCloseEvent |
View close event.
This event is sent when the view is to be closed, for example when the user clicks the close button.
This event type has no extra fields.
| typedef PuglAnyEvent PuglCreateEvent |
View create event.
This event is sent when a view is realized before it is first displayed, with the graphics context entered. This is typically used for setting up the graphics system, for example by loading OpenGL extensions.
This event type has no extra fields.
| typedef PuglAnyEvent PuglDestroyEvent |
View destroy event.
This event is the counterpart to PuglCreateEvent, and it is sent when the view is being destroyed. This is typically used for tearing down the graphics system, or otherwise freeing any resources allocated when the create event was handled.
This is the last event sent to any view, and immediately after it is processed, the view is destroyed and may no longer be used.
This event type has no extra fields.
| typedef uint32_t PuglEventFlags |
Bitwise OR of PuglEventFlag values.
| typedef PuglAnyEvent PuglLoopEnterEvent |
Recursive loop enter event.
This event is sent when the window system enters a recursive loop. The main loop will be stalled and no expose events will be received while in the recursive loop. To give the application full control, Pugl does not do any special handling of this situation, but this event can be used to install a timer to perform continuous actions (such as drawing) on platforms that do this.
This event type has no extra fields.
| typedef PuglAnyEvent PuglLoopLeaveEvent |
Recursive loop leave event.
This event is sent after a loop enter event when the recursive loop is finished and normal iteration will continue.
This event type has no extra fields.
| typedef PuglAnyEvent PuglMapEvent |
View show event.
This event is sent when a view is mapped to the screen and made visible.
This event type has no extra fields.
| typedef PuglAnyEvent PuglUnmapEvent |
View hide event.
This event is sent when a view is unmapped from the screen and made invisible.
This event type has no extra fields.
| typedef PuglAnyEvent PuglUpdateEvent |
View update event.
This event is sent to every view near the end of a main loop iteration when any pending exposures are about to be redrawn. It is typically used to mark regions to expose with puglPostRedisplay() or puglPostRedisplayRect(). For example, to continuously animate, a view calls puglPostRedisplay() when an update event is received, and it will then shortly receive an expose event.
| enum PuglCrossingMode |
Reason for a PuglCrossingEvent.
| 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. |
| enum PuglEventFlag |
| enum PuglEventType |
The type of a PuglEvent.
| Enumerator | |
|---|---|
| PUGL_NOTHING | No event. |
| PUGL_CREATE | View created, a PuglCreateEvent. |
| PUGL_DESTROY | View destroyed, a PuglDestroyEvent. |
| PUGL_CONFIGURE | View moved/resized, a PuglConfigureEvent. |
| PUGL_MAP | View made visible, a PuglMapEvent. |
| PUGL_UNMAP | View made invisible, a PuglUnmapEvent. |
| PUGL_UPDATE | View ready to draw, a PuglUpdateEvent. |
| PUGL_EXPOSE | View must be drawn, a PuglExposeEvent. |
| PUGL_CLOSE | View will be closed, a PuglCloseEvent. |
| PUGL_FOCUS_IN | Keyboard focus entered view, a PuglFocusEvent. |
| PUGL_FOCUS_OUT | Keyboard focus left view, a PuglFocusEvent. |
| PUGL_KEY_PRESS | Key pressed, a PuglKeyEvent. |
| PUGL_KEY_RELEASE | Key released, a PuglKeyEvent. |
| PUGL_TEXT | Character entered, a PuglTextEvent. |
| PUGL_POINTER_IN | Pointer entered view, a PuglCrossingEvent. |
| PUGL_POINTER_OUT | Pointer left view, a PuglCrossingEvent. |
| PUGL_BUTTON_PRESS | Mouse button pressed, a PuglButtonEvent. |
| PUGL_BUTTON_RELEASE | Mouse button released, a PuglButtonEvent. |
| PUGL_MOTION | Pointer moved, a PuglMotionEvent. |
| PUGL_SCROLL | Scrolled, a PuglScrollEvent. |
| PUGL_CLIENT | Custom client message, a PuglClientEvent. |
| PUGL_TIMER | Timer triggered, a PuglTimerEvent. |
| PUGL_LOOP_ENTER | Recursive loop entered, a PuglLoopEnterEvent. |
| PUGL_LOOP_LEAVE | Recursive loop left, a PuglLoopLeaveEvent. |
| PUGL_DATA_OFFER | Data offered from clipboard, a PuglDataOfferEvent. |
| PUGL_DATA | Data available from clipboard, a PuglDataEvent. |
| enum PuglKey |
Keyboard key codepoints.
All keys are identified by a Unicode code point in PuglKeyEvent::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.
| 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. |
| enum PuglScrollDirection |
Scroll direction.
Describes the direction of a PuglScrollEvent along with whether the scroll is a "smooth" scroll. The discrete directions are for devices like mouse wheels with constrained axes, while a smooth scroll is for those with arbitrary scroll direction freedom, like some touchpads.
| Enumerator | |
|---|---|
| PUGL_SCROLL_UP | Scroll up. |
| PUGL_SCROLL_DOWN | Scroll down. |
| PUGL_SCROLL_LEFT | Scroll left. |
| PUGL_SCROLL_RIGHT | Scroll right. |
| PUGL_SCROLL_SMOOTH | Smooth scroll in any direction. |