Commit 836bd127 authored by Hanspeter Portner's avatar Hanspeter Portner

nk: implement resize feature/extension.

parent a55713ba
Pipeline #11380052 passed with stages
in 9 minutes and 6 seconds
......@@ -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;
}
......
......@@ -33,7 +33,7 @@ sherlock:atom_inspector_4_nk
] ;
lv2:extensionData ui:idleInterface ;
lv2:optionalFeature ui:resize ;
lv2:requiredFeature ui:idleInterface, urid:map, urid:unmap .
lv2:requiredFeature ui:idleInterface, urid:map, urid:unmap, ui:resize .
# MIDI Inspector UI
sherlock:midi_inspector_4_nk
......@@ -46,7 +46,7 @@ sherlock:midi_inspector_4_nk
] ;
lv2:extensionData ui:idleInterface ;
lv2:optionalFeature ui:resize ;
lv2:requiredFeature ui:idleInterface, urid:map, urid:unmap .
lv2:requiredFeature ui:idleInterface, urid:map, urid:unmap, ui:resize .
# OSC Inspector UI
sherlock:osc_inspector_4_nk
......@@ -59,4 +59,4 @@ sherlock:osc_inspector_4_nk
] ;
lv2:extensionData ui:idleInterface ;
lv2:optionalFeature ui:resize ;
lv2:requiredFeature ui:idleInterface, urid:map, urid:unmap .
lv2:requiredFeature ui:idleInterface, urid:map, urid:unmap, ui:resize .
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment