Commit f5e0986e authored by Hanspeter Portner's avatar Hanspeter Portner

nk: implement resize feature/extension.

parent 0a7cb37a
Pipeline #11379977 (#) passed with stages
in 14 minutes and 29 seconds
......@@ -62,4 +62,4 @@ moony:moony_ui
] ;
lv2:requiredFeature ui:idleInterface, ui:portMap, urid:map, urid:unmap ;
lv2:optionalFeature ui:resize ;
lv2:extensionData ui:idleInterface .
lv2:extensionData ui:idleInterface, ui:resize .
......@@ -3580,11 +3580,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 *
ext_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;
}
......
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