forked from enlightenment/efl
Merge branch 'master' into devs/hermet/lottie
This commit is contained in:
commit
a621b3c634
|
@ -59,7 +59,7 @@ _create_popup(efl_ui_popup_data *p_data)
|
|||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_EVENT_BACKWALL_CLICKED, _backwall_clicked, NULL);
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_EVENT_TIMEOUT, _timeout_cb, p_data);
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
|
||||
Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
|
||||
efl_text_set(btn, "Efl.Ui.Popup");
|
||||
|
@ -194,9 +194,9 @@ _popup_resize_cb(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
static Eina_Bool size_changed = EINA_FALSE;
|
||||
|
||||
if (!size_changed)
|
||||
efl_ui_popup_size_set(p_data->efl_ui_popup, EINA_SIZE2D(300, 160));
|
||||
efl_gfx_hint_size_min_set(p_data->efl_ui_popup, EINA_SIZE2D(300, 160));
|
||||
else
|
||||
efl_ui_popup_size_set(p_data->efl_ui_popup, EINA_SIZE2D(160, 120));
|
||||
efl_gfx_hint_size_min_set(p_data->efl_ui_popup, EINA_SIZE2D(160, 120));
|
||||
|
||||
size_changed = !size_changed;
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ _alert_scroll_case1_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
@ -428,8 +428,8 @@ _alert_scroll_case2_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
//This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
|
||||
efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(320, -1));
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(320, -1));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
@ -454,8 +454,8 @@ _alert_scroll_case3_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
//This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
|
||||
efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 320));
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 320));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
@ -480,8 +480,8 @@ _alert_scroll_case4_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
//This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
|
||||
efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(320, 320));
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(320, 320));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
@ -506,8 +506,8 @@ _alert_scroll_case5_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
//This is beta API for now. So EFL_UI_SCROLL_ALERT_POPUP_BETA should be defined.
|
||||
efl_ui_scroll_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(80, 80));
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(80, 80));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(160, 160));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
@ -584,7 +584,7 @@ _alert_text_case1_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ _alert_text_case2_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
Eina_Strbuf *message_buf = eina_strbuf_new();
|
||||
create_message(message_buf, "This is Text Popup ", 50);
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_text_set(efl_part(efl_ui_popup, "title"), "title");
|
||||
efl_text_set(efl_ui_popup, eina_strbuf_string_get(message_buf));
|
||||
|
@ -618,8 +618,8 @@ _alert_text_case3_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
Eo *win = data;
|
||||
Eo *efl_ui_popup= efl_add(EFL_UI_TEXT_ALERT_POPUP_CLASS, win);
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, 300));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, 300));
|
||||
|
||||
efl_text_set(efl_part(efl_ui_popup, "title"), "title");
|
||||
efl_text_set(efl_ui_popup, "This is Text Popup");
|
||||
|
@ -637,7 +637,7 @@ _alert_text_case4_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
Eo *win = data;
|
||||
Eo *efl_ui_popup= efl_add(EFL_UI_TEXT_ALERT_POPUP_CLASS, win);
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_text_set(efl_part(efl_ui_popup, "title"), "title");
|
||||
efl_text_set(efl_ui_popup, "This is Text Popup");
|
||||
|
@ -646,7 +646,7 @@ _alert_text_case4_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, -1));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, -1));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
@ -664,9 +664,9 @@ _alert_text_case5_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
}
|
||||
|
||||
|
@ -686,9 +686,9 @@ _alert_text_case6_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, 300));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, 300));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -704,7 +704,7 @@ _alert_text_case7_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
Eina_Strbuf *message_buf = eina_strbuf_new();
|
||||
create_message(message_buf, "This is Text Popup ", 50);
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_text_set(efl_part(efl_ui_popup, "title"), "title");
|
||||
efl_text_set(efl_ui_popup, eina_strbuf_string_get(message_buf));
|
||||
|
@ -713,7 +713,7 @@ _alert_text_case7_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, -1));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, -1));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -736,9 +736,9 @@ _alert_text_case8_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -761,9 +761,9 @@ _alert_text_case9_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(10, 10));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(10, 10));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -786,9 +786,9 @@ _alert_text_case10_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(150, 150));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(150, 150));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -811,9 +811,9 @@ _alert_text_case11_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(150, -1));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(150, -1));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -836,9 +836,9 @@ _alert_text_case12_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(300, -1));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(300, -1));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -861,9 +861,9 @@ _alert_text_case13_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 150));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 150));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
@ -886,9 +886,9 @@ _alert_text_case14_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_NEGATIVE, "No", NULL);
|
||||
efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_USER, "Cancel", NULL);
|
||||
|
||||
efl_ui_text_alert_popup_expandable_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
|
||||
efl_gfx_hint_size_max_set(efl_ui_popup, EINA_SIZE2D(-1, 300));
|
||||
|
||||
efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
efl_gfx_hint_size_min_set(efl_ui_popup, EINA_SIZE2D(200, 200));
|
||||
|
||||
efl_event_callback_add(efl_ui_popup, EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED, efl_ui_text_alert_popup_clicked_cb, NULL);
|
||||
|
||||
|
|
|
@ -287,10 +287,10 @@ run(options_type const& opts)
|
|||
{
|
||||
const Eolian_Class *klass = nullptr;
|
||||
char* dup = strdup(opts.in_files[0].c_str());
|
||||
char* base = basename(dup);
|
||||
std::string base (basename(dup));
|
||||
std::string cpp_types_header;
|
||||
opts.unit = (Eolian_Unit*)opts.state;
|
||||
klass = ::eolian_state_class_by_file_get(opts.state, base);
|
||||
klass = ::eolian_state_class_by_file_get(opts.state, base.c_str());
|
||||
free(dup);
|
||||
if (klass)
|
||||
{
|
||||
|
@ -346,8 +346,8 @@ run(options_type const& opts)
|
|||
opts.unit = unit;
|
||||
}
|
||||
char* dup = strdup(name.c_str());
|
||||
char* base = basename(dup);
|
||||
Eolian_Class const* klass = ::eolian_state_class_by_file_get(opts.state, base);
|
||||
std::string base(basename(dup));
|
||||
Eolian_Class const* klass = ::eolian_state_class_by_file_get(opts.state, base.c_str());
|
||||
free(dup);
|
||||
if (klass)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ _make_model(Evas_Object *win)
|
|||
|
||||
snprintf(buf, sizeof(buf), "Item # %i", i);
|
||||
eina_value_set(&vtext, buf);
|
||||
efl_model_property_set(child, "name", &vtext);
|
||||
efl_model_property_set(child, "title", &vtext);
|
||||
}
|
||||
|
||||
eina_value_flush(&vtext);
|
||||
|
@ -90,7 +90,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
|
||||
efl_ui_property_bind(factory, "signal/efl,state,%v", "odd_style");
|
||||
efl_ui_property_bind(factory, "signal/efl,state,%{selected;unselected}", "selected");
|
||||
efl_ui_property_bind(factory, "efl.text", "name");
|
||||
efl_ui_property_bind(factory, "efl.text", "title");
|
||||
|
||||
li = efl_add(EFL_UI_LIST_VIEW_CLASS, win
|
||||
, efl_ui_list_view_layout_factory_set(efl_added, factory)
|
||||
|
|
|
@ -136,7 +136,7 @@ _ecore_evas_object_callback_changed_size_hints(void *data, Evas *e EINA_UNUSED,
|
|||
evas_object_size_hint_combined_min_get(obj, &w, &h);
|
||||
ecore_evas_size_min_set(ee, w, h);
|
||||
|
||||
evas_object_size_hint_max_get(obj, &w, &h);
|
||||
evas_object_size_hint_combined_max_get(obj, &w, &h);
|
||||
if (w < 1) w = -1;
|
||||
if (h < 1) h = -1;
|
||||
ecore_evas_size_max_set(ee, w, h);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Edje.Global extends Efl.Object implements Efl.Gfx.Color_Class, Efl.Gfx.Text_Class, Efl.Gfx.Size_Class
|
||||
class @beta Edje.Global extends Efl.Object implements Efl.Gfx.Color_Class, Efl.Gfx.Text_Class, Efl.Gfx.Size_Class
|
||||
{
|
||||
[[An internal object that manages global color, text and size classes for
|
||||
the whole application. Individual edje objects also support the same
|
||||
|
|
|
@ -628,7 +628,12 @@ struct _Edje_Style
|
|||
Eina_List *tags;
|
||||
Evas_Textblock_Style *style;
|
||||
|
||||
Eina_Bool cache;
|
||||
Eina_Bool cache : 1;
|
||||
/* * read only * true if no text_class and no color_class exits in the style.
|
||||
* added for performace as we don't have to check all tags to decide if we need to update
|
||||
* this style or not.
|
||||
*/
|
||||
Eina_Bool readonly : 1;
|
||||
};
|
||||
|
||||
struct _Edje_Style_Tag
|
||||
|
|
|
@ -168,7 +168,6 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
|
|||
Eina_Strbuf *txt = NULL;
|
||||
Edje_Style_Tag *tag;
|
||||
Edje_Text_Class *tc;
|
||||
int found = 0;
|
||||
char *fontset = NULL, *fontsource = NULL;
|
||||
|
||||
if (!ed->file) return;
|
||||
|
@ -176,21 +175,12 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
|
|||
/* Make sure the style is already defined */
|
||||
if (!stl->style) return;
|
||||
|
||||
/* we are sure it dosen't have any text_class */
|
||||
if (stl->readonly) return;
|
||||
|
||||
/* No need to compute it again and again and again */
|
||||
if (!force && stl->cache) return;
|
||||
|
||||
/* Make sure the style contains a text_class */
|
||||
EINA_LIST_FOREACH(stl->tags, l, tag)
|
||||
{
|
||||
if (tag->text_class)
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* No text classes , goto next style */
|
||||
if (!found) return;
|
||||
if (!txt)
|
||||
txt = eina_strbuf_new();
|
||||
|
||||
|
@ -430,7 +420,8 @@ _edje_textblock_styles_cache_free(Edje *ed, const char *text_class)
|
|||
EINA_LIST_FOREACH(ed->file->styles, l, stl)
|
||||
{
|
||||
Edje_Style_Tag *tag;
|
||||
Eina_Bool found = EINA_FALSE;
|
||||
|
||||
if (stl->readonly) continue;
|
||||
|
||||
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||
{
|
||||
|
@ -438,12 +429,10 @@ _edje_textblock_styles_cache_free(Edje *ed, const char *text_class)
|
|||
|
||||
if (!strcmp(tag->text_class, text_class))
|
||||
{
|
||||
found = EINA_TRUE;
|
||||
stl->cache = EINA_FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
stl->cache = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -467,6 +456,8 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
|||
|
||||
if (stl->style) break;
|
||||
|
||||
stl->readonly = EINA_TRUE;
|
||||
|
||||
if (!txt)
|
||||
txt = eina_strbuf_new();
|
||||
|
||||
|
@ -516,6 +507,8 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
|||
}
|
||||
}
|
||||
eina_strbuf_append(txt, "'");
|
||||
|
||||
if (tag->text_class) stl->readonly = EINA_FALSE;
|
||||
}
|
||||
if (fontset) free(fontset);
|
||||
if (fontsource) free(fontsource);
|
||||
|
|
|
@ -6021,7 +6021,7 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
|
|||
Evas_Aspect_Control am = EVAS_ASPECT_CONTROL_NONE;
|
||||
|
||||
evas_object_size_hint_combined_min_get(rp->typedata.swallow->swallowed_object, &w1, &h1);
|
||||
evas_object_size_hint_max_get(rp->typedata.swallow->swallowed_object, &w2, &h2);
|
||||
evas_object_size_hint_combined_max_get(rp->typedata.swallow->swallowed_object, &w2, &h2);
|
||||
evas_object_size_hint_aspect_get(rp->typedata.swallow->swallowed_object, &am, &aw, &ah);
|
||||
rp->typedata.swallow->swallow_params.min.w = w1;
|
||||
rp->typedata.swallow->swallow_params.min.h = h1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// FIXME: This EO doc needs a direct link to the "edcref" doc
|
||||
|
||||
class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.Container, Efl.Part,
|
||||
Efl.Observer, Efl.Layout.Calc,
|
||||
Efl.Observer, Efl.Ui.I18n, Efl.Layout.Calc,
|
||||
Efl.Layout.Signal, Efl.Layout.Group,
|
||||
Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class,
|
||||
Efl.Gfx.Size_Class
|
||||
|
|
|
@ -65,12 +65,61 @@ interface Efl.Gfx.Hint
|
|||
Note: Smart objects (such as elementary) can have their own
|
||||
hint policy. So calling this API may or may not affect
|
||||
the size of smart objects.
|
||||
|
||||
Note: It is an error for the @.hint_size_max to be smaller in either axis
|
||||
than @.hint_size_min. In this scenario, the max size hint will be
|
||||
prioritized over the user min size hint.
|
||||
]]
|
||||
values {
|
||||
sz: Eina.Size2D; [[Maximum size (hint) in pixels, (-1, -1) by
|
||||
default for canvas objects).]]
|
||||
}
|
||||
}
|
||||
@property hint_size_restricted_max {
|
||||
[[Internal hints for an object's maximum size.
|
||||
|
||||
This is not a size enforcement in any way, it's just a hint
|
||||
that should be used whenever appropriate.
|
||||
|
||||
Values -1 will be treated as unset hint components, when
|
||||
queried by managers.
|
||||
|
||||
Note: This property is internal and meant for widget developers to
|
||||
define the absolute maximum size of the object. EFL itself sets
|
||||
this size internally, so any change to it from an application
|
||||
might be ignored. Applications should use @.hint_size_max instead.
|
||||
|
||||
Note: It is an error for the @.hint_size_restricted_max to be smaller in either axis
|
||||
than @.hint_size_restricted_min. In this scenario, the max size hint will be
|
||||
prioritized over the user min size hint.
|
||||
]]
|
||||
set @protected {
|
||||
[[This function is protected as it is meant for widgets to indicate
|
||||
their "intrinsic" maximum size.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the "intrinsic" maximum size of this object.]]
|
||||
}
|
||||
values {
|
||||
sz: Eina.Size2D; [[Maximum size (hint) in pixels.]]
|
||||
}
|
||||
}
|
||||
@property hint_size_combined_max {
|
||||
[[Read-only maximum size combining both @.hint_size_restricted_max and
|
||||
@.hint_size_max hints.
|
||||
|
||||
@.hint_size_restricted_max is intended for mostly internal usage
|
||||
and widget developers, and @.hint_size_max is intended to be
|
||||
set from application side. @.hint_size_combined_max combines both values
|
||||
by taking their repective maximum (in both width and height), and
|
||||
is used internally to get an object's maximum size.
|
||||
]]
|
||||
get {}
|
||||
values {
|
||||
sz: Eina.Size2D; [[Maximum size (hint) in pixels.]]
|
||||
}
|
||||
}
|
||||
@property hint_size_min {
|
||||
[[Hints on the object's minimum size.
|
||||
|
||||
|
@ -85,6 +134,10 @@ interface Efl.Gfx.Hint
|
|||
Note: This property is meant to be set by applications and not by
|
||||
EFL itself. Use this to request a specific size (treated as minimum
|
||||
size).
|
||||
|
||||
Note: It is an error for the @.hint_size_max to be smaller in either axis
|
||||
than @.hint_size_min. In this scenario, the max size hint will be
|
||||
prioritized over the user min size hint.
|
||||
]]
|
||||
values {
|
||||
sz: Eina.Size2D; [[Minimum size (hint) in pixels.]]
|
||||
|
@ -103,6 +156,10 @@ interface Efl.Gfx.Hint
|
|||
define the absolute minimum size of the object. EFL itself sets
|
||||
this size internally, so any change to it from an application
|
||||
might be ignored. Use @.hint_size_min instead.
|
||||
|
||||
Note: It is an error for the @.hint_size_restricted_max to be smaller in either axis
|
||||
than @.hint_size_restricted_min. In this scenario, the max size hint will be
|
||||
prioritized over the user min size hint.
|
||||
]]
|
||||
set @protected {
|
||||
[[This function is protected as it is meant for widgets to indicate
|
||||
|
|
|
@ -60,5 +60,7 @@ class Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layo
|
|||
Efl.Pack_Linear.pack_index_get;
|
||||
Efl.Pack_Layout.layout_update;
|
||||
Efl.Pack_Layout.layout_request;
|
||||
@empty Efl.Ui.L10n.l10n_text { get; set; }
|
||||
@empty Efl.Ui.I18n.language { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ _efl_ui_container_layout_item_init(Eo* o, Efl_Ui_Container_Item_Hints *item)
|
|||
efl_gfx_hint_margin_get(o, &item[0].margin[0], &item[0].margin[1],
|
||||
&item[1].margin[0], &item[1].margin[1]);
|
||||
efl_gfx_hint_fill_get(o, &item[0].fill, &item[1].fill);
|
||||
max = efl_gfx_hint_size_max_get(o);
|
||||
max = efl_gfx_hint_size_combined_max_get(o);
|
||||
min = efl_gfx_hint_size_combined_min_get(o);
|
||||
efl_gfx_hint_aspect_get(o, &aspect_type, &aspect);
|
||||
item[0].aspect = aspect.w;
|
||||
|
|
|
@ -67,8 +67,8 @@ static void
|
|||
_sizing_eval(Evas_Object *obj)
|
||||
{
|
||||
Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1;
|
||||
Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1;
|
||||
int fingx = 0, fingy = 0;
|
||||
Eina_Size2D max = EINA_SIZE2D(-1, -1), max2 = EINA_SIZE2D(-1, -1);
|
||||
|
||||
EFL_UI_FLIP_DATA_GET(obj, sd);
|
||||
|
||||
|
@ -77,14 +77,14 @@ _sizing_eval(Evas_Object *obj)
|
|||
if (sd->back.content)
|
||||
evas_object_size_hint_combined_min_get(sd->back.content, &minw2, &minh2);
|
||||
if (sd->front.content)
|
||||
evas_object_size_hint_max_get(sd->front.content, &maxw, &maxh);
|
||||
max = efl_gfx_hint_size_combined_max_get(sd->front.content);
|
||||
if (sd->back.content)
|
||||
evas_object_size_hint_max_get(sd->back.content, &maxw2, &maxh2);
|
||||
max2 = efl_gfx_hint_size_combined_max_get(sd->back.content);
|
||||
|
||||
if (minw2 > minw) minw = minw2;
|
||||
if (minh2 > minh) minh = minh2;
|
||||
if ((maxw2 >= 0) && (maxw2 < maxw)) maxw = maxw2;
|
||||
if ((maxh2 >= 0) && (maxh2 < maxh)) maxh = maxh2;
|
||||
if ((max2.w >= 0) && (max2.w < max.w)) max.w = max2.w;
|
||||
if ((max2.h >= 0) && (max2.h < max.h)) max.h = max2.h;
|
||||
|
||||
if (sd->dir_enabled[ELM_FLIP_DIRECTION_UP]) fingy++;
|
||||
if (sd->dir_enabled[ELM_FLIP_DIRECTION_DOWN]) fingy++;
|
||||
|
@ -93,11 +93,8 @@ _sizing_eval(Evas_Object *obj)
|
|||
|
||||
elm_coords_finger_size_adjust(fingx, &minw, fingy, &minh);
|
||||
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
else
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
efl_gfx_hint_size_restricted_max_set(obj, max);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Error
|
||||
|
|
|
@ -38,11 +38,11 @@ _sizing_eval(Evas_Object *obj,
|
|||
evas_object_size_hint_min_get(obj, &cminw, &cminh);
|
||||
if ((minw == cminw) && (minh == cminh)) return;
|
||||
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
evas_object_size_hint_max_set(obj, -1, -1);
|
||||
else
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
evas_object_size_hint_max_set(obj, -1, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -802,11 +802,8 @@ _efl_ui_image_sizing_eval(Evas_Object *obj)
|
|||
}
|
||||
}
|
||||
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
else
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
efl_gfx_hint_size_restricted_max_set(obj, EINA_SIZE2D(maxw, maxh));
|
||||
|
||||
if (sd->img)
|
||||
{
|
||||
|
|
|
@ -111,16 +111,12 @@ _photocam_image_file_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd)
|
|||
static void
|
||||
_sizing_eval(Evas_Object *obj)
|
||||
{
|
||||
Evas_Coord minw = 0, minh = 0, maxw = -1, maxh = -1;
|
||||
Evas_Coord minw = 0, minh = 0;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
Eina_Size2D max = efl_gfx_hint_size_combined_max_get(wd->resize_obj);
|
||||
|
||||
evas_object_size_hint_max_get
|
||||
(wd->resize_obj, &maxw, &maxh);
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
else
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
efl_gfx_hint_size_restricted_max_set(obj, max);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1864,10 +1860,7 @@ _efl_ui_image_zoomable_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Image_Zoomable
|
|||
(priv->img, EVAS_CALLBACK_IMAGE_PRELOADED, _main_img_preloaded_cb, obj);
|
||||
|
||||
edje_object_size_min_calc(edje, &minw, &minh);
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
else
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
|
||||
_efl_ui_image_zoomable_edje_object_attach(obj);
|
||||
|
||||
|
|
|
@ -119,7 +119,6 @@ _efl_ui_internal_text_scroller_efl_canvas_group_group_calculate(Eo *obj,
|
|||
|
||||
efl_gfx_entity_size_set(sd->text_table, fsz);
|
||||
efl_gfx_hint_size_restricted_min_set(obj, size);
|
||||
efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, size.h));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -210,10 +210,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Data *sd, Elm_Layout_Data *ld)
|
|||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
|
||||
if (ld)
|
||||
{
|
||||
ld->restricted_calc_w = ld->restricted_calc_h = EINA_FALSE;
|
||||
efl_gfx_hint_size_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
}
|
||||
ld->restricted_calc_w = ld->restricted_calc_h = EINA_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2518,6 +2515,34 @@ _efl_ui_layout_base_efl_ui_factory_bind_factory_bind(Eo *obj EINA_UNUSED, Efl_Ui
|
|||
_efl_ui_layout_view_model_content_update(pd, tracking, ss_key);
|
||||
}
|
||||
|
||||
EOLIAN void
|
||||
_efl_ui_layout_base_efl_ui_i18n_language_set(Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED, const char *locale)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
efl_ui_language_set(wd->resize_obj, locale);
|
||||
}
|
||||
|
||||
EOLIAN const char *
|
||||
_efl_ui_layout_base_efl_ui_i18n_language_get(const Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
||||
return efl_ui_language_get(wd->resize_obj);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_layout_base_efl_ui_l10n_l10n_text_set(Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED, const char *label, const char *domain)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
efl_ui_l10n_text_set(efl_part(obj, efl_ui_widget_default_text_part_get(obj)), label, domain);
|
||||
}
|
||||
|
||||
EOLIAN static const char *
|
||||
_efl_ui_layout_base_efl_ui_l10n_l10n_text_get(const Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED, const char **domain)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
||||
return efl_ui_l10n_text_get(efl_part(obj, efl_ui_widget_default_text_part_get(obj)), domain);
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_layout_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -107,6 +107,8 @@ abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container,
|
|||
Efl.Part.part_get;
|
||||
Efl.Ui.Property_Bind.property_bind;
|
||||
Efl.Ui.Factory_Bind.factory_bind;
|
||||
Efl.Ui.L10n.l10n_text { get; set; }
|
||||
Efl.Ui.I18n.language { get; set; }
|
||||
}
|
||||
events {
|
||||
theme,changed: void; [[Called when theme changed]]
|
||||
|
|
|
@ -65,7 +65,7 @@ _item_size_calc(Efl_Ui_List_View_Precise_Layouter_Data *pd, Efl_Ui_List_View_Lay
|
|||
efl_gfx_hint_margin_get(pd->modeler, &boxl, &boxr, &boxt, &boxb);
|
||||
efl_gfx_hint_align_get(item->layout, &align[0], &align[1]);
|
||||
efl_gfx_hint_fill_get(item->layout, &fill[0], &fill[1]);
|
||||
max = efl_gfx_hint_size_max_get(item->layout);
|
||||
max = efl_gfx_hint_size_combined_max_get(item->layout);
|
||||
|
||||
// box outer margin
|
||||
boxw -= boxl + boxr;
|
||||
|
|
|
@ -138,18 +138,6 @@ _efl_ui_popup_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
|
|||
return pd->align;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_popup_popup_size_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Size2D size)
|
||||
{
|
||||
efl_gfx_entity_size_set(obj, size);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Size2D
|
||||
_efl_ui_popup_popup_size_get(const Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return efl_gfx_entity_size_get(obj);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_timer_cb(void *data)
|
||||
{
|
||||
|
|
|
@ -36,17 +36,6 @@ class @beta Efl.Ui.Popup extends Efl.Ui.Layout_Base implements Efl.Content, Efl.
|
|||
time: double; [[Timeout in seconds]]
|
||||
}
|
||||
}
|
||||
@property popup_size {
|
||||
set {
|
||||
[[Set the popup size.]]
|
||||
}
|
||||
get {
|
||||
[[get the current popup size.]]
|
||||
}
|
||||
values {
|
||||
size: Eina.Size2D;
|
||||
}
|
||||
}
|
||||
}
|
||||
parts {
|
||||
backwall: Efl.Ui.Popup_Part_Backwall; [[A backwall behind the popup.]]
|
||||
|
|
|
@ -497,7 +497,7 @@ _hash_child_init_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key E
|
|||
calc->aspect[1] = aspect.h;
|
||||
efl_gfx_hint_margin_get(child->obj, &calc->margin[LEFT], &calc->margin[RIGHT],
|
||||
&calc->margin[TOP], &calc->margin[BOTTOM]);
|
||||
max = efl_gfx_hint_size_max_get(child->obj);
|
||||
max = efl_gfx_hint_size_combined_max_get(child->obj);
|
||||
min = efl_gfx_hint_size_combined_min_get(child->obj);
|
||||
calc->max[0] = max.w;
|
||||
calc->max[1] = max.h;
|
||||
|
|
|
@ -19,18 +19,19 @@ static void
|
|||
_scroller_sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd,
|
||||
Eina_Size2D obj_min, Eina_Size2D scr_min)
|
||||
{
|
||||
Eina_Size2D max_size;
|
||||
max_size.w = -1;
|
||||
max_size.h = -1;
|
||||
Eina_Size2D max_size, min_size;
|
||||
max_size = efl_gfx_hint_size_max_get(obj);
|
||||
|
||||
if (pd->max_size.w != -1)
|
||||
max_size.w = (obj_min.w > pd->max_size.w) ? obj_min.w : pd->max_size.w;
|
||||
if (pd->max_size.h != -1)
|
||||
max_size.h = (obj_min.h > pd->max_size.h) ? obj_min.h : pd->max_size.h;
|
||||
if (max_size.w != -1)
|
||||
max_size.w = (obj_min.w > max_size.w) ? obj_min.w : max_size.w;
|
||||
if (max_size.h != -1)
|
||||
max_size.h = (obj_min.h > max_size.h) ? obj_min.h : max_size.h;
|
||||
|
||||
min_size = efl_gfx_hint_size_min_get(obj);
|
||||
|
||||
Eina_Size2D size;
|
||||
size.w = (obj_min.w > pd->size.w) ? obj_min.w : pd->size.w;
|
||||
size.h = (obj_min.h > pd->size.h) ? obj_min.h : pd->size.h;
|
||||
size.w = (obj_min.w > min_size.w) ? obj_min.w : min_size.w;
|
||||
size.h = (obj_min.h > min_size.h) ? obj_min.h : min_size.h;
|
||||
|
||||
Eina_Size2D new_min = obj_min;
|
||||
|
||||
|
@ -214,48 +215,6 @@ _efl_ui_scroll_alert_popup_text_get(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Alert_Pop
|
|||
return efl_text_get(efl_part(efl_super(obj, MY_CLASS), part));
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroll_alert_popup_expandable_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Alert_Popup_Data *pd, Eina_Size2D max_size)
|
||||
{
|
||||
Eina_Bool valid_max_w = EINA_FALSE;
|
||||
Eina_Bool valid_max_h = EINA_FALSE;
|
||||
|
||||
if ((max_size.w == -1) || (max_size.w >= 0))
|
||||
valid_max_w = EINA_TRUE;
|
||||
|
||||
if ((max_size.h == -1) || (max_size.h >= 0))
|
||||
valid_max_h = EINA_TRUE;
|
||||
|
||||
if (!valid_max_w || !valid_max_h)
|
||||
{
|
||||
ERR("Invalid max size(%d, %d)!"
|
||||
"The max size should be equal to or bigger than 0. "
|
||||
"To disable expandable property, set -1 to the max size.",
|
||||
max_size.w, max_size.h);
|
||||
return;
|
||||
}
|
||||
|
||||
pd->max_size = max_size;
|
||||
|
||||
efl_canvas_group_change(obj);
|
||||
}
|
||||
|
||||
static Eina_Size2D
|
||||
_efl_ui_scroll_alert_popup_expandable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Alert_Popup_Data *pd)
|
||||
{
|
||||
return pd->max_size;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_scroll_alert_popup_efl_ui_popup_popup_size_set(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd, Eina_Size2D size)
|
||||
{
|
||||
pd->size = size;
|
||||
|
||||
efl_gfx_entity_size_set(obj, size);
|
||||
|
||||
efl_canvas_group_change(obj);
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_scroll_alert_popup_efl_object_constructor(Eo *obj,
|
||||
Efl_Ui_Scroll_Alert_Popup_Data *pd)
|
||||
|
@ -275,9 +234,6 @@ _efl_ui_scroll_alert_popup_efl_object_constructor(Eo *obj,
|
|||
efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"),
|
||||
pd->scroller);
|
||||
|
||||
pd->size = EINA_SIZE2D(0, 0);
|
||||
pd->max_size = EINA_SIZE2D(-1, -1);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,31 +3,9 @@ import eina_types;
|
|||
class @beta Efl.Ui.Scroll_Alert_Popup extends Efl.Ui.Alert_Popup
|
||||
{
|
||||
[[EFL UI Scroll Alert Popup class]]
|
||||
methods {
|
||||
@property expandable @beta {
|
||||
set {
|
||||
[[Set the expandable max size of popup.
|
||||
|
||||
If the given max_size is -1, then a popup appears with its size.
|
||||
However, if the given max_size is bigger than 0 the popup size is up to the given max_size. If popup content's min size is bigger than the given max_size the scroller appears in the popup content area.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the expandable max size of popup.
|
||||
|
||||
If the given max_size is -1, then popup appears with its size.
|
||||
However, if the given max_size is bigger than 0 the popup size is up to the given max_size. If popup content's min size is bigger than the given max_size the scroller appears in the popup content area.
|
||||
]]
|
||||
}
|
||||
values {
|
||||
max_size: Eina.Size2D; [[A 2D max size in pixel units.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Efl.Part.part_get;
|
||||
Efl.Ui.Popup.popup_size { set;}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ struct _Efl_Ui_Scroll_Alert_Popup_Data
|
|||
{
|
||||
Eo *scroller;
|
||||
Eo *content;
|
||||
Eina_Size2D size;
|
||||
Eina_Size2D max_size;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -302,7 +302,7 @@ _efl_ui_scroller_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Scroller_Data
|
|||
if (sd->content)
|
||||
{
|
||||
min = efl_gfx_hint_size_combined_min_get(sd->content);
|
||||
max = efl_gfx_hint_size_max_get(sd->content);
|
||||
max = efl_gfx_hint_size_combined_max_get(sd->content);
|
||||
efl_gfx_hint_weight_get(sd->content, &xw, &yw);
|
||||
}
|
||||
|
||||
|
|
|
@ -4999,6 +4999,7 @@ _efl_ui_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Ui_Selection_
|
|||
{
|
||||
Sel_Manager_Dropable *dropable = NULL;
|
||||
Sel_Manager_Seat_Selection *seat_sel;
|
||||
Eina_Bool remove_handler = EINA_FALSE;
|
||||
|
||||
dropable = efl_key_data_get(target_obj, "__elm_dropable");
|
||||
if (dropable)
|
||||
|
@ -5040,14 +5041,21 @@ _efl_ui_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Ui_Selection_
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE);
|
||||
if (!have_drop_list)
|
||||
{
|
||||
ecore_x_dnd_aware_set(xwin, EINA_FALSE);
|
||||
remove_handler = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
seat_sel = _sel_manager_seat_selection_init(pd, seat);
|
||||
ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del);
|
||||
ELM_SAFE_FREE(seat_sel->drop_handler, ecore_event_handler_del);
|
||||
ELM_SAFE_FREE(seat_sel->enter_handler, ecore_event_handler_del);
|
||||
ELM_SAFE_FREE(seat_sel->leave_handler, ecore_event_handler_del);
|
||||
if (remove_handler)
|
||||
{
|
||||
seat_sel = _sel_manager_seat_selection_init(pd, seat);
|
||||
ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del);
|
||||
ELM_SAFE_FREE(seat_sel->drop_handler, ecore_event_handler_del);
|
||||
ELM_SAFE_FREE(seat_sel->enter_handler, ecore_event_handler_del);
|
||||
ELM_SAFE_FREE(seat_sel->leave_handler, ecore_event_handler_del);
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -53,5 +53,7 @@ class Efl.Ui.Table extends Efl.Ui.Widget implements Efl.Pack_Table, Efl.Pack_Lay
|
|||
Efl.Pack_Table.table_rows { get; set; }
|
||||
Efl.Pack_Layout.layout_update;
|
||||
Efl.Pack_Layout.layout_request;
|
||||
@empty Efl.Ui.L10n.l10n_text { get; set; }
|
||||
@empty Efl.Ui.I18n.language { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,18 +20,20 @@
|
|||
static void
|
||||
_scroller_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D obj_min, Eina_Size2D text_min)
|
||||
{
|
||||
Eina_Size2D max_size;
|
||||
max_size.w = -1;
|
||||
max_size.h = -1;
|
||||
Eina_Size2D max_size, min_size;
|
||||
|
||||
if (pd->max_size.w != -1)
|
||||
max_size.w = (obj_min.w > pd->max_size.w) ? obj_min.w : pd->max_size.w;
|
||||
if (pd->max_size.h != -1)
|
||||
max_size.h = (obj_min.h > pd->max_size.h) ? obj_min.h : pd->max_size.h;
|
||||
max_size = efl_gfx_hint_size_max_get(obj);
|
||||
|
||||
if (max_size.w != -1)
|
||||
max_size.w = (obj_min.w > max_size.w) ? obj_min.w : max_size.w;
|
||||
if (max_size.h != -1)
|
||||
max_size.h = (obj_min.h > max_size.h) ? obj_min.h : max_size.h;
|
||||
|
||||
min_size = efl_gfx_hint_size_min_get(obj);
|
||||
|
||||
Eina_Size2D size;
|
||||
size.w = (obj_min.w > pd->size.w) ? obj_min.w : pd->size.w;
|
||||
size.h = (obj_min.h > pd->size.h) ? obj_min.h : pd->size.h;
|
||||
size.w = (obj_min.w > min_size.w) ? obj_min.w : min_size.w;
|
||||
size.h = (obj_min.h > min_size.h) ? obj_min.h : min_size.h;
|
||||
|
||||
text_min.w = (obj_min.w > text_min.w) ? obj_min.w : text_min.w;
|
||||
text_min.h = (obj_min.h > text_min.h) ? obj_min.h : text_min.h;
|
||||
|
@ -107,16 +109,6 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D obj
|
|||
efl_gfx_hint_size_restricted_min_set(obj, new_min);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_text_alert_popup_efl_ui_popup_popup_size_set(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D size)
|
||||
{
|
||||
pd->size = size;
|
||||
|
||||
efl_gfx_entity_size_set(obj, size);
|
||||
|
||||
efl_canvas_group_change(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd)
|
||||
{
|
||||
|
@ -239,32 +231,6 @@ _efl_ui_text_alert_popup_efl_text_text_get(const Eo *obj, Efl_Ui_Text_Alert_Popu
|
|||
return _efl_ui_text_alert_popup_text_get(obj, pd, "efl.text");
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_text_alert_popup_expandable_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D max_size)
|
||||
{
|
||||
Eina_Bool valid_max_w = EINA_FALSE;
|
||||
Eina_Bool valid_max_h = EINA_FALSE;
|
||||
|
||||
if ((max_size.w == -1) || (max_size.w >= 0))
|
||||
valid_max_w = EINA_TRUE;
|
||||
|
||||
if ((max_size.h == -1) || (max_size.h >= 0))
|
||||
valid_max_h = EINA_TRUE;
|
||||
|
||||
if (!valid_max_w || !valid_max_h)
|
||||
{
|
||||
ERR("Invalid max size(%d, %d)!"
|
||||
"The max size should be equal to or bigger than 0. "
|
||||
"To disable expandable property, set -1 to the max size.",
|
||||
max_size.w, max_size.h);
|
||||
return;
|
||||
}
|
||||
|
||||
pd->max_size = max_size;
|
||||
|
||||
efl_canvas_group_change(obj);
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_text_alert_popup_efl_object_constructor(Eo *obj,
|
||||
Efl_Ui_Text_Alert_Popup_Data *pd)
|
||||
|
@ -284,9 +250,6 @@ _efl_ui_text_alert_popup_efl_object_constructor(Eo *obj,
|
|||
efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"),
|
||||
pd->scroller);
|
||||
|
||||
pd->size = EINA_SIZE2D(0, 0);
|
||||
pd->max_size = EINA_SIZE2D(-1, -1);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,25 +3,9 @@ import eina_types;
|
|||
class @beta Efl.Ui.Text_Alert_Popup extends Efl.Ui.Alert_Popup implements Efl.Text
|
||||
{
|
||||
[[EFL UI Text Alert Popup class]]
|
||||
methods {
|
||||
@property expandable {
|
||||
set {
|
||||
[[Set the expandable of popup.
|
||||
|
||||
If the contents of the popup has min size, the popup will be increased by min size along the Y axis.
|
||||
If max hint is set it will be increased to the value of max hint
|
||||
and scrolling will occur.
|
||||
]]
|
||||
}
|
||||
values {
|
||||
max_size: Eina.Size2D; [[A 2D max size in pixel units.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Efl.Ui.Popup.popup_size { set;}
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Part.part_get;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ struct _Efl_Ui_Text_Alert_Popup_Data
|
|||
{
|
||||
Eo *scroller;
|
||||
Eo *message;
|
||||
Eina_Size2D size;
|
||||
Eina_Size2D max_size;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -17,7 +17,7 @@ struct Efl.Ui.Widget_Focus_State {
|
|||
|
||||
abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
|
||||
Efl.Access.Component, Efl.Part, Efl.Ui.Focus.Object,
|
||||
Efl.Ui.L10n,
|
||||
Efl.Ui.I18n, Efl.Ui.L10n,
|
||||
Efl.Ui.Selection, Efl.Ui.Dnd,
|
||||
Efl.Ui.Property_Bind, Efl.Ui.View
|
||||
{
|
||||
|
|
|
@ -189,7 +189,7 @@ _efl_ui_widget_factory_efl_part_part_get(const Eo *obj,
|
|||
part = efl_add(EFL_UI_PROPERTY_BIND_PART_CLASS, (Eo*) obj);
|
||||
if (!part) return NULL;
|
||||
|
||||
ppd = efl_data_scope_get(obj, EFL_UI_PROPERTY_BIND_PART_CLASS);
|
||||
ppd = efl_data_scope_get(part, EFL_UI_PROPERTY_BIND_PART_CLASS);
|
||||
ppd->name = eina_stringshare_add(name);
|
||||
ppd->pd = pd;
|
||||
|
||||
|
@ -213,6 +213,12 @@ _efl_ui_property_bind_part_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSE
|
|||
Efl_Ui_Bind_Part_Data *bpd;
|
||||
Efl_Ui_Property_Bind_Data *bppd;
|
||||
|
||||
if (!pd->pd)
|
||||
{
|
||||
EINA_LOG_ERR("Trying to bind part property without specifying which part");
|
||||
return ENOENT;
|
||||
}
|
||||
|
||||
if (!pd->pd->parts)
|
||||
pd->pd->parts = eina_hash_stringshared_new(NULL);
|
||||
|
||||
|
@ -228,13 +234,15 @@ _efl_ui_property_bind_part_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSE
|
|||
}
|
||||
|
||||
bppd = calloc(1, sizeof (Efl_Ui_Property_Bind_Data));
|
||||
if (bppd) return ENOMEM;
|
||||
if (!bppd) return ENOMEM;
|
||||
|
||||
bppd->part_property = eina_stringshare_add(key);
|
||||
bppd->model_property = eina_stringshare_add(property);
|
||||
|
||||
bpd->properties = eina_list_append(bpd->properties, bppd);
|
||||
|
||||
efl_event_callback_call(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND, (void*) key);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -963,7 +963,7 @@ _elm_win_size_hints_update(Efl_Ui_Win *win, Efl_Ui_Win_Data *sd)
|
|||
Eina_Size2D min, max;
|
||||
|
||||
min = efl_gfx_hint_size_combined_min_get(win);
|
||||
max = efl_gfx_hint_size_max_get(win);
|
||||
max = efl_gfx_hint_size_combined_max_get(win);
|
||||
if (max.w < 1) max.w = -1;
|
||||
if (max.h < 1) max.h = -1;
|
||||
|
||||
|
@ -1637,7 +1637,7 @@ _win_rotate(Evas_Object *obj, Efl_Ui_Win_Data *sd, int rotation, Eina_Bool resiz
|
|||
if (resize) TRAP(sd, rotation_with_resize_set, rotation);
|
||||
else TRAP(sd, rotation_set, rotation);
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(-1, -1));
|
||||
efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, -1));
|
||||
efl_gfx_hint_size_restricted_max_set(obj, EINA_SIZE2D(-1, -1));
|
||||
_elm_win_resize_objects_eval(obj, EINA_FALSE);
|
||||
#ifdef HAVE_ELEMENTARY_X
|
||||
_elm_win_xwin_update(sd);
|
||||
|
@ -2694,6 +2694,12 @@ _efl_ui_win_efl_canvas_scene_group_objects_calculate(Eo *obj EINA_UNUSED, Efl_Ui
|
|||
evas_smart_objects_calculate(sd->evas);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_efl_canvas_scene_group_objects_calculating_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
{
|
||||
return efl_canvas_scene_group_objects_calculating_get(sd->evas);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Iterator *
|
||||
_efl_ui_win_efl_canvas_scene_objects_at_xy_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Position2D pos, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
||||
{
|
||||
|
@ -3695,6 +3701,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
|
|||
evas_object_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
|
||||
if ((!minw) && (!minh) && (!sd->deferred_resize_job)) return;
|
||||
|
||||
efl_gfx_hint_size_restricted_max_set(obj, EINA_SIZE2D(-1, -1));
|
||||
// If content has a weight, make resizable
|
||||
efl_gfx_hint_weight_get(sd->legacy.edje, &wx, &wy);
|
||||
|
||||
|
@ -3716,6 +3723,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
|
|||
if (maxh > 32767) maxh = 32767;
|
||||
|
||||
unresizable = ((minw == maxw) && (minh == maxh));
|
||||
|
||||
if (sd->csd.need_unresizable != unresizable)
|
||||
{
|
||||
sd->csd.need_unresizable = unresizable;
|
||||
|
@ -3735,7 +3743,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
|
|||
|
||||
sd->tmp_updating_hints = 1;
|
||||
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
|
||||
efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(maxw, maxh));
|
||||
efl_gfx_hint_size_restricted_max_set(obj, EINA_SIZE2D(maxw, maxh));
|
||||
sd->tmp_updating_hints = 0;
|
||||
_elm_win_size_hints_update(obj, sd);
|
||||
|
||||
|
@ -5976,6 +5984,33 @@ _efl_ui_win_efl_text_text_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
|||
return sd->title;
|
||||
}
|
||||
|
||||
EOLIAN void
|
||||
_efl_ui_win_efl_ui_i18n_language_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *locale)
|
||||
{
|
||||
if (sd->frame_obj)
|
||||
efl_ui_language_set(sd->frame_obj, locale);
|
||||
}
|
||||
|
||||
EOLIAN const char *
|
||||
_efl_ui_win_efl_ui_i18n_language_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
{
|
||||
return sd->frame_obj ? efl_ui_language_get(sd->frame_obj) : NULL;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_efl_ui_l10n_l10n_text_set(Eo *obj, Efl_Ui_Win_Data *sd, const char *label, const char *domain)
|
||||
{
|
||||
if (sd->frame_obj)
|
||||
efl_ui_l10n_text_set(efl_part(obj, "efl.text.title"), label, domain);
|
||||
}
|
||||
|
||||
EOLIAN static const char *
|
||||
_efl_ui_win_efl_ui_l10n_l10n_text_get(const Eo *obj, Efl_Ui_Win_Data *sd, const char **domain)
|
||||
{
|
||||
return sd->frame_obj ?
|
||||
efl_ui_l10n_text_get(efl_part(obj, "efl.text.title"), domain) : NULL;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_win_type_set(Eo *obj, Efl_Ui_Win_Data *sd, Efl_Ui_Win_Type type)
|
||||
{
|
||||
|
@ -6966,10 +7001,17 @@ _efl_ui_win_efl_screen_screen_rotation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win
|
|||
{
|
||||
//TODO: query to wm about device's rotation
|
||||
(void)sd;
|
||||
|
||||
WRN("Not yet implemented");
|
||||
return 0;
|
||||
}
|
||||
|
||||
EOLIAN static float
|
||||
_efl_ui_win_efl_screen_screen_scale_factor_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd EINA_UNUSED)
|
||||
{
|
||||
WRN("Not yet implemented");
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_prop_focus_skip_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool skip)
|
||||
{
|
||||
|
|
|
@ -848,15 +848,19 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
|
|||
Efl.Screen.screen_dpi { get; }
|
||||
Efl.Screen.screen_rotation { get; }
|
||||
Efl.Screen.screen_size_in_pixels { get; }
|
||||
Efl.Screen.screen_scale_factor { get; }
|
||||
Efl.Gfx.Hint.hint_aspect { set; }
|
||||
Efl.Gfx.Hint.hint_weight { set; }
|
||||
Efl.Gfx.Hint.hint_size_max { set; }
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Ui.L10n.l10n_text { get; set; }
|
||||
Efl.Ui.I18n.language { get; set; }
|
||||
Efl.Canvas.Scene.seat_default { get; }
|
||||
Efl.Canvas.Scene.pointer_position { get; }
|
||||
Efl.Canvas.Pointer.pointer_inside { get; }
|
||||
Efl.Canvas.Scene.image_max_size { get; }
|
||||
Efl.Canvas.Scene.group_objects_calculate;
|
||||
Efl.Canvas.Scene.group_objects_calculating { get; }
|
||||
Efl.Canvas.Scene.objects_at_xy_get;
|
||||
Efl.Canvas.Scene.object_top_at_xy_get;
|
||||
Efl.Canvas.Scene.objects_in_rectangle_get;
|
||||
|
|
|
@ -730,6 +730,16 @@ _selection_data_cb(void *data EINA_UNUSED,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!(sel_data->format & ELM_SEL_FORMAT_MARKUP))
|
||||
{
|
||||
char *txt = _elm_util_text_to_mkup(buf);
|
||||
if (txt)
|
||||
{
|
||||
_edje_entry_user_insert(obj, txt);
|
||||
free(txt);
|
||||
}
|
||||
}
|
||||
else
|
||||
_edje_entry_user_insert(obj, buf);
|
||||
}
|
||||
free(buf);
|
||||
|
|
|
@ -911,7 +911,7 @@ _ethumb_generate_hash(const char *file)
|
|||
{
|
||||
char *tmp;
|
||||
|
||||
tmp = alloca(length);
|
||||
tmp = alloca(length + 1);
|
||||
length = getxattr(file, "user.e.md5", tmp, length);
|
||||
|
||||
/* check if we have at least something that look like a md5 hash */
|
||||
|
|
|
@ -61,6 +61,15 @@ evas_object_size_hint_combined_min_get(const Eo *obj, int *w, int *h)
|
|||
if (h) *h = sz.h;
|
||||
}
|
||||
|
||||
static inline void
|
||||
evas_object_size_hint_combined_max_get(const Eo *obj, int *w, int *h)
|
||||
{
|
||||
Eina_Size2D sz;
|
||||
sz = efl_gfx_hint_size_combined_max_get(obj);
|
||||
if (w) *w = sz.w;
|
||||
if (h) *h = sz.h;
|
||||
}
|
||||
|
||||
/* Internal EO APIs */
|
||||
EAPI Eo *evas_find(const Eo *obj);
|
||||
EOAPI void efl_canvas_object_legacy_ctor(Eo *obj);
|
||||
|
|
|
@ -8,7 +8,7 @@ struct Efl.Event_Animator_Tick {
|
|||
|
||||
abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack,
|
||||
Efl.Input.Interface, Efl.Gfx.Hint,
|
||||
Efl.Gfx.Mapping, Efl.Ui.I18n, Efl.Canvas.Pointer, Efl.Gesture.Events
|
||||
Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Gesture.Events
|
||||
{
|
||||
[[Efl canvas object abstract class
|
||||
|
||||
|
@ -540,7 +540,9 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
|
|||
Efl.Gfx.Hint.hint_aspect { get; set; }
|
||||
Efl.Gfx.Hint.hint_align { get; set; }
|
||||
Efl.Gfx.Hint.hint_size_combined_min { get; }
|
||||
Efl.Gfx.Hint.hint_size_combined_max { get; }
|
||||
Efl.Gfx.Hint.hint_size_restricted_min { get; set; }
|
||||
Efl.Gfx.Hint.hint_size_restricted_max { get; set; }
|
||||
Efl.Gfx.Hint.hint_size_min { get; set; }
|
||||
Efl.Gfx.Hint.hint_size_max { get; set; }
|
||||
Efl.Gfx.Hint.hint_margin { get; set; }
|
||||
|
|
|
@ -90,7 +90,12 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
|
|||
obj->map->cur.map->normal_geometry.y = yy1;
|
||||
obj->map->cur.map->normal_geometry.w = (x2 - x1);
|
||||
obj->map->cur.map->normal_geometry.h = (yy2 - yy1);
|
||||
obj->changed_map = ch;
|
||||
|
||||
/* if change_map is true, it means that the prev map data
|
||||
did not render before. even though both prev and cur
|
||||
has same map points we need to draw it */
|
||||
obj->changed_map |= ch;
|
||||
|
||||
// This shouldn't really be needed, but without it we do have case
|
||||
// where the clip is wrong when a map doesn't change, so always forcing
|
||||
// it, as long as someone doesn't find a better fix.
|
||||
|
|
|
@ -1405,6 +1405,8 @@ _evas_object_size_hint_alloc(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protec
|
|||
obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints);
|
||||
if (!obj->size_hints) return;
|
||||
EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints);
|
||||
obj->size_hints->user_max.w = -1;
|
||||
obj->size_hints->user_max.h = -1;
|
||||
obj->size_hints->max.w = -1;
|
||||
obj->size_hints->max.h = -1;
|
||||
obj->size_hints->align.x = 0.5;
|
||||
|
@ -1443,6 +1445,37 @@ evas_object_size_hint_display_mode_set(Eo *eo_obj, Evas_Display_Mode dispmode)
|
|||
evas_object_inform_call_changed_size_hints(eo_obj, obj);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Size2D
|
||||
_efl_canvas_object_efl_gfx_hint_hint_size_restricted_max_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
return EINA_SIZE2D(0, 0);
|
||||
|
||||
return obj->size_hints->max;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_canvas_object_efl_gfx_hint_hint_size_restricted_max_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Size2D sz)
|
||||
{
|
||||
if (obj->delete_me)
|
||||
return;
|
||||
|
||||
EVAS_OBJECT_DATA_VALID_CHECK(obj);
|
||||
evas_object_async_block(obj);
|
||||
if (EINA_UNLIKELY(!obj->size_hints))
|
||||
{
|
||||
if (!sz.w && !sz.h) return;
|
||||
_evas_object_size_hint_alloc(eo_obj, obj);
|
||||
}
|
||||
if ((obj->size_hints->max.w == sz.w) && (obj->size_hints->max.h == sz.h)) return;
|
||||
obj->size_hints->max = sz;
|
||||
if ((obj->size_hints->max.w != -1) && (obj->size_hints->max.w < obj->size_hints->min.w))
|
||||
ERR("restricted max width hint is now smaller than restricted min width hint! (%d < %d)", obj->size_hints->max.w, obj->size_hints->min.w);
|
||||
if ((obj->size_hints->max.h != -1) && (obj->size_hints->max.h < obj->size_hints->min.h))
|
||||
ERR("restricted max height hint is now smaller than restricted min height hint! (%d < %d)", obj->size_hints->max.h, obj->size_hints->min.h);
|
||||
evas_object_inform_call_changed_size_hints(eo_obj, obj);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Size2D
|
||||
_efl_canvas_object_efl_gfx_hint_hint_size_restricted_min_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||
{
|
||||
|
@ -1467,7 +1500,10 @@ _efl_canvas_object_efl_gfx_hint_hint_size_restricted_min_set(Eo *eo_obj, Evas_Ob
|
|||
}
|
||||
if ((obj->size_hints->min.w == sz.w) && (obj->size_hints->min.h == sz.h)) return;
|
||||
obj->size_hints->min = sz;
|
||||
|
||||
if ((obj->size_hints->max.w != -1) && (obj->size_hints->max.w < obj->size_hints->min.w))
|
||||
ERR("restricted max width hint is now smaller than restricted min width hint! (%d < %d)", obj->size_hints->max.w, obj->size_hints->min.w);
|
||||
if ((obj->size_hints->max.h != -1) && (obj->size_hints->max.h < obj->size_hints->min.h))
|
||||
ERR("restricted max height hint is now smaller than restricted min height hint! (%d < %d)", obj->size_hints->max.h, obj->size_hints->min.h);
|
||||
evas_object_inform_call_changed_size_hints(eo_obj, obj);
|
||||
}
|
||||
|
||||
|
@ -1479,8 +1515,50 @@ _efl_canvas_object_efl_gfx_hint_hint_size_combined_min_get(const Eo *eo_obj EINA
|
|||
if ((!obj->size_hints) || obj->delete_me)
|
||||
return sz;
|
||||
|
||||
sz.w = MAX(obj->size_hints->min.w, obj->size_hints->user_min.w);
|
||||
sz.h = MAX(obj->size_hints->min.h, obj->size_hints->user_min.h);
|
||||
sz.w = obj->size_hints->user_min.w;
|
||||
if (obj->size_hints->max.w != -1)
|
||||
sz.w = obj->size_hints->max.w;
|
||||
sz.h = obj->size_hints->user_min.h;
|
||||
if (obj->size_hints->max.h != -1)
|
||||
sz.h = obj->size_hints->max.h;
|
||||
|
||||
/* clamp user min to restricted max here */
|
||||
sz.w = MAX(obj->size_hints->min.w, MIN(sz.w, obj->size_hints->user_min.w));
|
||||
sz.h = MAX(obj->size_hints->min.h, MIN(sz.h, obj->size_hints->user_min.h));
|
||||
return sz;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Size2D
|
||||
_efl_canvas_object_efl_gfx_hint_hint_size_combined_max_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||
{
|
||||
Eina_Size2D sz = { -1, -1 };
|
||||
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
return sz;
|
||||
|
||||
sz.w = obj->size_hints->user_max.w;
|
||||
sz.h = obj->size_hints->user_max.h;
|
||||
|
||||
/* clamp user max to restricted max here */
|
||||
if (obj->size_hints->max.w != -1)
|
||||
{
|
||||
if (sz.w == -1)
|
||||
sz.w = obj->size_hints->max.w;
|
||||
else
|
||||
sz.w = MIN(obj->size_hints->max.w, sz.w);
|
||||
}
|
||||
if (obj->size_hints->max.h != -1)
|
||||
{
|
||||
if (sz.h == -1)
|
||||
sz.h = obj->size_hints->max.h;
|
||||
else
|
||||
sz.h = MIN(obj->size_hints->max.h, sz.h);
|
||||
}
|
||||
/* then clamp to restricted min */
|
||||
if ((sz.w != -1) && obj->size_hints->min.w > 0)
|
||||
sz.w = MAX(sz.w, obj->size_hints->min.w);
|
||||
if ((sz.h != -1) && obj->size_hints->min.h > 0)
|
||||
sz.h = MAX(sz.h, obj->size_hints->min.h);
|
||||
return sz;
|
||||
}
|
||||
|
||||
|
@ -1490,7 +1568,7 @@ _efl_canvas_object_efl_gfx_hint_hint_size_max_get(const Eo *eo_obj EINA_UNUSED,
|
|||
if ((!obj->size_hints) || obj->delete_me)
|
||||
return EINA_SIZE2D(-1, -1);
|
||||
|
||||
return obj->size_hints->max;
|
||||
return obj->size_hints->user_max;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -1506,9 +1584,13 @@ _efl_canvas_object_efl_gfx_hint_hint_size_max_set(Eo *eo_obj, Evas_Object_Protec
|
|||
if ((sz.w == -1) && (sz.h == -1)) return;
|
||||
_evas_object_size_hint_alloc(eo_obj, obj);
|
||||
}
|
||||
if ((obj->size_hints->max.w == sz.w) && (obj->size_hints->max.h == sz.h)) return;
|
||||
obj->size_hints->max.w = sz.w;
|
||||
obj->size_hints->max.h = sz.h;
|
||||
if ((obj->size_hints->user_max.w == sz.w) && (obj->size_hints->user_max.h == sz.h)) return;
|
||||
obj->size_hints->user_max.w = sz.w;
|
||||
obj->size_hints->user_max.h = sz.h;
|
||||
if ((obj->size_hints->user_max.w != -1) && (obj->size_hints->user_max.w < obj->size_hints->user_min.w))
|
||||
ERR("user_max width hint is now smaller than user_min width hint! (%d < %d)", obj->size_hints->user_max.w, obj->size_hints->user_min.w);
|
||||
if ((obj->size_hints->user_max.h != -1) && (obj->size_hints->user_max.h < obj->size_hints->user_min.h))
|
||||
ERR("user_max height hint is now smaller than user_min height hint! (%d < %d)", obj->size_hints->user_max.h, obj->size_hints->user_min.h);
|
||||
|
||||
evas_object_inform_call_changed_size_hints(eo_obj, obj);
|
||||
}
|
||||
|
@ -1572,7 +1654,10 @@ _efl_canvas_object_efl_gfx_hint_hint_size_min_set(Eo *eo_obj, Evas_Object_Protec
|
|||
}
|
||||
if ((obj->size_hints->user_min.w == sz.w) && (obj->size_hints->user_min.h == sz.h)) return;
|
||||
obj->size_hints->user_min = sz;
|
||||
|
||||
if ((obj->size_hints->user_max.w != -1) && (obj->size_hints->max.w < obj->size_hints->user_min.w))
|
||||
ERR("max width hint is now smaller than min width hint! (%d < %d)", obj->size_hints->user_max.w, obj->size_hints->user_min.w);
|
||||
if ((obj->size_hints->user_max.h != -1) && (obj->size_hints->max.h < obj->size_hints->user_min.h))
|
||||
ERR("max height hint is now smaller than min height hint! (%d < %d)", obj->size_hints->user_max.h, obj->size_hints->user_min.h);
|
||||
evas_object_inform_call_changed_size_hints(eo_obj, obj);
|
||||
}
|
||||
|
||||
|
|
|
@ -959,7 +959,7 @@ struct _Evas_Double_Pair
|
|||
struct _Evas_Size_Hints
|
||||
{
|
||||
Evas_Size request;
|
||||
Eina_Size2D min, user_min, max;
|
||||
Eina_Size2D min, user_min, max, user_max;
|
||||
Evas_Aspect aspect;
|
||||
Evas_Double_Pair align, weight;
|
||||
Evas_Border padding;
|
||||
|
|
|
@ -3,7 +3,10 @@ mod_src = files([
|
|||
'wayland_imcontext.c',
|
||||
'wayland_imcontext.h'
|
||||
])
|
||||
mod_deps = [ecore, ecore_imf, ecore_wl2, wayland_protocol, ecore_evas, ecore_input]
|
||||
|
||||
libxkbcommon = dependency('xkbcommon', version : ['>=0.3.0'])
|
||||
|
||||
mod_deps = [ecore, ecore_imf, ecore_wl2, wayland_protocol, ecore_evas, ecore_input, libxkbcommon]
|
||||
|
||||
shared_module(mod_name,
|
||||
mod_src,
|
||||
|
|
|
@ -212,7 +212,14 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader,
|
|||
prop->info.w = (int) epi->w32;
|
||||
prop->info.h = (int) epi->h32;
|
||||
}
|
||||
if (png_get_valid(epi->png_ptr, epi->info_ptr, PNG_INFO_tRNS)) epi->hasa = 1;
|
||||
|
||||
if (png_get_valid(epi->png_ptr, epi->info_ptr, PNG_INFO_tRNS))
|
||||
{
|
||||
/* expand transparency entry -> alpha channel if present */
|
||||
if (!close_file) png_set_tRNS_to_alpha(epi->png_ptr);
|
||||
epi->hasa = 1;
|
||||
}
|
||||
|
||||
switch (epi->color_type)
|
||||
{
|
||||
case PNG_COLOR_TYPE_RGB_ALPHA:
|
||||
|
|
|
@ -13,6 +13,7 @@ static const Efl_Test_Case etc[] =
|
|||
{ "Display", ecore_wl2_test_display },
|
||||
{ "Window", ecore_wl2_test_window },
|
||||
{ "Input", ecore_wl2_test_input },
|
||||
{ "Surface", ecore_wl2_test_surface },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
|
@ -8,5 +8,6 @@ void ecore_wl2_test_init(TCase *tc);
|
|||
void ecore_wl2_test_display(TCase *tc);
|
||||
void ecore_wl2_test_window(TCase *tc);
|
||||
void ecore_wl2_test_input(TCase *tc);
|
||||
void ecore_wl2_test_surface(TCase *tc);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <Eina.h>
|
||||
#include <Ecore.h>
|
||||
#include <Ecore_Wl2.h>
|
||||
|
||||
#include "ecore_wl2_suite.h"
|
||||
|
||||
static Ecore_Wl2_Display *
|
||||
_display_connect(void)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ecore_wl2_display_connect(NULL);
|
||||
return disp;
|
||||
}
|
||||
|
||||
static Ecore_Wl2_Window *
|
||||
_window_create(Ecore_Wl2_Display *disp)
|
||||
{
|
||||
Ecore_Wl2_Window *win;
|
||||
|
||||
win = ecore_wl2_window_new(disp, NULL, 100, 100, 500, 500);
|
||||
return win;
|
||||
}
|
||||
|
||||
EFL_START_TEST(wl2_surface_create)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
Ecore_Wl2_Surface *surf;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
|
||||
surf = ecore_wl2_surface_create(win, EINA_FALSE);
|
||||
ck_assert(surf != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_surface(TCase *tc)
|
||||
{
|
||||
if (getenv("WAYLAND_DISPLAY"))
|
||||
{
|
||||
/* surface tests can only run if there is an existing compositor */
|
||||
tcase_add_test(tc, wl2_surface_create);
|
||||
}
|
||||
}
|
|
@ -5,7 +5,8 @@ ecore_wl2_suite_src = [
|
|||
'ecore_wl2_test_ecore_wl2.c',
|
||||
'ecore_wl2_test_display.c',
|
||||
'ecore_wl2_test_window.c',
|
||||
'ecore_wl2_test_input.c'
|
||||
'ecore_wl2_test_input.c',
|
||||
'ecore_wl2_test_surface.c'
|
||||
]
|
||||
|
||||
ecore_wl2_suite = executable('ecore_wl2_suite',
|
||||
|
|
|
@ -66,7 +66,7 @@ EFL_START_TEST(efl_ui_test_popup_basic_align)
|
|||
efl_gfx_entity_size_set(win, EINA_SIZE2D(WIN_SIZE, WIN_SIZE));
|
||||
|
||||
popup = efl_add(EFL_UI_POPUP_CLASS, win);
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
|
||||
Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, popup);
|
||||
efl_text_set(btn, "Efl.Ui.Popup");
|
||||
|
@ -150,7 +150,7 @@ EFL_START_TEST(efl_ui_test_popup_basic_sizing)
|
|||
efl_gfx_entity_size_set(win, EINA_SIZE2D(WIN_SIZE, WIN_SIZE));
|
||||
|
||||
popup = efl_add(EFL_UI_POPUP_CLASS, win);
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
|
||||
Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, popup);
|
||||
efl_text_set(btn, "Efl.Ui.Popup");
|
||||
|
@ -179,7 +179,7 @@ EFL_START_TEST(efl_ui_test_popup_events)
|
|||
efl_event_callback_add(popup, EFL_UI_POPUP_EVENT_BACKWALL_CLICKED,
|
||||
(void*)event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointer_when_called, &called);
|
||||
efl_event_callback_add(popup, EFL_UI_POPUP_EVENT_TIMEOUT, event_callback_that_quits_the_main_loop_when_called, NULL);
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
|
||||
Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, popup);
|
||||
efl_text_set(btn, "Efl.Ui.Popup");
|
||||
|
@ -294,7 +294,7 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert)
|
|||
Eina_Size2D popup_sz_min;
|
||||
Eina_Size2D layout_sz_min = _popup_scroll_alert_setup(&popup, &layout);
|
||||
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
get_me_to_those_events(popup);
|
||||
|
||||
/* base popup size without content */
|
||||
|
@ -332,8 +332,8 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
|
|||
popup_sz_min = popup_sz_min1 = efl_gfx_hint_size_combined_min_get(popup);
|
||||
|
||||
/* first test horizontal expand */
|
||||
efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, -1));
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, -1));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_canvas_group_calculate(popup);
|
||||
|
||||
|
||||
|
@ -358,8 +358,8 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
|
|||
}
|
||||
|
||||
/* now expand vertically */
|
||||
efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(-1, POPUP_SIZE_EXPAND));
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(-1, POPUP_SIZE_EXPAND));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_canvas_group_calculate(popup);
|
||||
|
||||
/* base popup size without content */
|
||||
|
@ -385,8 +385,8 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
|
|||
}
|
||||
|
||||
/* now both */
|
||||
efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, POPUP_SIZE_EXPAND));
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(POPUP_SIZE_EXPAND, POPUP_SIZE_EXPAND));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_canvas_group_calculate(popup);
|
||||
|
||||
/* base popup size without content */
|
||||
|
@ -417,8 +417,8 @@ EFL_START_TEST(efl_ui_test_popup_scroll_alert_expand)
|
|||
}
|
||||
|
||||
/* now use a confining expand which ignores content min size */
|
||||
efl_ui_scroll_alert_popup_expandable_set(popup, EINA_SIZE2D(POPUP_SIZE / 2, POPUP_SIZE / 2));
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_max_set(popup, EINA_SIZE2D(POPUP_SIZE / 2, POPUP_SIZE / 2));
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_canvas_group_calculate(popup);
|
||||
|
||||
{
|
||||
|
@ -498,6 +498,7 @@ EFL_START_TEST(efl_ui_test_popup_text_alert)
|
|||
|
||||
get_me_to_those_events(popup);
|
||||
popup_sz_min1 = efl_gfx_hint_size_combined_min_get(popup);
|
||||
efl_gfx_hint_size_min_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
|
||||
for (i = 0; i < num_tests; i++)
|
||||
{
|
||||
|
@ -510,8 +511,7 @@ EFL_START_TEST(efl_ui_test_popup_text_alert)
|
|||
eina_strbuf_append(buf, test_string);
|
||||
|
||||
efl_text_set(popup, eina_strbuf_string_get(buf));
|
||||
efl_ui_text_alert_popup_expandable_set(popup, test_expands[i]);
|
||||
efl_ui_popup_size_set(popup, EINA_SIZE2D(POPUP_SIZE, POPUP_SIZE));
|
||||
efl_gfx_hint_size_max_set(popup, test_expands[i]);
|
||||
efl_canvas_group_calculate(popup);
|
||||
|
||||
/* get internal label object: VERY illegal */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Focus.Test.Sub.Main
|
||||
class @beta Focus.Test.Sub.Main
|
||||
extends Efl.Object
|
||||
implements Efl.Ui.Focus.Object, Efl.Ui.Focus.Manager_Sub, Efl.Gfx.Entity
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue