Update Events

typedef PuglAnyEvent PuglBlankEvent

View blank event.

This event is sent to a view when it is about to be exposed, after the graphics context is entered.

typedef PuglAnyEvent PuglFlushEvent

View flush event.

This event is sent to a view after it has been exposed and the graphics context is exited.

typedef PuglAnyEvent PuglUpdateEvent

View update event.

This is sent near the end of a main loop iteration when the view is potentially about to be redrawn. It can be used to mark regions for exposure with puglObscureView() or puglObscureRegion(). For example, to continuously animate, obscure the view whenever an update event is received, then receive and handle the expose event(s) shortly afterwards.

struct PuglDamageEvent

View damage event.

This is sent with the graphics context entered and activated for drawing, once for every region that is being exposed (possibly several per frame). The application must either draw the region immediately or commit to doing so by the end of the exposure.

PuglEventType type

PuglEventType.PUGL_DAMAGE

PuglEventFlags flags

Bitwise OR of PuglEventFlag values.

PuglCoord x

View-relative top-left X coordinate of region.

PuglCoord y

View-relative top-left Y coordinate of region.

PuglSpan width

Width of exposed region.

PuglSpan height

Height of exposed region.

struct PuglExposeEvent

View expose event.

With the same format as PuglDamageEvent, this is sent once per frame at the end of an exposure, after any damage events have been delivered, with the graphics context sill active. The given rectangle is a bounding box for all the damage that is being exposed. The application must finish drawing at least all damaged regions.

PuglEventType type

PuglEventType.PUGL_EXPOSE

PuglEventFlags flags

Bitwise OR of PuglEventFlag values.

PuglCoord x

View-relative top-left X coordinate of region.

PuglCoord y

View-relative top-left Y coordinate of region.

PuglSpan width

Width of exposed region.

PuglSpan height

Height of exposed region.