diff options
Diffstat (limited to 'pugl')
-rw-r--r-- | pugl/common.h | 5 | ||||
-rw-r--r-- | pugl/event.h | 8 | ||||
-rw-r--r-- | pugl/pugl.h | 36 | ||||
-rw-r--r-- | pugl/pugl_osx.m | 2 | ||||
-rw-r--r-- | pugl/pugl_win.cpp | 2 | ||||
-rw-r--r-- | pugl/pugl_x11.c | 2 |
6 files changed, 38 insertions, 17 deletions
diff --git a/pugl/common.h b/pugl/common.h index 4a92403..54ec6ef 100644 --- a/pugl/common.h +++ b/pugl/common.h @@ -15,9 +15,7 @@ */ /** - @file common.h Common definitions. - - @ingroup pugl + @addtogroup pugl @{ */ @@ -114,7 +112,6 @@ typedef enum { /** @} - @} */ #ifdef __cplusplus diff --git a/pugl/event.h b/pugl/event.h index 211916d..b4a13a9 100644 --- a/pugl/event.h +++ b/pugl/event.h @@ -15,12 +15,7 @@ */ /** - @file event.h PuglEvent struct definition. - - @ingroup pugl - @{ - - @name Event + @addtogroup pugl @{ */ @@ -213,7 +208,6 @@ typedef union { /** @} - @} */ #ifdef __cplusplus diff --git a/pugl/pugl.h b/pugl/pugl.h index d13ce12..68ecc19 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -135,6 +135,12 @@ typedef void (*PuglScrollFunc)(PuglView* view, typedef void (*PuglSpecialFunc)(PuglView* view, bool press, PuglKey key); /** + @name Initialization + Configuration functions which must be called before creating a window. + @{ +*/ + +/** Create a Pugl context. To create a window, call the various puglInit* functions as necessary, then @@ -171,6 +177,16 @@ PUGL_API void puglInitContextType(PuglView* view, PuglContextType type); /** + @} +*/ + +/** + @name Windows + Window management functions. + @{ +*/ + +/** Create a window with the settings given by the various puglInit functions. @return 1 (pugl does not currently support multiple windows). @@ -191,6 +207,16 @@ PUGL_API void puglHideWindow(PuglView* view); /** + Return the native window handle. +*/ +PUGL_API PuglNativeWindow +puglGetNativeWindow(PuglView* view); + +/** + @} +*/ + +/** Set the handle to be passed to all callbacks. This is generally a pointer to a struct which contains all necessary state. @@ -238,6 +264,12 @@ PUGL_API void puglIgnoreKeyRepeat(PuglView* view, bool ignore); /** + @name Event Callbacks + Functions to set event callbacks for handling user input. + @{ +*/ + +/** Set the function to call when an event occurs. */ PUGL_API void @@ -292,10 +324,8 @@ PUGL_API void puglSetReshapeFunc(PuglView* view, PuglReshapeFunc reshapeFunc); /** - Return the native window handle. + @} */ -PUGL_API PuglNativeWindow -puglGetNativeWindow(PuglView* view); /** Grab the input focus. diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m index d502002..7989f83 100644 --- a/pugl/pugl_osx.m +++ b/pugl/pugl_osx.m @@ -22,7 +22,7 @@ #import <Cocoa/Cocoa.h> -#include "pugl_internal.h" +#include "pugl/pugl_internal.h" @interface PuglWindow : NSWindow { diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp index 16c6b0b..cc6fc41 100644 --- a/pugl/pugl_win.cpp +++ b/pugl/pugl_win.cpp @@ -25,7 +25,7 @@ #include <stdio.h> #include <stdlib.h> -#include "pugl_internal.h" +#include "pugl/pugl_internal.h" #ifndef WM_MOUSEWHEEL # define WM_MOUSEWHEEL 0x020A diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c index 65eaab8..838980b 100644 --- a/pugl/pugl_x11.c +++ b/pugl/pugl_x11.c @@ -39,8 +39,8 @@ #include <cairo/cairo-xlib.h> #endif -#include "pugl_internal.h" #include "pugl/event.h" +#include "pugl/pugl_internal.h" struct PuglInternalsImpl { Display* display; |