aboutsummaryrefslogtreecommitdiff
path: root/nk_pugl
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-09-01 19:23:39 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-09-01 19:23:39 +0200
commit33a69777e626a64f725962bce8354411d75a205b (patch)
tree75d0d0cac9513e97325118ef57bebbfd17c3272b /nk_pugl
parent7da788dabbe19ae5342febc4c315f2579348a1ed (diff)
parent3133ea70085d498f58ef72284a86ec2b1698f61b (diff)
downloadsynthpod-33a69777e626a64f725962bce8354411d75a205b.tar.xz
Merge commit '3133ea70085d498f58ef72284a86ec2b1698f61b'
Diffstat (limited to 'nk_pugl')
-rw-r--r--nk_pugl/nk_pugl.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/nk_pugl/nk_pugl.h b/nk_pugl/nk_pugl.h
index eb6f0414..d0e0ba1c 100644
--- a/nk_pugl/nk_pugl.h
+++ b/nk_pugl/nk_pugl.h
@@ -447,7 +447,7 @@ _nk_pugl_font_deinit(nk_pugl_window_t *win)
}
static void
-_nk_pugl_resize(nk_pugl_window_t *win)
+_nk_pugl_host_resize(nk_pugl_window_t *win)
{
nk_pugl_config_t *cfg = &win->cfg;
@@ -470,7 +470,7 @@ _nk_pugl_reconfigure(nk_pugl_window_t *win)
#if 0
if(win->cfg.resizable)
- _nk_pugl_resize(win);
+ _nk_pugl_host_resize(win);
#endif
}
@@ -1068,7 +1068,7 @@ nk_pugl_show(nk_pugl_window_t *win)
return;
puglShowWindow(win->view);
- _nk_pugl_resize(win);
+ _nk_pugl_host_resize(win);
}
NK_PUGL_API void
@@ -1136,6 +1136,20 @@ nk_pugl_process_events(nk_pugl_window_t *win)
return win->quit;
}
+NK_PUGL_API int
+nk_pugl_resize(nk_pugl_window_t *win, int width, int height)
+{
+ if(!win->view)
+ return 1; // quit
+
+ win->cfg.width = width;
+ win->cfg.height = height;
+
+ puglPostRedisplay(win->view);
+
+ return 0;
+}
+
NK_PUGL_API void
nk_pugl_post_redisplay(nk_pugl_window_t *win)
{