aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-01-03 17:57:18 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-01-03 17:57:18 +0100
commit904f3d29fc434fa1e4695ce21b38b50f3b1db72a (patch)
tree8c0bd7b4913858189594a9c005d414d58095a72f
parent2726194150699c45005741da1a4a93f0f31b3823 (diff)
downloadsherlock.lv2-904f3d29fc434fa1e4695ce21b38b50f3b1db72a.tar.xz
add support for ui:resize to EoUI.
-rw-r--r--lv2_eo_ui.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/lv2_eo_ui.h b/lv2_eo_ui.h
index 973f286..b98a0b9 100644
--- a/lv2_eo_ui.h
+++ b/lv2_eo_ui.h
@@ -54,6 +54,7 @@ struct _eo_ui_t {
// eo iface
struct {
Evas_Object *parent;
+ LV2UI_Resize *resize;
} eo;
// show iface
@@ -349,10 +350,13 @@ eoui_instantiate(eo_ui_t *eoui, const LV2UI_Descriptor *descriptor,
case EO_UI_DRIVER_EO:
{
eoui->eo.parent = NULL; // mandatory
+ eoui->eo.resize = NULL; // optional
for(int i=0; features[i]; i++)
{
if(!strcmp(features[i]->URI, LV2_UI__parent))
eoui->eo.parent = features[i]->data;
+ else if(!strcmp(features[i]->URI, LV2_UI__resize))
+ eoui->eo.resize = (LV2UI_Resize *)features[i]->data;
}
if(!eoui->eo.parent)
return -1;
@@ -363,6 +367,9 @@ eoui_instantiate(eo_ui_t *eoui, const LV2UI_Descriptor *descriptor,
*(Evas_Object **)widget = eoui->content;
+ if(eoui->eo.resize)
+ eoui->eo.resize->ui_resize(eoui->eo.resize->handle, eoui->w, eoui->h);
+
break;
}
@@ -448,12 +455,12 @@ eoui_instantiate(eo_ui_t *eoui, const LV2UI_Descriptor *descriptor,
}
}
- if(eoui->x11.resize)
- eoui->x11.resize->ui_resize(eoui->x11.resize->handle, eoui->w, eoui->h);
-
eoui->x11.child = elm_win_xwindow_get(eoui->win);
*(uintptr_t *)widget = eoui->x11.child;
+ if(eoui->x11.resize)
+ eoui->x11.resize->ui_resize(eoui->x11.resize->handle, eoui->w, eoui->h);
+
break;
}
#endif