aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-08-04 23:20:04 +0200
committerDavid Robillard <d@drobilla.net>2019-09-03 08:34:56 +0200
commit67a5799618186beecd0ea028101395de3569345f (patch)
treef0f264c0d3e9965a8143d6effd990f41bb306635 /pugl/pugl.h
parent59359e4f3d81231e7c665aa53ceeba7de0671d95 (diff)
downloadpugl-67a5799618186beecd0ea028101395de3569345f.tar.gz
pugl-67a5799618186beecd0ea028101395de3569345f.tar.bz2
pugl-67a5799618186beecd0ea028101395de3569345f.zip
Make almost everything return a status
Prepares the API for proper error handling, even though there isn't any for these functions yet.
Diffstat (limited to 'pugl/pugl.h')
-rw-r--r--pugl/pugl.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h
index 51c86a1..4182225 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -561,7 +561,7 @@ puglGetVisible(PuglView* view);
/**
Request a redisplay on the next call to puglDispatchEvents().
*/
-PUGL_API void
+PUGL_API PuglStatus
puglPostRedisplay(PuglView* view);
/**
@@ -636,7 +636,7 @@ puglSetParentWindow(PuglView* view, PuglNativeWindow parent);
This is used for things like dialogs, to have them associated with the
window they are a transient child of properly.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglSetTransientFor(PuglView* view, PuglNativeWindow parent);
/**
@@ -644,19 +644,19 @@ puglSetTransientFor(PuglView* view, PuglNativeWindow parent);
@return 1 (pugl does not currently support multiple windows).
*/
-PUGL_API int
+PUGL_API PuglStatus
puglCreateWindow(PuglView* view, const char* title);
/**
Show the current window.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglShowWindow(PuglView* view);
/**
Hide the current window.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglHideWindow(PuglView* view);
/**
@@ -716,7 +716,7 @@ puglGetContext(PuglView* view);
@param view The view being entered.
@param drawing If true, prepare for drawing.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglEnterContext(PuglView* view, bool drawing);
/**
@@ -728,7 +728,7 @@ puglEnterContext(PuglView* view, bool drawing);
@param view The view being left.
@param drawing If true, finish drawing, for example by swapping buffers.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglLeaveContext(PuglView* view, bool drawing);
/**
@@ -745,7 +745,7 @@ typedef PuglStatus (*PuglEventFunc)(PuglView* view, const PuglEvent* event);
/**
Set the function to call when an event occurs.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglSetEventFunc(PuglView* view, PuglEventFunc eventFunc);
/**
@@ -757,7 +757,7 @@ puglHasFocus(const PuglView* view);
/**
Grab the input focus.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglGrabFocus(PuglView* view);
/**
@@ -767,7 +767,7 @@ puglGrabFocus(PuglView* view);
from the user. The exact effect depends on the platform, but is usually
something like flashing a task bar entry.
*/
-PUGL_API void
+PUGL_API PuglStatus
puglRequestAttention(PuglView* view);
/**