diff options
Diffstat (limited to 'dgl/src/pugl/pugl.h')
-rw-r--r-- | dgl/src/pugl/pugl.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dgl/src/pugl/pugl.h b/dgl/src/pugl/pugl.h index 32a10a2b..a2ffa85d 100644 --- a/dgl/src/pugl/pugl.h +++ b/dgl/src/pugl/pugl.h @@ -274,6 +274,20 @@ PUGL_API void puglInitTransientFor(PuglView* view, uintptr_t parent); /** + Drawing context type. +*/ +typedef enum { + PUGL_GL, + PUGL_CAIRO +} PuglContextType; + +/** + Set the context type before creating a window. +*/ +PUGL_API void +puglInitContextType(PuglView* view, PuglContextType type); + +/** @} */ @@ -350,6 +364,14 @@ PUGL_API PuglHandle puglGetHandle(PuglView* view); /** + Get the drawing context. + For PUGL_GL contexts, this is unused and returns NULL. + For PUGL_CAIRO contexts, this returns a pointer to a cairo_t. +*/ +PUGL_API void* +puglGetContext(PuglView* view); + +/** Return the timestamp (if any) of the currently-processing event. */ PUGL_API uint32_t |