aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-01-03 18:01:46 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-01-03 18:01:46 +0100
commitd5b09c039756661615a632d3a6f679678df217a7 (patch)
tree5932a35656696823c462c0e09df850af62c87380
parent92005ee78943e0927414f902bd91b04a84ca66c5 (diff)
parent904f3d29fc434fa1e4695ce21b38b50f3b1db72a (diff)
downloadmidi_matrix.lv2-d5b09c039756661615a632d3a6f679678df217a7.tar.xz
Merge commit '904f3d29fc434fa1e4695ce21b38b50f3b1db72a'
-rw-r--r--eo_ui.lv2/lv2_eo_ui.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/eo_ui.lv2/lv2_eo_ui.h b/eo_ui.lv2/lv2_eo_ui.h
index 973f286..b98a0b9 100644
--- a/eo_ui.lv2/lv2_eo_ui.h
+++ b/eo_ui.lv2/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