summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c1042
1 files changed, 666 insertions, 376 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 1870e28..4989adf 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -24,17 +24,18 @@
24# include "ecore_evas_wayland_private.h" 24# include "ecore_evas_wayland_private.h"
25#endif 25#endif
26 26
27#include "../evas/canvas/evas_box.eo.h" 27#include "../evas/canvas/evas_box_eo.h"
28 28
29#define EFL_INTERNAL_UNSTABLE 29#define EFL_INTERNAL_UNSTABLE
30#include "interfaces/efl_common_internal.h" 30#include "interfaces/efl_common_internal.h"
31 31
32#include "elm_part_helper.h" 32#include "elm_part_helper.h"
33#include "efl_ui_win_part.eo.h" 33#include "efl_ui_win_part.eo.h"
34#include "elm_plug.eo.h" 34#include "elm_plug_eo.h"
35#include "efl_ui_win_legacy.eo.h" 35#include "efl_ui_win_legacy_eo.h"
36#include "efl_ui_win_socket_legacy.eo.h" 36#include "efl_ui_win_socket_legacy_eo.h"
37#include "efl_ui_win_inlined_legacy.eo.h" 37#include "efl_ui_win_inlined_legacy_eo.h"
38#include "efl_ui_widget_common.h"
38 39
39#define MY_CLASS EFL_UI_WIN_CLASS 40#define MY_CLASS EFL_UI_WIN_CLASS
40#define MY_CLASS_NAME "Efl.Ui.Win" 41#define MY_CLASS_NAME "Efl.Ui.Win"
@@ -52,7 +53,7 @@ static int _paused_windows = 0;
52#define TRAP(sd, name, ...) \ 53#define TRAP(sd, name, ...) \
53 do \ 54 do \
54 { \ 55 { \
55 if (sd->type != ELM_WIN_FAKE) \ 56 if (sd->type != EFL_UI_WIN_TYPE_FAKE) \
56 if ((!trap) || (!trap->name) || \ 57 if ((!trap) || (!trap->name) || \
57 ((trap->name) && \ 58 ((trap->name) && \
58 (trap->name(sd->trap_data, sd->obj, ## __VA_ARGS__)))) \ 59 (trap->name(sd->trap_data, sd->obj, ## __VA_ARGS__)))) \
@@ -212,6 +213,7 @@ struct _Efl_Ui_Win_Data
212 int norender; 213 int norender;
213 int modal_count; 214 int modal_count;
214 int response; 215 int response;
216 int rotation;
215 Eina_Bool req_wh : 1; 217 Eina_Bool req_wh : 1;
216 Eina_Bool req_xy : 1; 218 Eina_Bool req_xy : 1;
217 219
@@ -280,7 +282,7 @@ struct _Efl_Ui_Win_Data
280 Eina_Bool autohide : 1; 282 Eina_Bool autohide : 1;
281 Eina_Bool constrain : 1; 283 Eina_Bool constrain : 1;
282 Eina_Bool resizing : 1; 284 Eina_Bool resizing : 1;
283 Eina_Bool iconified : 1; 285 Eina_Bool minimized : 1;
284 Eina_Bool withdrawn : 1; 286 Eina_Bool withdrawn : 1;
285 Eina_Bool sticky : 1; 287 Eina_Bool sticky : 1;
286 Eina_Bool fullscreen : 1; 288 Eina_Bool fullscreen : 1;
@@ -310,7 +312,7 @@ static const char SIG_FOCUS_OUT[] = "focus,out"; // deprecated. use "unfocused"
310static const char SIG_FOCUS_IN[] = "focus,in"; // deprecated. use "focused" instead. 312static const char SIG_FOCUS_IN[] = "focus,in"; // deprecated. use "focused" instead.
311static const char SIG_MOVED[] = "moved"; 313static const char SIG_MOVED[] = "moved";
312static const char SIG_WITHDRAWN[] = "withdrawn"; 314static const char SIG_WITHDRAWN[] = "withdrawn";
313static const char SIG_ICONIFIED[] = "iconified"; 315static const char SIG_MINIMIZED[] = "minimized";
314static const char SIG_NORMAL[] = "normal"; 316static const char SIG_NORMAL[] = "normal";
315static const char SIG_STICK[] = "stick"; 317static const char SIG_STICK[] = "stick";
316static const char SIG_UNSTICK[] = "unstick"; 318static const char SIG_UNSTICK[] = "unstick";
@@ -330,7 +332,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
330 {SIG_FOCUS_IN, ""}, 332 {SIG_FOCUS_IN, ""},
331 {SIG_MOVED, ""}, 333 {SIG_MOVED, ""},
332 {SIG_WITHDRAWN, ""}, 334 {SIG_WITHDRAWN, ""},
333 {SIG_ICONIFIED, ""}, 335 {SIG_MINIMIZED, ""},
334 {SIG_NORMAL, ""}, 336 {SIG_NORMAL, ""},
335 {SIG_STICK, ""}, 337 {SIG_STICK, ""},
336 {SIG_UNSTICK, ""}, 338 {SIG_UNSTICK, ""},
@@ -376,13 +378,73 @@ _elm_win_on_resize_obj_changed_size_hints(void *data,
376 void *event_info); 378 void *event_info);
377static void 379static void
378_elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj); 380_elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj);
379static Efl_Ui_Theme_Apply_Result _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd); 381static Eina_Error _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd);
380static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style); 382static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style);
381static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool calc); 383static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool calc);
382static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine); 384static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine);
383static void _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize); 385static void _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize);
384static void _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd, Eina_Bool force); 386static void _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd, Eina_Bool force);
385 387
388static inline Efl_Ui_Win_Type
389_elm_win_type_to_efl_ui_win_type(Elm_Win_Type type)
390{
391 switch (type)
392 {
393#define CONVERT_TYPE(TYPE) case ELM_WIN_##TYPE: return EFL_UI_WIN_TYPE_##TYPE
394 CONVERT_TYPE(BASIC);
395 CONVERT_TYPE(DIALOG_BASIC);
396 CONVERT_TYPE(DESKTOP);
397 CONVERT_TYPE(DOCK);
398 CONVERT_TYPE(TOOLBAR);
399 CONVERT_TYPE(MENU);
400 CONVERT_TYPE(UTILITY);
401 CONVERT_TYPE(SPLASH);
402 CONVERT_TYPE(DROPDOWN_MENU);
403 CONVERT_TYPE(POPUP_MENU);
404 CONVERT_TYPE(TOOLTIP);
405 CONVERT_TYPE(NOTIFICATION);
406 CONVERT_TYPE(COMBO);
407 CONVERT_TYPE(DND);
408 CONVERT_TYPE(INLINED_IMAGE);
409 CONVERT_TYPE(SOCKET_IMAGE);
410 CONVERT_TYPE(FAKE);
411 CONVERT_TYPE(NAVIFRAME_BASIC);
412 default: break;
413 }
414 return EFL_UI_WIN_TYPE_UNKNOWN;
415#undef CONVERT_TYPE
416}
417
418static inline Elm_Win_Type
419_efl_ui_win_type_to_elm_win_type(Efl_Ui_Win_Type type)
420{
421 switch (type)
422 {
423#define CONVERT_TYPE(TYPE) case EFL_UI_WIN_TYPE_##TYPE: return ELM_WIN_##TYPE
424 CONVERT_TYPE(BASIC);
425 CONVERT_TYPE(DIALOG_BASIC);
426 CONVERT_TYPE(DESKTOP);
427 CONVERT_TYPE(DOCK);
428 CONVERT_TYPE(TOOLBAR);
429 CONVERT_TYPE(MENU);
430 CONVERT_TYPE(UTILITY);
431 CONVERT_TYPE(SPLASH);
432 CONVERT_TYPE(DROPDOWN_MENU);
433 CONVERT_TYPE(POPUP_MENU);
434 CONVERT_TYPE(TOOLTIP);
435 CONVERT_TYPE(NOTIFICATION);
436 CONVERT_TYPE(COMBO);
437 CONVERT_TYPE(DND);
438 CONVERT_TYPE(INLINED_IMAGE);
439 CONVERT_TYPE(SOCKET_IMAGE);
440 CONVERT_TYPE(FAKE);
441 CONVERT_TYPE(NAVIFRAME_BASIC);
442 default: break;
443 }
444 return ELM_WIN_UNKNOWN;
445#undef CONVERT_TYPE
446}
447
386#ifdef HAVE_ELEMENTARY_X 448#ifdef HAVE_ELEMENTARY_X
387static void _elm_win_xwin_update(Efl_Ui_Win_Data *sd); 449static void _elm_win_xwin_update(Efl_Ui_Win_Data *sd);
388#endif 450#endif
@@ -422,7 +484,7 @@ _win_noblank_eval(void)
422 484
423 if (sd->x.xwin) 485 if (sd->x.xwin)
424 { 486 {
425 if ((sd->noblank) && (!sd->iconified) && (!sd->withdrawn) && 487 if ((sd->noblank) && (!sd->minimized) && (!sd->withdrawn) &&
426 evas_object_visible_get(obj)) 488 evas_object_visible_get(obj))
427 noblanks++; 489 noblanks++;
428 490
@@ -486,12 +548,12 @@ _elm_win_apply_alpha(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
486/* auto norender withdrawn is really only for X11. 548/* auto norender withdrawn is really only for X11.
487 * On other backends like wayland, there's actually 549 * On other backends like wayland, there's actually
488 * no way for a client to tell if the window is 550 * no way for a client to tell if the window is
489 * iconified or not. You can request iconified state 551 * minimized or not. You can request minimized state
490 * but there's no explicit feedback for iconification 552 * but there's no explicit feedback for minimization
491 * or return to normal state. 553 * or return to normal state.
492 * 554 *
493 * So, blocking drawing based on client side thinking 555 * So, blocking drawing based on client side thinking
494 * it's iconified, and having the compositor think 556 * it's minimized, and having the compositor think
495 * the client should be drawing will lead to 557 * the client should be drawing will lead to
496 * predictably disappointing results. 558 * predictably disappointing results.
497 * 559 *
@@ -522,7 +584,7 @@ _elm_win_state_eval(void *data EINA_UNUSED)
522 Eina_List *l; 584 Eina_List *l;
523 Evas_Object *obj; 585 Evas_Object *obj;
524 int _elm_win_count_shown = 0; 586 int _elm_win_count_shown = 0;
525 int _elm_win_count_iconified = 0; 587 int _elm_win_count_minimized = 0;
526 int _elm_win_count_withdrawn = 0; 588 int _elm_win_count_withdrawn = 0;
527 Eina_Bool throttle = EINA_FALSE; 589 Eina_Bool throttle = EINA_FALSE;
528 590
@@ -587,7 +649,7 @@ _elm_win_state_eval(void *data EINA_UNUSED)
587 EINA_LIST_FOREACH(_elm_win_list, l, obj) 649 EINA_LIST_FOREACH(_elm_win_list, l, obj)
588 { 650 {
589 if (elm_win_withdrawn_get(obj)) _elm_win_count_withdrawn++; 651 if (elm_win_withdrawn_get(obj)) _elm_win_count_withdrawn++;
590 else if (elm_win_iconified_get(obj)) _elm_win_count_iconified++; 652 else if (elm_win_iconified_get(obj)) _elm_win_count_minimized++;
591 else if (evas_object_visible_get(obj)) _elm_win_count_shown++; 653 else if (evas_object_visible_get(obj)) _elm_win_count_shown++;
592 } 654 }
593 if (_elm_win_count_shown <= 0) 655 if (_elm_win_count_shown <= 0)
@@ -927,14 +989,16 @@ _elm_win_move(Ecore_Evas *ee)
927 Efl_Ui_Win_Data *sd = _elm_win_associate_get(ee); 989 Efl_Ui_Win_Data *sd = _elm_win_associate_get(ee);
928 int x, y; 990 int x, y;
929 Eo *obj; 991 Eo *obj;
992 Eina_Position2D pos;
930 993
931 if (!sd) return; 994 if (!sd) return;
932 obj = sd->obj; 995 obj = sd->obj;
933 996
934 ecore_evas_geometry_get(ee, &x, &y, NULL, NULL); 997 ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
935 sd->screen.x = x; 998 pos.x = sd->screen.x = x;
936 sd->screen.y = y; 999 pos.y = sd->screen.y = y;
937 efl_event_callback_legacy_call(sd->obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, NULL); 1000 efl_event_callback_call(sd->obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, &pos);
1001 evas_object_smart_callback_call(sd->obj, "move", NULL);
938 ELM_WIN_DATA_ALIVE_CHECK(obj, sd); 1002 ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
939 evas_nochange_push(evas_object_evas_get(sd->obj)); 1003 evas_nochange_push(evas_object_evas_get(sd->obj));
940 sd->response++; 1004 sd->response++;
@@ -998,7 +1062,7 @@ _elm_win_pre_render(Ecore_Evas *ee)
998 { 1062 {
999 int mw, mh; 1063 int mw, mh;
1000 1064
1001 if (sd->type != ELM_WIN_FAKE) 1065 if (sd->type != EFL_UI_WIN_TYPE_FAKE)
1002 { 1066 {
1003 edje_object_thaw(sd->frame_obj); 1067 edje_object_thaw(sd->frame_obj);
1004 evas_object_show(sd->frame_obj); 1068 evas_object_show(sd->frame_obj);
@@ -1185,8 +1249,6 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
1185 Eina_Bool visible_changed; 1249 Eina_Bool visible_changed;
1186 Eina_Bool common_visible; 1250 Eina_Bool common_visible;
1187 const char *sig = NULL; 1251 const char *sig = NULL;
1188 const char *focus_style_target = NULL;
1189 const char *focus_style_previous = NULL;
1190 1252
1191 _elm_win_focus_highlight_reconfigure_job_stop(sd); 1253 _elm_win_focus_highlight_reconfigure_job_stop(sd);
1192 1254
@@ -1252,18 +1314,11 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
1252 goto the_end; 1314 goto the_end;
1253 } 1315 }
1254 1316
1255 if (previous) 1317 if (sd->focus_highlight.theme_changed)
1256 focus_style_previous = elm_widget_focus_highlight_style_get(previous);
1257 focus_style_target = elm_widget_focus_highlight_style_get(target);
1258
1259 if (sd->focus_highlight.theme_changed ||
1260 (focus_style_target != focus_style_previous))
1261 { 1318 {
1262 const char *str; 1319 const char *str;
1263 1320
1264 if (focus_style_target) 1321 if (sd->focus_highlight.style)
1265 str = focus_style_target;
1266 else if (sd->focus_highlight.style)
1267 str = sd->focus_highlight.style; 1322 str = sd->focus_highlight.style;
1268 else 1323 else
1269 str = "default"; 1324 str = "default";
@@ -1322,7 +1377,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
1322 1377
1323 _elm_widget_top_win_focused_set(obj, EINA_TRUE); 1378 _elm_widget_top_win_focused_set(obj, EINA_TRUE);
1324 ELM_WIN_DATA_ALIVE_CHECK(obj, sd); 1379 ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
1325 if (sd->type != ELM_WIN_FAKE) 1380 if (sd->type != EFL_UI_WIN_TYPE_FAKE)
1326 { 1381 {
1327 Efl_Ui_Focus_Manager *man = sd->obj; 1382 Efl_Ui_Focus_Manager *man = sd->obj;
1328 while(efl_ui_focus_manager_redirect_get(man)) 1383 while(efl_ui_focus_manager_redirect_get(man))
@@ -1345,7 +1400,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
1345 if (_elm_config->atspi_mode) 1400 if (_elm_config->atspi_mode)
1346 { 1401 {
1347 efl_access_window_activated_signal_emit(obj); 1402 efl_access_window_activated_signal_emit(obj);
1348 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_ACTIVE, EINA_TRUE); 1403 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_ACTIVE, EINA_TRUE);
1349 } 1404 }
1350 1405
1351 /* do nothing */ 1406 /* do nothing */
@@ -1392,10 +1447,10 @@ _elm_win_focus_out(Ecore_Evas *ee)
1392 if (_elm_config->atspi_mode) 1447 if (_elm_config->atspi_mode)
1393 { 1448 {
1394 efl_access_window_deactivated_signal_emit(obj); 1449 efl_access_window_deactivated_signal_emit(obj);
1395 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_ACTIVE, EINA_FALSE); 1450 efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_ACTIVE, EINA_FALSE);
1396 } 1451 }
1397 1452
1398 if (sd->type != ELM_WIN_FAKE) 1453 if (sd->type != EFL_UI_WIN_TYPE_FAKE)
1399 { 1454 {
1400 Efl_Ui_Focus_Manager *man = sd->obj; 1455 Efl_Ui_Focus_Manager *man = sd->obj;
1401 while(efl_ui_focus_manager_redirect_get(man)) 1456 while(efl_ui_focus_manager_redirect_get(man))
@@ -1558,6 +1613,93 @@ _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd, Eina_Bool force)
1558 TRAP(sd, resize, w, h); 1613 TRAP(sd, resize, w, h);
1559} 1614}
1560 1615
1616static int
1617_win_rotation_degree_check(int rotation)
1618{
1619 if ((rotation > 360) || (rotation < 0))
1620 {
1621 WRN("Rotation degree should be 0 ~ 360 (passed degree: %d)", rotation);
1622 rotation %= 360;
1623 if (rotation < 0) rotation += 360;
1624 }
1625 return rotation;
1626}
1627
1628/*
1629 * This API resizes the internal window(ex: X window) and evas_output.
1630 * But this does not resize the elm window object and its contents.
1631 */
1632static void
1633_win_rotate(Evas_Object *obj, Efl_Ui_Win_Data *sd, int rotation, Eina_Bool resize)
1634{
1635 rotation = _win_rotation_degree_check(rotation);
1636 if (sd->rot == rotation) return;
1637 sd->rot = rotation;
1638 if (resize) TRAP(sd, rotation_with_resize_set, rotation);
1639 else TRAP(sd, rotation_set, rotation);
1640 efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(-1, -1));
1641 efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, -1));
1642 _elm_win_resize_objects_eval(obj, EINA_FALSE);
1643#ifdef HAVE_ELEMENTARY_X
1644 _elm_win_xwin_update(sd);
1645#endif
1646 _elm_win_frame_obj_update(sd, 0);
1647 efl_event_callback_legacy_call
1648 (obj, EFL_UI_WIN_EVENT_ROTATION_CHANGED, NULL);
1649 if (_elm_config->atspi_mode)
1650 {
1651 Evas_Coord x = 0, y = 0, width = 0, height = 0;
1652 elm_win_screen_size_get(obj, &x, &y, &width, &height);
1653 if ((sd->rot == 0) || (sd->rot == 180))
1654 {
1655 efl_access_bounds_changed_signal_emit(obj, x, y, width, height);
1656 }
1657 else
1658 {
1659 efl_access_bounds_changed_signal_emit(obj, x, y, height, width);
1660 }
1661 }
1662}
1663
1664EOLIAN static void
1665_efl_ui_win_win_rotation_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, int rotation)
1666{
1667 Efl_Ui_Widget *widget;
1668 Eina_Iterator *it;
1669 int rot = rotation %360;
1670
1671 if (pd->rot == rot) return;
1672
1673 _win_rotate(obj, pd, rot, EINA_FALSE);
1674
1675 it = efl_ui_widget_tree_widget_iterator(obj);
1676 EINA_ITERATOR_FOREACH(it, widget)
1677 {
1678 if (!efl_isa(widget, EFL_UI_LAYOUT_CLASS)) continue;
1679
1680 if (efl_ui_layout_automatic_theme_rotation_get(widget))
1681 efl_ui_layout_theme_rotation_apply(widget, rot);
1682 }
1683}
1684
1685EOLIAN static int
1686_efl_ui_win_win_rotation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd)
1687{
1688 return pd->rotation;
1689}
1690
1691EAPI void
1692elm_win_rotation_set(Evas_Object *obj, int rotation)
1693{
1694 efl_ui_win_rotation_set(obj, rotation);
1695}
1696
1697EAPI int
1698elm_win_rotation_get(const Evas_Object *obj)
1699{
1700 return efl_ui_win_rotation_get(obj);
1701}
1702
1561static void 1703static void
1562_elm_win_state_change(Ecore_Evas *ee) 1704_elm_win_state_change(Ecore_Evas *ee)
1563{ 1705{
@@ -1565,7 +1707,7 @@ _elm_win_state_change(Ecore_Evas *ee)
1565 Evas_Object *obj; 1707 Evas_Object *obj;
1566 Eina_Bool ch_withdrawn = EINA_FALSE; 1708 Eina_Bool ch_withdrawn = EINA_FALSE;
1567 Eina_Bool ch_sticky = EINA_FALSE; 1709 Eina_Bool ch_sticky = EINA_FALSE;
1568 Eina_Bool ch_iconified = EINA_FALSE; 1710 Eina_Bool ch_minimized = EINA_FALSE;
1569 Eina_Bool ch_fullscreen = EINA_FALSE; 1711 Eina_Bool ch_fullscreen = EINA_FALSE;
1570 Eina_Bool ch_maximized = EINA_FALSE; 1712 Eina_Bool ch_maximized = EINA_FALSE;
1571 Eina_Bool ch_profile = EINA_FALSE; 1713 Eina_Bool ch_profile = EINA_FALSE;
@@ -1586,10 +1728,10 @@ _elm_win_state_change(Ecore_Evas *ee)
1586 sd->sticky = ecore_evas_sticky_get(sd->ee); 1728 sd->sticky = ecore_evas_sticky_get(sd->ee);
1587 ch_sticky = EINA_TRUE; 1729 ch_sticky = EINA_TRUE;
1588 } 1730 }
1589 if (sd->iconified != ecore_evas_iconified_get(sd->ee)) 1731 if (sd->minimized != ecore_evas_iconified_get(sd->ee))
1590 { 1732 {
1591 sd->iconified = ecore_evas_iconified_get(sd->ee); 1733 sd->minimized = ecore_evas_iconified_get(sd->ee);
1592 ch_iconified = EINA_TRUE; 1734 ch_minimized = EINA_TRUE;
1593 } 1735 }
1594 if (sd->fullscreen != ecore_evas_fullscreen_get(sd->ee)) 1736 if (sd->fullscreen != ecore_evas_fullscreen_get(sd->ee))
1595 { 1737 {
@@ -1613,21 +1755,21 @@ _elm_win_state_change(Ecore_Evas *ee)
1613 { 1755 {
1614 if (sd->rot != ecore_evas_rotation_get(sd->ee)) 1756 if (sd->rot != ecore_evas_rotation_get(sd->ee))
1615 { 1757 {
1616 sd->rot = ecore_evas_rotation_get(sd->ee);
1617 ch_wm_rotation = EINA_TRUE; 1758 ch_wm_rotation = EINA_TRUE;
1618 } 1759 }
1619 } 1760 }
1620 1761
1621 _elm_win_state_eval_queue(); 1762 _elm_win_state_eval_queue();
1622 1763
1623 if ((ch_withdrawn) || (ch_iconified)) 1764 if ((ch_withdrawn) || (ch_minimized))
1624 { 1765 {
1625 ELM_WIN_DATA_ALIVE_CHECK(obj, sd); 1766 ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
1626 if (sd->withdrawn) 1767 if (sd->withdrawn)
1627 efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_WITHDRAWN, NULL); 1768 efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_WITHDRAWN, NULL);
1628 else if (sd->iconified) 1769 else if (sd->minimized)
1629 { 1770 {
1630 efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_ICONIFIED, NULL); 1771 efl_event_callback_call(obj, EFL_UI_WIN_EVENT_MINIMIZED, NULL);
1772 evas_object_smart_callback_call(obj, "iconified", NULL);
1631 if (_elm_config->atspi_mode) 1773 if (_elm_config->atspi_mode)
1632 efl_access_window_minimized_signal_emit(obj); 1774 efl_access_window_minimized_signal_emit(obj);
1633 } 1775 }
@@ -1691,31 +1833,10 @@ _elm_win_state_change(Ecore_Evas *ee)
1691 } 1833 }
1692 if (ch_wm_rotation) 1834 if (ch_wm_rotation)
1693 { 1835 {
1694 efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(-1, -1)); 1836 efl_ui_win_rotation_set(obj, ecore_evas_rotation_get(sd->ee));
1695 efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, -1)); 1837
1696#ifdef HAVE_ELEMENTARY_X
1697 ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
1698 _elm_win_xwin_update(sd);
1699#endif
1700 ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
1701 efl_ui_widget_on_orientation_update(obj, sd->rot);
1702 efl_event_callback_legacy_call
1703 (obj, EFL_UI_WIN_EVENT_ROTATION_CHANGED, NULL);
1704 efl_event_callback_legacy_call 1838 efl_event_callback_legacy_call
1705 (obj, EFL_UI_WIN_EVENT_WM_ROTATION_CHANGED, NULL); 1839 (obj, EFL_UI_WIN_EVENT_WM_ROTATION_CHANGED, NULL);
1706 if (_elm_config->atspi_mode)
1707 {
1708 Evas_Coord x = 0, y = 0, width = 0, height = 0;
1709 elm_win_screen_size_get(obj, &x, &y, &width, &height);
1710 if ((sd->rot == 0) || (sd->rot == 180))
1711 {
1712 efl_access_bounds_changed_signal_emit(obj, x, y, width, height);
1713 }
1714 else
1715 {
1716 efl_access_bounds_changed_signal_emit(obj, x, y, height, width);
1717 }
1718 }
1719 } 1840 }
1720} 1841}
1721 1842
@@ -2575,7 +2696,7 @@ _efl_ui_win_efl_canvas_scene_image_max_size_get(const Eo *obj EINA_UNUSED, Efl_U
2575} 2696}
2576 2697
2577EOLIAN static void 2698EOLIAN static void
2578_efl_ui_win_efl_canvas_scene_smart_objects_calculate(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 2699_efl_ui_win_efl_canvas_scene_group_objects_calculate(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
2579{ 2700{
2580 evas_smart_objects_calculate(sd->evas); 2701 evas_smart_objects_calculate(sd->evas);
2581} 2702}
@@ -2884,7 +3005,7 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd)
2884 3005
2885 /* NB: child deletion handled by parent's smart del */ 3006 /* NB: child deletion handled by parent's smart del */
2886 3007
2887 if ((sd->type != ELM_WIN_FAKE) && (trap) && (trap->del)) 3008 if ((sd->type != EFL_UI_WIN_TYPE_FAKE) && (trap) && (trap->del))
2888 trap->del(sd->trap_data, obj); 3009 trap->del(sd->trap_data, obj);
2889 3010
2890 if (sd->parent) 3011 if (sd->parent)
@@ -2936,7 +3057,7 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd)
2936 } 3057 }
2937 else 3058 else
2938 { 3059 {
2939 if (sd->ee && (sd->type != ELM_WIN_FAKE)) 3060 if (sd->ee && (sd->type != EFL_UI_WIN_TYPE_FAKE))
2940 { 3061 {
2941 ecore_evas_manual_render_set(sd->ee, EINA_TRUE); 3062 ecore_evas_manual_render_set(sd->ee, EINA_TRUE);
2942 edje_object_freeze(sd->frame_obj); 3063 edje_object_freeze(sd->frame_obj);
@@ -3015,7 +3136,8 @@ _efl_ui_win_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Posit
3015 { 3136 {
3016 sd->screen.x = pos.x; 3137 sd->screen.x = pos.x;
3017 sd->screen.y = pos.y; 3138 sd->screen.y = pos.y;
3018 efl_event_callback_legacy_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, NULL); 3139 efl_event_callback_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, &pos);
3140 evas_object_smart_callback_call(obj, "move", NULL);
3019 } 3141 }
3020 goto super_skip; 3142 goto super_skip;
3021 } 3143 }
@@ -3037,7 +3159,8 @@ _efl_ui_win_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Posit
3037 { 3159 {
3038 sd->screen.x = pos.x; 3160 sd->screen.x = pos.x;
3039 sd->screen.y = pos.y; 3161 sd->screen.y = pos.y;
3040 efl_event_callback_legacy_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, NULL); 3162 efl_event_callback_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, &pos);
3163 evas_object_smart_callback_call(obj, "move", NULL);
3041 } 3164 }
3042 if (sd->frame_obj) 3165 if (sd->frame_obj)
3043 { 3166 {
@@ -3226,7 +3349,7 @@ _elm_win_wl_cursor_set(Evas_Object *obj, const char *cursor)
3226 3349
3227 if (cursor) 3350 if (cursor)
3228 { 3351 {
3229 if (!elm_widget_theme_object_set(sd->obj, sd->pointer.obj, 3352 if (elm_widget_theme_object_set(sd->obj, sd->pointer.obj,
3230 "cursor", cursor, "default")) 3353 "cursor", cursor, "default"))
3231 { 3354 {
3232 elm_widget_theme_object_set(sd->obj, sd->pointer.obj, 3355 elm_widget_theme_object_set(sd->obj, sd->pointer.obj,
@@ -3350,7 +3473,7 @@ _elm_win_xwin_update(Efl_Ui_Win_Data *sd)
3350{ 3473{
3351 const char *s; 3474 const char *s;
3352 3475
3353 if (sd->type == ELM_WIN_FAKE) return; 3476 if (sd->type == EFL_UI_WIN_TYPE_FAKE) return;
3354 _internal_elm_win_xwindow_get(sd); 3477 _internal_elm_win_xwindow_get(sd);
3355 3478
3356 if (!sd->x.xwin) return; /* nothing more to do */ 3479 if (!sd->x.xwin) return; /* nothing more to do */
@@ -3972,40 +4095,40 @@ typedef struct _resize_info {
3972} resize_info; 4095} resize_info;
3973 4096
3974static const resize_info _resize_infos_legacy[8] = { 4097static const resize_info _resize_infos_legacy[8] = {
3975 { "elm.event.resize.t", ELM_CURSOR_TOP_SIDE, EFL_UI_WIN_MOVE_RESIZE_TOP, 1 XDIR(SIZE_T) }, 4098 { "elm.event.resize.t", ELM_CURSOR_TOP_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_TOP, 1 XDIR(SIZE_T) },
3976 { "elm.event.resize.b", ELM_CURSOR_BOTTOM_SIDE, EFL_UI_WIN_MOVE_RESIZE_BOTTOM, 2 XDIR(SIZE_B) }, 4099 { "elm.event.resize.b", ELM_CURSOR_BOTTOM_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM, 2 XDIR(SIZE_B) },
3977 { "elm.event.resize.l", ELM_CURSOR_LEFT_SIDE, EFL_UI_WIN_MOVE_RESIZE_LEFT, 4 XDIR(SIZE_L) }, 4100 { "elm.event.resize.l", ELM_CURSOR_LEFT_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT, 4 XDIR(SIZE_L) },
3978 { "elm.event.resize.r", ELM_CURSOR_RIGHT_SIDE, EFL_UI_WIN_MOVE_RESIZE_RIGHT, 8 XDIR(SIZE_R) }, 4101 { "elm.event.resize.r", ELM_CURSOR_RIGHT_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT, 8 XDIR(SIZE_R) },
3979 { "elm.event.resize.tl", ELM_CURSOR_TOP_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_LEFT, 5 XDIR(SIZE_TL) }, 4102 { "elm.event.resize.tl", ELM_CURSOR_TOP_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_TOP | EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT, 5 XDIR(SIZE_TL) },
3980 { "elm.event.resize.bl", ELM_CURSOR_BOTTOM_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_LEFT, 6 XDIR(SIZE_BL) }, 4103 { "elm.event.resize.bl", ELM_CURSOR_BOTTOM_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT, 6 XDIR(SIZE_BL) },
3981 { "elm.event.resize.br", ELM_CURSOR_BOTTOM_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 10 XDIR(SIZE_BR) }, 4104 { "elm.event.resize.br", ELM_CURSOR_BOTTOM_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT, 10 XDIR(SIZE_BR) },
3982 { "elm.event.resize.tr", ELM_CURSOR_TOP_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 9 XDIR(SIZE_TR) }, 4105 { "elm.event.resize.tr", ELM_CURSOR_TOP_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_TOP | EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT, 9 XDIR(SIZE_TR) },
3983}; 4106};
3984 4107
3985static const resize_info _resize_infos[8] = { 4108static const resize_info _resize_infos[8] = {
3986 { "efl.event.resize.t", ELM_CURSOR_TOP_SIDE, EFL_UI_WIN_MOVE_RESIZE_TOP, 1 XDIR(SIZE_T) }, 4109 { "efl.event.resize.t", ELM_CURSOR_TOP_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_TOP, 1 XDIR(SIZE_T) },
3987 { "efl.event.resize.b", ELM_CURSOR_BOTTOM_SIDE, EFL_UI_WIN_MOVE_RESIZE_BOTTOM, 2 XDIR(SIZE_B) }, 4110 { "efl.event.resize.b", ELM_CURSOR_BOTTOM_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM, 2 XDIR(SIZE_B) },
3988 { "efl.event.resize.l", ELM_CURSOR_LEFT_SIDE, EFL_UI_WIN_MOVE_RESIZE_LEFT, 4 XDIR(SIZE_L) }, 4111 { "efl.event.resize.l", ELM_CURSOR_LEFT_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT, 4 XDIR(SIZE_L) },
3989 { "efl.event.resize.r", ELM_CURSOR_RIGHT_SIDE, EFL_UI_WIN_MOVE_RESIZE_RIGHT, 8 XDIR(SIZE_R) }, 4112 { "efl.event.resize.r", ELM_CURSOR_RIGHT_SIDE, EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT, 8 XDIR(SIZE_R) },
3990 { "efl.event.resize.tl", ELM_CURSOR_TOP_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_LEFT, 5 XDIR(SIZE_TL) }, 4113 { "efl.event.resize.tl", ELM_CURSOR_TOP_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_TOP | EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT, 5 XDIR(SIZE_TL) },
3991 { "efl.event.resize.bl", ELM_CURSOR_BOTTOM_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_LEFT, 6 XDIR(SIZE_BL) }, 4114 { "efl.event.resize.bl", ELM_CURSOR_BOTTOM_LEFT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT, 6 XDIR(SIZE_BL) },
3992 { "efl.event.resize.br", ELM_CURSOR_BOTTOM_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 10 XDIR(SIZE_BR) }, 4115 { "efl.event.resize.br", ELM_CURSOR_BOTTOM_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT, 10 XDIR(SIZE_BR) },
3993 { "efl.event.resize.tr", ELM_CURSOR_TOP_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 9 XDIR(SIZE_TR) }, 4116 { "efl.event.resize.tr", ELM_CURSOR_TOP_RIGHT_CORNER, EFL_UI_WIN_MOVE_RESIZE_MODE_TOP | EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT, 9 XDIR(SIZE_TR) },
3994}; 4117};
3995 4118
3996static inline Efl_Ui_Win_Move_Resize_Mode 4119static inline Efl_Ui_Win_Move_Resize_Mode
3997_move_resize_mode_rotate(int rotation, Efl_Ui_Win_Move_Resize_Mode mode) 4120_move_resize_mode_rotate(int rotation, Efl_Ui_Win_Move_Resize_Mode mode)
3998{ 4121{
3999 const Efl_Ui_Win_Move_Resize_Mode edges[4] = { 4122 const Efl_Ui_Win_Move_Resize_Mode edges[4] = {
4000 EFL_UI_WIN_MOVE_RESIZE_TOP, EFL_UI_WIN_MOVE_RESIZE_LEFT, 4123 EFL_UI_WIN_MOVE_RESIZE_MODE_TOP, EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT,
4001 EFL_UI_WIN_MOVE_RESIZE_BOTTOM, EFL_UI_WIN_MOVE_RESIZE_RIGHT 4124 EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM, EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT
4002 }; 4125 };
4003 4126
4004 const Efl_Ui_Win_Move_Resize_Mode corners[4] = { 4127 const Efl_Ui_Win_Move_Resize_Mode corners[4] = {
4005 EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_LEFT, 4128 EFL_UI_WIN_MOVE_RESIZE_MODE_TOP | EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT,
4006 EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_LEFT, 4129 EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_MODE_LEFT,
4007 EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 4130 EFL_UI_WIN_MOVE_RESIZE_MODE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT,
4008 EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 4131 EFL_UI_WIN_MOVE_RESIZE_MODE_TOP | EFL_UI_WIN_MOVE_RESIZE_MODE_RIGHT,
4009 }; 4132 };
4010 4133
4011 const int i = rotation / 90; 4134 const int i = rotation / 90;
@@ -4019,7 +4142,7 @@ _move_resize_mode_rotate(int rotation, Efl_Ui_Win_Move_Resize_Mode mode)
4019 if (mode == corners[k]) 4142 if (mode == corners[k])
4020 return corners[(k + i) % 4]; 4143 return corners[(k + i) % 4];
4021 4144
4022 return EFL_UI_WIN_MOVE_RESIZE_MOVE; 4145 return EFL_UI_WIN_MOVE_RESIZE_MODE_MOVE;
4023} 4146}
4024 4147
4025static const resize_info * 4148static const resize_info *
@@ -4064,7 +4187,7 @@ _move_resize_mode_get(Evas_Object *obj, const char *source)
4064 return _resize_infos[k].mode; 4187 return _resize_infos[k].mode;
4065 } 4188 }
4066 4189
4067 return EFL_UI_WIN_MOVE_RESIZE_MOVE; 4190 return EFL_UI_WIN_MOVE_RESIZE_MODE_MOVE;
4068} 4191}
4069 4192
4070static void 4193static void
@@ -4205,7 +4328,7 @@ _win_move_resize_start(Efl_Ui_Win_Data *sd, Efl_Ui_Win_Move_Resize_Mode mode)
4205 return EINA_FALSE; 4328 return EINA_FALSE;
4206 } 4329 }
4207 4330
4208 if (mode == EFL_UI_WIN_MOVE_RESIZE_MOVE) 4331 if (mode == EFL_UI_WIN_MOVE_RESIZE_MODE_MOVE)
4209 return _win_move_start(sd); 4332 return _win_move_start(sd);
4210 4333
4211 ri = _resize_info_get(sd->obj, sd->rot, mode); 4334 ri = _resize_info_get(sd->obj, sd->rot, mode);
@@ -4251,7 +4374,7 @@ _elm_win_frame_cb_move_start(void *data,
4251{ 4374{
4252 ELM_WIN_DATA_GET_OR_RETURN(data, sd); 4375 ELM_WIN_DATA_GET_OR_RETURN(data, sd);
4253 4376
4254 _win_move_resize_start(sd, EFL_UI_WIN_MOVE_RESIZE_MOVE); 4377 _win_move_resize_start(sd, EFL_UI_WIN_MOVE_RESIZE_MODE_MOVE);
4255} 4378}
4256 4379
4257static void 4380static void
@@ -4262,7 +4385,7 @@ _elm_win_frame_cb_resize_start(void *data, Evas_Object *obj EINA_UNUSED,
4262 Efl_Ui_Win_Move_Resize_Mode mode; 4385 Efl_Ui_Win_Move_Resize_Mode mode;
4263 4386
4264 mode = _move_resize_mode_get(sd->obj, source); 4387 mode = _move_resize_mode_get(sd->obj, source);
4265 if (mode == EFL_UI_WIN_MOVE_RESIZE_MOVE) return; 4388 if (mode == EFL_UI_WIN_MOVE_RESIZE_MODE_MOVE) return;
4266 4389
4267 _win_move_resize_start(sd, mode); 4390 _win_move_resize_start(sd, mode);
4268} 4391}
@@ -4276,7 +4399,7 @@ _elm_win_frame_cb_minimize(void *data,
4276 ELM_WIN_DATA_GET(data, sd); 4399 ELM_WIN_DATA_GET(data, sd);
4277 4400
4278 if (!sd) return; 4401 if (!sd) return;
4279// sd->iconified = EINA_TRUE; 4402// sd->minimized = EINA_TRUE;
4280 TRAP(sd, iconified_set, EINA_TRUE); 4403 TRAP(sd, iconified_set, EINA_TRUE);
4281} 4404}
4282 4405
@@ -4442,8 +4565,8 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style)
4442 v = version ? atoi(version) : 0; 4565 v = version ? atoi(version) : 0;
4443 if (EINA_LIKELY(v >= FRAME_OBJ_THEME_MIN_VERSION)) 4566 if (EINA_LIKELY(v >= FRAME_OBJ_THEME_MIN_VERSION))
4444 { 4567 {
4445 if (!elm_widget_theme_object_set 4568 if (elm_widget_theme_object_set
4446 (sd->obj, sd->frame_obj, "border", element, style)) 4569 (sd->obj, sd->frame_obj, "border", element, style) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
4447 { 4570 {
4448 ERR("Failed to set main border theme for the window."); 4571 ERR("Failed to set main border theme for the window.");
4449 ELM_SAFE_FREE(sd->frame_obj, evas_object_del); 4572 ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
@@ -4638,7 +4761,7 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool
4638 if (!sd->frame_obj) 4761 if (!sd->frame_obj)
4639 { 4762 {
4640 if (!efl_finalized_get(sd->obj)) return; 4763 if (!efl_finalized_get(sd->obj)) return;
4641 if (EINA_LIKELY(sd->type == ELM_WIN_FAKE)) 4764 if (EINA_LIKELY(sd->type == EFL_UI_WIN_TYPE_FAKE))
4642 return; 4765 return;
4643 if (!_elm_config->win_no_border) 4766 if (!_elm_config->win_no_border)
4644 CRI("Window has no frame object!"); 4767 CRI("Window has no frame object!");
@@ -4868,7 +4991,7 @@ _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine)
4868 sd->csd.wayland = (eina_streq(engine, ELM_WAYLAND_SHM) || 4991 sd->csd.wayland = (eina_streq(engine, ELM_WAYLAND_SHM) ||
4869 eina_streq(engine, ELM_WAYLAND_EGL)); 4992 eina_streq(engine, ELM_WAYLAND_EGL));
4870 4993
4871 if (sd->type == ELM_WIN_FAKE) 4994 if (sd->type == EFL_UI_WIN_TYPE_FAKE)
4872 sd->csd.need = EINA_FALSE; 4995 sd->csd.need = EINA_FALSE;
4873 else if (eina_streq(s, "on")) 4996 else if (eina_streq(s, "on"))
4874 sd->csd.need = EINA_TRUE; 4997 sd->csd.need = EINA_TRUE;
@@ -5022,7 +5145,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5022 5145
5023 switch ((int) type) 5146 switch ((int) type)
5024 { 5147 {
5025 case ELM_WIN_FAKE: 5148 case EFL_UI_WIN_TYPE_FAKE:
5026 tmp_sd.ee = sd->ee; 5149 tmp_sd.ee = sd->ee;
5027 break; 5150 break;
5028 case ELM_WIN_INLINED_IMAGE: 5151 case ELM_WIN_INLINED_IMAGE:
@@ -5372,12 +5495,12 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5372 SD_CPY(shot.info); 5495 SD_CPY(shot.info);
5373#undef SD_CPY 5496#undef SD_CPY
5374 5497
5375 if ((type != ELM_WIN_FAKE) && (trap) && (trap->add)) 5498 if ((type != EFL_UI_WIN_TYPE_FAKE) && (trap) && (trap->add))
5376 sd->trap_data = trap->add(obj); 5499 sd->trap_data = trap->add(obj);
5377 5500
5378 /* complementary actions, which depend on final smart data 5501 /* complementary actions, which depend on final smart data
5379 * pointer */ 5502 * pointer */
5380 if (type == ELM_WIN_INLINED_IMAGE) 5503 if (type == EFL_UI_WIN_TYPE_INLINED_IMAGE)
5381 _win_inlined_image_set(sd); 5504 _win_inlined_image_set(sd);
5382#ifdef HAVE_ELEMENTARY_X 5505#ifdef HAVE_ELEMENTARY_X
5383 else if ((engine) && 5506 else if ((engine) &&
@@ -5395,7 +5518,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5395 5518
5396 sd->kbdmode = ELM_WIN_KEYBOARD_UNKNOWN; 5519 sd->kbdmode = ELM_WIN_KEYBOARD_UNKNOWN;
5397 sd->legacy.indmode = ELM_WIN_INDICATOR_UNKNOWN; 5520 sd->legacy.indmode = ELM_WIN_INDICATOR_UNKNOWN;
5398 sd->indimode = EFL_UI_WIN_INDICATOR_OFF; 5521 sd->indimode = EFL_UI_WIN_INDICATOR_MODE_OFF;
5399 5522
5400#ifdef HAVE_ELEMENTARY_X 5523#ifdef HAVE_ELEMENTARY_X
5401 _internal_elm_win_xwindow_get(sd); 5524 _internal_elm_win_xwindow_get(sd);
@@ -5435,7 +5558,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5435 } 5558 }
5436 ecore_wl2_window_type_set(sd->wl.win, wtype); 5559 ecore_wl2_window_type_set(sd->wl.win, wtype);
5437 } 5560 }
5438 else if (sd->type == ELM_WIN_FAKE) 5561 else if (sd->type == EFL_UI_WIN_TYPE_FAKE)
5439 { 5562 {
5440 const char *env = getenv("WAYLAND_DISPLAY"); 5563 const char *env = getenv("WAYLAND_DISPLAY");
5441 if (env) 5564 if (env)
@@ -5481,13 +5604,13 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5481 evas_object_color_set(obj, 0, 0, 0, 0); 5604 evas_object_color_set(obj, 0, 0, 0, 0);
5482 evas_object_pass_events_set(obj, EINA_TRUE); 5605 evas_object_pass_events_set(obj, EINA_TRUE);
5483 5606
5484 if (type == ELM_WIN_INLINED_IMAGE) 5607 if (type == EFL_UI_WIN_TYPE_INLINED_IMAGE)
5485 efl_ui_win_inlined_parent_set(obj, parent); 5608 efl_ui_win_inlined_parent_set(obj, parent);
5486 5609
5487 /* use own version of ecore_evas_object_associate() that does TRAP() */ 5610 /* use own version of ecore_evas_object_associate() that does TRAP() */
5488 ecore_evas_data_set(sd->ee, "elm_win", obj); 5611 ecore_evas_data_set(sd->ee, "elm_win", obj);
5489 5612
5490 if (type != ELM_WIN_FAKE) 5613 if (type != EFL_UI_WIN_TYPE_FAKE)
5491 { 5614 {
5492 evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 5615 evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
5493 _elm_win_obj_callback_changed_size_hints, NULL); 5616 _elm_win_obj_callback_changed_size_hints, NULL);
@@ -5512,7 +5635,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5512 ecore_evas_callback_resize_set(sd->ee, _elm_win_resize); 5635 ecore_evas_callback_resize_set(sd->ee, _elm_win_resize);
5513 ecore_evas_callback_move_set(sd->ee, _elm_win_move); 5636 ecore_evas_callback_move_set(sd->ee, _elm_win_move);
5514 ecore_evas_callback_pre_render_set(sd->ee, _elm_win_pre_render); 5637 ecore_evas_callback_pre_render_set(sd->ee, _elm_win_pre_render);
5515 if (type != ELM_WIN_FAKE) 5638 if (type != EFL_UI_WIN_TYPE_FAKE)
5516 { 5639 {
5517 ecore_evas_callback_mouse_in_set(sd->ee, _elm_win_mouse_in); 5640 ecore_evas_callback_mouse_in_set(sd->ee, _elm_win_mouse_in);
5518 ecore_evas_callback_mouse_out_set(sd->ee, _elm_win_mouse_out); 5641 ecore_evas_callback_mouse_out_set(sd->ee, _elm_win_mouse_out);
@@ -5541,7 +5664,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5541 _elm_win_xwin_update(sd); 5664 _elm_win_xwin_update(sd);
5542#endif 5665#endif
5543 5666
5544 if (type != ELM_WIN_FAKE) 5667 if (type != EFL_UI_WIN_TYPE_FAKE)
5545 { 5668 {
5546 //Prohibiting auto-rendering, until elm_win is shown. 5669 //Prohibiting auto-rendering, until elm_win is shown.
5547 if (_elm_win_auto_norender_withdrawn(obj)) 5670 if (_elm_win_auto_norender_withdrawn(obj))
@@ -5568,7 +5691,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5568 ERR("failed to grab F12 key to elm widgets (dot) tree generation"); 5691 ERR("failed to grab F12 key to elm widgets (dot) tree generation");
5569#endif 5692#endif
5570 5693
5571 if (type != ELM_WIN_FAKE) 5694 if (type != EFL_UI_WIN_TYPE_FAKE)
5572 { 5695 {
5573 if ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_ON) || 5696 if ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_ON) ||
5574 ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_AUTO) && 5697 ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_AUTO) &&
@@ -5606,7 +5729,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5606 _elm_win_apply_alpha(obj, sd); 5729 _elm_win_apply_alpha(obj, sd);
5607 5730
5608#ifdef HAVE_ELEMENTARY_WL2 5731#ifdef HAVE_ELEMENTARY_WL2
5609 if ((type != ELM_WIN_FAKE) && (type != ELM_WIN_INLINED_IMAGE)) 5732 if ((type != EFL_UI_WIN_TYPE_FAKE) && (type != EFL_UI_WIN_TYPE_INLINED_IMAGE))
5610 { 5733 {
5611 if ((engine) && 5734 if ((engine) &&
5612 ((!strcmp(engine, ELM_WAYLAND_SHM) || 5735 ((!strcmp(engine, ELM_WAYLAND_SHM) ||
@@ -5634,7 +5757,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5634#endif 5757#endif
5635 5758
5636 /* do not append to list; all windows render as black rects */ 5759 /* do not append to list; all windows render as black rects */
5637 if (type != ELM_WIN_FAKE) 5760 if (type != EFL_UI_WIN_TYPE_FAKE)
5638 { 5761 {
5639 const char *element = "base"; 5762 const char *element = "base";
5640 const char *style; 5763 const char *style;
@@ -5652,15 +5775,15 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5652 if (!style) style = "default"; 5775 if (!style) style = "default";
5653 switch (type) 5776 switch (type)
5654 { 5777 {
5655 case EFL_UI_WIN_DIALOG_BASIC: element = "dialog"; break; 5778 case EFL_UI_WIN_TYPE_DIALOG_BASIC: element = "dialog"; break;
5656 case EFL_UI_WIN_NAVIFRAME_BASIC: element = "naviframe"; break; 5779 case EFL_UI_WIN_TYPE_NAVIFRAME_BASIC: element = "naviframe"; break;
5657 default: break; 5780 default: break;
5658 } 5781 }
5659 5782
5660 if (!_elm_config->win_no_border) 5783 if (!_elm_config->win_no_border)
5661 _elm_win_frame_add(sd, element, style); 5784 _elm_win_frame_add(sd, element, style);
5662 5785
5663 if (sd->indimode != EFL_UI_WIN_INDICATOR_OFF) 5786 if (sd->indimode != EFL_UI_WIN_INDICATOR_MODE_OFF)
5664 _indicator_add(sd); 5787 _indicator_add(sd);
5665 5788
5666 if (_elm_config->focus_highlight_enable) 5789 if (_elm_config->focus_highlight_enable)
@@ -5681,7 +5804,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5681 efl_event_callback_array_add(obj, _elm_win_tracking(), sd); 5804 efl_event_callback_array_add(obj, _elm_win_tracking(), sd);
5682 evas_object_show(sd->legacy.edje); 5805 evas_object_show(sd->legacy.edje);
5683 5806
5684 if (type == ELM_WIN_FAKE) 5807 if (type == EFL_UI_WIN_TYPE_FAKE)
5685 { 5808 {
5686 _elm_win_resize_job(obj); 5809 _elm_win_resize_job(obj);
5687 _elm_win_move(sd->ee); 5810 _elm_win_move(sd->ee);
@@ -5697,9 +5820,9 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5697 { 5820 {
5698 switch (type) 5821 switch (type)
5699 { 5822 {
5700 case EFL_UI_WIN_UNKNOWN: 5823 case EFL_UI_WIN_TYPE_UNKNOWN:
5701 case EFL_UI_WIN_BASIC: 5824 case EFL_UI_WIN_TYPE_BASIC:
5702 case EFL_UI_WIN_DIALOG_BASIC: 5825 case EFL_UI_WIN_TYPE_DIALOG_BASIC:
5703 _elm_win_standard_init(obj); 5826 _elm_win_standard_init(obj);
5704 break; 5827 break;
5705 default: break; 5828 default: break;
@@ -5721,6 +5844,12 @@ _efl_ui_win_efl_object_finalize(Eo *obj, Efl_Ui_Win_Data *sd)
5721 if (!obj) return NULL; 5844 if (!obj) return NULL;
5722 obj = efl_finalize(efl_super(obj, MY_CLASS)); 5845 obj = efl_finalize(efl_super(obj, MY_CLASS));
5723 if (obj && resume) efl_event_callback_call(efl_loop_get(obj), EFL_APP_EVENT_RESUME, NULL); 5846 if (obj && resume) efl_event_callback_call(efl_loop_get(obj), EFL_APP_EVENT_RESUME, NULL);
5847 if (obj && (!elm_widget_is_legacy(obj)))
5848 {
5849 /* FIXME: if parts other than background are supported then this should change */
5850 if (efl_file_get(efl_part(obj, "background")) || efl_file_mmap_get(efl_part(obj, "background")))
5851 efl_file_load(efl_part(obj, "background"));
5852 }
5724 return obj; 5853 return obj;
5725} 5854}
5726 5855
@@ -5747,7 +5876,7 @@ EOLIAN static void
5747_efl_ui_win_efl_object_destructor(Eo *obj, Efl_Ui_Win_Data *pd EINA_UNUSED) 5876_efl_ui_win_efl_object_destructor(Eo *obj, Efl_Ui_Win_Data *pd EINA_UNUSED)
5748{ 5877{
5749#ifdef HAVE_ELEMENTARY_WL2 5878#ifdef HAVE_ELEMENTARY_WL2
5750 if (pd->type == ELM_WIN_FAKE) 5879 if (pd->type == EFL_UI_WIN_TYPE_FAKE)
5751 { 5880 {
5752 if (pd->wl.win) 5881 if (pd->wl.win)
5753 ecore_wl2_window_free(pd->wl.win); 5882 ecore_wl2_window_free(pd->wl.win);
@@ -5853,21 +5982,6 @@ _efl_ui_win_accel_preference_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd)
5853} 5982}
5854 5983
5855EOLIAN static void 5984EOLIAN static void
5856_efl_ui_win_noblank_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, Eina_Bool noblank)
5857{
5858 noblank = !!noblank;
5859 if (pd->noblank == noblank) return;
5860 pd->noblank = noblank;
5861 _win_noblank_eval();
5862}
5863
5864EOLIAN static Eina_Bool
5865_efl_ui_win_noblank_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd)
5866{
5867 return pd->noblank;
5868}
5869
5870EOLIAN static void
5871_efl_ui_win_win_role_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *role) 5985_efl_ui_win_win_role_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *role)
5872{ 5986{
5873 if (!role) return; 5987 if (!role) return;
@@ -6153,7 +6267,7 @@ _efl_ui_win_fullscreen_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool f
6153 // these engines... can ONLY be fullscreen 6267 // these engines... can ONLY be fullscreen
6154 return; 6268 return;
6155 } 6269 }
6156 else if (sd->type == ELM_WIN_FAKE) 6270 else if (sd->type == EFL_UI_WIN_TYPE_FAKE)
6157 sd->fullscreen = !!fullscreen; 6271 sd->fullscreen = !!fullscreen;
6158 else 6272 else
6159 { 6273 {
@@ -6301,19 +6415,19 @@ _efl_ui_win_maximized_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6301} 6415}
6302 6416
6303EOLIAN static void 6417EOLIAN static void
6304_efl_ui_win_iconified_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool iconified) 6418_efl_ui_win_minimized_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool minimized)
6305{ 6419{
6306// sd->iconified = iconified; 6420// sd->minimized = minimized;
6307 TRAP(sd, iconified_set, iconified); 6421 TRAP(sd, iconified_set, minimized);
6308#ifdef HAVE_ELEMENTARY_X 6422#ifdef HAVE_ELEMENTARY_X
6309 _elm_win_xwin_update(sd); 6423 _elm_win_xwin_update(sd);
6310#endif 6424#endif
6311} 6425}
6312 6426
6313EOLIAN static Eina_Bool 6427EOLIAN static Eina_Bool
6314_efl_ui_win_iconified_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 6428_efl_ui_win_minimized_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6315{ 6429{
6316 return sd->iconified; 6430 return sd->minimized;
6317} 6431}
6318 6432
6319EOLIAN static void 6433EOLIAN static void
@@ -6415,8 +6529,8 @@ _efl_ui_win_urgent_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Efl_Ui_Win_Urge
6415EOLIAN static Efl_Ui_Win_Urgent_Mode 6529EOLIAN static Efl_Ui_Win_Urgent_Mode
6416_efl_ui_win_urgent_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 6530_efl_ui_win_urgent_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6417{ 6531{
6418 if (sd->urgent) return EFL_UI_WIN_URGENT_URGENT; 6532 if (sd->urgent) return EFL_UI_WIN_URGENT_MODE_URGENT;
6419 return EFL_UI_WIN_URGENT_NONE; 6533 return EFL_UI_WIN_URGENT_MODE_NONE;
6420} 6534}
6421 6535
6422EOLIAN static void 6536EOLIAN static void
@@ -6441,8 +6555,8 @@ _efl_ui_win_modal_set(Eo *obj, Efl_Ui_Win_Data *sd, Efl_Ui_Win_Modal_Mode modal)
6441EOLIAN static Efl_Ui_Win_Modal_Mode 6555EOLIAN static Efl_Ui_Win_Modal_Mode
6442_efl_ui_win_modal_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 6556_efl_ui_win_modal_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6443{ 6557{
6444 if (sd->modal) return EFL_UI_WIN_MODAL_MODAL; 6558 if (sd->modal) return EFL_UI_WIN_MODAL_MODE_MODAL;
6445 return EFL_UI_WIN_MODAL_NONE; 6559 return EFL_UI_WIN_MODAL_MODE_NONE;
6446} 6560}
6447 6561
6448static void 6562static void
@@ -6575,55 +6689,6 @@ elm_win_render(Evas_Object *obj)
6575 ecore_evas_manual_render(sd->ee); 6689 ecore_evas_manual_render(sd->ee);
6576} 6690}
6577 6691
6578static int
6579_win_rotation_degree_check(int rotation)
6580{
6581 if ((rotation > 360) || (rotation < 0))
6582 {
6583 WRN("Rotation degree should be 0 ~ 360 (passed degree: %d)", rotation);
6584 rotation %= 360;
6585 if (rotation < 0) rotation += 360;
6586 }
6587 return rotation;
6588}
6589
6590/*
6591 * This API resizes the internal window(ex: X window) and evas_output.
6592 * But this does not resize the elm window object and its contents.
6593 */
6594static void
6595_win_rotate(Evas_Object *obj, Efl_Ui_Win_Data *sd, int rotation, Eina_Bool resize)
6596{
6597 rotation = _win_rotation_degree_check(rotation);
6598 if (sd->rot == rotation) return;
6599 sd->rot = rotation;
6600 if (resize) TRAP(sd, rotation_with_resize_set, rotation);
6601 else TRAP(sd, rotation_set, rotation);
6602 efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(-1, -1));
6603 efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(-1, -1));
6604 _elm_win_resize_objects_eval(obj, EINA_FALSE);
6605#ifdef HAVE_ELEMENTARY_X
6606 _elm_win_xwin_update(sd);
6607#endif
6608 _elm_win_frame_obj_update(sd, 0);
6609 efl_ui_widget_on_orientation_update(obj, rotation);
6610 efl_event_callback_legacy_call
6611 (obj, EFL_UI_WIN_EVENT_ROTATION_CHANGED, NULL);
6612 if (_elm_config->atspi_mode)
6613 {
6614 Evas_Coord x = 0, y = 0, width = 0, height = 0;
6615 elm_win_screen_size_get(obj, &x, &y, &width, &height);
6616 if ((sd->rot == 0) || (sd->rot == 180))
6617 {
6618 efl_access_bounds_changed_signal_emit(obj, x, y, width, height);
6619 }
6620 else
6621 {
6622 efl_access_bounds_changed_signal_emit(obj, x, y, height, width);
6623 }
6624 }
6625}
6626
6627EOLIAN static void 6692EOLIAN static void
6628_efl_ui_win_wm_available_rotations_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, 6693_efl_ui_win_wm_available_rotations_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd,
6629 Eina_Bool allow_0, Eina_Bool allow_90, 6694 Eina_Bool allow_0, Eina_Bool allow_90,
@@ -6751,7 +6816,7 @@ _efl_ui_win_sticky_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6751} 6816}
6752 6817
6753EOLIAN static void 6818EOLIAN static void
6754_efl_ui_win_keyboard_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Elm_Win_Keyboard_Mode mode) 6819_efl_ui_win_keyboard_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Efl_Ui_Win_Keyboard_Mode mode)
6755{ 6820{
6756 if (mode == sd->kbdmode) return; 6821 if (mode == sd->kbdmode) return;
6757#ifdef HAVE_ELEMENTARY_X 6822#ifdef HAVE_ELEMENTARY_X
@@ -6765,7 +6830,7 @@ _efl_ui_win_keyboard_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Elm_Win_
6765#endif 6830#endif
6766} 6831}
6767 6832
6768EOLIAN static Elm_Win_Keyboard_Mode 6833EOLIAN static Efl_Ui_Win_Keyboard_Mode
6769_efl_ui_win_keyboard_mode_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 6834_efl_ui_win_keyboard_mode_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6770{ 6835{
6771 return sd->kbdmode; 6836 return sd->kbdmode;
@@ -6778,7 +6843,7 @@ _efl_ui_win_indicator_mode_set(Eo *obj, Efl_Ui_Win_Data *sd, Efl_Ui_Win_Indicato
6778 if (sd->indimode == mode) return; 6843 if (sd->indimode == mode) return;
6779 sd->indimode = mode; 6844 sd->indimode = mode;
6780 6845
6781 if (sd->indimode == EFL_UI_WIN_INDICATOR_OFF) 6846 if (sd->indimode == EFL_UI_WIN_INDICATOR_MODE_OFF)
6782 { 6847 {
6783 _indicator_del(sd); 6848 _indicator_del(sd);
6784 return; 6849 return;
@@ -6788,20 +6853,20 @@ _efl_ui_win_indicator_mode_set(Eo *obj, Efl_Ui_Win_Data *sd, Efl_Ui_Win_Indicato
6788 6853
6789 if (elm_widget_is_legacy(obj)) 6854 if (elm_widget_is_legacy(obj))
6790 { 6855 {
6791 if (sd->indimode == EFL_UI_WIN_INDICATOR_BG_OPAQUE) 6856 if (sd->indimode == EFL_UI_WIN_INDICATOR_MODE_BG_OPAQUE)
6792 edje_object_signal_emit(sd->frame_obj, "elm,action,indicator,bg_opaque", "elm"); 6857 edje_object_signal_emit(sd->frame_obj, "elm,action,indicator,bg_opaque", "elm");
6793 else if (sd->indimode == EFL_UI_WIN_INDICATOR_BG_TRANSPARENT) 6858 else if (sd->indimode == EFL_UI_WIN_INDICATOR_MODE_BG_TRANSPARENT)
6794 edje_object_signal_emit(sd->frame_obj, "elm,action,indicator,bg_transparent", "elm"); 6859 edje_object_signal_emit(sd->frame_obj, "elm,action,indicator,bg_transparent", "elm");
6795 else if (sd->indimode == EFL_UI_WIN_INDICATOR_HIDDEN) 6860 else if (sd->indimode == EFL_UI_WIN_INDICATOR_MODE_HIDDEN)
6796 edje_object_signal_emit(sd->frame_obj, "elm,action,indicator,hidden", "elm"); 6861 edje_object_signal_emit(sd->frame_obj, "elm,action,indicator,hidden", "elm");
6797 } 6862 }
6798 else 6863 else
6799 { 6864 {
6800 if (sd->indimode == EFL_UI_WIN_INDICATOR_BG_OPAQUE) 6865 if (sd->indimode == EFL_UI_WIN_INDICATOR_MODE_BG_OPAQUE)
6801 edje_object_signal_emit(sd->frame_obj, "efl,action,indicator,bg_opaque", "efl"); 6866 edje_object_signal_emit(sd->frame_obj, "efl,action,indicator,bg_opaque", "efl");
6802 else if (sd->indimode == EFL_UI_WIN_INDICATOR_BG_TRANSPARENT) 6867 else if (sd->indimode == EFL_UI_WIN_INDICATOR_MODE_BG_TRANSPARENT)
6803 edje_object_signal_emit(sd->frame_obj, "efl,action,indicator,bg_transparent", "efl"); 6868 edje_object_signal_emit(sd->frame_obj, "efl,action,indicator,bg_transparent", "efl");
6804 else if (sd->indimode == EFL_UI_WIN_INDICATOR_HIDDEN) 6869 else if (sd->indimode == EFL_UI_WIN_INDICATOR_MODE_HIDDEN)
6805 edje_object_signal_emit(sd->frame_obj, "efl,action,indicator,hidden", "efl"); 6870 edje_object_signal_emit(sd->frame_obj, "efl,action,indicator,hidden", "efl");
6806 } 6871 }
6807 6872
@@ -6866,66 +6931,9 @@ _efl_ui_win_prop_focus_skip_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_B
6866 TRAP(sd, focus_skip_set, skip); 6931 TRAP(sd, focus_skip_set, skip);
6867} 6932}
6868 6933
6869EOLIAN static Eina_Bool
6870_efl_ui_win_keygrab_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *key,
6871 Efl_Input_Modifier modifiers EINA_UNUSED,
6872 Efl_Input_Modifier not_modifiers EINA_UNUSED,
6873 int priority EINA_UNUSED, Efl_Ui_Win_Keygrab_Mode grab_mode)
6874{
6875 Eina_Bool ret = EINA_FALSE;
6876#ifdef HAVE_ELEMENTARY_X
6877 _internal_elm_win_xwindow_get(sd);
6878 if (sd->x.xwin)
6879 {
6880 Ecore_X_Win_Keygrab_Mode x_grab_mode;
6881 switch (grab_mode)
6882 {
6883 case ELM_WIN_KEYGRAB_SHARED:
6884 x_grab_mode = ECORE_X_WIN_KEYGRAB_SHARED;
6885 break;
6886 case ELM_WIN_KEYGRAB_TOPMOST:
6887 x_grab_mode = ECORE_X_WIN_KEYGRAB_TOPMOST;
6888 break;
6889 case ELM_WIN_KEYGRAB_EXCLUSIVE:
6890 x_grab_mode = ECORE_X_WIN_KEYGRAB_EXCLUSIVE;
6891 break;
6892 case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
6893 x_grab_mode = ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE;
6894 break;
6895 default:
6896 return ret;
6897 }
6898 ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, x_grab_mode);
6899 }
6900#else
6901 (void)sd;
6902 (void)key;
6903 (void)grab_mode;
6904#endif
6905 return ret;
6906}
6907
6908EOLIAN static Eina_Bool
6909_efl_ui_win_keygrab_unset(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *key,
6910 Efl_Input_Modifier modifiers EINA_UNUSED,
6911 Efl_Input_Modifier not_modifiers EINA_UNUSED)
6912{
6913 Eina_Bool ret = EINA_FALSE;
6914#ifdef HAVE_ELEMENTARY_X
6915 _internal_elm_win_xwindow_get(sd);
6916 if (sd->x.xwin)
6917 ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0);
6918#else
6919 (void)sd;
6920 (void)key;
6921#endif
6922 return ret;
6923}
6924
6925EOLIAN static void 6934EOLIAN static void
6926_efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled) 6935_efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled)
6927{ 6936{
6928 // Do not call efl_super() here. Only Win handles this property.
6929 enabled = !!enabled; 6937 enabled = !!enabled;
6930 if (sd->focus_highlight.enabled == enabled) 6938 if (sd->focus_highlight.enabled == enabled)
6931 return; 6939 return;
@@ -6939,31 +6947,27 @@ _efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_U
6939} 6947}
6940 6948
6941EOLIAN static Eina_Bool 6949EOLIAN static Eina_Bool
6942_efl_ui_win_efl_ui_widget_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 6950_efl_ui_win_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6943{ 6951{
6944 // Do not call efl_super() here. Only Win handles this property.
6945 return sd->focus_highlight.enabled; 6952 return sd->focus_highlight.enabled;
6946} 6953}
6947 6954
6948static Efl_Ui_Theme_Apply_Result 6955static Eina_Error
6949_elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd) 6956_elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
6950{ 6957{
6951 Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL; 6958 Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
6952 Eina_Bool ret = EINA_FALSE, prev_alpha; 6959 Eina_Bool prev_alpha;
6953 const char *s; 6960 const char *s;
6954 6961
6955 int_ret = elm_widget_theme_object_set(obj, sd->legacy.edje, "win", "base", 6962 int_ret = elm_widget_theme_object_set(obj, sd->legacy.edje, "win", "base",
6956 elm_widget_style_get(obj)); 6963 elm_widget_style_get(obj));
6957 if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL; 6964 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
6958 6965
6959 edje_object_mirrored_set(sd->legacy.edje, efl_ui_mirrored_get(obj)); 6966 edje_object_mirrored_set(sd->legacy.edje, efl_ui_mirrored_get(obj));
6960 edje_object_scale_set(sd->legacy.edje, 6967 edje_object_scale_set(sd->legacy.edje,
6961 efl_gfx_entity_scale_get(obj) * elm_config_scale_get()); 6968 efl_gfx_entity_scale_get(obj) * elm_config_scale_get());
6962 6969
6963 efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_THEME_CHANGED, NULL); 6970 efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_THEME_CHANGED, NULL);
6964 ret = efl_ui_widget_on_disabled_update(obj, elm_widget_disabled_get(obj));
6965
6966 if (!ret) int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
6967 6971
6968 prev_alpha = sd->theme_alpha; 6972 prev_alpha = sd->theme_alpha;
6969 s = edje_object_data_get(sd->legacy.edje, "alpha"); 6973 s = edje_object_data_get(sd->legacy.edje, "alpha");
@@ -6974,26 +6978,25 @@ _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
6974 return int_ret; 6978 return int_ret;
6975} 6979}
6976 6980
6977EOLIAN static Efl_Ui_Theme_Apply_Result 6981EOLIAN static Eina_Error
6978_efl_ui_win_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Win_Data *sd) 6982_efl_ui_win_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Win_Data *sd)
6979{ 6983{
6980 Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL; 6984 Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
6981 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); 6985 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
6982 if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL; 6986 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
6983 6987
6984 sd->focus_highlight.theme_changed = EINA_TRUE; 6988 sd->focus_highlight.theme_changed = EINA_TRUE;
6985 6989
6986 int_ret = _elm_win_theme_internal(obj, sd) & int_ret; 6990 int_ret = _elm_win_theme_internal(obj, sd) & int_ret;
6987 if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL; 6991 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
6988 _elm_win_focus_highlight_reconfigure_job_start(sd); 6992 _elm_win_focus_highlight_reconfigure_job_start(sd);
6989 6993
6990 return int_ret; 6994 return int_ret;
6991} 6995}
6992 6996
6993EOLIAN static Eina_Bool 6997EOLIAN static Eina_Bool
6994_efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style) 6998_efl_ui_win_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style)
6995{ 6999{
6996 // Do not call efl_super() here. Only Win handles this property.
6997 if (!eina_stringshare_replace(&sd->focus_highlight.style, style)) 7000 if (!eina_stringshare_replace(&sd->focus_highlight.style, style))
6998 return EINA_TRUE; 7001 return EINA_TRUE;
6999 7002
@@ -7003,16 +7006,14 @@ _efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_
7003} 7006}
7004 7007
7005EOLIAN static const char* 7008EOLIAN static const char*
7006_efl_ui_win_efl_ui_widget_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 7009_efl_ui_win_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
7007{ 7010{
7008 // Do not call efl_super() here. Only Win handles this property.
7009 return sd->focus_highlight.style; 7011 return sd->focus_highlight.style;
7010} 7012}
7011 7013
7012EOLIAN static void 7014EOLIAN static void
7013_efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate) 7015_efl_ui_win_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate)
7014{ 7016{
7015 // Do not call efl_super() here. Only Win handles this property.
7016 animate = !!animate; 7017 animate = !!animate;
7017 if (sd->focus_highlight.animate == animate) 7018 if (sd->focus_highlight.animate == animate)
7018 return; 7019 return;
@@ -7023,9 +7024,8 @@ _efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_U
7023} 7024}
7024 7025
7025EOLIAN static Eina_Bool 7026EOLIAN static Eina_Bool
7026_efl_ui_win_efl_ui_widget_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 7027_efl_ui_win_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
7027{ 7028{
7028 // Do not call efl_super() here. Only Win handles this property.
7029 return sd->focus_highlight.animate; 7029 return sd->focus_highlight.animate;
7030} 7030}
7031 7031
@@ -7276,7 +7276,7 @@ _on_atspi_bus_connected(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUS
7276 target = efl_ui_focus_manager_focus_get(m); 7276 target = efl_ui_focus_manager_focus_get(m);
7277 } 7277 }
7278 if (target) 7278 if (target)
7279 efl_access_state_changed_signal_emit(target, EFL_ACCESS_STATE_FOCUSED, EINA_TRUE); 7279 efl_access_state_changed_signal_emit(target, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_TRUE);
7280 } 7280 }
7281 else 7281 else
7282 efl_access_window_deactivated_signal_emit(win); 7282 efl_access_window_deactivated_signal_emit(win);
@@ -7323,7 +7323,7 @@ _efl_ui_win_efl_access_object_state_set_get(const Eo *obj, Efl_Ui_Win_Data *sd E
7323 ret = efl_access_object_state_set_get(efl_super(obj, MY_CLASS)); 7323 ret = efl_access_object_state_set_get(efl_super(obj, MY_CLASS));
7324 7324
7325 if (elm_win_focus_get(obj)) 7325 if (elm_win_focus_get(obj))
7326 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_ACTIVE); 7326 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_ACTIVE);
7327 7327
7328 return ret; 7328 return ret;
7329} 7329}
@@ -7617,9 +7617,14 @@ _efl_ui_win_part_color_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char
7617 return EINA_FALSE; 7617 return EINA_FALSE;
7618} 7618}
7619 7619
7620static Eina_Bool 7620static Eina_Error
7621_efl_ui_win_part_file_set(Eo *obj, Efl_Ui_Win_Data *sd, const char *part, const char *file, const char *key) 7621_efl_ui_win_part_file_load(Eo *obj, Efl_Ui_Win_Data *sd, Eo *part_obj, const char *part)
7622{ 7622{
7623 const char *file, *key;
7624
7625 if (efl_file_loaded_get(part_obj)) return 0;
7626 file = efl_file_get(part_obj);
7627 key = efl_file_key_get(part_obj);
7623 sd->legacy.forbidden = EINA_TRUE; 7628 sd->legacy.forbidden = EINA_TRUE;
7624 if (eina_streq(part, "background")) 7629 if (eina_streq(part, "background"))
7625 { 7630 {
@@ -7630,7 +7635,7 @@ _efl_ui_win_part_file_set(Eo *obj, Efl_Ui_Win_Data *sd, const char *part, const
7630 { 7635 {
7631 bg = efl_add(EFL_UI_IMAGE_CLASS, obj); 7636 bg = efl_add(EFL_UI_IMAGE_CLASS, obj);
7632 efl_gfx_image_scale_type_set(bg, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE); 7637 efl_gfx_image_scale_type_set(bg, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE);
7633 ok = efl_file_set(bg, file, key); 7638 ok = efl_file_simple_load(bg, file, key);
7634 if (!ok) ELM_SAFE_DEL(bg); 7639 if (!ok) ELM_SAFE_DEL(bg);
7635 _elm_win_bg_set(sd, bg); 7640 _elm_win_bg_set(sd, bg);
7636 } 7641 }
@@ -7646,22 +7651,41 @@ _efl_ui_win_part_file_set(Eo *obj, Efl_Ui_Win_Data *sd, const char *part, const
7646 return EINA_FALSE; 7651 return EINA_FALSE;
7647} 7652}
7648 7653
7649static Eina_Bool 7654static const char *
7650_efl_ui_win_part_file_get(Eo *obj, Efl_Ui_Win_Data *sd, const char *part, const char **file, const char **key) 7655_efl_ui_win_part_file_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const Eo *part_obj, const char *part EINA_UNUSED)
7651{ 7656{
7652 sd->legacy.forbidden = EINA_TRUE; 7657 sd->legacy.forbidden = EINA_TRUE;
7653 if (file) *file = NULL; 7658 return efl_file_get(efl_super(part_obj, EFL_UI_WIN_PART_CLASS));
7654 if (key) *key = NULL; 7659#if 0
7655 7660
7656 if (eina_streq(part, "background")) 7661 if (eina_streq(part, "background"))
7657 { 7662 {
7658 const Eo *bg = _efl_ui_win_content_get(obj, sd, "background"); 7663 const Eo *bg = _efl_ui_win_content_get(obj, sd, "background");
7659 efl_file_get(bg, file, key); 7664 return efl_file_get(bg);
7660 return EINA_TRUE;
7661 } 7665 }
7662 7666
7663 WIN_PART_ERR(part); 7667 WIN_PART_ERR(part);
7664 return EINA_FALSE; 7668 return NULL;
7669#endif
7670}
7671
7672static const char *
7673_efl_ui_win_part_file_key_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const Eo *part_obj, const char *part EINA_UNUSED)
7674{
7675 sd->legacy.forbidden = EINA_TRUE;
7676 return efl_file_key_get(efl_super(part_obj, EFL_UI_WIN_PART_CLASS));
7677/* NOTE; if more than one part is ever supported here then this section is needed */
7678#if 0
7679
7680 if (eina_streq(part, "background"))
7681 {
7682 const Eo *bg = _efl_ui_win_content_get(obj, sd, "background");
7683 return efl_file_get(bg);
7684 }
7685
7686 WIN_PART_ERR(part);
7687 return NULL;
7688#endif
7665} 7689}
7666 7690
7667/* Efl.Part begin */ 7691/* Efl.Part begin */
@@ -7686,22 +7710,31 @@ _efl_ui_win_part_efl_gfx_color_color_get(const Eo *obj, void *_pd EINA_UNUSED, i
7686 _efl_ui_win_part_color_get(pd->obj, sd, pd->part, r, g, b, a); 7710 _efl_ui_win_part_color_get(pd->obj, sd, pd->part, r, g, b, a);
7687} 7711}
7688 7712
7689static Eina_Bool 7713EOLIAN static const char *
7690_efl_ui_win_part_efl_file_file_set(Eo *obj, void *_pd EINA_UNUSED, const char *file, const char *key) 7714_efl_ui_win_part_efl_file_file_get(const Eo *obj, void *_pd EINA_UNUSED)
7691{ 7715{
7692 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 7716 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
7693 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 7717 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
7694 return _efl_ui_win_part_file_set(pd->obj, sd, pd->part, file, key); 7718 return _efl_ui_win_part_file_get(pd->obj, sd, obj, pd->part);
7695} 7719}
7696 7720
7697static void 7721EOLIAN static const char *
7698_efl_ui_win_part_efl_file_file_get(const Eo *obj, void *_pd EINA_UNUSED, const char **file, const char **key) 7722_efl_ui_win_part_efl_file_key_get(const Eo *obj, void *_pd EINA_UNUSED)
7723{
7724 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
7725 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
7726 return _efl_ui_win_part_file_key_get(pd->obj, sd, obj, pd->part);
7727}
7728
7729EOLIAN static Eina_Error
7730_efl_ui_win_part_efl_file_load(Eo *obj, void *_pd EINA_UNUSED)
7699{ 7731{
7700 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 7732 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
7701 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 7733 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
7702 _efl_ui_win_part_file_get(pd->obj, sd, pd->part, file, key); 7734 return _efl_ui_win_part_file_load(pd->obj, sd, obj, pd->part);
7703} 7735}
7704 7736
7737
7705ELM_PART_OVERRIDE(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data) 7738ELM_PART_OVERRIDE(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data)
7706ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data) 7739ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data)
7707ELM_PART_OVERRIDE_CONTENT_GET(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data) 7740ELM_PART_OVERRIDE_CONTENT_GET(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data)
@@ -8185,15 +8218,6 @@ elm_win_wm_rotation_manual_rotation_done(Evas_Object *obj)
8185 ecore_evas_wm_rotation_manual_rotation_done(sd->ee); 8218 ecore_evas_wm_rotation_manual_rotation_done(sd->ee);
8186} 8219}
8187 8220
8188EAPI void
8189elm_win_rotation_set(Evas_Object *obj, int rotation)
8190{
8191 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
8192 if (!sd) return;
8193
8194 _win_rotate(obj, sd, rotation, EINA_FALSE);
8195}
8196
8197/* 8221/*
8198 * This API does not resize the internal window (ex: X window). 8222 * This API does not resize the internal window (ex: X window).
8199 * But this resizes evas_output, elm window, and its contents. 8223 * But this resizes evas_output, elm window, and its contents.
@@ -8208,15 +8232,6 @@ elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation)
8208} 8232}
8209 8233
8210EAPI int 8234EAPI int
8211elm_win_rotation_get(const Evas_Object *obj)
8212{
8213 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
8214 if (!sd) return -1;
8215
8216 return sd->rot;
8217}
8218
8219EAPI int
8220elm_win_wm_rotation_preferred_rotation_get(const Evas_Object *obj) 8235elm_win_wm_rotation_preferred_rotation_get(const Evas_Object *obj)
8221{ 8236{
8222 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); 8237 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
@@ -8379,7 +8394,7 @@ elm_win_modal_set(Evas_Object *obj, Eina_Bool modal)
8379{ 8394{
8380 Efl_Ui_Win_Modal_Mode modality; 8395 Efl_Ui_Win_Modal_Mode modality;
8381 8396
8382 modality = modal ? EFL_UI_WIN_MODAL_MODAL : EFL_UI_WIN_MODAL_NONE; 8397 modality = modal ? EFL_UI_WIN_MODAL_MODE_MODAL : EFL_UI_WIN_MODAL_MODE_NONE;
8383 efl_ui_win_modal_set(obj, modality); 8398 efl_ui_win_modal_set(obj, modality);
8384} 8399}
8385 8400
@@ -8389,7 +8404,7 @@ elm_win_modal_get(const Evas_Object *obj)
8389 Efl_Ui_Win_Modal_Mode modality; 8404 Efl_Ui_Win_Modal_Mode modality;
8390 8405
8391 modality = efl_ui_win_modal_get(obj); 8406 modality = efl_ui_win_modal_get(obj);
8392 return (modality != EFL_UI_WIN_MODAL_NONE); 8407 return (modality != EFL_UI_WIN_MODAL_MODE_NONE);
8393} 8408}
8394 8409
8395EAPI void 8410EAPI void
@@ -8759,7 +8774,7 @@ _elm_win_legacy_init(Efl_Ui_Win_Data *sd)
8759 edje_object_part_swallow(sd->legacy.edje, "efl.contents", sd->legacy.box); 8774 edje_object_part_swallow(sd->legacy.edje, "efl.contents", sd->legacy.box);
8760 8775
8761 evas_object_geometry_set(sd->legacy.edje, 0, 0, 1, 1); 8776 evas_object_geometry_set(sd->legacy.edje, 0, 0, 1, 1);
8762 if (sd->type != ELM_WIN_FAKE) 8777 if (sd->type != EFL_UI_WIN_TYPE_FAKE)
8763 { 8778 {
8764 edje_object_update_hints_set(sd->legacy.edje, EINA_TRUE); 8779 edje_object_update_hints_set(sd->legacy.edje, EINA_TRUE);
8765 evas_object_event_callback_add(sd->legacy.edje, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 8780 evas_object_event_callback_add(sd->legacy.edje, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
@@ -8819,13 +8834,41 @@ EAPI Eina_Bool
8819elm_win_keygrab_set(Elm_Win *obj, const char *key, 8834elm_win_keygrab_set(Elm_Win *obj, const char *key,
8820 Evas_Modifier_Mask modifiers EINA_UNUSED, 8835 Evas_Modifier_Mask modifiers EINA_UNUSED,
8821 Evas_Modifier_Mask not_modifiers EINA_UNUSED, 8836 Evas_Modifier_Mask not_modifiers EINA_UNUSED,
8822 int priority, Elm_Win_Keygrab_Mode grab_mode) 8837 int priority EINA_UNUSED, Elm_Win_Keygrab_Mode grab_mode)
8823{ 8838{
8824 // Note: Not converting modifiers as they are not used in the implementation 8839 // Note: Not converting modifiers as they are not used in the implementation
8825 return efl_ui_win_keygrab_set(obj, key, 8840 Eina_Bool ret = EINA_FALSE;
8826 EFL_INPUT_MODIFIER_NONE, 8841#ifdef HAVE_ELEMENTARY_X
8827 EFL_INPUT_MODIFIER_NONE, 8842 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
8828 priority, grab_mode); 8843 _internal_elm_win_xwindow_get(sd);
8844 if (sd->x.xwin)
8845 {
8846 Ecore_X_Win_Keygrab_Mode x_grab_mode;
8847 switch (grab_mode)
8848 {
8849 case ELM_WIN_KEYGRAB_SHARED:
8850 x_grab_mode = ECORE_X_WIN_KEYGRAB_SHARED;
8851 break;
8852 case ELM_WIN_KEYGRAB_TOPMOST:
8853 x_grab_mode = ECORE_X_WIN_KEYGRAB_TOPMOST;
8854 break;
8855 case ELM_WIN_KEYGRAB_EXCLUSIVE:
8856 x_grab_mode = ECORE_X_WIN_KEYGRAB_EXCLUSIVE;
8857 break;
8858 case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
8859 x_grab_mode = ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE;
8860 break;
8861 default:
8862 return ret;
8863 }
8864 ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, x_grab_mode);
8865 }
8866#else
8867 (void)obj;
8868 (void)key;
8869 (void)grab_mode;
8870#endif
8871 return ret;
8829} 8872}
8830 8873
8831EAPI Eina_Bool 8874EAPI Eina_Bool
@@ -8834,9 +8877,17 @@ elm_win_keygrab_unset(Elm_Win *obj, const char *key,
8834 Evas_Modifier_Mask not_modifiers EINA_UNUSED) 8877 Evas_Modifier_Mask not_modifiers EINA_UNUSED)
8835{ 8878{
8836 // Note: Not converting modifiers as they are not used in the implementation 8879 // Note: Not converting modifiers as they are not used in the implementation
8837 return efl_ui_win_keygrab_unset(obj, key, 8880 Eina_Bool ret = EINA_FALSE;
8838 EFL_INPUT_MODIFIER_NONE, 8881#ifdef HAVE_ELEMENTARY_X
8839 EFL_INPUT_MODIFIER_NONE); 8882 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
8883 _internal_elm_win_xwindow_get(sd);
8884 if (sd->x.xwin)
8885 ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0);
8886#else
8887 (void)obj;
8888 (void)key;
8889#endif
8890 return ret;
8840} 8891}
8841 8892
8842EAPI Eina_Bool 8893EAPI Eina_Bool
@@ -8852,42 +8903,6 @@ elm_win_focus_get(const Efl_Ui_Win *obj)
8852 return efl_ui_focus_object_focus_get(obj); 8903 return efl_ui_focus_object_focus_get(obj);
8853} 8904}
8854 8905
8855EAPI void
8856elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style)
8857{
8858 elm_widget_focus_highlight_style_set(obj, style);
8859}
8860
8861EAPI const char *
8862elm_win_focus_highlight_style_get(const Elm_Win *obj)
8863{
8864 return elm_widget_focus_highlight_style_get(obj);
8865}
8866
8867EAPI Eina_Bool
8868elm_win_focus_highlight_enabled_get(const Efl_Ui_Win *obj)
8869{
8870 return elm_widget_focus_highlight_enabled_get(obj);
8871}
8872
8873EAPI void
8874elm_win_focus_highlight_enabled_set(Efl_Ui_Win *obj, Eina_Bool enabled)
8875{
8876 efl_ui_widget_focus_highlight_enabled_set(obj, enabled);
8877}
8878
8879EAPI void
8880elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate)
8881{
8882 efl_ui_widget_focus_highlight_animate_set(obj, animate);
8883}
8884
8885EAPI Eina_Bool
8886elm_win_focus_highlight_animate_get(const Elm_Win *obj)
8887{
8888 return efl_ui_widget_focus_highlight_animate_get(obj);
8889}
8890
8891EAPI Eina_Bool 8906EAPI Eina_Bool
8892elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count) 8907elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count)
8893{ 8908{
@@ -8947,7 +8962,7 @@ EAPI void
8947elm_win_type_set(Evas_Object *obj, Elm_Win_Type type) 8962elm_win_type_set(Evas_Object *obj, Elm_Win_Type type)
8948{ 8963{
8949 ERR("Calling deprecrated function '%s'", __FUNCTION__); 8964 ERR("Calling deprecrated function '%s'", __FUNCTION__);
8950 efl_ui_win_type_set(obj, type); 8965 efl_ui_win_type_set(obj, _elm_win_type_to_efl_ui_win_type(type));
8951} 8966}
8952 8967
8953EAPI void 8968EAPI void
@@ -9001,8 +9016,45 @@ _efl_ui_win_legacy_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
9001 return obj; 9016 return obj;
9002} 9017}
9003 9018
9019
9020Efl_Object *_efl_ui_win_legacy_efl_object_finalize(Eo *obj, void *pd);
9021
9022
9023static Eina_Bool
9024_efl_ui_win_legacy_class_initializer(Efl_Class *klass)
9025{
9026 const Efl_Object_Ops *opsp = NULL;
9027
9028 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
9029
9030#ifndef EFL_UI_WIN_LEGACY_EXTRA_OPS
9031#define EFL_UI_WIN_LEGACY_EXTRA_OPS
9032#endif
9033
9034 EFL_OPS_DEFINE(ops,
9035 EFL_OBJECT_OP_FUNC(efl_finalize, _efl_ui_win_legacy_efl_object_finalize),
9036 EFL_UI_WIN_LEGACY_EXTRA_OPS
9037 );
9038 opsp = &ops;
9039
9040 return efl_class_functions_set(klass, opsp, ropsp);
9041}
9042
9043static const Efl_Class_Description _efl_ui_win_legacy_class_desc = {
9044 EO_VERSION,
9045 "Efl.Ui.Win_Legacy",
9046 EFL_CLASS_TYPE_REGULAR,
9047 0,
9048 _efl_ui_win_legacy_class_initializer,
9049 _efl_ui_win_legacy_class_constructor,
9050 NULL
9051};
9052
9053EFL_DEFINE_CLASS(efl_ui_win_legacy_class_get, &_efl_ui_win_legacy_class_desc, EFL_UI_WIN_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
9054
9055
9004EAPI Evas_Object * 9056EAPI Evas_Object *
9005elm_win_add(Evas_Object *parent, const char *name, Efl_Ui_Win_Type type) 9057elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
9006{ 9058{
9007 const Efl_Class *klass = EFL_UI_WIN_LEGACY_CLASS; 9059 const Efl_Class *klass = EFL_UI_WIN_LEGACY_CLASS;
9008 9060
@@ -9025,7 +9077,7 @@ elm_win_fake_add(Ecore_Evas *ee)
9025 return elm_legacy_add(EFL_UI_WIN_LEGACY_CLASS, NULL, 9077 return elm_legacy_add(EFL_UI_WIN_LEGACY_CLASS, NULL,
9026 _fake_canvas_set(efl_added, ee), 9078 _fake_canvas_set(efl_added, ee),
9027 efl_ui_win_name_set(efl_added, NULL), 9079 efl_ui_win_name_set(efl_added, NULL),
9028 efl_ui_win_type_set(efl_added, ELM_WIN_FAKE)); 9080 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_FAKE));
9029} 9081}
9030 9082
9031EAPI Evas_Object * 9083EAPI Evas_Object *
@@ -9036,7 +9088,7 @@ elm_win_util_standard_add(const char *name, const char *title)
9036 win = elm_legacy_add(EFL_UI_WIN_LEGACY_CLASS, NULL, 9088 win = elm_legacy_add(EFL_UI_WIN_LEGACY_CLASS, NULL,
9037 efl_text_set(efl_added, title), 9089 efl_text_set(efl_added, title),
9038 efl_ui_win_name_set(efl_added, name), 9090 efl_ui_win_name_set(efl_added, name),
9039 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC)); 9091 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC));
9040 if (!win) return NULL; 9092 if (!win) return NULL;
9041 9093
9042 _elm_win_standard_init(win); 9094 _elm_win_standard_init(win);
@@ -9051,11 +9103,249 @@ elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char *title
9051 win = elm_legacy_add(EFL_UI_WIN_LEGACY_CLASS, parent, 9103 win = elm_legacy_add(EFL_UI_WIN_LEGACY_CLASS, parent,
9052 efl_text_set(efl_added, title), 9104 efl_text_set(efl_added, title),
9053 efl_ui_win_name_set(efl_added, name), 9105 efl_ui_win_name_set(efl_added, name),
9054 efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC)); 9106 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_DIALOG_BASIC));
9055 if (!win) return NULL; 9107 if (!win) return NULL;
9056 9108
9057 _elm_win_standard_init(win); 9109 _elm_win_standard_init(win);
9058 return win; 9110 return win;
9059} 9111}
9060 9112
9061#include "efl_ui_win_legacy.eo.c" 9113
9114EAPI void
9115elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
9116{
9117 efl_ui_win_keyboard_mode_set(obj, mode);
9118}
9119
9120EAPI Elm_Win_Keyboard_Mode
9121elm_win_keyboard_mode_get(const Evas_Object *obj)
9122{
9123 return efl_ui_win_keyboard_mode_get(obj);
9124}
9125
9126EAPI void
9127elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain)
9128{
9129 efl_ui_win_screen_constrain_set(obj, constrain);
9130}
9131
9132EAPI Eina_Bool
9133elm_win_screen_constrain_get(const Evas_Object *obj)
9134{
9135 return efl_ui_win_screen_constrain_get(obj);
9136}
9137
9138EAPI void
9139elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip)
9140{
9141 efl_ui_win_prop_focus_skip_set(obj, skip);
9142}
9143
9144EAPI void
9145elm_win_autohide_set(Evas_Object *obj, Eina_Bool autohide)
9146{
9147 efl_ui_win_autohide_set(obj, autohide);
9148}
9149
9150EAPI Eina_Bool
9151elm_win_autohide_get(const Evas_Object *obj)
9152{
9153 return efl_ui_win_autohide_get(obj);
9154}
9155
9156EAPI void
9157elm_win_exit_on_close_set(Evas_Object *obj, const Eina_Value *exit_code)
9158{
9159 efl_ui_win_exit_on_close_set(obj, exit_code);
9160}
9161
9162EAPI const Eina_Value *
9163elm_win_exit_on_close_get(const Evas_Object *obj)
9164{
9165 return efl_ui_win_exit_on_close_get(obj);
9166}
9167
9168EAPI void
9169elm_win_icon_object_set(Evas_Object *obj, Evas_Object *icon)
9170{
9171 efl_ui_win_icon_object_set(obj, icon);
9172}
9173
9174EAPI const Evas_Object *
9175elm_win_icon_object_get(const Evas_Object *obj)
9176{
9177 return efl_ui_win_icon_object_get(obj);
9178}
9179
9180EAPI void
9181elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified)
9182{
9183 efl_ui_win_minimized_set(obj, iconified);
9184}
9185
9186EAPI Eina_Bool
9187elm_win_iconified_get(const Evas_Object *obj)
9188{
9189 return efl_ui_win_minimized_get(obj);
9190}
9191
9192EAPI void
9193elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized)
9194{
9195 efl_ui_win_maximized_set(obj, maximized);
9196}
9197
9198EAPI Eina_Bool
9199elm_win_maximized_get(const Evas_Object *obj)
9200{
9201 return efl_ui_win_maximized_get(obj);
9202}
9203
9204EAPI void
9205elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen)
9206{
9207 efl_ui_win_fullscreen_set(obj, fullscreen);
9208}
9209
9210EAPI Eina_Bool
9211elm_win_fullscreen_get(const Evas_Object *obj)
9212{
9213 return efl_ui_win_fullscreen_get(obj);
9214}
9215
9216EAPI void
9217elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky)
9218{
9219 efl_ui_win_sticky_set(obj, sticky);
9220}
9221
9222EAPI Eina_Bool
9223elm_win_sticky_get(const Evas_Object *obj)
9224{
9225 return efl_ui_win_sticky_get(obj);
9226}
9227
9228EAPI void
9229elm_win_noblank_set(Evas_Object *obj, Eina_Bool noblank)
9230{
9231 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
9232 noblank = !!noblank;
9233 if (sd->noblank == noblank) return;
9234 sd->noblank = noblank;
9235 _win_noblank_eval();
9236}
9237
9238EAPI Eina_Bool
9239elm_win_noblank_get(const Evas_Object *obj)
9240{
9241 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
9242 return sd->noblank;
9243}
9244
9245EAPI void
9246elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless)
9247{
9248 efl_ui_win_borderless_set(obj, borderless);
9249}
9250
9251EAPI Eina_Bool
9252elm_win_borderless_get(const Evas_Object *obj)
9253{
9254 return efl_ui_win_borderless_get(obj);
9255}
9256
9257EAPI void
9258elm_win_role_set(Evas_Object *obj, const char *role)
9259{
9260 efl_ui_win_role_set(obj, role);
9261}
9262
9263EAPI const char *
9264elm_win_role_get(const Evas_Object *obj)
9265{
9266 return efl_ui_win_role_get(obj);
9267}
9268
9269EAPI const char *
9270elm_win_name_get(const Evas_Object *obj)
9271{
9272 return efl_ui_win_name_get(obj);
9273}
9274
9275EAPI Elm_Win_Type
9276elm_win_type_get(const Evas_Object *obj)
9277{
9278 return _efl_ui_win_type_to_elm_win_type(efl_ui_win_type_get(obj));
9279}
9280
9281EAPI const char *
9282elm_win_accel_preference_get(const Evas_Object *obj)
9283{
9284 return efl_ui_win_accel_preference_get(obj);
9285}
9286
9287EAPI void
9288elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha)
9289{
9290 efl_ui_win_alpha_set(obj, alpha);
9291}
9292
9293EAPI Eina_Bool
9294elm_win_alpha_get(const Evas_Object *obj)
9295{
9296 return efl_ui_win_alpha_get(obj);
9297}
9298
9299EAPI void
9300elm_win_activate(Evas_Object *obj)
9301{
9302 efl_ui_win_activate(obj);
9303}
9304
9305EAPI void
9306elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v)
9307{
9308 efl_ui_win_center(obj, h, v);
9309}
9310
9311EAPI Eina_Bool
9312elm_win_move_resize_start(Evas_Object *obj, Elm_Win_Move_Resize_Mode mode)
9313{
9314 return efl_ui_win_move_resize_start(obj, mode);
9315}
9316
9317EAPI void
9318elm_win_focus_highlight_animate_set(Efl_Ui_Win *obj, Eina_Bool animate)
9319{
9320 efl_ui_win_focus_highlight_animate_set(obj, animate);
9321}
9322
9323EAPI Eina_Bool
9324elm_win_focus_highlight_animate_get(const Efl_Ui_Win *obj)
9325{
9326 return efl_ui_win_focus_highlight_animate_get(obj);
9327}
9328
9329EAPI void
9330elm_win_focus_highlight_enabled_set(Efl_Ui_Win *obj, Eina_Bool enabled)
9331{
9332 efl_ui_win_focus_highlight_enabled_set(obj, enabled);
9333}
9334
9335EAPI Eina_Bool
9336elm_win_focus_highlight_enabled_get(const Efl_Ui_Win *obj)
9337{
9338 return efl_ui_win_focus_highlight_enabled_get(obj);
9339}
9340
9341EAPI Eina_Bool
9342elm_win_focus_highlight_style_set(Efl_Ui_Win *obj, const char *style)
9343{
9344 return efl_ui_win_focus_highlight_style_set(obj, style);
9345}
9346
9347EAPI const char *
9348elm_win_focus_highlight_style_get(const Efl_Ui_Win *obj)
9349{
9350 return efl_ui_win_focus_highlight_style_get(obj);
9351}