From 21b42c7b40c4dd0598b60fa7eda1e3c501e32e41 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 27 Sep 2014 03:13:27 +0000 Subject: Improve documentation. --- pugl/common.h | 5 +---- pugl/event.h | 8 +------- pugl/pugl.h | 36 +++++++++++++++++++++++++++++++++--- pugl/pugl_osx.m | 2 +- pugl/pugl_win.cpp | 2 +- pugl/pugl_x11.c | 2 +- 6 files changed, 38 insertions(+), 17 deletions(-) (limited to 'pugl') 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 @@ -134,6 +134,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. @@ -170,6 +176,16 @@ puglInitResizable(PuglView* view, bool resizable); 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. @@ -190,6 +206,16 @@ puglShowWindow(PuglView* view); 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. @@ -237,6 +263,12 @@ puglGetModifiers(PuglView* view); 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. */ @@ -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 -#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 #include -#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 #endif -#include "pugl_internal.h" #include "pugl/event.h" +#include "pugl/pugl_internal.h" struct PuglInternalsImpl { Display* display; -- cgit v1.2.3