aboutsummaryrefslogtreecommitdiffstats
path: root/src/implementation.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-04-21 17:53:38 -0400
committerDavid Robillard <d@drobilla.net>2022-04-21 17:53:38 -0400
commita16cd4b851d30a8b9389de6085b391e77f0a349e (patch)
treec2a078cb12a7b1206d8b3b1466ef05e93580c71f /src/implementation.h
parent64e784e77b45cdbcd4ce17187c9fa4259b0ddefb (diff)
downloadpugl-a16cd4b851d30a8b9389de6085b391e77f0a349e.tar.gz
pugl-a16cd4b851d30a8b9389de6085b391e77f0a349e.tar.bz2
pugl-a16cd4b851d30a8b9389de6085b391e77f0a349e.zip
Improve error handling
Diffstat (limited to 'src/implementation.h')
-rw-r--r--src/implementation.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/implementation.h b/src/implementation.h
index 77ff606..0fcba02 100644
--- a/src/implementation.h
+++ b/src/implementation.h
@@ -1,9 +1,10 @@
-// Copyright 2012-2020 David Robillard <d@drobilla.net>
+// Copyright 2012-2022 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
#ifndef PUGL_IMPLEMENTATION_H
#define PUGL_IMPLEMENTATION_H
+#include "attributes.h"
#include "types.h"
#include "pugl/pugl.h"
@@ -42,19 +43,21 @@ uint32_t
puglDecodeUTF8(const uint8_t* buf);
/// Dispatch an event with a simple `type` to `view`
-void
+PuglStatus
puglDispatchSimpleEvent(PuglView* view, PuglEventType type);
/// Process configure event while already in the graphics context
-void
+PUGL_WARN_UNUSED_RESULT
+PuglStatus
puglConfigure(PuglView* view, const PuglEvent* event);
/// Process expose event while already in the graphics context
-void
+PUGL_WARN_UNUSED_RESULT
+PuglStatus
puglExpose(PuglView* view, const PuglEvent* event);
/// Dispatch `event` to `view`, entering graphics context if necessary
-void
+PuglStatus
puglDispatchEvent(PuglView* view, const PuglEvent* event);
/// Set internal (stored in view) clipboard contents
@@ -62,6 +65,7 @@ const void*
puglGetInternalClipboard(const PuglView* view, const char** type, size_t* len);
/// Set internal (stored in view) clipboard contents
+PUGL_WARN_UNUSED_RESULT
PuglStatus
puglSetInternalClipboard(PuglView* view,
const char* type,