aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-14 21:18:12 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-14 21:18:12 +0100
commit95069b8ad0d6a84c765d8d30e2eec445ef475a43 (patch)
treea30876ef7e29bb44a4dbf2067aa904fe7a248e94
parent5656cbf0412412b5e52ec438401a62d00e192390 (diff)
downloadsherlock.lv2-95069b8ad0d6a84c765d8d30e2eec445ef475a43.tar.xz
add NK_PUGL_API preprocessor constant.
-rw-r--r--nk_pugl.h60
1 files changed, 32 insertions, 28 deletions
diff --git a/nk_pugl.h b/nk_pugl.h
index c0177ab..e50719d 100644
--- a/nk_pugl.h
+++ b/nk_pugl.h
@@ -54,6 +54,10 @@ extern C {
#include "nuklear/nuklear.h"
#include "nuklear/example/stb_image.h"
+#ifndef NK_PUGL_API
+# define NK_PUGL_API static
+#endif
+
typedef struct _nk_pugl_config_t nk_pugl_config_t;
typedef struct _nk_pugl_window_t nk_pugl_window_t;
typedef void (*nkglGenerateMipmap)(GLenum target);
@@ -113,46 +117,46 @@ struct _nk_pugl_window_t {
#endif
};
-static inline intptr_t
+NK_PUGL_API intptr_t
nk_pugl_init(nk_pugl_window_t *win);
-static inline void
+NK_PUGL_API void
nk_pugl_show(nk_pugl_window_t *win);
-static inline void
+NK_PUGL_API void
nk_pugl_hide(nk_pugl_window_t *win);
-static inline void
+NK_PUGL_API void
nk_pugl_shutdown(nk_pugl_window_t *win);
-static inline void
+NK_PUGL_API void
nk_pugl_wait_for_event(nk_pugl_window_t *win);
-static inline int
+NK_PUGL_API int
nk_pugl_process_events(nk_pugl_window_t *win);
-static inline void
+NK_PUGL_API void
nk_pugl_post_redisplay(nk_pugl_window_t *win);
-static inline void
+NK_PUGL_API void
nk_pugl_async_redisplay(nk_pugl_window_t *win);
-static inline void
+NK_PUGL_API void
nk_pugl_quit(nk_pugl_window_t *win);
-static struct nk_image
+NK_PUGL_API struct nk_image
nk_pugl_icon_load(nk_pugl_window_t *win, const char *filename);
-static void
+NK_PUGL_API void
nk_pugl_icon_unload(nk_pugl_window_t *win, struct nk_image img);
-static bool
+NK_PUGL_API bool
nk_pugl_is_shortcut_pressed(struct nk_input *in, char letter, bool clear);
-static void
+NK_PUGL_API void
nk_pugl_copy_to_clipboard(nk_pugl_window_t *win, const char *selection, size_t len);
-static const char *
+NK_PUGL_API const char *
nk_pugl_paste_from_clipboard(nk_pugl_window_t *win, size_t *len);
#ifdef __cplusplus
@@ -870,7 +874,7 @@ _nk_pugl_event_func(PuglView *view, const PuglEvent *e)
}
}
-static inline intptr_t
+NK_PUGL_API intptr_t
nk_pugl_init(nk_pugl_window_t *win)
{
nk_pugl_config_t *cfg = &win->cfg;
@@ -951,7 +955,7 @@ nk_pugl_init(nk_pugl_window_t *win)
return win->widget;
}
-static inline void
+NK_PUGL_API void
nk_pugl_show(nk_pugl_window_t *win)
{
if(!win->view)
@@ -960,7 +964,7 @@ nk_pugl_show(nk_pugl_window_t *win)
puglShowWindow(win->view);
}
-static inline void
+NK_PUGL_API void
nk_pugl_hide(nk_pugl_window_t *win)
{
if(!win->view)
@@ -969,7 +973,7 @@ nk_pugl_hide(nk_pugl_window_t *win)
puglHideWindow(win->view);
}
-static inline void
+NK_PUGL_API void
nk_pugl_shutdown(nk_pugl_window_t *win)
{
if(!win->view)
@@ -1004,7 +1008,7 @@ nk_pugl_shutdown(nk_pugl_window_t *win)
#endif
}
-static inline void
+NK_PUGL_API void
nk_pugl_wait_for_event(nk_pugl_window_t *win)
{
if(!win->view)
@@ -1013,7 +1017,7 @@ nk_pugl_wait_for_event(nk_pugl_window_t *win)
puglWaitForEvent(win->view);
}
-static inline int
+NK_PUGL_API int
nk_pugl_process_events(nk_pugl_window_t *win)
{
if(!win->view)
@@ -1027,7 +1031,7 @@ nk_pugl_process_events(nk_pugl_window_t *win)
return win->quit;
}
-static inline void
+NK_PUGL_API void
nk_pugl_post_redisplay(nk_pugl_window_t *win)
{
if(!win->view)
@@ -1036,7 +1040,7 @@ nk_pugl_post_redisplay(nk_pugl_window_t *win)
puglPostRedisplay(win->view);
}
-static inline void
+NK_PUGL_API void
nk_pugl_async_redisplay(nk_pugl_window_t *win)
{
if(!win->view)
@@ -1074,13 +1078,13 @@ nk_pugl_async_redisplay(nk_pugl_window_t *win)
#endif
}
-static inline void
+NK_PUGL_API void
nk_pugl_quit(nk_pugl_window_t *win)
{
win->quit = 1;
}
-static struct nk_image
+NK_PUGL_API struct nk_image
nk_pugl_icon_load(nk_pugl_window_t *win, const char *filename)
{
GLuint tex = 0;
@@ -1114,7 +1118,7 @@ nk_pugl_icon_load(nk_pugl_window_t *win, const char *filename)
return nk_image_id(tex);
}
-static void
+NK_PUGL_API void
nk_pugl_icon_unload(nk_pugl_window_t *win, struct nk_image img)
{
if(!win->view)
@@ -1130,7 +1134,7 @@ nk_pugl_icon_unload(nk_pugl_window_t *win, struct nk_image img)
}
}
-static bool
+NK_PUGL_API bool
nk_pugl_is_shortcut_pressed(struct nk_input *in, char letter, bool clear)
{
const bool control = nk_input_is_key_down(in, NK_KEY_CTRL);
@@ -1152,13 +1156,13 @@ nk_pugl_is_shortcut_pressed(struct nk_input *in, char letter, bool clear)
return false;
}
-static void
+NK_PUGL_API void
nk_pugl_copy_to_clipboard(nk_pugl_window_t *win, const char *selection, size_t len)
{
puglCopyToClipboard(win->view, selection, len);
}
-static const char *
+NK_PUGL_API const char *
nk_pugl_paste_from_clipboard(nk_pugl_window_t *win, size_t *len)
{
return puglPasteFromClipboard(win->view, len);