diff options
author | David Robillard <d@drobilla.net> | 2021-05-24 14:12:17 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-24 15:14:41 -0400 |
commit | f535b6eaeed44093bed7d90b4be76363c2e2e4f4 (patch) | |
tree | 035478b033d349e06e8339d0217cf93aa607b268 /src/stub.h | |
parent | 830862ed8345a9620d2ff75293666e46972e2692 (diff) | |
download | pugl-f535b6eaeed44093bed7d90b4be76363c2e2e4f4.tar.gz pugl-f535b6eaeed44093bed7d90b4be76363c2e2e4f4.tar.bz2 pugl-f535b6eaeed44093bed7d90b4be76363c2e2e4f4.zip |
Separate stub backends from other backends
Stub backends were a dependency of other backends to allow some code reuse.
However, that can cause conflicting symbols if multiple backends are linked
into the same binary, which should be possible.
To avoid this, move the shared code into the platform implementation, and
export those symbols so that backends can use them. This adds some semi-public
platform-specific API that can only be used by backends included with pugl.
They are undocumented, subject to change at any time without a corresponding
version change, and may not be used by third parties (for example by custom
backends in an application).
Diffstat (limited to 'src/stub.h')
-rw-r--r-- | src/stub.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ /* - Copyright 2012-2020 David Robillard <d@drobilla.net> + Copyright 2012-2021 David Robillard <d@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 @@ -24,28 +24,28 @@ PUGL_BEGIN_DECLS static inline PuglStatus -puglStubConfigure(PuglView* view) +puglStubConfigure(PuglView* const view) { (void)view; return PUGL_SUCCESS; } static inline PuglStatus -puglStubCreate(PuglView* view) +puglStubCreate(PuglView* const view) { (void)view; return PUGL_SUCCESS; } static inline PuglStatus -puglStubDestroy(PuglView* view) +puglStubDestroy(PuglView* const view) { (void)view; return PUGL_SUCCESS; } static inline PuglStatus -puglStubEnter(PuglView* view, const PuglEventExpose* expose) +puglStubEnter(PuglView* const view, const PuglEventExpose* const expose) { (void)view; (void)expose; @@ -53,7 +53,7 @@ puglStubEnter(PuglView* view, const PuglEventExpose* expose) } static inline PuglStatus -puglStubLeave(PuglView* view, const PuglEventExpose* expose) +puglStubLeave(PuglView* const view, const PuglEventExpose* const expose) { (void)view; (void)expose; @@ -61,7 +61,7 @@ puglStubLeave(PuglView* view, const PuglEventExpose* expose) } static inline void* -puglStubGetContext(PuglView* view) +puglStubGetContext(PuglView* const view) { (void)view; return NULL; |