Management Events

PUGL_MAX_VIEW_STYLE_FLAG

PuglViewStyleFlag.PUGL_VIEW_STYLE_DEMANDING

The maximum PuglViewStyleFlag value.

typedef PuglAnyEvent PuglCloseEvent

View close event.

This is sent when the view is to be closed, for example when the user clicks the close button.

typedef PuglAnyEvent PuglLoopEnterEvent

Recursive loop enter event.

This is sent when the window system enters a recursive loop. While in the recursive loop, the main loop will be stalled and no expose events will be received. A typical use is to install a timer to perform continuous actions, such as drawing.

  • MacOS: A recursive loop is entered while the window is being live resized.

  • Windows: A recursive loop is entered while the window is being live resized or the menu is shown.

  • X11: A recursive loop is never entered and the event loop runs as usual while the view is being resized.

typedef PuglAnyEvent PuglLoopLeaveEvent

Recursive loop leave event.

This is sent after a loop enter event when the recursive loop is finished and normal iteration will continue.

typedef PuglAnyEvent PuglRealizeEvent

View realize event.

This is sent when a view is realized before it’s first displayed, with the graphics context entered (but not prepared to draw). This can be used to set up the graphics system, for example by loading OpenGL extensions.

typedef PuglAnyEvent PuglUnrealizeEvent

View unrealize event.

This counterpart to PuglRealizeEvent is sent when the view will no longer be displayed. This can be used to tear down the graphics system, or free any resources allocated when the view was realized.

typedef uint32_t PuglViewStyleFlags

Bitwise OR of PuglViewStyleFlag values.

enum PuglViewStyleFlag

View style flags.

Style flags reflect special modes and states supported by the window system. Applications can monitor or manipulate them to improve integration.

enumerator PUGL_VIEW_STYLE_MAPPED

View is mapped to a real window and potentially visible.

enumerator PUGL_VIEW_STYLE_MODAL

View is modal, typically a dialog box of its transient parent.

enumerator PUGL_VIEW_STYLE_ABOVE

View should be above most others.

enumerator PUGL_VIEW_STYLE_BELOW

View should be below most others.

enumerator PUGL_VIEW_STYLE_HIDDEN

View is minimized, shaded, or otherwise invisible.

enumerator PUGL_VIEW_STYLE_TALL

View is maximized to fill the screen vertically.

enumerator PUGL_VIEW_STYLE_WIDE

View is maximized to fill the screen horizontally.

enumerator PUGL_VIEW_STYLE_FULLSCREEN

View is enlarged to fill the entire screen with no decorations.

enumerator PUGL_VIEW_STYLE_RESIZING

View is being resized.

enumerator PUGL_VIEW_STYLE_DEMANDING

View is ready for input or otherwise demanding attention.

struct PuglConfigureEvent

View configure (resize/move) event.

This is sent whenever the view is resized or moved. The graphics context isn’t active during a configure event, so these values should be saved if necessary and applied the next time the view is exposed.

PuglEventType type

PuglEventType.PUGL_CONFIGURE

PuglEventFlags flags

Bitwise OR of PuglEventFlag values.

PuglCoord x

Parent-relative X coordinate of view.

PuglCoord y

Parent-relative Y coordinate of view.

PuglSpan width

Width of view.

PuglSpan height

Height of view.

PuglViewStyleFlags style

Bitwise OR of PuglViewStyleFlag flags.