aboutsummaryrefslogtreecommitdiff
path: root/sherlock_nk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sherlock_nk.c')
-rw-r--r--sherlock_nk.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sherlock_nk.c b/sherlock_nk.c
index e3280df..cbd1fd3 100644
--- a/sherlock_nk.c
+++ b/sherlock_nk.c
@@ -527,11 +527,25 @@ static const LV2UI_Idle_Interface idle_ext = {
.idle = _idle
};
+static int
+_resize(LV2UI_Handle instance, int width, int height)
+{
+ plughandle_t *handle = instance;
+
+ return nk_pugl_resize(&handle->win, width, height);
+}
+
+static const LV2UI_Resize resize_ext = {
+ .ui_resize = _resize
+};
+
static const void *
extension_data(const char *uri)
{
if(!strcmp(uri, LV2_UI__idleInterface))
return &idle_ext;
+ else if(!strcmp(uri, LV2_UI__resize))
+ return &resize_ext;
return NULL;
}