aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-02 21:40:40 +0100
committerDavid Robillard <d@drobilla.net>2021-01-02 21:40:40 +0100
commit416478739315ca41ad236197b25f87b83ab7f312 (patch)
tree93f69a2dad2ed23cd44d8dfc9c4b6f11b2b171b1 /include
parentd9efe12ed4e3abbbcf8b607a21559e17601b89d7 (diff)
downloadpugl-416478739315ca41ad236197b25f87b83ab7f312.tar.gz
pugl-416478739315ca41ad236197b25f87b83ab7f312.tar.bz2
pugl-416478739315ca41ad236197b25f87b83ab7f312.zip
Add PUGL_CONST_API
Just a convenience macro to make declarations a little more readable.
Diffstat (limited to 'include')
-rw-r--r--include/pugl/cairo.h3
-rw-r--r--include/pugl/gl.h3
-rw-r--r--include/pugl/pugl.h7
-rw-r--r--include/pugl/stub.h3
-rw-r--r--include/pugl/vulkan.h3
5 files changed, 9 insertions, 10 deletions
diff --git a/include/pugl/cairo.h b/include/pugl/cairo.h
index 9909682..48e868e 100644
--- a/include/pugl/cairo.h
+++ b/include/pugl/cairo.h
@@ -33,8 +33,7 @@ PUGL_BEGIN_DECLS
Pass the returned value to puglSetBackend() to draw to a view with Cairo.
*/
-PUGL_API
-PUGL_CONST_FUNC
+PUGL_CONST_API
const PuglBackend*
puglCairoBackend(void);
diff --git a/include/pugl/gl.h b/include/pugl/gl.h
index 3443d83..51c4a7d 100644
--- a/include/pugl/gl.h
+++ b/include/pugl/gl.h
@@ -94,8 +94,7 @@ puglLeaveContext(PuglView* view);
Pass the returned value to puglSetBackend() to draw to a view with OpenGL.
*/
-PUGL_API
-PUGL_CONST_FUNC
+PUGL_CONST_API
const PuglBackend*
puglGlBackend(void);
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h
index 7cb7bc2..41afc25 100644
--- a/include/pugl/pugl.h
+++ b/include/pugl/pugl.h
@@ -47,6 +47,10 @@
# define PUGL_CONST_FUNC
#endif
+#define PUGL_CONST_API \
+ PUGL_API \
+ PUGL_CONST_FUNC
+
#ifdef __cplusplus
# define PUGL_BEGIN_DECLS extern "C" {
# define PUGL_END_DECLS }
@@ -585,8 +589,7 @@ typedef enum {
} PuglStatus;
/// Return a string describing a status code
-PUGL_API
-PUGL_CONST_FUNC
+PUGL_CONST_API
const char*
puglStrerror(PuglStatus status);
diff --git a/include/pugl/stub.h b/include/pugl/stub.h
index 46e0e96..d1a699a 100644
--- a/include/pugl/stub.h
+++ b/include/pugl/stub.h
@@ -34,8 +34,7 @@ PUGL_BEGIN_DECLS
This backend just creates a simple native window without setting up any
portable graphics API.
*/
-PUGL_API
-PUGL_CONST_FUNC
+PUGL_CONST_API
const PuglBackend*
puglStubBackend(void);
diff --git a/include/pugl/vulkan.h b/include/pugl/vulkan.h
index 8941510..f12ad97 100644
--- a/include/pugl/vulkan.h
+++ b/include/pugl/vulkan.h
@@ -143,8 +143,7 @@ puglCreateSurface(PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr,
Pass the returned value to puglSetBackend() to draw to a view with Vulkan.
*/
-PUGL_API
-PUGL_CONST_FUNC
+PUGL_CONST_API
const PuglBackend*
puglVulkanBackend(void);