diff options
-rw-r--r-- | pugl/pugl.h | 6 | ||||
-rw-r--r-- | pugl/pugl_internal.h | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h index 07d3cf4..0c6dd79 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -284,6 +284,12 @@ PUGL_API bool puglGetVisible(PuglView* view); /** + Get the current size of the view. +*/ +PUGL_API void +puglGetSize(PuglView* view, int* width, int* height); + +/** Return the timestamp (if any) of the currently-processing event. */ PUGL_API uint32_t diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h index 6e7e621..9566c6f 100644 --- a/pugl/pugl_internal.h +++ b/pugl/pugl_internal.h @@ -174,6 +174,13 @@ puglGetVisible(PuglView* view) return view->visible; } +void +puglGetSize(PuglView* view, int* width, int* height) +{ + *width = view->width; + *height = view->height; +} + uint32_t puglGetEventTimestamp(PuglView* view) { |