aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
Diffstat (limited to 'pugl')
-rw-r--r--pugl/event.h36
-rw-r--r--pugl/pugl.h14
2 files changed, 24 insertions, 26 deletions
diff --git a/pugl/event.h b/pugl/event.h
index cf2ba7d..4b83488 100644
--- a/pugl/event.h
+++ b/pugl/event.h
@@ -1,5 +1,5 @@
/*
- Copyright 2014-2015 David Robillard <http://drobilla.net>
+ Copyright 2014-2016 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -34,20 +34,20 @@ extern "C" {
The type of a PuglEvent.
*/
typedef enum {
- PUGL_NOTHING,
- PUGL_BUTTON_PRESS,
- PUGL_BUTTON_RELEASE,
- PUGL_CONFIGURE,
- PUGL_EXPOSE,
- PUGL_CLOSE,
- PUGL_KEY_PRESS,
- PUGL_KEY_RELEASE,
- PUGL_ENTER_NOTIFY,
- PUGL_LEAVE_NOTIFY,
- PUGL_MOTION_NOTIFY,
- PUGL_SCROLL,
- PUGL_FOCUS_IN,
- PUGL_FOCUS_OUT
+ PUGL_NOTHING, /**< No event */
+ PUGL_BUTTON_PRESS, /**< Mouse button press */
+ PUGL_BUTTON_RELEASE, /**< Mouse button release */
+ PUGL_CONFIGURE, /**< View moved and/or resized */
+ PUGL_EXPOSE, /**< View exposed, redraw required */
+ PUGL_CLOSE, /**< Close view */
+ PUGL_KEY_PRESS, /**< Key press */
+ PUGL_KEY_RELEASE, /**< Key release */
+ PUGL_ENTER_NOTIFY, /**< Pointer entered view */
+ PUGL_LEAVE_NOTIFY, /**< Pointer left view */
+ PUGL_MOTION_NOTIFY, /**< Pointer motion */
+ PUGL_SCROLL, /**< Scroll */
+ PUGL_FOCUS_IN, /**< Keyboard focus entered view */
+ PUGL_FOCUS_OUT /**< Keyboard focus left view */
} PuglEventType;
typedef enum {
@@ -58,9 +58,9 @@ typedef enum {
Reason for a PuglEventCrossing.
*/
typedef enum {
- PUGL_CROSSING_NORMAL, /**< Crossing due to pointer motion. */
- PUGL_CROSSING_GRAB, /**< Crossing due to a grab. */
- PUGL_CROSSING_UNGRAB /**< Crossing due to a grab release. */
+ PUGL_CROSSING_NORMAL, /**< Crossing due to pointer motion. */
+ PUGL_CROSSING_GRAB, /**< Crossing due to a grab. */
+ PUGL_CROSSING_UNGRAB /**< Crossing due to a grab release. */
} PuglCrossingMode;
/**
diff --git a/pugl/pugl.h b/pugl/pugl.h
index c376d3f..91179c0 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -1,5 +1,5 @@
/*
- Copyright 2012-2015 David Robillard <http://drobilla.net>
+ Copyright 2012-2016 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -146,8 +146,9 @@ typedef void (*PuglSpecialFunc)(PuglView* view, bool press, PuglKey key);
To create a window, call the various puglInit* functions as necessary, then
call puglCreateWindow().
- @param pargc Pointer to argument count (unused, for GLUT compatibility).
- @param argv Arguments (unused, for GLUT compatibility).
+ @param pargc Pointer to argument count (currently unused).
+ @param argv Arguments (currently unused).
+ @return A newly created view.
*/
PUGL_API PuglView*
puglInit(int* pargc, char** argv);
@@ -198,8 +199,8 @@ puglInitResizable(PuglView* view, bool resizable);
/**
Set transient parent before creating a window.
- On X11, parent_id must be a Window.
- On OSX, parent_id must be an NSView*.
+ On X11, parent must be a Window.
+ On OSX, parent must be an NSView*.
*/
PUGL_API void
puglInitTransientFor(PuglView* view, uintptr_t parent);
@@ -255,9 +256,6 @@ puglGetNativeWindow(PuglView* view);
This is generally a pointer to a struct which contains all necessary state.
Everything needed in callbacks should be here, not in static variables.
-
- Note the lack of this facility makes GLUT unsuitable for plugins or
- non-trivial programs; this mistake is largely why Pugl exists.
*/
PUGL_API void
puglSetHandle(PuglView* view, PuglHandle handle);