2 # include "elementary_config.h"
5 #include <Elementary.h>
6 #include <Elementary_Cursor.h>
9 #include "elm_widget_menu.h"
11 EAPI Eo_Op ELM_OBJ_WIN_BASE_ID = EO_NOOP;
13 #define MY_CLASS ELM_OBJ_WIN_CLASS
15 #define MY_CLASS_NAME "Elm_Win"
16 #define MY_CLASS_NAME_LEGACY "elm_win"
18 static const Elm_Win_Trap *trap = NULL;
20 #define TRAP(sd, name, ...) \
23 if ((!trap) || (!trap->name) || \
25 (trap->name(sd->trap_data, sd->obj, ## __VA_ARGS__)))) \
26 ecore_evas_##name(sd->ee, ##__VA_ARGS__); \
30 #define ELM_WIN_DATA_GET(o, sd) \
31 Elm_Win_Smart_Data * sd = eo_data_scope_get(o, MY_CLASS)
33 #define ELM_WIN_DATA_GET_OR_RETURN(o, ptr) \
34 ELM_WIN_DATA_GET(o, ptr); \
37 CRI("No widget data for object %p (%s)", \
38 o, evas_object_type_get(o)); \
42 #define ELM_WIN_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
43 ELM_WIN_DATA_GET(o, ptr); \
46 CRI("No widget data for object %p (%s)", \
47 o, evas_object_type_get(o)); \
51 #define ELM_WIN_CHECK(obj) \
52 if (!obj || !eo_isa(obj, MY_CLASS)) \
55 #define ENGINE_GET() (_elm_preferred_engine ? _elm_preferred_engine : (_elm_config->engine ? _elm_config->engine : ""))
56 #define ENGINE_COMPARE(name) (!strcmp(ENGINE_GET(), name))
58 typedef struct _Elm_Win_Smart_Data Elm_Win_Smart_Data;
60 struct _Elm_Win_Smart_Data
64 Evas_Object *parent; /* parent *window* object*/
65 Evas_Object *img_obj, *frame_obj;
66 Evas_Object *client_obj; /* rect representing the client */
67 Evas_Object *spacer_obj;
70 Evas_Object *obj; /* The object itself */
71 #ifdef HAVE_ELEMENTARY_X
75 Ecore_Event_Handler *client_message_handler;
76 Ecore_Event_Handler *property_handler;
79 #ifdef HAVE_ELEMENTARY_WAYLAND
86 Ecore_Job *deferred_resize_job;
87 Ecore_Job *deferred_child_eval_job;
90 Elm_Win_Keyboard_Mode kbdmode;
91 Elm_Win_Indicator_Mode indmode;
92 Elm_Win_Indicator_Opacity_Mode ind_o_mode;
101 int *autodel_clear, rot;
110 Evas_Object *obj, *hot_obj;
115 Evas_Object *fobj; /* focus highlight edje object */
120 Eina_Bool visible : 1;
121 Eina_Bool in_theme: 1; /*<< focus highlight is handled by theme.
122 this is set true if edc data item "focus_highlight" is set to "on" during focus in callback. */
126 Ecore_Job *reconf_job;
128 Eina_Bool enabled : 1;
129 Eina_Bool theme_changed : 1; /* set true when the focus theme is changed */
130 Eina_Bool animate : 1; /* set true when the focus highlight animate is enabled */
131 Eina_Bool animate_supported : 1; /* set true when the focus highlight animate is supported by theme */
132 Eina_Bool geometry_changed : 1;
137 const char *icon_name;
140 Evas_Object *main_menu;
145 const char **available_list;
152 int size_base_w, size_base_h;
153 int size_step_w, size_step_h;
155 Eina_Bool urgent : 1;
157 Eina_Bool demand_attention : 1;
158 Eina_Bool autodel : 1;
159 Eina_Bool constrain : 1;
160 Eina_Bool resizing : 1;
161 Eina_Bool iconified : 1;
162 Eina_Bool withdrawn : 1;
163 Eina_Bool sticky : 1;
164 Eina_Bool fullscreen : 1;
165 Eina_Bool maximized : 1;
166 Eina_Bool skip_focus : 1;
167 Eina_Bool floating : 1;
170 static const char SIG_DELETE_REQUEST[] = "delete,request";
171 static const char SIG_FOCUS_OUT[] = "focus,out"; // deprecated. use "focused" instead.
172 static const char SIG_FOCUS_IN[] = "focus,in"; // deprecated. use "unfocused" instead.
173 static const char SIG_MOVED[] = "moved";
174 static const char SIG_WITHDRAWN[] = "withdrawn";
175 static const char SIG_ICONIFIED[] = "iconified";
176 static const char SIG_NORMAL[] = "normal";
177 static const char SIG_STICK[] = "stick";
178 static const char SIG_UNSTICK[] = "unstick";
179 static const char SIG_FULLSCREEN[] = "fullscreen";
180 static const char SIG_UNFULLSCREEN[] = "unfullscreen";
181 static const char SIG_MAXIMIZED[] = "maximized";
182 static const char SIG_UNMAXIMIZED[] = "unmaximized";
183 static const char SIG_IOERR[] = "ioerr";
184 static const char SIG_INDICATOR_PROP_CHANGED[] = "indicator,prop,changed";
185 static const char SIG_ROTATION_CHANGED[] = "rotation,changed";
186 static const char SIG_PROFILE_CHANGED[] = "profile,changed";
187 static const char SIG_FOCUSED[] = "focused";
188 static const char SIG_UNFOCUSED[] = "unfocused";
190 static const Evas_Smart_Cb_Description _smart_callbacks[] = {
191 {SIG_DELETE_REQUEST, ""},
200 {SIG_FULLSCREEN, ""},
201 {SIG_UNFULLSCREEN, ""},
203 {SIG_UNMAXIMIZED, ""},
205 {SIG_INDICATOR_PROP_CHANGED, ""},
206 {SIG_ROTATION_CHANGED, ""},
207 {SIG_PROFILE_CHANGED, ""},
213 Eina_List *_elm_win_list = NULL;
214 int _elm_win_deferred_free = 0;
216 static int _elm_win_count = 0;
218 static Eina_Bool _elm_win_auto_throttled = EINA_FALSE;
220 static Ecore_Job *_elm_win_state_eval_job = NULL;
223 _elm_win_on_resize_obj_changed_size_hints(void *data,
228 EAPI double _elm_startup_time = 0;
231 _elm_win_first_frame_do(void *data, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
233 double end = ecore_time_unix_get();
241 case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f' sec\n", end, _elm_startup_time, end - _elm_startup_time);
245 evas_event_callback_del_full(e, EVAS_CALLBACK_RENDER_POST, _elm_win_first_frame_do, data);
249 _elm_win_state_eval(void *data EINA_UNUSED)
253 int _elm_win_count_shown = 0;
254 int _elm_win_count_iconified = 0;
255 int _elm_win_count_withdrawn = 0;
257 _elm_win_state_eval_job = NULL;
259 if (_elm_config->auto_norender_withdrawn)
261 EINA_LIST_FOREACH(_elm_win_list, l, obj)
263 if ((elm_win_withdrawn_get(obj)) ||
264 ((elm_win_iconified_get(obj) &&
265 (_elm_config->auto_norender_iconified_same_as_withdrawn))))
267 if (!evas_object_data_get(obj, "__win_auto_norender"))
269 Evas *evas = evas_object_evas_get(obj);
271 elm_win_norender_push(obj);
272 evas_object_data_set(obj, "__win_auto_norender", obj);
274 if (_elm_config->auto_flush_withdrawn)
276 edje_file_cache_flush();
277 edje_collection_cache_flush();
278 evas_image_cache_flush(evas);
279 evas_font_cache_flush(evas);
281 if (_elm_config->auto_dump_withdrawn)
283 evas_render_dump(evas);
289 if (evas_object_data_get(obj, "__win_auto_norender"))
291 elm_win_norender_pop(obj);
292 evas_object_data_del(obj, "__win_auto_norender");
297 if (((_elm_config->auto_throttle) &&
298 (elm_policy_get(ELM_POLICY_THROTTLE) != ELM_POLICY_THROTTLE_NEVER)) ||
299 (elm_policy_get(ELM_POLICY_THROTTLE) == ELM_POLICY_THROTTLE_HIDDEN_ALWAYS))
301 if (_elm_win_count == 0)
303 if (_elm_win_auto_throttled)
305 ecore_throttle_adjust(-_elm_config->auto_throttle_amount);
306 _elm_win_auto_throttled = EINA_FALSE;
311 EINA_LIST_FOREACH(_elm_win_list, l, obj)
313 if (elm_win_withdrawn_get(obj))
314 _elm_win_count_withdrawn++;
315 else if (elm_win_iconified_get(obj))
316 _elm_win_count_iconified++;
317 else if (evas_object_visible_get(obj))
318 _elm_win_count_shown++;
320 if (_elm_win_count_shown <= 0)
322 if (!_elm_win_auto_throttled)
324 ecore_throttle_adjust(_elm_config->auto_throttle_amount);
325 _elm_win_auto_throttled = EINA_TRUE;
330 if (_elm_win_auto_throttled)
332 ecore_throttle_adjust(-_elm_config->auto_throttle_amount);
333 _elm_win_auto_throttled = EINA_FALSE;
341 _elm_win_state_eval_queue(void)
343 ecore_job_del(_elm_win_state_eval_job);
344 _elm_win_state_eval_job = ecore_job_add(_elm_win_state_eval, NULL);
347 // example shot spec (wait 0.1 sec then save as my-window.png):
348 // ELM_ENGINE="shot:delay=0.1:file=my-window.png"
351 _shot_delay_get(Elm_Win_Smart_Data *sd)
354 char *d = strdup(sd->shot.info);
357 for (p = (char *)sd->shot.info; *p; p++)
359 if (!strncmp(p, "delay=", 6))
363 for (pd = d, p += 6; (*p) && (*p != ':'); p++, pd++)
379 _shot_file_get(Elm_Win_Smart_Data *sd)
382 char *tmp = strdup(sd->shot.info);
383 char *repname = NULL;
385 if (!tmp) return NULL;
387 for (p = (char *)sd->shot.info; *p; p++)
389 if (!strncmp(p, "file=", 5))
392 if (!sd->shot.repeat_count) return tmp;
395 char *dotptr = strrchr(tmp, '.');
398 size_t size = sizeof(char) * (strlen(tmp) + 16);
399 repname = malloc(size);
400 strncpy(repname, tmp, dotptr - tmp);
401 snprintf(repname + (dotptr - tmp), size -
402 (dotptr - tmp), "%03i",
403 sd->shot.shot_counter + 1);
404 strcat(repname, dotptr);
412 if (!sd->shot.repeat_count) return strdup("out.png");
414 repname = malloc(sizeof(char) * 24);
415 snprintf(repname, sizeof(char) * 24, "out%03i.png",
416 sd->shot.shot_counter + 1);
422 _shot_repeat_count_get(Elm_Win_Smart_Data *sd)
425 char *d = strdup(sd->shot.info);
428 for (p = (char *)sd->shot.info; *p; p++)
430 if (!strncmp(p, "repeat=", 7))
434 for (pd = d, p += 7; (*p) && (*p != ':'); p++, pd++)
441 if (v > 1000) v = 999;
452 _shot_key_get(Elm_Win_Smart_Data *sd EINA_UNUSED)
458 _shot_flags_get(Elm_Win_Smart_Data *sd EINA_UNUSED)
464 _shot_do(Elm_Win_Smart_Data *sd)
468 unsigned int *pixels;
470 char *file, *key, *flags;
472 ecore_evas_manual_render(sd->ee);
473 pixels = (void *)ecore_evas_buffer_pixels_get(sd->ee);
476 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
477 if ((w < 1) || (h < 1)) return;
479 file = _shot_file_get(sd);
482 key = _shot_key_get(sd);
483 flags = _shot_flags_get(sd);
484 ee = ecore_evas_buffer_new(1, 1);
485 o = evas_object_image_add(ecore_evas_get(ee));
486 evas_object_image_alpha_set(o, ecore_evas_alpha_get(sd->ee));
487 evas_object_image_size_set(o, w, h);
488 evas_object_image_data_set(o, pixels);
489 if (!evas_object_image_save(o, file, key, flags))
491 ERR("Cannot save window to '%s' (key '%s', flags '%s')",
498 if (sd->shot.repeat_count) sd->shot.shot_counter++;
502 _shot_delay(void *data)
504 ELM_WIN_DATA_GET(data, sd);
507 if (sd->shot.repeat_count)
509 int remainshot = (sd->shot.repeat_count - sd->shot.shot_counter);
510 if (remainshot > 0) return EINA_TRUE;
512 sd->shot.timer = NULL;
519 _shot_init(Elm_Win_Smart_Data *sd)
521 if (!sd->shot.info) return;
523 sd->shot.repeat_count = _shot_repeat_count_get(sd);
524 sd->shot.shot_counter = 0;
528 _shot_handle(Elm_Win_Smart_Data *sd)
530 if (!sd->shot.info) return;
533 sd->shot.timer = ecore_timer_add(_shot_delay_get(sd), _shot_delay,
537 /* elm-win specific associate, does the trap while ecore_evas_object_associate()
540 static Elm_Win_Smart_Data *
541 _elm_win_associate_get(const Ecore_Evas *ee)
543 ELM_WIN_DATA_GET(ecore_evas_data_get(ee, "elm_win"), sd);
547 /* Interceptors Callbacks */
549 _elm_win_obj_intercept_raise(void *data, Evas_Object *obj EINA_UNUSED)
551 ELM_WIN_DATA_GET(data, sd);
556 _elm_win_obj_intercept_lower(void *data, Evas_Object *obj EINA_UNUSED)
558 ELM_WIN_DATA_GET(data, sd);
563 _elm_win_obj_intercept_stack_above(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Object *above EINA_UNUSED)
565 INF("TODO: %s", __FUNCTION__);
569 _elm_win_obj_intercept_stack_below(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Object *below EINA_UNUSED)
571 INF("TODO: %s", __FUNCTION__);
575 _elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj EINA_UNUSED, int l)
577 ELM_WIN_DATA_GET(data, sd);
578 TRAP(sd, layer_set, l);
581 /* Event Callbacks */
584 _elm_win_obj_callback_changed_size_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
586 ELM_WIN_DATA_GET(data, sd);
589 evas_object_size_hint_min_get(obj, &w, &h);
590 TRAP(sd, size_min_set, w, h);
592 evas_object_size_hint_max_get(obj, &w, &h);
595 TRAP(sd, size_max_set, w, h);
597 /* end of elm-win specific associate */
600 _elm_win_move(Ecore_Evas *ee)
602 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
605 EINA_SAFETY_ON_NULL_RETURN(sd);
607 ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
610 evas_object_smart_callback_call(sd->obj, SIG_MOVED, NULL);
614 _elm_win_resize_job(void *data)
616 ELM_WIN_DATA_GET(data, sd);
619 sd->deferred_resize_job = NULL;
620 ecore_evas_request_geometry_get(sd->ee, NULL, NULL, &w, &h);
624 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sw, &sh);
633 evas_output_framespace_get(sd->evas, &fx, &fy, &fw, &fh);
634 evas_object_move(sd->frame_obj, -fx, -fy);
635 evas_object_resize(sd->frame_obj, w + fw, h + fh);
638 evas_object_resize(sd->obj, w, h);
639 evas_object_resize(sd->layout, w, h);
643 _elm_win_resize(Ecore_Evas *ee)
645 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
646 EINA_SAFETY_ON_NULL_RETURN(sd);
648 ecore_job_del(sd->deferred_resize_job);
649 sd->deferred_resize_job = ecore_job_add(_elm_win_resize_job, sd->obj);
653 _elm_win_mouse_in(Ecore_Evas *ee)
655 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
656 EINA_SAFETY_ON_NULL_RETURN(sd);
658 if (sd->resizing) sd->resizing = EINA_FALSE;
662 _elm_win_focus_highlight_reconfigure_job_stop(Elm_Win_Smart_Data *sd)
664 ELM_SAFE_FREE(sd->focus_highlight.reconf_job, ecore_job_del);
668 _elm_win_focus_highlight_visible_set(Elm_Win_Smart_Data *sd,
671 Evas_Object *fobj = sd->focus_highlight.fobj;
676 evas_object_show(fobj);
677 edje_object_signal_emit(fobj, "elm,action,focus,show", "elm");
681 edje_object_signal_emit(fobj, "elm,action,focus,hide", "elm");
686 _elm_win_focus_highlight_geometry_get(Evas_Object *target, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
688 Evas_Coord tx = 0, ty = 0, tw = 0, th = 0;
689 const char *target_hl_part = NULL;
690 Evas_Object *edje_obj = NULL;
691 ELM_WIDGET_DATA_GET_OR_RETURN(target, wd);
693 evas_object_geometry_get(target, x, y, w, h);
694 if (wd->resize_obj && eo_isa(wd->resize_obj, EDJE_OBJ_CLASS))
696 edje_obj = wd->resize_obj;
697 if (!(target_hl_part = edje_object_data_get(edje_obj, "focus_part")))
700 else if (wd->resize_obj && eo_isa(wd->resize_obj, ELM_OBJ_LAYOUT_CLASS))
702 edje_obj = elm_layout_edje_get(wd->resize_obj);
703 if (!(target_hl_part = elm_layout_data_get(wd->resize_obj, "focus_part")))
708 edje_object_part_geometry_get(edje_obj, target_hl_part,
712 if (tw != *w) *w = tw;
713 if (th != *h) *h = th;
717 _elm_win_focus_highlight_anim_setup(Elm_Win_Smart_Data *sd,
720 Evas_Coord tx, ty, tw, th;
721 Evas_Coord w, h, px, py, pw, ph;
722 Edje_Message_Int_Set *m;
723 Evas_Object *previous = sd->focus_highlight.prev.target;
724 Evas_Object *target = sd->focus_highlight.cur.target;
726 evas_object_geometry_get(sd->obj, NULL, NULL, &w, &h);
727 _elm_win_focus_highlight_geometry_get(target, &tx, &ty, &tw, &th);
728 _elm_win_focus_highlight_geometry_get(previous, &px, &py, &pw, &ph);
729 evas_object_move(obj, tx, ty);
730 evas_object_resize(obj, tw, th);
731 evas_object_clip_unset(obj);
733 m = alloca(sizeof(*m) + (sizeof(int) * 8));
743 edje_object_message_send(obj, EDJE_MESSAGE_INT_SET, 1, m);
747 _elm_win_focus_highlight_simple_setup(Elm_Win_Smart_Data *sd,
750 Evas_Object *clip, *target = sd->focus_highlight.cur.target;
751 Evas_Coord x, y, w, h;
753 clip = evas_object_clip_get(target);
754 _elm_win_focus_highlight_geometry_get(target, &x, &y, &w, &h);
756 evas_object_move(obj, x, y);
757 evas_object_resize(obj, w, h);
758 evas_object_clip_set(obj, clip);
762 _elm_win_focus_highlight_reconfigure(Elm_Win_Smart_Data *sd)
764 Evas_Object *target = sd->focus_highlight.cur.target;
765 Evas_Object *previous = sd->focus_highlight.prev.target;
766 Evas_Object *fobj = sd->focus_highlight.fobj;
767 Eina_Bool visible_changed;
768 Eina_Bool common_visible;
769 const char *sig = NULL;
770 const char *focus_style_target = NULL;
771 const char *focus_style_previous = NULL;
773 _elm_win_focus_highlight_reconfigure_job_stop(sd);
775 visible_changed = (sd->focus_highlight.cur.visible !=
776 sd->focus_highlight.prev.visible);
778 if ((target == previous) && (!visible_changed) &&
779 (!sd->focus_highlight.geometry_changed) &&
780 (!sd->focus_highlight.theme_changed))
783 if ((previous) && (sd->focus_highlight.prev.in_theme))
784 elm_widget_signal_emit
785 (previous, "elm,action,focus_highlight,hide", "elm");
788 common_visible = EINA_FALSE;
789 else if (sd->focus_highlight.cur.in_theme)
791 common_visible = EINA_FALSE;
792 if (sd->focus_highlight.cur.visible)
793 sig = "elm,action,focus_highlight,show";
795 sig = "elm,action,focus_highlight,hide";
798 common_visible = sd->focus_highlight.cur.visible;
801 elm_widget_signal_emit(target, sig, "elm");
803 if ((!target) || (!common_visible) || (sd->focus_highlight.cur.in_theme))
807 focus_style_previous = elm_widget_focus_highlight_style_get(previous);
808 focus_style_target = elm_widget_focus_highlight_style_get(target);
810 if (sd->focus_highlight.theme_changed ||
811 (focus_style_target != focus_style_previous))
815 if (focus_style_target)
816 str = focus_style_target;
817 else if (sd->focus_highlight.style)
818 str = sd->focus_highlight.style;
822 elm_widget_theme_object_set
823 (sd->obj, fobj, "focus_highlight", "top", str);
824 sd->focus_highlight.theme_changed = EINA_FALSE;
826 if (sd->focus_highlight.animate)
828 str = edje_object_data_get(sd->focus_highlight.fobj, "animate");
829 sd->focus_highlight.animate_supported = ((str) && (!strcmp(str, "on")));
832 sd->focus_highlight.animate_supported = EINA_FALSE;
835 if ((sd->focus_highlight.animate_supported) && (previous) &&
836 (!sd->focus_highlight.prev.in_theme))
837 _elm_win_focus_highlight_anim_setup(sd, fobj);
839 _elm_win_focus_highlight_simple_setup(sd, fobj);
840 evas_object_raise(fobj);
843 _elm_win_focus_highlight_visible_set(sd, common_visible);
844 sd->focus_highlight.geometry_changed = EINA_FALSE;
845 sd->focus_highlight.prev = sd->focus_highlight.cur;
849 _elm_win_focus_highlight_reconfigure_job(void *data)
851 ELM_WIN_DATA_GET(data, sd);
852 _elm_win_focus_highlight_reconfigure(sd);
856 _elm_win_focus_highlight_reconfigure_job_start(Elm_Win_Smart_Data *sd)
858 ecore_job_del(sd->focus_highlight.reconf_job);
860 sd->focus_highlight.reconf_job = ecore_job_add(
861 _elm_win_focus_highlight_reconfigure_job, sd->obj);
865 _elm_win_focus_in(Ecore_Evas *ee)
867 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
869 unsigned int order = 0;
871 EINA_SAFETY_ON_NULL_RETURN(sd);
875 _elm_widget_top_win_focused_set(obj, EINA_TRUE);
876 if (!elm_widget_focus_order_get(obj)
877 || (obj == elm_widget_newest_focus_order_get(obj, &order, EINA_TRUE)))
879 elm_widget_focus_steal(obj);
882 elm_widget_focus_restore(obj);
883 evas_object_smart_callback_call(obj, SIG_FOCUS_IN, NULL);
884 evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL);
885 sd->focus_highlight.cur.visible = EINA_TRUE;
886 _elm_win_focus_highlight_reconfigure_job_start(sd);
889 edje_object_signal_emit(sd->frame_obj, "elm,action,focus", "elm");
893 /* else if (sd->img_obj) */
899 _elm_win_focus_out(Ecore_Evas *ee)
901 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
904 EINA_SAFETY_ON_NULL_RETURN(sd);
908 elm_object_focus_set(obj, EINA_FALSE);
909 _elm_widget_top_win_focused_set(obj, EINA_FALSE);
910 evas_object_smart_callback_call(obj, SIG_FOCUS_OUT, NULL);
911 evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL);
912 sd->focus_highlight.cur.visible = EINA_FALSE;
913 _elm_win_focus_highlight_reconfigure_job_start(sd);
916 edje_object_signal_emit(sd->frame_obj, "elm,action,unfocus", "elm");
920 _elm_access_object_highlight_disable(evas_object_evas_get(obj));
923 /* if (sd->img_obj) */
929 _elm_win_available_profiles_del(Elm_Win_Smart_Data *sd)
931 if (!sd->profile.available_list) return;
934 for (i = 0; i < sd->profile.count; i++)
935 ELM_SAFE_FREE(sd->profile.available_list[i], eina_stringshare_del);
936 sd->profile.count = 0;
937 ELM_SAFE_FREE(sd->profile.available_list, free);
941 _elm_win_profile_del(Elm_Win_Smart_Data *sd)
943 ELM_SAFE_FREE(sd->profile.name, eina_stringshare_del);
947 _elm_win_profile_set(Elm_Win_Smart_Data *sd, const char *profile)
949 Eina_Bool changed = EINA_FALSE;
952 if (sd->profile.name)
954 if (strcmp(sd->profile.name, profile) != 0)
956 eina_stringshare_replace(&(sd->profile.name), profile);
962 sd->profile.name = eina_stringshare_add(profile);
967 _elm_win_profile_del(sd);
973 _elm_win_profile_update(Elm_Win_Smart_Data *sd)
975 if (sd->profile.available_list)
977 Eina_Bool found = EINA_FALSE;
978 if (sd->profile.name)
981 for (i = 0; i < sd->profile.count; i++)
983 if (!strcmp(sd->profile.name,
984 sd->profile.available_list[i]))
992 /* If current profile is not present in an available profiles,
993 * change current profile to the 1st element of an array.
996 _elm_win_profile_set(sd, sd->profile.available_list[0]);
999 _elm_config_profile_set(sd->profile.name);
1003 Eina_List *sub, *l = NULL;
1005 sub = ecore_evas_sub_ecore_evas_list_get(sd->ee);
1006 EINA_LIST_FOREACH(sub, l, ee2)
1007 ecore_evas_window_profile_set(ee2, sd->profile.name);
1009 evas_object_smart_callback_call(sd->obj, SIG_PROFILE_CHANGED, NULL);
1013 _elm_win_state_change(Ecore_Evas *ee)
1015 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
1017 Eina_Bool ch_withdrawn = EINA_FALSE;
1018 Eina_Bool ch_sticky = EINA_FALSE;
1019 Eina_Bool ch_iconified = EINA_FALSE;
1020 Eina_Bool ch_fullscreen = EINA_FALSE;
1021 Eina_Bool ch_maximized = EINA_FALSE;
1022 Eina_Bool ch_profile = EINA_FALSE;
1023 const char *profile;
1025 EINA_SAFETY_ON_NULL_RETURN(sd);
1029 if (sd->withdrawn != ecore_evas_withdrawn_get(sd->ee))
1031 sd->withdrawn = ecore_evas_withdrawn_get(sd->ee);
1032 ch_withdrawn = EINA_TRUE;
1034 if (sd->sticky != ecore_evas_sticky_get(sd->ee))
1036 sd->sticky = ecore_evas_sticky_get(sd->ee);
1037 ch_sticky = EINA_TRUE;
1039 if (sd->iconified != ecore_evas_iconified_get(sd->ee))
1041 sd->iconified = ecore_evas_iconified_get(sd->ee);
1042 ch_iconified = EINA_TRUE;
1044 if (sd->fullscreen != ecore_evas_fullscreen_get(sd->ee))
1046 sd->fullscreen = ecore_evas_fullscreen_get(sd->ee);
1047 ch_fullscreen = EINA_TRUE;
1049 if (sd->maximized != ecore_evas_maximized_get(sd->ee))
1051 sd->maximized = ecore_evas_maximized_get(sd->ee);
1052 ch_maximized = EINA_TRUE;
1055 profile = ecore_evas_window_profile_get(sd->ee);
1056 ch_profile = _elm_win_profile_set(sd, profile);
1058 _elm_win_state_eval_queue();
1060 if ((ch_withdrawn) || (ch_iconified))
1063 evas_object_smart_callback_call(obj, SIG_WITHDRAWN, NULL);
1064 else if (sd->iconified)
1065 evas_object_smart_callback_call(obj, SIG_ICONIFIED, NULL);
1067 evas_object_smart_callback_call(obj, SIG_NORMAL, NULL);
1072 evas_object_smart_callback_call(obj, SIG_STICK, NULL);
1074 evas_object_smart_callback_call(obj, SIG_UNSTICK, NULL);
1079 evas_object_smart_callback_call(obj, SIG_FULLSCREEN, NULL);
1081 evas_object_smart_callback_call(obj, SIG_UNFULLSCREEN, NULL);
1086 evas_object_smart_callback_call(obj, SIG_MAXIMIZED, NULL);
1088 evas_object_smart_callback_call(obj, SIG_UNMAXIMIZED, NULL);
1092 _elm_win_profile_update(sd);
1097 _elm_win_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
1099 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1104 _elm_win_smart_focus_next(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1106 Elm_Focus_Direction dir = va_arg(*list, Elm_Focus_Direction);
1107 Evas_Object **next = va_arg(*list, Evas_Object **);
1108 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1109 if (ret) *ret = EINA_FALSE;
1111 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
1113 const Eina_List *items;
1114 void *(*list_data_get)(const Eina_List *list);
1119 if (!(items = elm_widget_focus_custom_chain_get(obj)))
1121 items = wd->subobjs;
1125 list_data_get = eina_list_data_get;
1127 elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next);
1131 if (ret) *ret = EINA_TRUE;
1135 *next = (Evas_Object *)obj;
1140 _elm_win_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
1142 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1147 _elm_win_smart_focus_direction(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1149 const Evas_Object *base = va_arg(*list, Evas_Object *);
1150 double degree = va_arg(*list, double);
1151 Evas_Object **direction = va_arg(*list, Evas_Object **);
1152 double *weight = va_arg(*list, double *);
1153 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1154 if (ret) *ret = EINA_FALSE;
1155 Eina_Bool int_ret = EINA_FALSE;
1157 const Eina_List *items;
1158 void *(*list_data_get)(const Eina_List *list);
1160 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
1165 if (!(items = elm_widget_focus_custom_chain_get(obj)))
1166 items = wd->subobjs;
1168 list_data_get = eina_list_data_get;
1170 int_ret = elm_widget_focus_list_direction_get
1171 (obj, base, items, list_data_get, degree, direction, weight);
1172 if (ret) *ret = int_ret;
1177 _elm_win_smart_on_focus(Eo *obj, void *_pd, va_list *list)
1179 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1180 if (ret) *ret = EINA_TRUE;
1181 Elm_Win_Smart_Data *sd = _pd;
1182 Eina_Bool int_ret = EINA_FALSE;
1184 eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
1185 if (!int_ret) return;
1188 evas_object_focus_set(sd->img_obj, elm_widget_focus_get(obj));
1190 evas_object_focus_set(obj, elm_widget_focus_get(obj));
1194 _elm_win_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1196 Evas_Object *src = va_arg(*list, Evas_Object *);
1197 Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
1198 Evas_Event_Key_Down *ev = va_arg(*list, void *);
1199 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1201 if (ret) *ret = EINA_FALSE;
1204 if (elm_widget_disabled_get(obj)) return;
1205 if (type != EVAS_CALLBACK_KEY_DOWN) return;
1207 if ((!strcmp(ev->key, "Tab")) ||
1208 (!strcmp(ev->key, "ISO_Left_Tab")))
1210 if (evas_key_modifier_is_set(ev->modifiers, "Control") ||
1211 evas_key_modifier_is_set(ev->modifiers, "Alt"))
1213 if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
1214 elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
1216 elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
1220 else if ((!strcmp(ev->key, "Left")) ||
1221 ((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
1223 elm_widget_focus_cycle(obj, ELM_FOCUS_LEFT);
1227 else if ((!strcmp(ev->key, "Right")) ||
1228 ((!strcmp(ev->key, "KP_Right")) && (!ev->string)))
1230 elm_widget_focus_cycle(obj, ELM_FOCUS_RIGHT);
1234 else if ((!strcmp(ev->key, "Up")) ||
1235 ((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
1237 elm_widget_focus_cycle(obj, ELM_FOCUS_UP);
1241 else if ((!strcmp(ev->key, "Down")) ||
1242 ((!strcmp(ev->key, "KP_Down")) && (!ev->string)))
1244 elm_widget_focus_cycle(obj, ELM_FOCUS_DOWN);
1252 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1253 if (ret) *ret = EINA_TRUE;
1257 _deferred_ecore_evas_free(void *data)
1259 ecore_evas_free(data);
1260 _elm_win_deferred_free--;
1264 _elm_win_smart_show(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1266 Elm_Win_Smart_Data *sd = _pd;
1268 if (!evas_object_visible_get(obj))
1269 _elm_win_state_eval_queue();
1270 eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
1274 if (sd->shot.info) _shot_handle(sd);
1278 _elm_win_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1280 Elm_Win_Smart_Data *sd = _pd;
1282 if (evas_object_visible_get(obj))
1283 _elm_win_state_eval_queue();
1284 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
1290 evas_object_hide(sd->frame_obj);
1294 evas_object_hide(sd->img_obj);
1296 if (sd->pointer.obj)
1298 evas_object_hide(sd->pointer.obj);
1299 ecore_evas_hide(sd->pointer.ee);
1304 _elm_win_on_parent_del(void *data,
1305 Evas *e EINA_UNUSED,
1307 void *event_info EINA_UNUSED)
1309 ELM_WIN_DATA_GET(data, sd);
1311 if (obj == sd->parent) sd->parent = NULL;
1315 _elm_win_focus_target_move(void *data,
1316 Evas *e EINA_UNUSED,
1317 Evas_Object *obj EINA_UNUSED,
1318 void *event_info EINA_UNUSED)
1320 ELM_WIN_DATA_GET(data, sd);
1322 sd->focus_highlight.geometry_changed = EINA_TRUE;
1323 _elm_win_focus_highlight_reconfigure_job_start(sd);
1327 _elm_win_focus_target_resize(void *data,
1328 Evas *e EINA_UNUSED,
1329 Evas_Object *obj EINA_UNUSED,
1330 void *event_info EINA_UNUSED)
1332 ELM_WIN_DATA_GET(data, sd);
1334 sd->focus_highlight.geometry_changed = EINA_TRUE;
1335 _elm_win_focus_highlight_reconfigure_job_start(sd);
1339 _elm_win_focus_target_del(void *data,
1340 Evas *e EINA_UNUSED,
1341 Evas_Object *obj EINA_UNUSED,
1342 void *event_info EINA_UNUSED)
1344 ELM_WIN_DATA_GET(data, sd);
1346 sd->focus_highlight.cur.target = NULL;
1348 _elm_win_focus_highlight_reconfigure_job_start(sd);
1351 static Evas_Object *
1352 _elm_win_focus_target_get(Evas_Object *obj)
1354 Evas_Object *o = obj;
1358 if (elm_widget_is(o))
1360 if (!elm_widget_highlight_ignore_get(o))
1362 o = elm_widget_parent_get(o);
1364 o = evas_object_smart_parent_get(o);
1368 o = elm_widget_parent_widget_get(o);
1370 o = evas_object_smart_parent_get(o);
1379 _elm_win_focus_target_callbacks_add(Elm_Win_Smart_Data *sd)
1381 Evas_Object *obj = sd->focus_highlight.cur.target;
1384 evas_object_event_callback_add
1385 (obj, EVAS_CALLBACK_MOVE, _elm_win_focus_target_move, sd->obj);
1386 evas_object_event_callback_add
1387 (obj, EVAS_CALLBACK_RESIZE, _elm_win_focus_target_resize, sd->obj);
1388 evas_object_event_callback_add
1389 (obj, EVAS_CALLBACK_DEL, _elm_win_focus_target_del, sd->obj);
1393 _elm_win_focus_target_callbacks_del(Elm_Win_Smart_Data *sd)
1395 Evas_Object *obj = sd->focus_highlight.cur.target;
1397 evas_object_event_callback_del_full
1398 (obj, EVAS_CALLBACK_MOVE, _elm_win_focus_target_move, sd->obj);
1399 evas_object_event_callback_del_full
1400 (obj, EVAS_CALLBACK_RESIZE, _elm_win_focus_target_resize, sd->obj);
1401 evas_object_event_callback_del_full
1402 (obj, EVAS_CALLBACK_DEL, _elm_win_focus_target_del, sd->obj);
1406 _elm_win_object_focus_in(void *data,
1407 Evas *e EINA_UNUSED,
1410 Evas_Object *obj = event_info, *target;
1411 ELM_WIN_DATA_GET(data, sd);
1413 if (sd->focus_highlight.cur.target == obj)
1416 target = _elm_win_focus_target_get(obj);
1417 sd->focus_highlight.cur.target = target;
1418 if (target && elm_widget_highlight_in_theme_get(target))
1419 sd->focus_highlight.cur.in_theme = EINA_TRUE;
1421 _elm_win_focus_target_callbacks_add(sd);
1423 _elm_win_focus_highlight_reconfigure_job_start(sd);
1427 _elm_win_object_focus_out(void *data,
1428 Evas *e EINA_UNUSED,
1429 void *event_info EINA_UNUSED)
1431 ELM_WIN_DATA_GET(data, sd);
1433 if (!sd->focus_highlight.cur.target)
1436 if (!sd->focus_highlight.cur.in_theme)
1437 _elm_win_focus_target_callbacks_del(sd);
1439 sd->focus_highlight.cur.target = NULL;
1440 sd->focus_highlight.cur.in_theme = EINA_FALSE;
1442 _elm_win_focus_highlight_reconfigure_job_start(sd);
1446 _elm_win_focus_highlight_shutdown(Elm_Win_Smart_Data *sd)
1448 _elm_win_focus_highlight_reconfigure_job_stop(sd);
1449 if (sd->focus_highlight.cur.target)
1451 elm_widget_signal_emit(sd->focus_highlight.cur.target,
1452 "elm,action,focus_highlight,hide", "elm");
1453 _elm_win_focus_target_callbacks_del(sd);
1454 sd->focus_highlight.cur.target = NULL;
1456 ELM_SAFE_FREE(sd->focus_highlight.fobj, evas_object_del);
1458 evas_event_callback_del_full
1459 (sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
1460 _elm_win_object_focus_in, sd->obj);
1461 evas_event_callback_del_full
1462 (sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
1463 _elm_win_object_focus_out, sd->obj);
1467 _elm_win_on_img_obj_del(void *data,
1468 Evas *e EINA_UNUSED,
1469 Evas_Object *obj EINA_UNUSED,
1470 void *event_info EINA_UNUSED)
1472 ELM_WIN_DATA_GET(data, sd);
1477 _elm_win_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1479 Elm_Win_Smart_Data *sd = _pd;
1481 evas_object_event_callback_del_full(sd->layout,
1482 EVAS_CALLBACK_CHANGED_SIZE_HINTS,
1483 _elm_win_on_resize_obj_changed_size_hints,
1485 evas_object_del(sd->box);
1486 evas_object_del(sd->layout);
1488 /* NB: child deletion handled by parent's smart del */
1490 if ((trap) && (trap->del))
1491 trap->del(sd->trap_data, obj);
1495 evas_object_event_callback_del_full
1496 (sd->parent, EVAS_CALLBACK_DEL, _elm_win_on_parent_del, obj);
1500 if (sd->autodel_clear) *(sd->autodel_clear) = -1;
1502 _elm_win_list = eina_list_remove(_elm_win_list, obj);
1504 _elm_win_state_eval_queue();
1508 ecore_evas_callback_delete_request_set(sd->ee, NULL);
1509 ecore_evas_callback_resize_set(sd->ee, NULL);
1512 ecore_job_del(sd->deferred_resize_job);
1513 ecore_job_del(sd->deferred_child_eval_job);
1514 eina_stringshare_del(sd->shot.info);
1515 ecore_timer_del(sd->shot.timer);
1517 #ifdef HAVE_ELEMENTARY_X
1518 ecore_event_handler_del(sd->x.client_message_handler);
1519 ecore_event_handler_del(sd->x.property_handler);
1524 evas_object_event_callback_del_full
1525 (sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, obj);
1532 ecore_job_add(_deferred_ecore_evas_free, sd->ee);
1533 _elm_win_deferred_free++;
1537 _elm_win_focus_highlight_shutdown(sd);
1538 eina_stringshare_del(sd->focus_highlight.style);
1540 eina_stringshare_del(sd->title);
1541 eina_stringshare_del(sd->icon_name);
1542 eina_stringshare_del(sd->role);
1543 evas_object_del(sd->icon);
1544 evas_object_del(sd->main_menu);
1546 _elm_win_profile_del(sd);
1547 _elm_win_available_profiles_del(sd);
1549 /* Don't let callback in the air that point to sd */
1550 ecore_evas_callback_delete_request_set(sd->ee, NULL);
1551 ecore_evas_callback_resize_set(sd->ee, NULL);
1552 ecore_evas_callback_mouse_in_set(sd->ee, NULL);
1553 ecore_evas_callback_focus_in_set(sd->ee, NULL);
1554 ecore_evas_callback_focus_out_set(sd->ee, NULL);
1555 ecore_evas_callback_move_set(sd->ee, NULL);
1556 ecore_evas_callback_state_change_set(sd->ee, NULL);
1558 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
1560 if ((!_elm_win_list) &&
1561 (elm_policy_get(ELM_POLICY_QUIT) == ELM_POLICY_QUIT_LAST_WINDOW_CLOSED))
1563 edje_file_cache_flush();
1564 edje_collection_cache_flush();
1565 evas_image_cache_flush(evas_object_evas_get(obj));
1566 evas_font_cache_flush(evas_object_evas_get(obj));
1572 _elm_win_obj_intercept_show(void *data,
1575 ELM_WIN_DATA_GET(data, sd);
1577 // this is called to make sure all smart containers have calculated their
1578 // sizes BEFORE we show the window to make sure it initially appears at
1579 // our desired size (ie min size is known first)
1580 evas_smart_objects_calculate(evas_object_evas_get(obj));
1583 evas_object_show(sd->frame_obj);
1587 evas_object_show(sd->img_obj);
1589 if (sd->pointer.obj)
1591 ecore_evas_show(sd->pointer.ee);
1592 evas_object_show(sd->pointer.obj);
1594 evas_object_show(obj);
1598 _elm_win_smart_move(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1600 Evas_Coord x = va_arg(*list, Evas_Coord);
1601 Evas_Coord y = va_arg(*list, Evas_Coord);
1602 Elm_Win_Smart_Data *sd = _pd;
1606 if ((x != sd->screen.x) || (y != sd->screen.y))
1610 evas_object_smart_callback_call(obj, SIG_MOVED, NULL);
1616 TRAP(sd, move, x, y);
1617 if (!ecore_evas_override_get(sd->ee)) return;
1620 eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y));
1622 if (ecore_evas_override_get(sd->ee))
1626 evas_object_smart_callback_call(obj, SIG_MOVED, NULL);
1630 /* FIXME: We should update ecore_wl_window_location here !! */
1642 _elm_win_smart_resize(Eo *obj, void *_pd, va_list *list)
1644 Evas_Coord w = va_arg(*list, Evas_Coord);
1645 Evas_Coord h = va_arg(*list, Evas_Coord);
1647 Elm_Win_Smart_Data *sd = _pd;
1649 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
1657 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sw, &sh);
1664 evas_object_image_size_set(sd->img_obj, w, h);
1667 TRAP(sd, resize, w, h);
1671 _elm_win_delete_request(Ecore_Evas *ee)
1673 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
1676 EINA_SAFETY_ON_NULL_RETURN(sd);
1680 int autodel = sd->autodel;
1681 sd->autodel_clear = &autodel;
1682 evas_object_ref(obj);
1683 evas_object_smart_callback_call(obj, SIG_DELETE_REQUEST, NULL);
1684 // FIXME: if above callback deletes - then the below will be invalid
1685 if (autodel) evas_object_del(obj);
1686 else sd->autodel_clear = NULL;
1687 evas_object_unref(obj);
1691 _elm_ee_xwin_get(const Ecore_Evas *ee)
1693 #ifdef HAVE_ELEMENTARY_X
1694 const char *engine_name;
1697 engine_name = ecore_evas_engine_name_get(ee);
1698 if (EINA_UNLIKELY(!engine_name)) return 0;
1700 if (!strcmp(engine_name, ELM_SOFTWARE_X11))
1702 return ecore_evas_software_x11_window_get(ee);
1704 else if (!strcmp(engine_name, ELM_OPENGL_X11))
1706 return ecore_evas_gl_x11_window_get(ee);
1708 else if (!strcmp(engine_name, ELM_SOFTWARE_WIN32))
1710 return (long)ecore_evas_win32_window_get(ee);
1716 #ifdef HAVE_ELEMENTARY_X
1718 _elm_win_xwindow_get(Elm_Win_Smart_Data *sd)
1720 sd->x.xwin = _elm_ee_xwin_get(sd->ee);
1725 _elm_ee_wlwin_get(const Ecore_Evas *ee)
1727 #ifdef HAVE_ELEMENTARY_WAYLAND
1728 const char *engine_name;
1730 if (!ee) return NULL;
1732 engine_name = ecore_evas_engine_name_get(ee);
1733 if (EINA_UNLIKELY(!engine_name)) return NULL;
1735 if ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
1736 (!strcmp(engine_name, ELM_WAYLAND_EGL)))
1738 return ecore_evas_wayland_window_get(ee);
1746 #ifdef HAVE_ELEMENTARY_WAYLAND
1748 _elm_win_wlwindow_get(Elm_Win_Smart_Data *sd)
1750 sd->wl.win = _elm_ee_wlwin_get(sd->ee);
1754 #ifdef HAVE_ELEMENTARY_X
1756 _elm_win_xwin_update(Elm_Win_Smart_Data *sd)
1760 _elm_win_xwindow_get(sd);
1763 ELM_WIN_DATA_GET(sd->parent, sdp);
1767 ecore_x_icccm_transient_for_set(sd->x.xwin, sdp->x.xwin);
1771 if (!sd->x.xwin) return; /* nothing more to do */
1774 if (!s) s = _elm_appname;
1776 if (sd->icon_name) s = sd->icon_name;
1777 ecore_x_icccm_icon_name_set(sd->x.xwin, s);
1778 ecore_x_netwm_icon_name_set(sd->x.xwin, s);
1781 if (s) ecore_x_icccm_window_role_set(sd->x.xwin, s);
1788 data = evas_object_image_data_get(sd->icon, EINA_FALSE);
1792 int w = 0, h = 0, stride, x, y;
1796 evas_object_image_size_get(sd->icon, &w, &h);
1797 stride = evas_object_image_stride_get(sd->icon);
1798 if ((w > 0) && (h > 0) &&
1799 (stride >= (int)(w * sizeof(unsigned int))))
1803 ic.data = malloc(w * h * sizeof(unsigned int));
1807 p = (unsigned char *)data;
1808 p2 = (unsigned int *)ic.data;
1809 for (y = 0; y < h; y++)
1811 for (x = 0; x < w; x++)
1813 *p2 = *((unsigned int *)p);
1814 p += sizeof(unsigned int);
1817 p += (stride - (w * sizeof(unsigned int)));
1819 ecore_x_netwm_icons_set(sd->x.xwin, &ic, 1);
1823 evas_object_image_data_set(sd->icon, data);
1830 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_NORMAL);
1833 case ELM_WIN_DIALOG_BASIC:
1834 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DIALOG);
1837 case ELM_WIN_DESKTOP:
1838 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DESKTOP);
1842 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DOCK);
1845 case ELM_WIN_TOOLBAR:
1846 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_TOOLBAR);
1850 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_MENU);
1853 case ELM_WIN_UTILITY:
1854 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_UTILITY);
1857 case ELM_WIN_SPLASH:
1858 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_SPLASH);
1861 case ELM_WIN_DROPDOWN_MENU:
1862 ecore_x_netwm_window_type_set
1863 (sd->x.xwin, ECORE_X_WINDOW_TYPE_DROPDOWN_MENU);
1866 case ELM_WIN_POPUP_MENU:
1867 ecore_x_netwm_window_type_set
1868 (sd->x.xwin, ECORE_X_WINDOW_TYPE_POPUP_MENU);
1871 case ELM_WIN_TOOLTIP:
1872 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_TOOLTIP);
1875 case ELM_WIN_NOTIFICATION:
1876 ecore_x_netwm_window_type_set
1877 (sd->x.xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
1881 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_COMBO);
1885 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DND);
1891 ecore_x_e_virtual_keyboard_state_set
1892 (sd->x.xwin, (Ecore_X_Virtual_Keyboard_State)sd->kbdmode);
1893 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
1894 ecore_x_e_illume_indicator_state_set
1895 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
1896 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
1897 ecore_x_e_illume_indicator_state_set
1898 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
1906 * Resize the window according to window layout's min and weight.
1907 * If the window layout's weight is 0.0, the window max is limited to layout's
1910 * This is called when the window layout's weight hint is changed or when the
1911 * window is rotated.
1913 * @param obj window object
1916 _elm_win_resize_objects_eval(Evas_Object *obj)
1918 ELM_WIN_DATA_GET(obj, sd);
1919 Evas_Coord w, h, minw, minh, maxw, maxh;
1922 evas_object_size_hint_min_get(sd->layout, &minw, &minh);
1923 if (minw < 1) minw = 1;
1924 if (minh < 1) minh = 1;
1926 evas_object_size_hint_weight_get(sd->layout, &wx, &wy);
1927 if (!wx) maxw = minw;
1929 if (!wy) maxh = minh;
1932 evas_object_size_hint_min_set(obj, minw, minh);
1933 evas_object_size_hint_max_set(obj, maxw, maxh);
1934 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
1935 if (w < minw) w = minw;
1936 if (h < minh) h = minh;
1937 if (w > maxw) w = maxw;
1938 if (h > maxh) h = maxh;
1939 evas_object_move(obj, 0, 0);
1940 evas_object_resize(obj, w, h);
1944 _elm_win_on_resize_obj_changed_size_hints(void *data,
1945 Evas *e EINA_UNUSED,
1946 Evas_Object *obj EINA_UNUSED,
1947 void *event_info EINA_UNUSED)
1949 _elm_win_resize_objects_eval(data);
1953 _elm_win_shutdown(void)
1955 while (_elm_win_list) evas_object_del(_elm_win_list->data);
1956 ELM_SAFE_FREE(_elm_win_state_eval_job, ecore_job_del);
1960 _elm_win_rescale(Elm_Theme *th,
1961 Eina_Bool use_theme)
1968 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1969 elm_widget_theme(obj);
1973 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1974 elm_widget_theme_specific(obj, th, EINA_FALSE);
1979 _elm_win_access(Eina_Bool is_access)
1986 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1988 elm_widget_access(obj, is_access);
1990 /* floating orphan object. if there are A, B, C objects and user does
1991 as below, then there would be floating orphan objects.
1993 1. elm_object_content_set(layout, A);
1994 2. elm_object_content_set(layout, B);
1995 3. elm_object_content_set(layout, C);
1997 now, the object A and B are floating orphan objects */
2002 fobj = evas_object_below_get(fobj);
2005 if (elm_widget_is(fobj) && !elm_widget_parent_get(fobj))
2007 elm_widget_access(fobj, is_access);
2013 evas = evas_object_evas_get(obj);
2014 if (evas) _elm_access_object_highlight_disable(evas);
2020 _elm_win_translate(void)
2025 EINA_LIST_FOREACH(_elm_win_list, l, obj)
2026 elm_widget_translate(obj);
2029 #ifdef HAVE_ELEMENTARY_X
2031 _elm_win_client_message(void *data,
2032 int type EINA_UNUSED,
2035 ELM_WIN_DATA_GET(data, sd);
2036 Ecore_X_Event_Client_Message *e = event;
2038 if (e->format != 32) return ECORE_CALLBACK_PASS_ON;
2039 if (e->message_type == ECORE_X_ATOM_E_COMP_FLUSH)
2041 if ((unsigned int)e->data.l[0] == sd->x.xwin)
2043 Evas *evas = evas_object_evas_get(sd->obj);
2046 edje_file_cache_flush();
2047 edje_collection_cache_flush();
2048 evas_image_cache_flush(evas);
2049 evas_font_cache_flush(evas);
2053 else if (e->message_type == ECORE_X_ATOM_E_COMP_DUMP)
2055 if ((unsigned int)e->data.l[0] == sd->x.xwin)
2057 Evas *evas = evas_object_evas_get(sd->obj);
2060 edje_file_cache_flush();
2061 edje_collection_cache_flush();
2062 evas_image_cache_flush(evas);
2063 evas_font_cache_flush(evas);
2064 evas_render_dump(evas);
2068 else if (e->message_type == ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL)
2070 if ((unsigned int)e->data.l[0] == sd->x.xwin)
2072 if ((unsigned int)e->data.l[1] ==
2073 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT)
2075 // XXX: call right access func
2077 else if ((unsigned int)e->data.l[1] ==
2078 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_PREV)
2080 // XXX: call right access func
2082 else if ((unsigned int)e->data.l[1] ==
2083 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE)
2085 _elm_access_highlight_object_activate
2086 (sd->obj, ELM_ACTIVATE_DEFAULT);
2088 else if ((unsigned int)e->data.l[1] ==
2089 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ)
2091 /* there would be better way to read highlight object */
2093 evas = evas_object_evas_get(sd->obj);
2094 if (!evas) return ECORE_CALLBACK_PASS_ON;
2096 _elm_access_mouse_event_enabled_set(EINA_TRUE);
2098 evas_event_feed_mouse_in(evas, 0, NULL);
2099 evas_event_feed_mouse_move
2100 (evas, e->data.l[2], e->data.l[3], 0, NULL);
2102 _elm_access_mouse_event_enabled_set(EINA_FALSE);
2104 else if ((unsigned int)e->data.l[1] ==
2105 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_NEXT)
2107 _elm_access_highlight_cycle(sd->obj, ELM_FOCUS_NEXT);
2109 else if ((unsigned int)e->data.l[1] ==
2110 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_PREV)
2112 _elm_access_highlight_cycle(sd->obj, ELM_FOCUS_PREVIOUS);
2114 else if ((unsigned int)e->data.l[1] ==
2115 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP)
2117 _elm_access_highlight_object_activate
2118 (sd->obj, ELM_ACTIVATE_UP);
2120 else if ((unsigned int)e->data.l[1] ==
2121 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN)
2123 _elm_access_highlight_object_activate
2124 (sd->obj, ELM_ACTIVATE_DOWN);
2128 return ECORE_CALLBACK_PASS_ON;
2132 _elm_win_property_change(void *data,
2133 int type EINA_UNUSED,
2136 ELM_WIN_DATA_GET(data, sd);
2137 Ecore_X_Event_Window_Property *e = event;
2139 if (e->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE)
2141 if (e->win == sd->x.xwin)
2143 sd->indmode = (Elm_Win_Indicator_Mode)ecore_x_e_illume_indicator_state_get(e->win);
2144 evas_object_smart_callback_call(sd->obj, SIG_INDICATOR_PROP_CHANGED, NULL);
2147 return ECORE_CALLBACK_PASS_ON;
2152 _elm_win_focus_highlight_hide(void *data EINA_UNUSED,
2154 const char *emission EINA_UNUSED,
2155 const char *source EINA_UNUSED)
2157 evas_object_hide(obj);
2161 _elm_win_focus_highlight_anim_end(void *data,
2163 const char *emission EINA_UNUSED,
2164 const char *source EINA_UNUSED)
2166 ELM_WIN_DATA_GET(data, sd);
2168 _elm_win_focus_highlight_simple_setup(sd, obj);
2172 _elm_win_focus_highlight_init(Elm_Win_Smart_Data *sd)
2174 evas_event_callback_add(sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
2175 _elm_win_object_focus_in, sd->obj);
2176 evas_event_callback_add(sd->evas,
2177 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
2178 _elm_win_object_focus_out, sd->obj);
2180 sd->focus_highlight.cur.target = evas_focus_get(sd->evas);
2181 sd->focus_highlight.fobj = edje_object_add(sd->evas);
2182 sd->focus_highlight.theme_changed = EINA_TRUE;
2184 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2185 "elm,action,focus,hide,end", "*",
2186 _elm_win_focus_highlight_hide, NULL);
2187 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2188 "elm,action,focus,anim,end", "*",
2189 _elm_win_focus_highlight_anim_end, sd->obj);
2190 _elm_win_focus_highlight_reconfigure_job_start(sd);
2194 _elm_win_frame_cb_move_start(void *data,
2195 Evas_Object *obj EINA_UNUSED,
2196 const char *sig EINA_UNUSED,
2199 ELM_WIN_DATA_GET(data, sd);
2203 #ifdef HAVE_ELEMENTARY_WAYLAND
2204 if (!strcmp(source, "elm"))
2205 ecore_wl_window_cursor_from_name_set(sd->wl.win, ELM_CURSOR_HAND1);
2207 ecore_wl_window_cursor_default_restore(sd->wl.win);
2212 /* FIXME: Change mouse pointer */
2214 /* NB: Wayland handles moving surfaces by itself so we cannot
2215 * specify a specific x/y we want. Instead, we will pass in the
2216 * existing x/y values so they can be recorded as 'previous'
2217 * position. The new position will get updated automatically when
2218 * the move is finished */
2220 ecore_evas_wayland_move(sd->ee, sd->screen.x, sd->screen.y);
2224 _elm_win_frame_cb_move_stop(void *data,
2225 Evas_Object *obj EINA_UNUSED,
2226 const char *sig EINA_UNUSED,
2227 const char *source EINA_UNUSED)
2229 ELM_WIN_DATA_GET(data, sd);
2233 #ifdef HAVE_ELEMENTARY_WAYLAND
2234 ecore_wl_window_cursor_default_restore(sd->wl.win);
2238 #ifdef HAVE_ELEMENTARY_WAYLAND
2245 static struct _resize_info _border_side[4] =
2247 { ELM_CURSOR_TOP_SIDE, 1 },
2248 { ELM_CURSOR_LEFT_SIDE, 4 },
2249 { ELM_CURSOR_BOTTOM_SIDE, 2 },
2250 { ELM_CURSOR_RIGHT_SIDE, 8 },
2253 static struct _resize_info _border_corner[4] =
2255 { ELM_CURSOR_TOP_LEFT_CORNER, 5 },
2256 { ELM_CURSOR_BOTTOM_LEFT_CORNER, 6 },
2257 { ELM_CURSOR_BOTTOM_RIGHT_CORNER, 10 },
2258 { ELM_CURSOR_TOP_RIGHT_CORNER, 9 },
2263 _elm_win_frame_obj_update(Elm_Win_Smart_Data *sd)
2269 evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
2270 evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
2271 evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
2273 evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
2275 if ((x != (ox - fx)) || (y != (oy - fy)) ||
2276 (w != (fw - ow)) || (h != (fh - oh)))
2278 evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
2279 (fw - ow), (fh - oh));
2282 #ifdef HAVE_ELEMENTARY_WAYLAND
2283 ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -(fy - sy), sw, sh);
2288 _elm_win_frame_obj_move(void *data,
2289 Evas *e EINA_UNUSED,
2290 Evas_Object *obj EINA_UNUSED,
2291 void *event_info EINA_UNUSED)
2293 Elm_Win_Smart_Data *sd;
2295 if (!(sd = data)) return;
2296 if (!sd->client_obj) return;
2298 _elm_win_frame_obj_update(sd);
2302 _elm_win_frame_obj_resize(void *data,
2303 Evas *e EINA_UNUSED,
2304 Evas_Object *obj EINA_UNUSED,
2305 void *event_info EINA_UNUSED)
2307 Elm_Win_Smart_Data *sd;
2309 if (!(sd = data)) return;
2310 if (!sd->client_obj) return;
2312 _elm_win_frame_obj_update(sd);
2316 _elm_win_frame_cb_resize_show(void *data,
2317 Evas_Object *obj EINA_UNUSED,
2318 const char *sig EINA_UNUSED,
2321 ELM_WIN_DATA_GET(data, sd);
2324 if (sd->resizing) return;
2326 #ifdef HAVE_ELEMENTARY_WAYLAND
2329 if (!strcmp(source, "elm.event.resize.t"))
2330 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2331 _border_side[(0 + i) % 4].name);
2332 else if (!strcmp(source, "elm.event.resize.b"))
2333 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2334 _border_side[(2 + i) % 4].name);
2335 else if (!strcmp(source, "elm.event.resize.l"))
2336 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2337 _border_side[(1 + i) % 4].name);
2338 else if (!strcmp(source, "elm.event.resize.r"))
2339 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2340 _border_side[(3 + i) % 4].name);
2341 else if (!strcmp(source, "elm.event.resize.tl"))
2342 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2343 _border_corner[(0 + i) % 4].name);
2344 else if (!strcmp(source, "elm.event.resize.tr"))
2345 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2346 _border_corner[(3 + i) % 4].name);
2347 else if (!strcmp(source, "elm.event.resize.bl"))
2348 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2349 _border_corner[(1 + i) % 4].name);
2350 else if (!strcmp(source, "elm.event.resize.br"))
2351 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2352 _border_corner[(2 + i) % 4].name);
2354 ecore_wl_window_cursor_default_restore(sd->wl.win);
2361 _elm_win_frame_cb_resize_hide(void *data,
2362 Evas_Object *obj EINA_UNUSED,
2363 const char *sig EINA_UNUSED,
2364 const char *source EINA_UNUSED)
2366 ELM_WIN_DATA_GET(data, sd);
2369 if (sd->resizing) return;
2371 #ifdef HAVE_ELEMENTARY_WAYLAND
2372 ecore_wl_window_cursor_default_restore(sd->wl.win);
2377 _elm_win_frame_cb_resize_start(void *data,
2378 Evas_Object *obj EINA_UNUSED,
2379 const char *sig EINA_UNUSED,
2382 #ifdef HAVE_ELEMENTARY_WAYLAND
2383 ELM_WIN_DATA_GET(data, sd);
2387 if (sd->resizing) return;
2389 sd->resizing = EINA_TRUE;
2391 if (!strcmp(source, "elm.event.resize.t"))
2392 sd->resize_location = _border_side[(0 + i) % 4].location;
2393 else if (!strcmp(source, "elm.event.resize.b"))
2394 sd->resize_location = _border_side[(2 + i) % 4].location;
2395 else if (!strcmp(source, "elm.event.resize.l"))
2396 sd->resize_location = _border_side[(1 + i) % 4].location;
2397 else if (!strcmp(source, "elm.event.resize.r"))
2398 sd->resize_location = _border_side[(3 + i) % 4].location;
2399 else if (!strcmp(source, "elm.event.resize.tl"))
2400 sd->resize_location = _border_corner[(0 + i) % 4].location;
2401 else if (!strcmp(source, "elm.event.resize.tr"))
2402 sd->resize_location = _border_corner[(3 + i) % 4].location;
2403 else if (!strcmp(source, "elm.event.resize.bl"))
2404 sd->resize_location = _border_corner[(1 + i) % 4].location;
2405 else if (!strcmp(source, "elm.event.resize.br"))
2406 sd->resize_location = _border_corner[(2 + i) % 4].location;
2408 sd->resize_location = 0;
2410 if (sd->resize_location > 0)
2411 ecore_evas_wayland_resize(sd->ee, sd->resize_location);
2419 _elm_win_frame_cb_minimize(void *data,
2420 Evas_Object *obj EINA_UNUSED,
2421 const char *sig EINA_UNUSED,
2422 const char *source EINA_UNUSED)
2424 ELM_WIN_DATA_GET(data, sd);
2427 // sd->iconified = EINA_TRUE;
2428 TRAP(sd, iconified_set, EINA_TRUE);
2432 _elm_win_frame_maximized_state_update(Elm_Win_Smart_Data *sd, Eina_Bool maximized)
2434 const char *emission;
2437 emission = "elm,state,maximized";
2439 emission = "elm,state,unmaximized";
2441 edje_object_signal_emit(sd->frame_obj, emission, "elm");
2442 edje_object_message_signal_process(sd->frame_obj);
2443 evas_object_smart_calculate(sd->frame_obj);
2445 _elm_win_frame_obj_update(sd);
2449 _elm_win_frame_cb_maximize(void *data,
2450 Evas_Object *obj EINA_UNUSED,
2451 const char *sig EINA_UNUSED,
2452 const char *source EINA_UNUSED)
2455 ELM_WIN_DATA_GET(data, sd);
2458 if (sd->maximized) value = EINA_FALSE;
2459 else value = EINA_TRUE;
2461 _elm_win_frame_maximized_state_update(sd, value);
2463 TRAP(sd, maximized_set, value);
2467 _elm_win_frame_cb_close(void *data,
2468 Evas_Object *obj EINA_UNUSED,
2469 const char *sig EINA_UNUSED,
2470 const char *source EINA_UNUSED)
2472 ELM_WIN_DATA_GET(data, sd);
2475 /* FIXME: After the current freeze, this should be handled differently.
2477 * Ideally, we would want to mimic the X11 backend and use something
2478 * like ECORE_WL_EVENT_WINDOW_DELETE and handle the delete_request
2479 * inside of ecore_evas. That would be the 'proper' way, but since we are
2480 * in a freeze right now, I cannot add a new event value, or a new
2481 * event structure to ecore_wayland.
2483 * So yes, this is a temporary 'stop-gap' solution which will be fixed
2484 * when the freeze is over, but it does fix a trac bug for now, and in a
2485 * way which does not break API or the freeze. - dh
2492 int autodel = sd->autodel;
2493 sd->autodel_clear = &autodel;
2494 evas_object_ref(win);
2495 evas_object_smart_callback_call(win, SIG_DELETE_REQUEST, NULL);
2496 // FIXME: if above callback deletes - then the below will be invalid
2497 if (autodel) evas_object_del(win);
2498 else sd->autodel_clear = NULL;
2499 evas_object_unref(win);
2503 _elm_win_frame_add(Elm_Win_Smart_Data *sd,
2506 Evas_Object *obj = sd->obj;
2510 sd->frame_obj = edje_object_add(sd->evas);
2511 layer = evas_object_layer_get(obj);
2512 evas_object_layer_set(sd->frame_obj, layer + 1);
2513 if (!elm_widget_theme_object_set
2514 (sd->obj, sd->frame_obj, "border", "base", style))
2516 ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
2520 sd->spacer_obj = evas_object_rectangle_add(sd->evas);
2521 evas_object_color_set(sd->spacer_obj, 0, 0, 0, 0);
2522 evas_object_repeat_events_set(sd->spacer_obj, EINA_TRUE);
2523 edje_object_part_swallow(sd->frame_obj, "elm.swallow.frame_spacer",
2526 sd->client_obj = evas_object_rectangle_add(sd->evas);
2527 evas_object_color_set(sd->client_obj, 0, 0, 0, 0);
2528 /* NB: Tried pass_events here, but that fails to send events */
2529 evas_object_repeat_events_set(sd->client_obj, EINA_TRUE);
2530 edje_object_part_swallow(sd->frame_obj, "elm.swallow.client",
2533 evas_object_is_frame_object_set(sd->frame_obj, EINA_TRUE);
2535 evas_object_event_callback_add
2536 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
2537 evas_object_event_callback_add
2538 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
2540 /* NB: Do NOT remove these calls !! Needed to calculate proper
2541 * framespace on inital show of the window */
2542 edje_object_size_min_calc(sd->frame_obj, &mw, &mh);
2543 evas_object_move(sd->frame_obj, 0, 0);
2544 evas_object_resize(sd->frame_obj, mw, mh);
2545 evas_object_smart_calculate(sd->frame_obj);
2547 edje_object_signal_callback_add
2548 (sd->frame_obj, "elm,action,move,start", "elm",
2549 _elm_win_frame_cb_move_start, obj);
2550 edje_object_signal_callback_add
2551 (sd->frame_obj, "elm,action,move,stop", "elm",
2552 _elm_win_frame_cb_move_stop, obj);
2553 edje_object_signal_callback_add
2554 (sd->frame_obj, "elm,action,resize,show", "*",
2555 _elm_win_frame_cb_resize_show, obj);
2556 edje_object_signal_callback_add
2557 (sd->frame_obj, "elm,action,resize,hide", "*",
2558 _elm_win_frame_cb_resize_hide, obj);
2559 edje_object_signal_callback_add
2560 (sd->frame_obj, "elm,action,resize,start", "*",
2561 _elm_win_frame_cb_resize_start, obj);
2562 edje_object_signal_callback_add
2563 (sd->frame_obj, "elm,action,minimize", "elm",
2564 _elm_win_frame_cb_minimize, obj);
2565 edje_object_signal_callback_add
2566 (sd->frame_obj, "elm,action,maximize", "elm",
2567 _elm_win_frame_cb_maximize, obj);
2568 edje_object_signal_callback_add
2569 (sd->frame_obj, "elm,action,close", "elm", _elm_win_frame_cb_close, obj);
2573 edje_object_part_text_escaped_set
2574 (sd->frame_obj, "elm.text.title", sd->title);
2577 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
2578 ecore_evas_resize(sd->ee, w, h);
2582 _elm_win_frame_del(Elm_Win_Smart_Data *sd)
2586 ELM_SAFE_FREE(sd->client_obj, evas_object_del);
2590 evas_object_event_callback_del_full
2591 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
2592 evas_object_event_callback_del_full
2593 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
2595 edje_object_signal_callback_del
2596 (sd->frame_obj, "elm,action,move,start", "elm",
2597 _elm_win_frame_cb_move_start);
2598 edje_object_signal_callback_del
2599 (sd->frame_obj, "elm,action,move,stop", "elm",
2600 _elm_win_frame_cb_move_stop);
2601 edje_object_signal_callback_del
2602 (sd->frame_obj, "elm,action,resize,show", "*",
2603 _elm_win_frame_cb_resize_show);
2604 edje_object_signal_callback_del
2605 (sd->frame_obj, "elm,action,resize,hide", "*",
2606 _elm_win_frame_cb_resize_hide);
2607 edje_object_signal_callback_del
2608 (sd->frame_obj, "elm,action,resize,start", "*",
2609 _elm_win_frame_cb_resize_start);
2610 edje_object_signal_callback_del
2611 (sd->frame_obj, "elm,action,minimize", "elm",
2612 _elm_win_frame_cb_minimize);
2613 edje_object_signal_callback_del
2614 (sd->frame_obj, "elm,action,maximize", "elm",
2615 _elm_win_frame_cb_maximize);
2616 edje_object_signal_callback_del
2617 (sd->frame_obj, "elm,action,close", "elm",
2618 _elm_win_frame_cb_close);
2620 ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
2623 evas_output_framespace_set(sd->evas, 0, 0, 0, 0);
2624 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
2625 ecore_evas_resize(sd->ee, w, h);
2630 _debug_key_down(void *data EINA_UNUSED,
2631 Evas *e EINA_UNUSED,
2635 Evas_Event_Key_Down *ev = event_info;
2637 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
2640 if ((strcmp(ev->key, "F12")) ||
2641 (!evas_key_modifier_is_set(ev->modifiers, "Control")))
2644 INF("Tree graph generated.");
2645 elm_object_tree_dot_dump(obj, "./dump.dot");
2651 _win_img_hide(void *data,
2652 Evas *e EINA_UNUSED,
2653 Evas_Object *obj EINA_UNUSED,
2654 void *event_info EINA_UNUSED)
2656 elm_widget_focus_hide_handle(data);
2660 _win_img_mouse_up(void *data,
2661 Evas *e EINA_UNUSED,
2662 Evas_Object *obj EINA_UNUSED,
2665 Evas_Event_Mouse_Up *ev = event_info;
2666 if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
2667 elm_widget_focus_mouse_up_handle(data);
2671 _win_img_focus_in(void *data,
2672 Evas *e EINA_UNUSED,
2673 Evas_Object *obj EINA_UNUSED,
2674 void *event_info EINA_UNUSED)
2676 elm_widget_focus_steal(data);
2680 _win_img_focus_out(void *data,
2681 Evas *e EINA_UNUSED,
2682 Evas_Object *obj EINA_UNUSED,
2683 void *event_info EINA_UNUSED)
2685 elm_widget_focused_object_clear(data);
2689 _win_inlined_image_set(Elm_Win_Smart_Data *sd)
2691 evas_object_image_alpha_set(sd->img_obj, EINA_FALSE);
2692 evas_object_image_filled_set(sd->img_obj, EINA_TRUE);
2694 evas_object_event_callback_add
2695 (sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, sd->obj);
2696 evas_object_event_callback_add
2697 (sd->img_obj, EVAS_CALLBACK_HIDE, _win_img_hide, sd->obj);
2698 evas_object_event_callback_add
2699 (sd->img_obj, EVAS_CALLBACK_MOUSE_UP, _win_img_mouse_up, sd->obj);
2700 evas_object_event_callback_add
2701 (sd->img_obj, EVAS_CALLBACK_FOCUS_IN, _win_img_focus_in, sd->obj);
2702 evas_object_event_callback_add
2703 (sd->img_obj, EVAS_CALLBACK_FOCUS_OUT, _win_img_focus_out, sd->obj);
2707 _elm_win_on_icon_del(void *data,
2708 Evas *e EINA_UNUSED,
2710 void *event_info EINA_UNUSED)
2712 ELM_WIN_DATA_GET(data, sd);
2714 if (sd->icon == obj) sd->icon = NULL;
2718 _elm_win_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
2720 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
2722 elm_widget_can_focus_set(obj, EINA_TRUE);
2724 elm_widget_highlight_ignore_set(obj, EINA_TRUE);
2727 #ifdef HAVE_ELEMENTARY_X
2729 _elm_x_io_err(void *data EINA_UNUSED)
2734 EINA_LIST_FOREACH(_elm_win_list, l, obj)
2735 evas_object_smart_callback_call(obj, SIG_IOERR, NULL);
2741 elm_win_add(Evas_Object *parent,
2745 Evas_Object *obj = eo_add_custom(MY_CLASS, parent, elm_obj_win_constructor(name, type));
2751 _elm_win_cb_hide(void *data EINA_UNUSED,
2752 Evas *e EINA_UNUSED,
2753 Evas_Object *obj EINA_UNUSED,
2754 void *event_info EINA_UNUSED)
2756 _elm_win_state_eval_queue();
2760 _elm_win_cb_show(void *data EINA_UNUSED,
2761 Evas *e EINA_UNUSED,
2762 Evas_Object *obj EINA_UNUSED,
2763 void *event_info EINA_UNUSED)
2765 _elm_win_state_eval_queue();
2771 * Recalculate the size of window considering its resize objects' weight and
2772 * min size. If any of its resize objects' weight equals to 0.0, window
2773 * layout's weight will be set to 0.0.
2775 * @param o box object
2776 * @param p box's private data
2777 * @param data window object
2780 _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
2784 Evas_Object_Box_Option *opt;
2785 Evas_Coord x, y, w, h;
2787 Evas_Coord minw = -1, minh = -1;
2788 double weight_x = EVAS_HINT_EXPAND;
2789 double weight_y = EVAS_HINT_EXPAND;
2791 EINA_LIST_FOREACH(p->children, l, opt)
2794 evas_object_size_hint_weight_get(child, &wx, &wy);
2795 if (wx == 0.0) weight_x = 0;
2796 if (wy == 0.0) weight_y = 0;
2798 evas_object_size_hint_min_get(child, &w, &h);
2799 if (w > minw) minw = w;
2800 if (h > minh) minh = h;
2803 evas_object_size_hint_min_set(o, minw, minh);
2804 evas_object_geometry_get(o, &x, &y, &w, &h);
2805 if (w < minw) w = minw;
2806 if (h < minh) h = minh;
2807 evas_object_resize(o, w, h);
2809 EINA_LIST_FOREACH(p->children, l, opt)
2812 evas_object_move(child, x, y);
2813 evas_object_resize(child, w, h);
2816 ELM_WIN_DATA_GET(data, sd);
2817 evas_object_size_hint_weight_set(sd->layout, weight_x, weight_y);
2818 evas_object_smart_changed(sd->layout);
2822 _win_constructor(Eo *obj, void *_pd, va_list *list)
2824 Elm_Win_Smart_Data *sd = _pd;
2825 sd->obj = obj; // in ctor
2827 const char *name = va_arg(*list, const char *);
2828 Elm_Win_Type type = va_arg(*list, Elm_Win_Type);
2829 Evas_Object *parent;
2832 const char *fontpath, *fallback = NULL;
2834 Elm_Win_Smart_Data tmp_sd;
2836 eo_do(obj, eo_parent_get(&parent));
2838 /* just to store some data while trying out to create a canvas */
2839 memset(&tmp_sd, 0, sizeof(Elm_Win_Smart_Data));
2841 #define FALLBACK_TRY(engine) \
2843 CRI(engine " engine creation failed. Trying default."); \
2845 #define FALLBACK_STORE(engine) \
2848 CRI(engine "Fallback to %s successful.", engine); \
2849 fallback = engine; \
2854 case ELM_WIN_INLINED_IMAGE:
2857 e = evas_object_evas_get(parent);
2862 ee = ecore_evas_ecore_evas_get(e);
2865 tmp_sd.img_obj = ecore_evas_object_image_new(ee);
2866 if (!tmp_sd.img_obj) break;
2868 tmp_sd.ee = ecore_evas_object_ecore_evas_get(tmp_sd.img_obj);
2871 ELM_SAFE_FREE(tmp_sd.img_obj, evas_object_del);
2876 case ELM_WIN_SOCKET_IMAGE:
2877 tmp_sd.ee = ecore_evas_extn_socket_new(1, 1);
2881 if (ENGINE_COMPARE(ELM_SOFTWARE_X11))
2883 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2884 FALLBACK_TRY("Software X11");
2887 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2888 FALLBACK_STORE("Software FB");
2891 else if (ENGINE_COMPARE(ELM_SOFTWARE_FB))
2893 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2894 FALLBACK_TRY("Software FB");
2897 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2898 FALLBACK_STORE("Software X11");
2901 else if (ENGINE_COMPARE(ELM_OPENGL_X11))
2906 if (_elm_config->vsync)
2908 opt[opt_i] = ECORE_EVAS_GL_X11_OPT_VSYNC;
2915 tmp_sd.ee = ecore_evas_gl_x11_options_new
2916 (NULL, 0, 0, 0, 1, 1, opt);
2918 tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 1, 1);
2919 FALLBACK_TRY("OpenGL");
2922 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2923 FALLBACK_STORE("Software X11");
2926 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2927 FALLBACK_STORE("Software FB");
2931 else if (ENGINE_COMPARE(ELM_SOFTWARE_WIN32))
2933 tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
2934 FALLBACK_TRY("Software Win32");
2936 else if (ENGINE_COMPARE(ELM_SOFTWARE_PSL1GHT))
2938 tmp_sd.ee = ecore_evas_psl1ght_new(NULL, 1, 1);
2939 FALLBACK_TRY("PSL1GHT");
2941 else if (ENGINE_COMPARE(ELM_SOFTWARE_SDL))
2943 tmp_sd.ee = ecore_evas_sdl_new(NULL, 0, 0, 0, 0, 0, 1);
2944 FALLBACK_TRY("Software SDL");
2947 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2948 FALLBACK_STORE("Software X11");
2951 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2952 FALLBACK_STORE("Software FB");
2956 else if (ENGINE_COMPARE(ELM_SOFTWARE_16_SDL))
2958 tmp_sd.ee = ecore_evas_sdl16_new(NULL, 0, 0, 0, 0, 0, 1);
2959 FALLBACK_TRY("Software-16-SDL");
2962 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2963 FALLBACK_STORE("Software X11");
2966 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2967 FALLBACK_STORE("Software FB");
2971 else if (ENGINE_COMPARE(ELM_OPENGL_SDL))
2973 tmp_sd.ee = ecore_evas_gl_sdl_new(NULL, 1, 1, 0, 0);
2974 FALLBACK_TRY("OpenGL SDL");
2977 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2978 FALLBACK_STORE("Software X11");
2981 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2982 FALLBACK_STORE("Software FB");
2986 else if (ENGINE_COMPARE(ELM_OPENGL_COCOA))
2988 tmp_sd.ee = ecore_evas_cocoa_new(NULL, 1, 1, 0, 0);
2989 FALLBACK_TRY("OpenGL Cocoa");
2991 else if (ENGINE_COMPARE(ELM_BUFFER))
2993 tmp_sd.ee = ecore_evas_buffer_new(1, 1);
2995 else if (ENGINE_COMPARE(ELM_EWS))
2997 tmp_sd.ee = ecore_evas_ews_new(0, 0, 1, 1);
2999 else if (ENGINE_COMPARE(ELM_WAYLAND_SHM))
3001 tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 0);
3003 else if (ENGINE_COMPARE(ELM_WAYLAND_EGL))
3005 tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0);
3007 else if (!strncmp(ENGINE_GET(), "shot:", 5))
3009 tmp_sd.ee = ecore_evas_buffer_new(1, 1);
3010 ecore_evas_manual_render_set(tmp_sd.ee, EINA_TRUE);
3011 tmp_sd.shot.info = eina_stringshare_add
3020 ERR("Cannot create window.");
3025 eo_do(obj, eo_parent_set(ecore_evas_get(tmp_sd.ee)));
3026 eo_do_super(obj, MY_CLASS, eo_constructor());
3028 evas_obj_type_set(MY_CLASS_NAME_LEGACY),
3029 evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
3031 if (getenv("ELM_FIRST_FRAME"))
3032 evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
3033 _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));
3035 /* copying possibly altered fields back */
3036 #define SD_CPY(_field) \
3039 sd->_field = tmp_sd._field; \
3047 if ((trap) && (trap->add))
3048 sd->trap_data = trap->add(obj);
3050 /* complementary actions, which depend on final smart data
3052 if (type == ELM_WIN_INLINED_IMAGE)
3053 _win_inlined_image_set(sd);
3055 #ifdef HAVE_ELEMENTARY_X
3056 else if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
3057 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
3058 ENGINE_COMPARE(ELM_SOFTWARE_8_X11) ||
3059 ENGINE_COMPARE(ELM_OPENGL_X11))
3061 sd->x.client_message_handler = ecore_event_handler_add
3062 (ECORE_X_EVENT_CLIENT_MESSAGE, _elm_win_client_message, obj);
3063 sd->x.property_handler = ecore_event_handler_add
3064 (ECORE_X_EVENT_WINDOW_PROPERTY, _elm_win_property_change, obj);
3068 else if (!strncmp(ENGINE_GET(), "shot:", 5))
3071 sd->kbdmode = ELM_WIN_KEYBOARD_UNKNOWN;
3072 sd->indmode = ELM_WIN_INDICATOR_UNKNOWN;
3074 #ifdef HAVE_ELEMENTARY_X
3075 _elm_win_xwindow_get(sd);
3078 ecore_x_io_error_handler_set(_elm_x_io_err, NULL);
3082 #ifdef HAVE_ELEMENTARY_WAYLAND
3083 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
3084 _elm_win_wlwindow_get(sd);
3087 if ((_elm_config->bgpixmap)
3088 #ifdef HAVE_ELEMENTARY_X
3090 (((sd->x.xwin) && (!ecore_x_screen_is_composited(0))) ||
3095 TRAP(sd, avoid_damage_set, ECORE_EVAS_AVOID_DAMAGE_EXPOSE);
3096 // bg pixmap done by x - has other issues like can be redrawn by x before it
3097 // is filled/ready by app
3098 // TRAP(sd, avoid_damage_set, ECORE_EVAS_AVOID_DAMAGE_BUILT_IN);
3101 sd->parent = parent;
3104 evas_object_event_callback_add
3105 (sd->parent, EVAS_CALLBACK_DEL, _elm_win_on_parent_del, obj);
3107 sd->evas = ecore_evas_get(sd->ee);
3109 evas_object_color_set(obj, 0, 0, 0, 0);
3110 evas_object_move(obj, 0, 0);
3111 evas_object_resize(obj, 1, 1);
3112 evas_object_layer_set(obj, 50);
3113 evas_object_pass_events_set(obj, EINA_TRUE);
3115 if (type == ELM_WIN_INLINED_IMAGE)
3116 elm_widget_parent2_set(obj, parent);
3118 /* use own version of ecore_evas_object_associate() that does TRAP() */
3119 ecore_evas_data_set(sd->ee, "elm_win", obj);
3121 evas_object_event_callback_add
3122 (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3123 _elm_win_obj_callback_changed_size_hints, obj);
3125 evas_object_intercept_raise_callback_add
3126 (obj, _elm_win_obj_intercept_raise, obj);
3127 evas_object_intercept_lower_callback_add
3128 (obj, _elm_win_obj_intercept_lower, obj);
3129 evas_object_intercept_stack_above_callback_add
3130 (obj, _elm_win_obj_intercept_stack_above, obj);
3131 evas_object_intercept_stack_below_callback_add
3132 (obj, _elm_win_obj_intercept_stack_below, obj);
3133 evas_object_intercept_layer_set_callback_add
3134 (obj, _elm_win_obj_intercept_layer_set, obj);
3135 evas_object_intercept_show_callback_add
3136 (obj, _elm_win_obj_intercept_show, obj);
3138 TRAP(sd, name_class_set, name, _elm_appname);
3139 ecore_evas_callback_delete_request_set(sd->ee, _elm_win_delete_request);
3140 ecore_evas_callback_resize_set(sd->ee, _elm_win_resize);
3141 ecore_evas_callback_mouse_in_set(sd->ee, _elm_win_mouse_in);
3142 ecore_evas_callback_focus_in_set(sd->ee, _elm_win_focus_in);
3143 ecore_evas_callback_focus_out_set(sd->ee, _elm_win_focus_out);
3144 ecore_evas_callback_move_set(sd->ee, _elm_win_move);
3145 ecore_evas_callback_state_change_set(sd->ee, _elm_win_state_change);
3146 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _elm_win_cb_hide, NULL);
3147 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _elm_win_cb_show, NULL);
3149 evas_image_cache_set(sd->evas, (_elm_config->image_cache * 1024));
3150 evas_font_cache_set(sd->evas, (_elm_config->font_cache * 1024));
3152 EINA_LIST_FOREACH(_elm_config->font_dirs, l, fontpath)
3153 evas_font_path_append(sd->evas, fontpath);
3155 if (!_elm_config->font_hinting)
3156 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_NONE);
3157 else if (_elm_config->font_hinting == 1)
3158 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_AUTO);
3159 else if (_elm_config->font_hinting == 2)
3160 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_BYTECODE);
3162 #ifdef HAVE_ELEMENTARY_X
3163 _elm_win_xwin_update(sd);
3166 _elm_win_list = eina_list_append(_elm_win_list, obj);
3169 if (((fallback) && (!strcmp(fallback, "Software FB"))) ||
3170 ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))
3172 TRAP(sd, fullscreen_set, 1);
3174 else if ((type != ELM_WIN_INLINED_IMAGE) &&
3175 (ENGINE_COMPARE(ELM_WAYLAND_SHM) ||
3176 ENGINE_COMPARE(ELM_WAYLAND_EGL)))
3177 _elm_win_frame_add(sd, "default");
3179 if (_elm_config->focus_highlight_enable)
3180 elm_win_focus_highlight_enabled_set(obj, EINA_TRUE);
3181 if (_elm_config->focus_highlight_animate)
3182 elm_win_focus_highlight_animate_set(obj, EINA_TRUE);
3185 Evas_Modifier_Mask mask = evas_key_modifier_mask_get(sd->evas, "Control");
3186 evas_object_event_callback_add
3187 (obj, EVAS_CALLBACK_KEY_DOWN, _debug_key_down, NULL);
3189 if (evas_object_key_grab(obj, "F12", mask, 0, EINA_TRUE))
3190 INF("Ctrl+F12 key combination exclusive for dot tree generation\n");
3192 ERR("failed to grab F12 key to elm widgets (dot) tree generation");
3195 if ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_ON) ||
3196 ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_AUTO) &&
3197 (((fallback) && (!strcmp(fallback, "Software FB"))) ||
3198 ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))))
3201 Evas_Coord mw = 1, mh = 1, hx = 0, hy = 0;
3203 sd->pointer.obj = o = edje_object_add(ecore_evas_get(tmp_sd.ee));
3204 _elm_theme_object_set(obj, o, "pointer", "base", "default");
3205 edje_object_size_min_calc(o, &mw, &mh);
3206 evas_object_resize(o, mw, mh);
3207 edje_object_part_geometry_get(o, "elm.swallow.hotspot",
3208 &hx, &hy, NULL, NULL);
3209 sd->pointer.hot_x = hx;
3210 sd->pointer.hot_y = hy;
3211 evas_object_show(o);
3212 ecore_evas_object_cursor_set(tmp_sd.ee, o, EVAS_LAYER_MAX, hx, hy);
3214 else if (_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_OFF)
3219 sd->layout = edje_object_add(sd->evas);
3220 _elm_theme_object_set(obj, sd->layout, "win", "base", "default");
3221 sd->box = evas_object_box_add(sd->evas);
3222 evas_object_box_layout_set(sd->box, _window_layout_stack, obj, NULL);
3223 edje_object_part_swallow(sd->layout, "elm.swallow.contents", sd->box);
3224 evas_object_move(sd->layout, 0, 0);
3225 evas_object_resize(sd->layout, 1, 1);
3226 edje_object_update_hints_set(sd->layout, EINA_TRUE);
3227 evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3228 _elm_win_on_resize_obj_changed_size_hints, obj);
3229 evas_object_show(sd->layout);
3233 _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
3236 ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME);
3240 elm_win_util_standard_add(const char *name,
3243 Evas_Object *win, *bg;
3245 win = elm_win_add(NULL, name, ELM_WIN_BASIC);
3246 if (!win) return NULL;
3248 elm_win_title_set(win, title);
3249 bg = elm_bg_add(win);
3252 evas_object_del(win);
3255 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
3256 elm_win_resize_object_add(win, bg);
3257 evas_object_show(bg);
3263 elm_win_resize_object_add(Evas_Object *obj,
3264 Evas_Object *subobj)
3267 eo_do(obj, elm_obj_win_resize_object_add(subobj));
3271 _resize_object_add(Eo *obj, void *_pd, va_list *list)
3273 Evas_Object *subobj = va_arg(*list, Evas_Object *);
3275 Elm_Win_Smart_Data *sd = _pd;
3277 elm_widget_sub_object_add(obj, subobj);
3279 if (!evas_object_box_append(sd->box, subobj))
3280 ERR("could not append %p to box", subobj);
3284 elm_win_resize_object_del(Evas_Object *obj,
3285 Evas_Object *subobj)
3288 eo_do(obj, elm_obj_win_resize_object_del(subobj));
3292 _resize_object_del(Eo *obj, void *_pd, va_list *list)
3294 Evas_Object *subobj = va_arg(*list, Evas_Object *);
3295 Elm_Win_Smart_Data *sd = _pd;
3297 if (!elm_widget_sub_object_del(obj, subobj))
3298 ERR("could not remove sub object %p from %p", subobj, obj);
3300 evas_object_box_remove(sd->box, subobj);
3304 elm_win_title_set(Evas_Object *obj,
3308 eo_do(obj, elm_obj_win_title_set(title));
3312 _title_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3314 const char *title = va_arg(*list, const char *);
3315 Elm_Win_Smart_Data *sd = _pd;
3318 eina_stringshare_replace(&(sd->title), title);
3319 TRAP(sd, title_set, sd->title);
3321 edje_object_part_text_escaped_set
3322 (sd->frame_obj, "elm.text.title", sd->title);
3326 elm_win_title_get(const Evas_Object *obj)
3328 ELM_WIN_CHECK(obj) NULL;
3329 const char *ret = NULL;
3330 eo_do((Eo *) obj, elm_obj_win_title_get(&ret));
3335 _title_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3337 const char **ret = va_arg(*list, const char **);
3338 Elm_Win_Smart_Data *sd = _pd;
3343 elm_win_icon_name_set(Evas_Object *obj,
3344 const char *icon_name)
3347 eo_do(obj, elm_obj_win_icon_name_set(icon_name));
3351 _icon_name_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3353 const char *icon_name = va_arg(*list, const char *);
3354 Elm_Win_Smart_Data *sd = _pd;
3356 if (!icon_name) return;
3357 eina_stringshare_replace(&(sd->icon_name), icon_name);
3358 #ifdef HAVE_ELEMENTARY_X
3359 _elm_win_xwin_update(sd);
3364 elm_win_icon_name_get(const Evas_Object *obj)
3366 ELM_WIN_CHECK(obj) NULL;
3367 const char *ret = NULL;
3368 eo_do((Eo *) obj, elm_obj_win_icon_name_get(&ret));
3373 _icon_name_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3375 const char **ret = va_arg(*list, const char **);
3376 Elm_Win_Smart_Data *sd = _pd;
3377 *ret = sd->icon_name;
3381 elm_win_role_set(Evas_Object *obj, const char *role)
3384 eo_do(obj, elm_obj_win_role_set(role));
3388 _role_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3390 const char *role = va_arg(*list, const char *);
3391 Elm_Win_Smart_Data *sd = _pd;
3394 eina_stringshare_replace(&(sd->role), role);
3395 #ifdef HAVE_ELEMENTARY_X
3396 _elm_win_xwin_update(sd);
3401 elm_win_role_get(const Evas_Object *obj)
3403 ELM_WIN_CHECK(obj) NULL;
3404 const char *ret = NULL;
3405 eo_do((Eo *) obj, elm_obj_win_role_get(&ret));
3410 _role_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3412 const char **ret = va_arg(*list, const char **);
3413 Elm_Win_Smart_Data *sd = _pd;
3418 elm_win_icon_object_set(Evas_Object *obj,
3422 eo_do(obj, elm_obj_win_icon_object_set(icon));
3426 _icon_object_set(Eo *obj, void *_pd, va_list *list)
3428 Evas_Object *icon = va_arg(*list, Evas_Object *);
3429 Elm_Win_Smart_Data *sd = _pd;
3432 evas_object_event_callback_del_full
3433 (sd->icon, EVAS_CALLBACK_DEL, _elm_win_on_icon_del, obj);
3436 evas_object_event_callback_add
3437 (sd->icon, EVAS_CALLBACK_DEL, _elm_win_on_icon_del, obj);
3438 #ifdef HAVE_ELEMENTARY_X
3439 _elm_win_xwin_update(sd);
3443 EAPI const Evas_Object *
3444 elm_win_icon_object_get(const Evas_Object *obj)
3446 ELM_WIN_CHECK(obj) NULL;
3447 const Evas_Object *ret = NULL;
3448 eo_do((Eo *) obj, elm_obj_win_icon_object_get(&ret));
3453 _icon_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3455 const Evas_Object **ret = va_arg(*list, const Evas_Object **);
3456 Elm_Win_Smart_Data *sd = _pd;
3461 elm_win_autodel_set(Evas_Object *obj,
3465 eo_do(obj, elm_obj_win_autodel_set(autodel));
3469 _autodel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3471 Eina_Bool autodel = va_arg(*list, int);
3472 Elm_Win_Smart_Data *sd = _pd;
3473 sd->autodel = autodel;
3477 elm_win_autodel_get(const Evas_Object *obj)
3479 ELM_WIN_CHECK(obj) EINA_FALSE;
3480 Eina_Bool ret = EINA_FALSE;
3481 eo_do((Eo *) obj, elm_obj_win_autodel_get(&ret));
3486 _autodel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3488 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3489 Elm_Win_Smart_Data *sd = _pd;
3494 elm_win_activate(Evas_Object *obj)
3497 eo_do(obj, elm_obj_win_activate());
3501 _activate(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3503 Elm_Win_Smart_Data *sd = _pd;
3508 elm_win_lower(Evas_Object *obj)
3511 eo_do(obj, elm_obj_win_lower());
3515 _lower(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3517 Elm_Win_Smart_Data *sd = _pd;
3522 elm_win_raise(Evas_Object *obj)
3525 eo_do(obj, elm_obj_win_raise());
3529 _raise(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3531 Elm_Win_Smart_Data *sd = _pd;
3536 elm_win_center(Evas_Object *obj,
3541 eo_do(obj, elm_obj_win_center(h, v));
3545 _center(Eo *obj, void *_pd, va_list *list)
3547 Eina_Bool h = va_arg(*list, int);
3548 Eina_Bool v = va_arg(*list, int);
3549 int win_w, win_h, screen_w, screen_h, nx, ny;
3551 Elm_Win_Smart_Data *sd = _pd;
3553 if ((trap) && (trap->center) && (!trap->center(sd->trap_data, obj)))
3556 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &screen_w, &screen_h);
3557 if ((!screen_w) || (!screen_h)) return;
3559 evas_object_geometry_get(obj, NULL, NULL, &win_w, &win_h);
3560 if ((!win_w) || (!win_h)) return;
3562 if (h) nx = win_w >= screen_w ? 0 : (screen_w / 2) - (win_w / 2);
3563 else nx = sd->screen.x;
3564 if (v) ny = win_h >= screen_h ? 0 : (screen_h / 2) - (win_h / 2);
3565 else ny = sd->screen.y;
3569 evas_object_move(obj, nx, ny);
3573 elm_win_borderless_set(Evas_Object *obj,
3574 Eina_Bool borderless)
3577 eo_do(obj, elm_obj_win_borderless_set(borderless));
3581 _borderless_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3583 Eina_Bool borderless = va_arg(*list, int);
3584 Elm_Win_Smart_Data *sd = _pd;
3586 Eina_Bool need_frame = EINA_FALSE;
3588 const char *engine_name = ecore_evas_engine_name_get(sd->ee);
3589 need_frame = engine_name &&
3590 ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
3591 (!strcmp(engine_name, ELM_WAYLAND_EGL)));
3596 _elm_win_frame_del(sd);
3601 _elm_win_frame_add(sd, "default");
3604 evas_object_show(sd->frame_obj);
3607 TRAP(sd, borderless_set, borderless);
3608 #ifdef HAVE_ELEMENTARY_X
3609 _elm_win_xwin_update(sd);
3614 elm_win_borderless_get(const Evas_Object *obj)
3616 ELM_WIN_CHECK(obj) EINA_FALSE;
3617 Eina_Bool ret = EINA_FALSE;
3618 eo_do((Eo *) obj, elm_obj_win_borderless_get(&ret));
3623 _borderless_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3625 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3626 Elm_Win_Smart_Data *sd = _pd;
3627 *ret = ecore_evas_borderless_get(sd->ee);
3631 elm_win_shaped_set(Evas_Object *obj,
3635 eo_do(obj, elm_obj_win_shaped_set(shaped));
3639 _shaped_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3641 Eina_Bool shaped = va_arg(*list, int);
3642 Elm_Win_Smart_Data *sd = _pd;
3644 TRAP(sd, shaped_set, shaped);
3645 #ifdef HAVE_ELEMENTARY_X
3646 _elm_win_xwin_update(sd);
3651 elm_win_shaped_get(const Evas_Object *obj)
3653 ELM_WIN_CHECK(obj) EINA_FALSE;
3654 Eina_Bool ret = EINA_FALSE;
3655 eo_do((Eo *) obj, elm_obj_win_shaped_get(&ret));
3660 _shaped_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3662 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3663 Elm_Win_Smart_Data *sd = _pd;
3664 *ret = ecore_evas_shaped_get(sd->ee);
3668 elm_win_alpha_set(Evas_Object *obj,
3672 eo_do(obj, elm_obj_win_alpha_set(enabled));
3676 _alpha_set(Eo *obj, void *_pd, va_list *list)
3678 Eina_Bool enabled = va_arg(*list, int);
3679 Elm_Win_Smart_Data *sd = _pd;
3683 evas_object_image_alpha_set(sd->img_obj, enabled);
3684 ecore_evas_alpha_set(sd->ee, enabled);
3688 #ifdef HAVE_ELEMENTARY_X
3693 if (!ecore_x_screen_is_composited(0))
3694 elm_win_shaped_set(obj, enabled);
3696 TRAP(sd, alpha_set, enabled);
3699 TRAP(sd, alpha_set, enabled);
3700 _elm_win_xwin_update(sd);
3704 TRAP(sd, alpha_set, enabled);
3709 elm_win_alpha_get(const Evas_Object *obj)
3711 ELM_WIN_CHECK(obj) EINA_FALSE;
3712 Eina_Bool ret = EINA_FALSE;
3713 eo_do((Eo *) obj, elm_obj_win_alpha_get(&ret));
3718 _alpha_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3720 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3721 Elm_Win_Smart_Data *sd = _pd;
3725 *ret = evas_object_image_alpha_get(sd->img_obj);
3729 *ret = ecore_evas_alpha_get(sd->ee);
3734 elm_win_override_set(Evas_Object *obj,
3738 eo_do(obj, elm_obj_win_override_set(override));
3742 _override_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3744 Eina_Bool override = va_arg(*list, int);
3745 Elm_Win_Smart_Data *sd = _pd;
3747 TRAP(sd, override_set, override);
3748 #ifdef HAVE_ELEMENTARY_X
3749 _elm_win_xwin_update(sd);
3754 elm_win_override_get(const Evas_Object *obj)
3756 ELM_WIN_CHECK(obj) EINA_FALSE;
3757 Eina_Bool ret = EINA_FALSE;
3758 eo_do((Eo *) obj, elm_obj_win_override_get(&ret));
3763 _override_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3765 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3766 Elm_Win_Smart_Data *sd = _pd;
3767 *ret = ecore_evas_override_get(sd->ee);
3771 elm_win_fullscreen_set(Evas_Object *obj,
3772 Eina_Bool fullscreen)
3775 eo_do(obj, elm_obj_win_fullscreen_set(fullscreen));
3779 _fullscreen_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3781 Eina_Bool fullscreen = va_arg(*list, int);
3782 Elm_Win_Smart_Data *sd = _pd;
3783 // YYY: handle if sd->img_obj
3784 if (ENGINE_COMPARE(ELM_SOFTWARE_FB) ||
3785 ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE))
3787 // these engines... can ONLY be fullscreen
3792 // sd->fullscreen = fullscreen;
3794 Eina_Bool need_frame = EINA_FALSE;
3796 const char *engine_name = ecore_evas_engine_name_get(sd->ee);
3797 need_frame = engine_name &&
3798 ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
3799 (!strcmp(engine_name, ELM_WAYLAND_EGL)));
3801 TRAP(sd, fullscreen_set, fullscreen);
3806 _elm_win_frame_del(sd);
3811 _elm_win_frame_add(sd, "default");
3814 evas_object_show(sd->frame_obj);
3816 #ifdef HAVE_ELEMENTARY_X
3817 _elm_win_xwin_update(sd);
3823 elm_win_fullscreen_get(const Evas_Object *obj)
3825 ELM_WIN_CHECK(obj) EINA_FALSE;
3826 Eina_Bool ret = EINA_FALSE;
3827 eo_do((Eo *) obj, elm_obj_win_fullscreen_get(&ret));
3832 _fullscreen_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3834 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3835 Elm_Win_Smart_Data *sd = _pd;
3839 const char* engine_name = ecore_evas_engine_name_get(sd->ee);
3842 ((!strcmp(engine_name, ELM_SOFTWARE_FB)) ||
3843 (!strcmp(engine_name, ELM_SOFTWARE_16_WINCE))))
3845 // these engines... can ONLY be fullscreen
3850 *ret = sd->fullscreen;
3855 elm_win_main_menu_get(const Evas_Object *obj)
3857 ELM_WIN_CHECK(obj) NULL;
3859 eo_do((Eo *) obj, elm_obj_win_main_menu_get(&ret));
3864 _dbus_menu_set(Eina_Bool dbus_connect, void *data)
3866 ELM_WIN_DATA_GET_OR_RETURN(data, sd);
3870 DBG("Setting menu to D-Bus");
3871 edje_object_part_unswallow(sd->layout, sd->main_menu);
3872 edje_object_signal_emit(sd->layout, "elm,action,hide_menu", "elm");
3873 _elm_menu_menu_bar_hide(sd->main_menu);
3877 DBG("Setting menu to local mode");
3878 edje_object_part_swallow(sd->layout, "elm.swallow.menu", sd->main_menu);
3879 edje_object_signal_emit(sd->layout, "elm,action,show_menu", "elm");
3880 evas_object_show(sd->main_menu);
3885 _main_menu_get(Eo *obj, void *_pd, va_list *list)
3887 Eo **ret = va_arg(*list, Eo **);
3888 Elm_Win_Smart_Data *sd = _pd;
3889 Eina_Bool use_dbus = EINA_FALSE;
3891 if (sd->main_menu) goto end;
3893 sd->main_menu = elm_menu_add(obj);
3894 _elm_menu_menu_bar_set(sd->main_menu, EINA_TRUE);
3896 #ifdef HAVE_ELEMENTARY_X
3897 if (!_elm_config->disable_external_menu && sd->x.xwin) use_dbus = EINA_TRUE;
3900 #ifdef HAVE_ELEMENTARY_X
3901 if (use_dbus && _elm_dbus_menu_register(sd->main_menu))
3903 _elm_dbus_menu_app_menu_register(sd->x.xwin, sd->main_menu,
3904 _dbus_menu_set, obj);
3908 _dbus_menu_set(EINA_FALSE, obj);
3911 *ret = sd->main_menu;
3915 elm_win_maximized_set(Evas_Object *obj,
3916 Eina_Bool maximized)
3919 eo_do(obj, elm_obj_win_maximized_set(maximized));
3923 _maximized_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3925 Eina_Bool maximized = va_arg(*list, int);
3926 Elm_Win_Smart_Data *sd = _pd;
3928 _elm_win_frame_maximized_state_update(sd, maximized);
3929 // YYY: handle if sd->img_obj
3930 TRAP(sd, maximized_set, maximized);
3931 #ifdef HAVE_ELEMENTARY_X
3932 _elm_win_xwin_update(sd);
3937 elm_win_maximized_get(const Evas_Object *obj)
3939 ELM_WIN_CHECK(obj) EINA_FALSE;
3940 Eina_Bool ret = EINA_FALSE;
3941 eo_do((Eo *) obj, elm_obj_win_maximized_get(&ret));
3946 _maximized_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3948 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3949 Elm_Win_Smart_Data *sd = _pd;
3950 *ret = sd->maximized;
3954 elm_win_iconified_set(Evas_Object *obj,
3955 Eina_Bool iconified)
3958 eo_do(obj, elm_obj_win_iconified_set(iconified));
3962 _iconified_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3964 Eina_Bool iconified = va_arg(*list, int);
3965 Elm_Win_Smart_Data *sd = _pd;
3967 // sd->iconified = iconified;
3968 TRAP(sd, iconified_set, iconified);
3969 #ifdef HAVE_ELEMENTARY_X
3970 _elm_win_xwin_update(sd);
3975 elm_win_iconified_get(const Evas_Object *obj)
3977 ELM_WIN_CHECK(obj) EINA_FALSE;
3978 Eina_Bool ret = EINA_FALSE;
3979 eo_do((Eo *) obj, elm_obj_win_iconified_get(&ret));
3984 _iconified_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3986 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3987 Elm_Win_Smart_Data *sd = _pd;
3988 *ret = sd->iconified;
3992 elm_win_withdrawn_set(Evas_Object *obj,
3993 Eina_Bool withdrawn)
3996 eo_do(obj, elm_obj_win_withdrawn_set(withdrawn));
4000 _withdrawn_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4002 Eina_Bool withdrawn = va_arg(*list, int);
4003 Elm_Win_Smart_Data *sd = _pd;
4005 // sd->withdrawn = withdrawn;
4006 TRAP(sd, withdrawn_set, withdrawn);
4007 #ifdef HAVE_ELEMENTARY_X
4008 _elm_win_xwin_update(sd);
4013 elm_win_withdrawn_get(const Evas_Object *obj)
4015 ELM_WIN_CHECK(obj) EINA_FALSE;
4016 Eina_Bool ret = EINA_FALSE;
4017 eo_do((Eo *) obj, elm_obj_win_withdrawn_get(&ret));
4022 _withdrawn_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4024 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4025 Elm_Win_Smart_Data *sd = _pd;
4026 *ret = sd->withdrawn;
4030 elm_win_available_profiles_set(Evas_Object *obj,
4031 const char **profiles,
4035 eo_do((Eo *) obj, elm_obj_win_available_profiles_set(profiles, count));
4039 _available_profiles_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4041 const char **profiles = va_arg(*list, const char **);
4042 unsigned int count = va_arg(*list, unsigned int);
4043 Elm_Win_Smart_Data *sd = _pd;
4044 Eina_Bool found = EINA_FALSE;
4046 _elm_win_available_profiles_del(sd);
4047 if ((profiles) && (count >= 1))
4049 sd->profile.available_list = calloc(count, sizeof(char *));
4050 if (sd->profile.available_list)
4052 if (!sd->profile.name) found = EINA_TRUE;
4055 for (i = 0; i < count; i++)
4057 sd->profile.available_list[i] = eina_stringshare_add(profiles[i]);
4059 /* check to see if a given array has a current profile of elm_win */
4060 if ((sd->profile.name) &&
4061 (!strcmp(sd->profile.name, profiles[i])))
4066 sd->profile.count = count;
4070 if (ecore_evas_window_profile_supported_get(sd->ee))
4072 ecore_evas_window_available_profiles_set(sd->ee,
4073 sd->profile.available_list,
4076 /* current profile of elm_win is wrong, change profile */
4077 if ((sd->profile.available_list) && (!found))
4079 eina_stringshare_replace(&(sd->profile.name),
4080 sd->profile.available_list[0]);
4081 ecore_evas_window_profile_set(sd->ee, sd->profile.name);
4087 if (sd->profile.available_list)
4088 _elm_win_profile_update(sd);
4093 elm_win_available_profiles_get(Evas_Object *obj,
4095 unsigned int *count)
4097 ELM_WIN_CHECK(obj) EINA_FALSE;
4098 Eina_Bool ret = EINA_FALSE;
4099 eo_do((Eo *) obj, elm_obj_win_available_profiles_get(profiles, count, &ret));
4104 _available_profiles_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4106 char ***profiles = va_arg(*list, char ***);
4107 unsigned int *count = va_arg(*list, unsigned int *);
4108 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4109 Elm_Win_Smart_Data *sd = _pd;
4112 if (ecore_evas_window_profile_supported_get(sd->ee))
4114 res = ecore_evas_window_available_profiles_get(sd->ee,
4120 if (profiles) *profiles = (char **)sd->profile.available_list;
4121 if (count) *count = sd->profile.count;
4124 if (ret) *ret = res;
4128 elm_win_profile_set(Evas_Object *obj,
4129 const char *profile)
4132 eo_do((Eo *) obj, elm_obj_win_profile_set(profile));
4136 _profile_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4138 const char *profile = va_arg(*list, const char *);
4139 Elm_Win_Smart_Data *sd = _pd;
4141 /* check to see if a given profile is present in an available profiles */
4142 if ((profile) && (sd->profile.available_list))
4144 Eina_Bool found = EINA_FALSE;
4146 for (i = 0; i < sd->profile.count; i++)
4148 if (!strcmp(profile,
4149 sd->profile.available_list[i]))
4158 if (ecore_evas_window_profile_supported_get(sd->ee))
4160 if (!profile) _elm_win_profile_del(sd);
4161 ecore_evas_window_profile_set(sd->ee, profile);
4165 if (_elm_win_profile_set(sd, profile))
4166 _elm_win_profile_update(sd);
4171 elm_win_profile_get(const Evas_Object *obj)
4173 ELM_WIN_CHECK(obj) NULL;
4174 const char *ret = NULL;
4175 eo_do((Eo *) obj, elm_obj_win_profile_get(&ret));
4180 _profile_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4182 const char **ret = va_arg(*list, const char **);
4183 Elm_Win_Smart_Data *sd = _pd;
4184 *ret = sd->profile.name;
4188 elm_win_urgent_set(Evas_Object *obj,
4192 eo_do(obj, elm_obj_win_urgent_set(urgent));
4196 _urgent_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4198 Eina_Bool urgent = va_arg(*list, int);
4199 Elm_Win_Smart_Data *sd = _pd;
4201 sd->urgent = urgent;
4202 TRAP(sd, urgent_set, urgent);
4203 #ifdef HAVE_ELEMENTARY_X
4204 _elm_win_xwin_update(sd);
4209 elm_win_urgent_get(const Evas_Object *obj)
4211 ELM_WIN_CHECK(obj) EINA_FALSE;
4212 Eina_Bool ret = EINA_FALSE;
4213 eo_do((Eo *) obj, elm_obj_win_urgent_get(&ret));
4218 _urgent_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4220 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4221 Elm_Win_Smart_Data *sd = _pd;
4226 elm_win_demand_attention_set(Evas_Object *obj,
4227 Eina_Bool demand_attention)
4230 eo_do(obj, elm_obj_win_demand_attention_set(demand_attention));
4234 _demand_attention_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4236 Eina_Bool demand_attention = va_arg(*list, int);
4237 Elm_Win_Smart_Data *sd = _pd;
4239 sd->demand_attention = demand_attention;
4240 TRAP(sd, demand_attention_set, demand_attention);
4241 #ifdef HAVE_ELEMENTARY_X
4242 _elm_win_xwin_update(sd);
4247 elm_win_demand_attention_get(const Evas_Object *obj)
4249 ELM_WIN_CHECK(obj) EINA_FALSE;
4250 Eina_Bool ret = EINA_FALSE;
4251 eo_do((Eo *) obj, elm_obj_win_demand_attention_get(&ret));
4256 _demand_attention_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4258 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4259 Elm_Win_Smart_Data *sd = _pd;
4260 *ret = sd->demand_attention;
4264 elm_win_modal_set(Evas_Object *obj,
4268 eo_do(obj, elm_obj_win_modal_set(modal));
4272 _modal_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4274 Eina_Bool modal = va_arg(*list, int);
4275 Elm_Win_Smart_Data *sd = _pd;
4278 TRAP(sd, modal_set, modal);
4279 #ifdef HAVE_ELEMENTARY_X
4280 _elm_win_xwin_update(sd);
4285 elm_win_modal_get(const Evas_Object *obj)
4287 ELM_WIN_CHECK(obj) EINA_FALSE;
4288 Eina_Bool ret = EINA_FALSE;
4289 eo_do((Eo *) obj, elm_obj_win_modal_get(&ret));
4294 _modal_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4296 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4297 Elm_Win_Smart_Data *sd = _pd;
4302 elm_win_aspect_set(Evas_Object *obj,
4306 eo_do(obj, elm_obj_win_aspect_set(aspect));
4310 _aspect_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4312 double aspect = va_arg(*list, double);
4313 Elm_Win_Smart_Data *sd = _pd;
4315 sd->aspect = aspect;
4316 TRAP(sd, aspect_set, aspect);
4317 #ifdef HAVE_ELEMENTARY_X
4318 _elm_win_xwin_update(sd);
4323 elm_win_aspect_get(const Evas_Object *obj)
4325 ELM_WIN_CHECK(obj) 0.0;
4327 eo_do((Eo *) obj, elm_obj_win_aspect_get(&ret));
4332 _aspect_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4334 double *ret = va_arg(*list, double *);
4335 Elm_Win_Smart_Data *sd = _pd;
4340 elm_win_size_base_set(Evas_Object *obj, int w, int h)
4343 eo_do(obj, elm_obj_win_size_base_set(w, h));
4347 _size_base_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4349 int w = va_arg(*list, int);
4350 int h = va_arg(*list, int);
4351 Elm_Win_Smart_Data *sd = _pd;
4352 sd->size_base_w = w;
4353 sd->size_base_h = h;
4354 TRAP(sd, size_base_set, w, h);
4355 #ifdef HAVE_ELEMENTARY_X
4356 _elm_win_xwin_update(sd);
4361 elm_win_size_base_get(Evas_Object *obj, int *w, int *h)
4364 eo_do(obj, elm_obj_win_size_base_get(w, h));
4368 _size_base_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4370 int *w = va_arg(*list, int *);
4371 int *h = va_arg(*list, int *);
4373 Elm_Win_Smart_Data *sd = _pd;
4374 if (w) *w = sd->size_base_w;
4375 if (w) *h = sd->size_base_h;
4379 elm_win_size_step_set(Evas_Object *obj, int w, int h)
4382 eo_do(obj, elm_obj_win_size_step_set(w, h));
4386 _size_step_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4388 int w = va_arg(*list, int);
4389 int h = va_arg(*list, int);
4390 Elm_Win_Smart_Data *sd = _pd;
4391 sd->size_step_w = w;
4392 sd->size_step_h = h;
4393 TRAP(sd, size_step_set, w, h);
4394 #ifdef HAVE_ELEMENTARY_X
4395 _elm_win_xwin_update(sd);
4400 elm_win_size_step_get(Evas_Object *obj, int *w, int *h)
4403 eo_do(obj, elm_obj_win_size_step_get(w, h));
4407 _size_step_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4409 int *w = va_arg(*list, int *);
4410 int *h = va_arg(*list, int *);
4411 Elm_Win_Smart_Data *sd = _pd;
4412 if (w) *w = sd->size_step_w;
4413 if (w) *h = sd->size_step_h;
4417 elm_win_layer_set(Evas_Object *obj,
4421 eo_do(obj, elm_obj_win_layer_set(layer));
4425 _layer_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4427 int layer = va_arg(*list, int);
4428 Elm_Win_Smart_Data *sd = _pd;
4430 TRAP(sd, layer_set, layer);
4431 #ifdef HAVE_ELEMENTARY_X
4432 _elm_win_xwin_update(sd);
4437 elm_win_layer_get(const Evas_Object *obj)
4439 ELM_WIN_CHECK(obj) - 1;
4441 eo_do((Eo *) obj, elm_obj_win_layer_get(&ret));
4446 _layer_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4448 int *ret = va_arg(*list, int *);
4449 Elm_Win_Smart_Data *sd = _pd;
4450 *ret = ecore_evas_layer_get(sd->ee);
4454 elm_win_norender_push(Evas_Object *obj)
4457 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4460 if (sd->norender == 1) ecore_evas_manual_render_set(sd->ee, EINA_TRUE);
4464 elm_win_norender_pop(Evas_Object *obj)
4467 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4469 if (sd->norender <= 0) return;
4471 if (sd->norender == 0) ecore_evas_manual_render_set(sd->ee, EINA_FALSE);
4475 elm_win_norender_get(Evas_Object *obj)
4477 ELM_WIN_CHECK(obj) - 1;
4478 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, -1);
4479 return sd->norender;
4483 elm_win_render(Evas_Object *obj)
4486 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4487 ecore_evas_manual_render(sd->ee);
4491 _win_rotation_degree_check(int rotation)
4493 if ((rotation > 360) || (rotation < 0))
4495 WRN("Rotation degree should be 0 ~ 360 (passed degree: %d)", rotation);
4497 if (rotation < 0) rotation += 360;
4503 * This API resizes the internal window(ex: X window) and evas_output.
4504 * But this does not resize the elm window object and its contents.
4507 elm_win_rotation_set(Evas_Object *obj,
4511 eo_do(obj, elm_obj_win_rotation_set(rotation));
4515 _win_rotate(Evas_Object *obj, Elm_Win_Smart_Data *sd, int rotation, Eina_Bool resize)
4517 rotation = _win_rotation_degree_check(rotation);
4518 if (sd->rot == rotation) return;
4520 if (resize) TRAP(sd, rotation_with_resize_set, rotation);
4521 else TRAP(sd, rotation_set, rotation);
4522 evas_object_size_hint_min_set(obj, -1, -1);
4523 evas_object_size_hint_max_set(obj, -1, -1);
4524 _elm_win_resize_objects_eval(obj);
4525 #ifdef HAVE_ELEMENTARY_X
4526 _elm_win_xwin_update(sd);
4528 _elm_win_frame_obj_update(sd);
4529 elm_widget_orientation_set(obj, rotation);
4530 evas_object_smart_callback_call(obj, SIG_ROTATION_CHANGED, NULL);
4534 _rotation_set(Eo *obj, void *_pd, va_list *list)
4536 int rotation = va_arg(*list, int);
4537 Elm_Win_Smart_Data *sd = _pd;
4538 _win_rotate(obj, sd, rotation, EINA_FALSE);
4542 * This API does not resize the internal window (ex: X window).
4543 * But this resizes evas_output, elm window, and its contents.
4546 elm_win_rotation_with_resize_set(Evas_Object *obj,
4550 eo_do(obj, elm_obj_win_rotation_with_resize_set(rotation));
4554 _rotation_with_resize_set(Eo *obj, void *_pd, va_list *list)
4556 int rotation = va_arg(*list, int);
4557 Elm_Win_Smart_Data *sd = _pd;
4558 _win_rotate(obj, sd, rotation, EINA_TRUE);
4562 elm_win_rotation_get(const Evas_Object *obj)
4564 ELM_WIN_CHECK(obj) - 1;
4566 eo_do((Eo *) obj, elm_obj_win_rotation_get(&ret));
4571 _rotation_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4573 int *ret = va_arg(*list, int *);
4574 Elm_Win_Smart_Data *sd = _pd;
4579 elm_win_sticky_set(Evas_Object *obj,
4583 eo_do(obj, elm_obj_win_sticky_set(sticky));
4587 _sticky_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4589 Eina_Bool sticky = va_arg(*list, int);
4590 Elm_Win_Smart_Data *sd = _pd;
4592 // sd->sticky = sticky;
4593 TRAP(sd, sticky_set, sticky);
4594 #ifdef HAVE_ELEMENTARY_X
4595 _elm_win_xwin_update(sd);
4600 elm_win_sticky_get(const Evas_Object *obj)
4602 ELM_WIN_CHECK(obj) EINA_FALSE;
4603 Eina_Bool ret = EINA_FALSE;
4604 eo_do((Eo *) obj, elm_obj_win_sticky_get(&ret));
4609 _sticky_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4611 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4612 Elm_Win_Smart_Data *sd = _pd;
4617 elm_win_keyboard_mode_set(Evas_Object *obj,
4618 Elm_Win_Keyboard_Mode mode)
4621 eo_do(obj, elm_obj_win_keyboard_mode_set(mode));
4625 _keyboard_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4627 Elm_Win_Keyboard_Mode mode = va_arg(*list, Elm_Win_Keyboard_Mode);
4628 Elm_Win_Smart_Data *sd = _pd;
4630 if (mode == sd->kbdmode) return;
4631 #ifdef HAVE_ELEMENTARY_X
4632 _elm_win_xwindow_get(sd);
4635 #ifdef HAVE_ELEMENTARY_X
4637 ecore_x_e_virtual_keyboard_state_set
4638 (sd->x.xwin, (Ecore_X_Virtual_Keyboard_State)sd->kbdmode);
4642 EAPI Elm_Win_Keyboard_Mode
4643 elm_win_keyboard_mode_get(const Evas_Object *obj)
4645 ELM_WIN_CHECK(obj) ELM_WIN_KEYBOARD_UNKNOWN;
4646 Elm_Win_Keyboard_Mode ret = ELM_WIN_KEYBOARD_UNKNOWN;
4647 eo_do((Eo *) obj, elm_obj_win_keyboard_mode_get(&ret));
4652 _keyboard_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4654 Elm_Win_Keyboard_Mode *ret = va_arg(*list, Elm_Win_Keyboard_Mode *);
4655 Elm_Win_Smart_Data *sd = _pd;
4660 elm_win_keyboard_win_set(Evas_Object *obj,
4661 Eina_Bool is_keyboard)
4664 eo_do(obj, elm_obj_win_keyboard_win_set(is_keyboard));
4668 _keyboard_win_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4670 Eina_Bool is_keyboard = va_arg(*list, int);
4671 Elm_Win_Smart_Data *sd = _pd;
4673 #ifdef HAVE_ELEMENTARY_X
4674 _elm_win_xwindow_get(sd);
4676 ecore_x_e_virtual_keyboard_set(sd->x.xwin, is_keyboard);
4683 elm_win_keyboard_win_get(const Evas_Object *obj)
4685 ELM_WIN_CHECK(obj) EINA_FALSE;
4686 Eina_Bool ret = EINA_FALSE;
4687 eo_do((Eo *) obj, elm_obj_win_keyboard_win_get(&ret));
4692 _keyboard_win_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4694 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4695 Elm_Win_Smart_Data *sd = _pd;
4697 #ifdef HAVE_ELEMENTARY_X
4698 _elm_win_xwindow_get(sd);
4701 *ret = ecore_x_e_virtual_keyboard_get(sd->x.xwin);
4709 elm_win_indicator_mode_set(Evas_Object *obj,
4710 Elm_Win_Indicator_Mode mode)
4713 eo_do(obj, elm_obj_win_indicator_mode_set(mode));
4717 _indicator_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4719 Elm_Win_Indicator_Mode mode = va_arg(*list, Elm_Win_Indicator_Mode);
4720 Elm_Win_Smart_Data *sd = _pd;
4722 if (mode == sd->indmode) return;
4723 #ifdef HAVE_ELEMENTARY_X
4724 _elm_win_xwindow_get(sd);
4727 #ifdef HAVE_ELEMENTARY_X
4730 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
4731 ecore_x_e_illume_indicator_state_set
4732 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
4733 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
4734 ecore_x_e_illume_indicator_state_set
4735 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
4738 evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
4741 EAPI Elm_Win_Indicator_Mode
4742 elm_win_indicator_mode_get(const Evas_Object *obj)
4744 ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_UNKNOWN;
4745 Elm_Win_Indicator_Mode ret = ELM_WIN_INDICATOR_UNKNOWN;
4746 eo_do((Eo *) obj, elm_obj_win_indicator_mode_get(&ret));
4751 _indicator_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4753 Elm_Win_Indicator_Mode *ret = va_arg(*list, Elm_Win_Indicator_Mode *);
4754 Elm_Win_Smart_Data *sd = _pd;
4759 elm_win_indicator_opacity_set(Evas_Object *obj,
4760 Elm_Win_Indicator_Opacity_Mode mode)
4763 eo_do(obj, elm_obj_win_indicator_opacity_set(mode));
4767 _indicator_opacity_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4769 Elm_Win_Indicator_Opacity_Mode mode = va_arg(*list, Elm_Win_Indicator_Opacity_Mode);
4770 Elm_Win_Smart_Data *sd = _pd;
4772 if (mode == sd->ind_o_mode) return;
4773 sd->ind_o_mode = mode;
4774 #ifdef HAVE_ELEMENTARY_X
4775 _elm_win_xwindow_get(sd);
4778 if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
4779 ecore_x_e_illume_indicator_opacity_set
4780 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_OPAQUE);
4781 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSLUCENT)
4782 ecore_x_e_illume_indicator_opacity_set
4783 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
4784 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
4785 ecore_x_e_illume_indicator_opacity_set
4786 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
4789 evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
4792 EAPI Elm_Win_Indicator_Opacity_Mode
4793 elm_win_indicator_opacity_get(const Evas_Object *obj)
4795 ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
4796 Elm_Win_Indicator_Opacity_Mode ret = ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
4797 eo_do((Eo *) obj, elm_obj_win_indicator_opacity_get(&ret));
4802 _indicator_opacity_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4804 Elm_Win_Indicator_Opacity_Mode *ret = va_arg(*list, Elm_Win_Indicator_Opacity_Mode *);
4805 Elm_Win_Smart_Data *sd = _pd;
4806 *ret = sd->ind_o_mode;
4810 elm_win_screen_position_get(const Evas_Object *obj,
4815 eo_do((Eo *) obj, elm_obj_win_screen_position_get(x, y));
4819 _screen_position_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4821 int *x = va_arg(*list, int *);
4822 int *y = va_arg(*list, int *);
4823 Elm_Win_Smart_Data *sd = _pd;
4825 if (x) *x = sd->screen.x;
4826 if (y) *y = sd->screen.y;
4830 elm_win_focus_get(const Evas_Object *obj)
4832 ELM_WIN_CHECK(obj) EINA_FALSE;
4833 Eina_Bool ret = EINA_FALSE;
4834 eo_do((Eo *) obj, elm_obj_win_focus_get(&ret));
4839 _focus_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4841 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4842 Elm_Win_Smart_Data *sd = _pd;
4843 *ret = ecore_evas_focus_get(sd->ee);
4847 elm_win_screen_constrain_set(Evas_Object *obj,
4848 Eina_Bool constrain)
4851 eo_do(obj, elm_obj_win_screen_constrain_set(constrain));
4855 _screen_constrain_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4857 Eina_Bool constrain = va_arg(*list, int);
4858 Elm_Win_Smart_Data *sd = _pd;
4859 sd->constrain = !!constrain;
4863 elm_win_screen_constrain_get(Evas_Object *obj)
4865 ELM_WIN_CHECK(obj) EINA_FALSE;
4866 Eina_Bool ret = EINA_FALSE;
4867 eo_do(obj, elm_obj_win_screen_constrain_get(&ret));
4872 _screen_constrain_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4874 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4875 Elm_Win_Smart_Data *sd = _pd;
4876 *ret = sd->constrain;
4880 elm_win_screen_size_get(const Evas_Object *obj,
4887 eo_do((Eo *) obj, elm_obj_win_screen_size_get(x, y, w, h));
4891 _screen_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4893 int *x = va_arg(*list, int *);
4894 int *y = va_arg(*list, int *);
4895 int *w = va_arg(*list, int *);
4896 int *h = va_arg(*list, int *);
4897 Elm_Win_Smart_Data *sd = _pd;
4899 ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
4903 elm_win_screen_dpi_get(const Evas_Object *obj,
4908 eo_do((Eo *) obj, elm_obj_win_screen_dpi_get(xdpi, ydpi));
4912 _screen_dpi_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4914 int *xdpi = va_arg(*list, int *);
4915 int *ydpi = va_arg(*list, int *);
4916 Elm_Win_Smart_Data *sd = _pd;
4918 ecore_evas_screen_dpi_get(sd->ee, xdpi, ydpi);
4922 elm_win_conformant_set(Evas_Object *obj,
4923 Eina_Bool conformant)
4926 eo_do(obj, elm_obj_win_conformant_set(conformant));
4930 _conformant_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4932 Eina_Bool conformant = va_arg(*list, int);
4933 Elm_Win_Smart_Data *sd = _pd;
4935 #ifdef HAVE_ELEMENTARY_X
4936 _elm_win_xwindow_get(sd);
4938 ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
4945 elm_win_conformant_get(const Evas_Object *obj)
4947 ELM_WIN_CHECK(obj) EINA_FALSE;
4948 Eina_Bool ret = EINA_FALSE;
4949 eo_do((Eo *) obj, elm_obj_win_conformant_get(&ret));
4954 _conformant_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4956 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4957 Elm_Win_Smart_Data *sd = _pd;
4960 #ifdef HAVE_ELEMENTARY_X
4961 _elm_win_xwindow_get(sd);
4963 *ret = ecore_x_e_illume_conformant_get(sd->x.xwin);
4968 elm_win_quickpanel_set(Evas_Object *obj,
4969 Eina_Bool quickpanel)
4972 eo_do(obj, elm_obj_win_quickpanel_set(quickpanel));
4976 _quickpanel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4978 Eina_Bool quickpanel = va_arg(*list, int);
4979 Elm_Win_Smart_Data *sd = _pd;
4980 #ifdef HAVE_ELEMENTARY_X
4981 _elm_win_xwindow_get(sd);
4984 ecore_x_e_illume_quickpanel_set(sd->x.xwin, quickpanel);
4987 Ecore_X_Window_State states[2];
4989 states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
4990 states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
4991 ecore_x_netwm_window_state_set(sd->x.xwin, states, 2);
4992 ecore_x_icccm_hints_set(sd->x.xwin, 0, 0, 0, 0, 0, 0, 0);
5001 elm_win_quickpanel_get(const Evas_Object *obj)
5003 ELM_WIN_CHECK(obj) EINA_FALSE;
5004 Eina_Bool ret = EINA_FALSE;
5005 eo_do((Eo *) obj, elm_obj_win_quickpanel_get(&ret));
5010 _quickpanel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5012 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5013 Elm_Win_Smart_Data *sd = _pd;
5016 #ifdef HAVE_ELEMENTARY_X
5017 _elm_win_xwindow_get(sd);
5019 *ret = ecore_x_e_illume_quickpanel_get(sd->x.xwin);
5024 elm_win_quickpanel_priority_major_set(Evas_Object *obj,
5028 eo_do(obj, elm_obj_win_quickpanel_priority_major_set(priority));
5032 _quickpanel_priority_major_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5034 int priority = va_arg(*list, int);
5035 Elm_Win_Smart_Data *sd = _pd;
5037 #ifdef HAVE_ELEMENTARY_X
5038 _elm_win_xwindow_get(sd);
5040 ecore_x_e_illume_quickpanel_priority_major_set(sd->x.xwin, priority);
5047 elm_win_quickpanel_priority_major_get(const Evas_Object *obj)
5049 ELM_WIN_CHECK(obj) - 1;
5051 eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_major_get(&ret));
5056 _quickpanel_priority_major_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5058 int *ret = va_arg(*list, int *);
5059 Elm_Win_Smart_Data *sd = _pd;
5062 #ifdef HAVE_ELEMENTARY_X
5063 _elm_win_xwindow_get(sd);
5065 *ret = ecore_x_e_illume_quickpanel_priority_major_get(sd->x.xwin);
5070 elm_win_quickpanel_priority_minor_set(Evas_Object *obj,
5074 eo_do(obj, elm_obj_win_quickpanel_priority_minor_set(priority));
5078 _quickpanel_priority_minor_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5080 int priority = va_arg(*list, int);
5081 Elm_Win_Smart_Data *sd = _pd;
5083 #ifdef HAVE_ELEMENTARY_X
5084 _elm_win_xwindow_get(sd);
5086 ecore_x_e_illume_quickpanel_priority_minor_set(sd->x.xwin, priority);
5093 elm_win_quickpanel_priority_minor_get(const Evas_Object *obj)
5095 ELM_WIN_CHECK(obj) - 1;
5097 eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_minor_get(&ret));
5102 _quickpanel_priority_minor_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5104 int *ret = va_arg(*list, int *);
5105 Elm_Win_Smart_Data *sd = _pd;
5108 #ifdef HAVE_ELEMENTARY_X
5109 _elm_win_xwindow_get(sd);
5111 *ret = ecore_x_e_illume_quickpanel_priority_minor_get(sd->x.xwin);
5116 elm_win_quickpanel_zone_set(Evas_Object *obj,
5120 eo_do(obj, elm_obj_win_quickpanel_zone_set(zone));
5124 _quickpanel_zone_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5126 int zone = va_arg(*list, int);
5127 Elm_Win_Smart_Data *sd = _pd;
5129 #ifdef HAVE_ELEMENTARY_X
5130 _elm_win_xwindow_get(sd);
5132 ecore_x_e_illume_quickpanel_zone_set(sd->x.xwin, zone);
5139 elm_win_quickpanel_zone_get(const Evas_Object *obj)
5141 ELM_WIN_CHECK(obj) 0;
5143 eo_do((Eo *) obj, elm_obj_win_quickpanel_zone_get(&ret));
5148 _quickpanel_zone_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5150 int *ret = va_arg(*list, int *);
5151 Elm_Win_Smart_Data *sd = _pd;
5154 #ifdef HAVE_ELEMENTARY_X
5155 _elm_win_xwindow_get(sd);
5157 *ret = ecore_x_e_illume_quickpanel_zone_get(sd->x.xwin);
5162 elm_win_prop_focus_skip_set(Evas_Object *obj,
5166 eo_do(obj, elm_obj_win_prop_focus_skip_set(skip));
5170 _prop_focus_skip_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5172 Eina_Bool skip = va_arg(*list, int);
5173 Elm_Win_Smart_Data *sd = _pd;
5175 sd->skip_focus = skip;
5176 TRAP(sd, focus_skip_set, skip);
5180 elm_win_illume_command_send(Evas_Object *obj,
5181 Elm_Illume_Command command,
5185 eo_do(obj, elm_obj_win_illume_command_send(command, params));
5189 _illume_command_send(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5191 Elm_Illume_Command command = va_arg(*list, Elm_Illume_Command);
5192 void *params = va_arg(*list, void *);
5194 Elm_Win_Smart_Data *sd = _pd;
5196 #ifdef HAVE_ELEMENTARY_X
5197 _elm_win_xwindow_get(sd);
5202 case ELM_ILLUME_COMMAND_FOCUS_BACK:
5203 ecore_x_e_illume_focus_back_send(sd->x.xwin);
5206 case ELM_ILLUME_COMMAND_FOCUS_FORWARD:
5207 ecore_x_e_illume_focus_forward_send(sd->x.xwin);
5210 case ELM_ILLUME_COMMAND_FOCUS_HOME:
5211 ecore_x_e_illume_focus_home_send(sd->x.xwin);
5214 case ELM_ILLUME_COMMAND_CLOSE:
5215 ecore_x_e_illume_close_send(sd->x.xwin);
5228 elm_win_inlined_image_object_get(Evas_Object *obj)
5230 ELM_WIN_CHECK(obj) NULL;
5231 Evas_Object *ret = NULL;
5232 eo_do(obj, elm_obj_win_inlined_image_object_get(&ret));
5237 _inlined_image_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5239 Evas_Object **ret = va_arg(*list, Evas_Object **);
5240 Elm_Win_Smart_Data *sd = _pd;
5245 elm_win_focus_highlight_enabled_set(Evas_Object *obj,
5249 eo_do(obj, elm_obj_win_focus_highlight_enabled_set(enabled));
5253 _focus_highlight_enabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5255 Eina_Bool enabled = va_arg(*list, int);
5256 Elm_Win_Smart_Data *sd = _pd;
5258 enabled = !!enabled;
5259 if (sd->focus_highlight.enabled == enabled)
5262 sd->focus_highlight.enabled = enabled;
5264 if (sd->focus_highlight.enabled)
5265 _elm_win_focus_highlight_init(sd);
5267 _elm_win_focus_highlight_shutdown(sd);
5271 elm_win_focus_highlight_enabled_get(const Evas_Object *obj)
5273 ELM_WIN_CHECK(obj) EINA_FALSE;
5274 Eina_Bool ret = EINA_FALSE;
5275 eo_do((Eo *) obj, elm_obj_win_focus_highlight_enabled_get(&ret));
5280 _focus_highlight_enabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5282 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5283 Elm_Win_Smart_Data *sd = _pd;
5284 *ret = sd->focus_highlight.enabled;
5288 elm_win_focus_highlight_style_set(Evas_Object *obj,
5292 eo_do(obj, elm_obj_win_focus_highlight_style_set(style));
5296 _elm_win_smart_theme(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
5298 Elm_Win_Smart_Data *sd = _pd;
5299 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5300 Eina_Bool int_ret = EINA_FALSE;
5302 if (ret) *ret = EINA_TRUE;
5304 eo_do_super(obj, MY_CLASS, elm_wdg_theme_apply(&int_ret));
5305 if (!int_ret) return;
5307 sd->focus_highlight.theme_changed = EINA_TRUE;
5308 _elm_win_focus_highlight_reconfigure_job_start(sd);
5310 if (ret) *ret = EINA_TRUE;
5314 _focus_highlight_style_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5316 const char *style = va_arg(*list, const char *);
5317 Elm_Win_Smart_Data *sd = _pd;
5319 eina_stringshare_replace(&sd->focus_highlight.style, style);
5320 sd->focus_highlight.theme_changed = EINA_TRUE;
5321 _elm_win_focus_highlight_reconfigure_job_start(sd);
5325 elm_win_focus_highlight_style_get(const Evas_Object *obj)
5327 ELM_WIN_CHECK(obj) NULL;
5328 const char *ret = NULL;
5329 eo_do((Eo *) obj, elm_obj_win_focus_highlight_style_get(&ret));
5334 _focus_highlight_style_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5336 const char **ret = va_arg(*list, const char **);
5337 Elm_Win_Smart_Data *sd = _pd;
5338 *ret = sd->focus_highlight.style;
5342 elm_win_focus_highlight_animate_set(Evas_Object *obj,
5346 eo_do(obj, elm_obj_win_focus_highlight_animate_set(animate));
5350 _focus_highlight_animate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5352 Eina_Bool animate = va_arg(*list, int);
5353 Elm_Win_Smart_Data *sd = _pd;
5355 animate = !!animate;
5356 if (sd->focus_highlight.animate == animate)
5359 sd->focus_highlight.animate = animate;
5360 sd->focus_highlight.theme_changed = EINA_TRUE;
5361 _elm_win_focus_highlight_reconfigure_job_start(sd);
5365 elm_win_focus_highlight_animate_get(const Evas_Object *obj)
5367 ELM_WIN_CHECK(obj) EINA_FALSE;
5368 Eina_Bool ret = EINA_FALSE;
5369 eo_do((Eo *) obj, elm_obj_win_focus_highlight_animate_get(&ret));
5374 _focus_highlight_animate_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5376 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5377 Elm_Win_Smart_Data *sd = _pd;
5378 *ret = sd->focus_highlight.animate;
5382 elm_win_socket_listen(Evas_Object *obj,
5383 const char *svcname,
5387 ELM_WIN_CHECK(obj) EINA_FALSE;
5388 Eina_Bool ret = EINA_FALSE;
5389 eo_do(obj, elm_obj_win_socket_listen(svcname, svcnum, svcsys, &ret));
5394 _socket_listen(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5396 const char *svcname = va_arg(*list, const char *);
5397 int svcnum = va_arg(*list, int);
5398 Eina_Bool svcsys = va_arg(*list, int);
5399 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5400 Elm_Win_Smart_Data *sd = _pd;
5403 if (!sd->ee) return;
5405 if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys))
5411 /* windowing specific calls - shall we do this differently? */
5414 elm_win_xwindow_get(const Evas_Object *obj)
5418 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
5420 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5421 return _elm_ee_xwin_get(ee);
5424 ELM_WIN_CHECK(obj) 0;
5425 Ecore_X_Window ret = 0;
5426 eo_do((Eo *) obj, elm_obj_win_xwindow_get(&ret));
5431 _xwindow_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5433 Ecore_X_Window *ret = va_arg(*list, Ecore_X_Window *);
5434 Elm_Win_Smart_Data *sd = _pd;
5436 #ifdef HAVE_ELEMENTARY_X
5444 *ret = elm_win_xwindow_get(sd->parent);
5451 EAPI Ecore_Wl_Window *
5452 elm_win_wl_window_get(const Evas_Object *obj)
5454 if (!obj) return NULL;
5456 if ((!ENGINE_COMPARE(ELM_WAYLAND_SHM)) &&
5457 (!ENGINE_COMPARE(ELM_WAYLAND_EGL)))
5460 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
5462 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5463 return _elm_ee_wlwin_get(ee);
5466 ELM_WIN_CHECK(obj) NULL;
5467 Ecore_Wl_Window *ret = NULL;
5468 eo_do((Eo *) obj, elm_obj_win_wl_window_get(&ret));
5473 _wl_window_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5475 Ecore_Wl_Window **ret = va_arg(*list, Ecore_Wl_Window **);
5476 #if HAVE_ELEMENTARY_WAYLAND
5477 Elm_Win_Smart_Data *sd = _pd;
5485 *ret = elm_win_wl_window_get(sd->parent);
5495 elm_win_trap_set(const Elm_Win_Trap *t)
5497 DBG("old %p, new %p", trap, t);
5499 if ((t) && (t->version != ELM_WIN_TRAP_VERSION))
5501 CRI("trying to set a trap version %lu while %lu was expected!",
5502 t->version, ELM_WIN_TRAP_VERSION);
5511 elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
5514 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
5516 floating = !!floating;
5517 if (floating == sd->floating) return;
5518 sd->floating = floating;
5519 #ifdef HAVE_ELEMENTARY_X
5520 _elm_win_xwindow_get(sd);
5524 ecore_x_e_illume_window_state_set
5525 (sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_FLOATING);
5527 ecore_x_e_illume_window_state_set
5528 (sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_NORMAL);
5534 elm_win_floating_mode_get(const Evas_Object *obj)
5536 ELM_WIN_CHECK(obj) EINA_FALSE;
5537 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
5539 return sd->floating;
5543 _window_id_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5545 Ecore_Window *ret = va_arg(*list, Ecore_Window *);
5546 Elm_Win_Smart_Data *sd = _pd;
5548 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
5550 #if HAVE_ELEMENTARY_WAYLAND
5553 *ret = (Ecore_Window)ecore_wl_window_surface_id_get(sd->wl.win);
5558 Ecore_Wl_Window *parent;
5560 parent = elm_win_wl_window_get(sd->parent);
5561 if (parent) *ret = (Ecore_Window)ecore_wl_window_surface_id_get(parent);
5568 #ifdef HAVE_ELEMENTARY_X
5569 _elm_win_xwindow_get(sd);
5572 *ret = (Ecore_Window)sd->x.xwin;
5577 *ret = (Ecore_Window)elm_win_xwindow_get(sd->parent);
5587 elm_win_window_id_get(const Evas_Object *obj)
5591 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
5593 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5594 return ecore_evas_window_get(ee);
5597 ELM_WIN_CHECK(obj) 0;
5598 Ecore_Window ret = 0;
5599 eo_do((Eo *) obj, elm_obj_win_window_id_get(&ret));
5604 _class_constructor(Eo_Class *klass)
5606 const Eo_Op_Func_Description func_desc[] = {
5607 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
5608 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_win_smart_add),
5609 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_win_smart_del),
5610 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_win_smart_resize),
5611 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_win_smart_move),
5612 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_SHOW), _elm_win_smart_show),
5613 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_HIDE), _elm_win_smart_hide),
5615 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_win_smart_on_focus),
5616 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_win_smart_event),
5617 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_win_smart_focus_next_manager_is),
5618 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_win_smart_focus_next),
5619 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_win_smart_focus_direction_manager_is),
5620 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION), _elm_win_smart_focus_direction),
5621 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_APPLY), _elm_win_smart_theme),
5623 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR), _win_constructor),
5624 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD), _resize_object_add),
5625 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL), _resize_object_del),
5626 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_SET), _title_set),
5627 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_GET), _title_get),
5628 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET), _icon_name_set),
5629 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET), _icon_name_get),
5630 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_SET), _role_set),
5631 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_GET), _role_get),
5632 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET), _icon_object_set),
5633 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET), _icon_object_get),
5634 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET), _autodel_set),
5635 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET), _autodel_get),
5636 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ACTIVATE), _activate),
5637 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LOWER), _lower),
5638 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RAISE), _raise),
5639 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CENTER), _center),
5640 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET), _borderless_set),
5641 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET), _borderless_get),
5642 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_SET), _shaped_set),
5643 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_GET), _shaped_get),
5644 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_SET), _alpha_set),
5645 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_GET), _alpha_get),
5646 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET), _override_set),
5647 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET), _override_get),
5648 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET), _fullscreen_set),
5649 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET), _fullscreen_get),
5650 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET), _main_menu_get),
5651 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET), _maximized_set),
5652 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET), _maximized_get),
5653 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET), _iconified_set),
5654 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET), _iconified_get),
5655 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET), _withdrawn_set),
5656 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET), _withdrawn_get),
5657 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET), _available_profiles_set),
5658 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET), _available_profiles_get),
5659 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_SET), _profile_set),
5660 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_GET), _profile_get),
5661 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_SET), _urgent_set),
5662 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_GET), _urgent_get),
5663 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET), _demand_attention_set),
5664 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET), _demand_attention_get),
5665 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_SET), _modal_set),
5666 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_GET), _modal_get),
5667 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_SET), _aspect_set),
5668 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_GET), _aspect_get),
5669 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET), _size_base_set),
5670 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET), _size_base_get),
5671 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET), _size_step_set),
5672 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET), _size_step_get),
5673 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_SET), _layer_set),
5674 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_GET), _layer_get),
5675 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_SET), _rotation_set),
5676 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET), _rotation_with_resize_set),
5677 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_GET), _rotation_get),
5678 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_SET), _sticky_set),
5679 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_GET), _sticky_get),
5680 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET), _keyboard_mode_set),
5681 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET), _keyboard_mode_get),
5682 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET), _keyboard_win_set),
5683 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET), _keyboard_win_get),
5684 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET), _indicator_mode_set),
5685 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET), _indicator_mode_get),
5686 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET), _indicator_opacity_set),
5687 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET), _indicator_opacity_get),
5688 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET), _screen_position_get),
5689 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_GET), _focus_get),
5690 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET), _screen_constrain_set),
5691 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET), _screen_constrain_get),
5692 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET), _screen_size_get),
5693 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET), _screen_dpi_get),
5694 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET), _conformant_set),
5695 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET), _conformant_get),
5696 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET), _quickpanel_set),
5697 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET), _quickpanel_get),
5698 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET), _quickpanel_priority_major_set),
5699 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET), _quickpanel_priority_major_get),
5700 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET), _quickpanel_priority_minor_set),
5701 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET), _quickpanel_priority_minor_get),
5702 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET), _quickpanel_zone_set),
5703 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET), _quickpanel_zone_get),
5704 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET), _prop_focus_skip_set),
5705 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND), _illume_command_send),
5706 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET), _inlined_image_object_get),
5707 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET), _focus_highlight_enabled_set),
5708 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET), _focus_highlight_enabled_get),
5709 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET), _focus_highlight_style_set),
5710 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET), _focus_highlight_style_get),
5711 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET), _focus_highlight_animate_set),
5712 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET), _focus_highlight_animate_get),
5713 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN), _socket_listen),
5714 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET), _xwindow_get),
5715 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET), _wl_window_get),
5716 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET), _window_id_get),
5720 eo_class_funcs_set(klass, func_desc);
5722 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
5725 static const Eo_Op_Description op_desc[] = {
5726 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR, "Adds a window object."),
5727 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD, "Add subobj as a resize object of window obj."),
5728 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL, "Delete subobj as a resize object of window obj."),
5729 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_SET, "Set the title of the window."),
5730 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_GET, "Get the title of the window."),
5731 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET, "Set the icon name of the window."),
5732 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET, "Get the icon name of the window."),
5733 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_SET, "Set the role of the window."),
5734 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_GET, "Get the role of the window."),
5735 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET, "Set a window object's icon."),
5736 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET, "Get the icon object used for the window."),
5737 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET, "Set the window's autodel state."),
5738 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET, "Get the window's autodel state."),
5739 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ACTIVATE, "Activate a window object."),
5740 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LOWER, "Lower a window object."),
5741 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RAISE, "Raise a window object."),
5742 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CENTER, "Center a window on its screen."),
5743 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET, "Set the borderless state of a window."),
5744 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET, "Get the borderless state of a window."),
5745 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_SET, "Set the shaped state of a window."),
5746 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_GET, "Get the shaped state of a window."),
5747 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_SET, "Set the alpha channel state of a window."),
5748 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_GET, "Get the alpha channel state of a window."),
5749 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET, "Set the override state of a window."),
5750 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET, "Get the override state of a window."),
5751 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET, "Set the fullscreen state of a window."),
5752 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET, "Get the fullscreen state of a window."),
5753 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET, "Get the Main Menu of a window."),
5754 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET, "Set the maximized state of a window."),
5755 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET, "Get the maximized state of a window."),
5756 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET, "Set the iconified state of a window."),
5757 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET, "Get the iconified state of a window."),
5758 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET, "Set the withdrawn state of a window."),
5759 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET, "Get the withdrawn state of a window."),
5760 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET, "Set the array of available profiles to a window."),
5761 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET, "Get the array of available profiles of a window."),
5762 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_SET, "Set the profile of a window."),
5763 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_GET, "Get the profile of a window."),
5764 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_SET, "Set the urgent state of a window."),
5765 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_GET, "Get the urgent state of a window."),
5766 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET, "Set the demand_attention state of a window."),
5767 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET, "Get the demand_attention state of a window."),
5768 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_SET, "Set the modal state of a window."),
5769 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_GET, "Get the modal state of a window."),
5770 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_SET, "Set the aspect ratio of a window."),
5771 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_GET, "Get the aspect ratio of a window."),
5772 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET, "Set the base window size used with stepping calculation."),
5773 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET, "Get the base size of a window."),
5774 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET, "Set the window stepping used with sizing calculation."),
5775 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET, "Get the stepping of a window."),
5776 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_SET, "Set the layer of the window."),
5777 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_GET, "Get the layer of the window."),
5778 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_SET, "Set the rotation of the window."),
5779 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET, "Rotates the window and resizes it."),
5780 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_GET, "Get the rotation of the window."),
5781 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_SET, "Set the sticky state of the window."),
5782 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_GET, "Get the sticky state of the window."),
5783 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET, "Sets the keyboard mode of the window."),
5784 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET, "Get the keyboard mode of the window."),
5785 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET, "Sets whether the window is a keyboard."),
5786 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET, "Get whether the window is a keyboard."),
5787 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET, "Sets the indicator mode of the window."),
5788 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET, "Get the indicator mode of the window."),
5789 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET, "Sets the indicator opacity mode of the window."),
5790 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET, "Get the indicator opacity mode of the window."),
5791 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET, "Get the screen position of a window."),
5792 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_GET, "Determine whether a window has focus."),
5793 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET, "Constrain the maximum width and height of a window to the width and height of its screen."),
5794 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET, "Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen."),
5795 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET, "Get screen geometry details for the screen that a window is on."),
5796 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET, "Get screen dpi for the screen that a window is on."),
5797 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET, "Set if this window is an illume conformant window."),
5798 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET, "Get if this window is an illume conformant window."),
5799 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET, "Set a window to be an illume quickpanel window."),
5800 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET, "Get if this window is a quickpanel or not."),
5801 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET, "Set the major priority of a quickpanel window."),
5802 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET, "Get the major priority of a quickpanel window."),
5803 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET, "Set the minor priority of a quickpanel window."),
5804 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET, "Get the minor priority of a quickpanel window."),
5805 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET, "Set which zone this quickpanel should appear in."),
5806 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET, "Get which zone this quickpanel should appear in."),
5807 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET, "Set the window to be skipped by keyboard focus."),
5808 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND, "Send a command to the windowing environment."),
5809 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET, "Get the inlined image object handle."),
5810 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET, "Set the enabled status for the focus highlight in a window."),
5811 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET, "Get the enabled value of the focus highlight for this window."),
5812 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET, "Set the style for the focus highlight on this window."),
5813 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET, "Get the style set for the focus highlight object."),
5814 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET, "Set the animate status for the focus highlight for this window."),
5815 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET, "Get the animate status for the focus highlight for this window."),
5816 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN, "Create a socket to provide the service for Plug widget."),
5817 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET, "Get the Ecore_X_Window of an Evas_Object."),
5818 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET, "Get the Ecore_Wl_Window of an Evas_Object."),
5819 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET, "Get the Ecore_Window of an Evas_Object."),
5820 EO_OP_DESCRIPTION_SENTINEL
5823 static const Eo_Class_Description class_desc = {
5826 EO_CLASS_TYPE_REGULAR,
5827 EO_CLASS_DESCRIPTION_OPS(&ELM_OBJ_WIN_BASE_ID, op_desc, ELM_OBJ_WIN_SUB_ID_LAST),
5829 sizeof(Elm_Win_Smart_Data),
5834 EO_DEFINE_CLASS(elm_obj_win_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, NULL);