Custom Events

struct PuglClientEvent

Custom client message event.

This is a custom event sent to a view with puglSendEvent(), which wakes up the event loop and delivers two pointer-sized data fields. These client-specific fields are opaque to Pugl and aren’t interpreted in any way.

PuglEventType type

PuglEventType.PUGL_CLIENT

PuglEventFlags flags

Bitwise OR of PuglEventFlag values.

uintptr_t data1

Client-specific data.

uintptr_t data2

Client-specific data.

struct PuglTimerEvent

Timer event.

This is sent while the timer with the given id is activated at the regular interval specified in the corresponding puglStartTimer() call. Other platform-specific timers may exist, so applications must always check the id field before reacting to a timer event.

PuglEventType type

PuglEventType.PUGL_TIMER

PuglEventFlags flags

Bitwise OR of PuglEventFlag values.

uintptr_t id

Timer ID.