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"
17 static const Elm_Win_Trap *trap = NULL;
19 #define TRAP(sd, name, ...) \
22 if ((!trap) || (!trap->name) || \
24 (trap->name(sd->trap_data, sd->obj, ## __VA_ARGS__)))) \
25 ecore_evas_##name(sd->ee, ##__VA_ARGS__); \
29 #define ELM_WIN_DATA_GET(o, sd) \
30 Elm_Win_Smart_Data * sd = eo_data_scope_get(o, MY_CLASS)
32 #define ELM_WIN_DATA_GET_OR_RETURN(o, ptr) \
33 ELM_WIN_DATA_GET(o, ptr); \
36 CRITICAL("No widget data for object %p (%s)", \
37 o, evas_object_type_get(o)); \
41 #define ELM_WIN_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
42 ELM_WIN_DATA_GET(o, ptr); \
45 CRITICAL("No widget data for object %p (%s)", \
46 o, evas_object_type_get(o)); \
50 #define ELM_WIN_CHECK(obj) \
51 if (!obj || !eo_isa(obj, MY_CLASS)) \
54 #define ENGINE_GET() (_elm_preferred_engine ? _elm_preferred_engine : (_elm_config->engine ? _elm_config->engine : ""))
55 #define ENGINE_COMPARE(name) (!strcmp(ENGINE_GET(), name))
56 #define EE_ENGINE_COMPARE(ee, name) (!strcmp(ecore_evas_engine_name_get(ee), 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 handled : 1;
125 Ecore_Job *reconf_job;
127 Eina_Bool enabled : 1;
128 Eina_Bool theme_changed : 1; /* set true when the focus theme is changed */
129 Eina_Bool animate : 1; /* set true when the focus highlight animate is enabled */
130 Eina_Bool animate_supported : 1; /* set true when the focus highlight animate is supported by theme */
131 Eina_Bool geometry_changed : 1;
136 const char *icon_name;
139 Evas_Object *main_menu;
144 const char **available_list;
151 int size_base_w, size_base_h;
152 int size_step_w, size_step_h;
154 Eina_Bool urgent : 1;
156 Eina_Bool demand_attention : 1;
157 Eina_Bool autodel : 1;
158 Eina_Bool constrain : 1;
159 Eina_Bool resizing : 1;
160 Eina_Bool iconified : 1;
161 Eina_Bool withdrawn : 1;
162 Eina_Bool sticky : 1;
163 Eina_Bool fullscreen : 1;
164 Eina_Bool maximized : 1;
165 Eina_Bool skip_focus : 1;
166 Eina_Bool floating : 1;
169 static const char SIG_DELETE_REQUEST[] = "delete,request";
170 static const char SIG_FOCUS_OUT[] = "focus,out"; // deprecated. use "focused" instead.
171 static const char SIG_FOCUS_IN[] = "focus,in"; // deprecated. use "unfocused" instead.
172 static const char SIG_MOVED[] = "moved";
173 static const char SIG_WITHDRAWN[] = "withdrawn";
174 static const char SIG_ICONIFIED[] = "iconified";
175 static const char SIG_NORMAL[] = "normal";
176 static const char SIG_STICK[] = "stick";
177 static const char SIG_UNSTICK[] = "unstick";
178 static const char SIG_FULLSCREEN[] = "fullscreen";
179 static const char SIG_UNFULLSCREEN[] = "unfullscreen";
180 static const char SIG_MAXIMIZED[] = "maximized";
181 static const char SIG_UNMAXIMIZED[] = "unmaximized";
182 static const char SIG_IOERR[] = "ioerr";
183 static const char SIG_INDICATOR_PROP_CHANGED[] = "indicator,prop,changed";
184 static const char SIG_ROTATION_CHANGED[] = "rotation,changed";
185 static const char SIG_PROFILE_CHANGED[] = "profile,changed";
186 static const char SIG_FOCUSED[] = "focused";
187 static const char SIG_UNFOCUSED[] = "unfocused";
189 static const Evas_Smart_Cb_Description _smart_callbacks[] = {
190 {SIG_DELETE_REQUEST, ""},
199 {SIG_FULLSCREEN, ""},
200 {SIG_UNFULLSCREEN, ""},
202 {SIG_UNMAXIMIZED, ""},
204 {SIG_INDICATOR_PROP_CHANGED, ""},
205 {SIG_ROTATION_CHANGED, ""},
206 {SIG_PROFILE_CHANGED, ""},
212 Eina_List *_elm_win_list = NULL;
213 int _elm_win_deferred_free = 0;
215 static int _elm_win_count = 0;
217 static Eina_Bool _elm_win_auto_throttled = EINA_FALSE;
219 static Ecore_Job *_elm_win_state_eval_job = NULL;
222 _elm_win_on_resize_obj_changed_size_hints(void *data,
227 EAPI double _elm_startup_time = 0;
230 _elm_win_first_frame_do(void *data, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
232 double end = ecore_time_unix_get();
240 case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f' sec\n", end, _elm_startup_time, end - _elm_startup_time);
244 evas_event_callback_del_full(e, EVAS_CALLBACK_RENDER_POST, _elm_win_first_frame_do, data);
248 _elm_win_state_eval(void *data __UNUSED__)
252 int _elm_win_count_shown = 0;
253 int _elm_win_count_iconified = 0;
254 int _elm_win_count_withdrawn = 0;
256 _elm_win_state_eval_job = NULL;
258 if (_elm_config->auto_norender_withdrawn)
260 EINA_LIST_FOREACH(_elm_win_list, l, obj)
262 if ((elm_win_withdrawn_get(obj)) ||
263 ((elm_win_iconified_get(obj) &&
264 (_elm_config->auto_norender_iconified_same_as_withdrawn))))
266 if (!evas_object_data_get(obj, "__win_auto_norender"))
268 Evas *evas = evas_object_evas_get(obj);
270 elm_win_norender_push(obj);
271 evas_object_data_set(obj, "__win_auto_norender", obj);
273 if (_elm_config->auto_flush_withdrawn)
275 edje_file_cache_flush();
276 edje_collection_cache_flush();
277 evas_image_cache_flush(evas);
278 evas_font_cache_flush(evas);
280 if (_elm_config->auto_dump_withdrawn)
282 evas_render_dump(evas);
288 if (evas_object_data_get(obj, "__win_auto_norender"))
290 elm_win_norender_pop(obj);
291 evas_object_data_del(obj, "__win_auto_norender");
296 if (((_elm_config->auto_throttle) &&
297 (elm_policy_get(ELM_POLICY_THROTTLE) != ELM_POLICY_THROTTLE_NEVER)) ||
298 (elm_policy_get(ELM_POLICY_THROTTLE) == ELM_POLICY_THROTTLE_HIDDEN_ALWAYS))
300 if (_elm_win_count == 0)
302 if (_elm_win_auto_throttled)
304 ecore_throttle_adjust(-_elm_config->auto_throttle_amount);
305 _elm_win_auto_throttled = EINA_FALSE;
310 EINA_LIST_FOREACH(_elm_win_list, l, obj)
312 if (elm_win_withdrawn_get(obj))
313 _elm_win_count_withdrawn++;
314 else if (elm_win_iconified_get(obj))
315 _elm_win_count_iconified++;
316 else if (evas_object_visible_get(obj))
317 _elm_win_count_shown++;
319 if (_elm_win_count_shown <= 0)
321 if (!_elm_win_auto_throttled)
323 ecore_throttle_adjust(_elm_config->auto_throttle_amount);
324 _elm_win_auto_throttled = EINA_TRUE;
329 if (_elm_win_auto_throttled)
331 ecore_throttle_adjust(-_elm_config->auto_throttle_amount);
332 _elm_win_auto_throttled = EINA_FALSE;
340 _elm_win_state_eval_queue(void)
342 if (_elm_win_state_eval_job) ecore_job_del(_elm_win_state_eval_job);
343 _elm_win_state_eval_job = ecore_job_add(_elm_win_state_eval, NULL);
346 // example shot spec (wait 0.1 sec then save as my-window.png):
347 // ELM_ENGINE="shot:delay=0.1:file=my-window.png"
350 _shot_delay_get(Elm_Win_Smart_Data *sd)
353 char *d = strdup(sd->shot.info);
356 for (p = (char *)sd->shot.info; *p; p++)
358 if (!strncmp(p, "delay=", 6))
362 for (pd = d, p += 6; (*p) && (*p != ':'); p++, pd++)
378 _shot_file_get(Elm_Win_Smart_Data *sd)
381 char *tmp = strdup(sd->shot.info);
382 char *repname = NULL;
384 if (!tmp) return NULL;
386 for (p = (char *)sd->shot.info; *p; p++)
388 if (!strncmp(p, "file=", 5))
391 if (!sd->shot.repeat_count) return tmp;
394 char *dotptr = strrchr(tmp, '.');
397 size_t size = sizeof(char) * (strlen(tmp) + 16);
398 repname = malloc(size);
399 strncpy(repname, tmp, dotptr - tmp);
400 snprintf(repname + (dotptr - tmp), size -
401 (dotptr - tmp), "%03i",
402 sd->shot.shot_counter + 1);
403 strcat(repname, dotptr);
411 if (!sd->shot.repeat_count) return strdup("out.png");
413 repname = malloc(sizeof(char) * 24);
414 snprintf(repname, sizeof(char) * 24, "out%03i.png",
415 sd->shot.shot_counter + 1);
421 _shot_repeat_count_get(Elm_Win_Smart_Data *sd)
424 char *d = strdup(sd->shot.info);
427 for (p = (char *)sd->shot.info; *p; p++)
429 if (!strncmp(p, "repeat=", 7))
433 for (pd = d, p += 7; (*p) && (*p != ':'); p++, pd++)
440 if (v > 1000) v = 999;
451 _shot_key_get(Elm_Win_Smart_Data *sd __UNUSED__)
457 _shot_flags_get(Elm_Win_Smart_Data *sd __UNUSED__)
463 _shot_do(Elm_Win_Smart_Data *sd)
467 unsigned int *pixels;
469 char *file, *key, *flags;
471 ecore_evas_manual_render(sd->ee);
472 pixels = (void *)ecore_evas_buffer_pixels_get(sd->ee);
475 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
476 if ((w < 1) || (h < 1)) return;
478 file = _shot_file_get(sd);
481 key = _shot_key_get(sd);
482 flags = _shot_flags_get(sd);
483 ee = ecore_evas_buffer_new(1, 1);
484 o = evas_object_image_add(ecore_evas_get(ee));
485 evas_object_image_alpha_set(o, ecore_evas_alpha_get(sd->ee));
486 evas_object_image_size_set(o, w, h);
487 evas_object_image_data_set(o, pixels);
488 if (!evas_object_image_save(o, file, key, flags))
490 ERR("Cannot save window to '%s' (key '%s', flags '%s')",
495 if (flags) free(flags);
497 if (sd->shot.repeat_count) sd->shot.shot_counter++;
501 _shot_delay(void *data)
503 ELM_WIN_DATA_GET(data, sd);
506 if (sd->shot.repeat_count)
508 int remainshot = (sd->shot.repeat_count - sd->shot.shot_counter);
509 if (remainshot > 0) return EINA_TRUE;
511 sd->shot.timer = NULL;
518 _shot_init(Elm_Win_Smart_Data *sd)
520 if (!sd->shot.info) return;
522 sd->shot.repeat_count = _shot_repeat_count_get(sd);
523 sd->shot.shot_counter = 0;
527 _shot_handle(Elm_Win_Smart_Data *sd)
529 if (!sd->shot.info) return;
532 sd->shot.timer = ecore_timer_add(_shot_delay_get(sd), _shot_delay,
536 /* elm-win specific associate, does the trap while ecore_evas_object_associate()
539 static Elm_Win_Smart_Data *
540 _elm_win_associate_get(const Ecore_Evas *ee)
542 ELM_WIN_DATA_GET(ecore_evas_data_get(ee, "elm_win"), sd);
546 /* Interceptors Callbacks */
548 _elm_win_obj_intercept_raise(void *data, Evas_Object *obj __UNUSED__)
550 ELM_WIN_DATA_GET(data, sd);
555 _elm_win_obj_intercept_lower(void *data, Evas_Object *obj __UNUSED__)
557 ELM_WIN_DATA_GET(data, sd);
562 _elm_win_obj_intercept_stack_above(void *data __UNUSED__, Evas_Object *obj __UNUSED__, Evas_Object *above __UNUSED__)
564 INF("TODO: %s", __FUNCTION__);
568 _elm_win_obj_intercept_stack_below(void *data __UNUSED__, Evas_Object *obj __UNUSED__, Evas_Object *below __UNUSED__)
570 INF("TODO: %s", __FUNCTION__);
574 _elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj __UNUSED__, int l)
576 ELM_WIN_DATA_GET(data, sd);
577 TRAP(sd, layer_set, l);
580 /* Event Callbacks */
583 _elm_win_obj_callback_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
585 ELM_WIN_DATA_GET(data, sd);
588 evas_object_size_hint_min_get(obj, &w, &h);
589 TRAP(sd, size_min_set, w, h);
591 evas_object_size_hint_max_get(obj, &w, &h);
594 TRAP(sd, size_max_set, w, h);
596 /* end of elm-win specific associate */
599 _elm_win_move(Ecore_Evas *ee)
601 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
604 EINA_SAFETY_ON_NULL_RETURN(sd);
606 ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
609 evas_object_smart_callback_call(sd->obj, SIG_MOVED, NULL);
613 _elm_win_resize_job(void *data)
615 ELM_WIN_DATA_GET(data, sd);
618 sd->deferred_resize_job = NULL;
619 ecore_evas_request_geometry_get(sd->ee, NULL, NULL, &w, &h);
623 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sw, &sh);
632 evas_output_framespace_get(sd->evas, &fx, &fy, &fw, &fh);
633 evas_object_move(sd->frame_obj, -fx, -fy);
634 evas_object_resize(sd->frame_obj, w + fw, h + fh);
637 evas_object_resize(sd->obj, w, h);
638 evas_object_resize(sd->layout, w, h);
642 _elm_win_resize(Ecore_Evas *ee)
644 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
645 EINA_SAFETY_ON_NULL_RETURN(sd);
647 if (sd->deferred_resize_job) ecore_job_del(sd->deferred_resize_job);
648 sd->deferred_resize_job = ecore_job_add(_elm_win_resize_job, sd->obj);
652 _elm_win_mouse_in(Ecore_Evas *ee)
654 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
655 EINA_SAFETY_ON_NULL_RETURN(sd);
657 if (sd->resizing) sd->resizing = EINA_FALSE;
661 _elm_win_focus_highlight_reconfigure_job_stop(Elm_Win_Smart_Data *sd)
663 ELM_SAFE_FREE(sd->focus_highlight.reconf_job, ecore_job_del);
667 _elm_win_focus_highlight_visible_set(Elm_Win_Smart_Data *sd,
670 Evas_Object *fobj = sd->focus_highlight.fobj;
675 evas_object_show(fobj);
676 edje_object_signal_emit(fobj, "elm,action,focus,show", "elm");
680 edje_object_signal_emit(fobj, "elm,action,focus,hide", "elm");
685 _elm_win_focus_highlight_anim_setup(Elm_Win_Smart_Data *sd,
688 Evas_Coord tx, ty, tw, th;
689 Evas_Coord w, h, px, py, pw, ph;
690 Edje_Message_Int_Set *m;
691 Evas_Object *previous = sd->focus_highlight.prev.target;
692 Evas_Object *target = sd->focus_highlight.cur.target;
694 evas_object_geometry_get(sd->obj, NULL, NULL, &w, &h);
695 evas_object_geometry_get(target, &tx, &ty, &tw, &th);
696 evas_object_geometry_get(previous, &px, &py, &pw, &ph);
697 evas_object_move(obj, tx, ty);
698 evas_object_resize(obj, tw, th);
699 evas_object_clip_unset(obj);
701 m = alloca(sizeof(*m) + (sizeof(int) * 8));
711 edje_object_message_send(obj, EDJE_MESSAGE_INT_SET, 1, m);
715 _elm_win_focus_highlight_simple_setup(Elm_Win_Smart_Data *sd,
718 Evas_Object *clip, *target = sd->focus_highlight.cur.target;
719 Evas_Coord x, y, w, h;
721 clip = evas_object_clip_get(target);
722 evas_object_geometry_get(target, &x, &y, &w, &h);
724 evas_object_move(obj, x, y);
725 evas_object_resize(obj, w, h);
726 evas_object_clip_set(obj, clip);
730 _elm_win_focus_highlight_reconfigure(Elm_Win_Smart_Data *sd)
732 Evas_Object *target = sd->focus_highlight.cur.target;
733 Evas_Object *previous = sd->focus_highlight.prev.target;
734 Evas_Object *fobj = sd->focus_highlight.fobj;
735 Eina_Bool visible_changed;
736 Eina_Bool common_visible;
737 const char *sig = NULL;
739 _elm_win_focus_highlight_reconfigure_job_stop(sd);
741 visible_changed = (sd->focus_highlight.cur.visible !=
742 sd->focus_highlight.prev.visible);
744 if ((target == previous) && (!visible_changed) &&
745 (!sd->focus_highlight.geometry_changed) &&
746 (!sd->focus_highlight.theme_changed))
749 if ((previous) && (sd->focus_highlight.prev.handled))
750 elm_widget_signal_emit
751 (previous, "elm,action,focus_highlight,hide", "elm");
754 common_visible = EINA_FALSE;
755 else if (sd->focus_highlight.cur.handled)
757 common_visible = EINA_FALSE;
758 if (sd->focus_highlight.cur.visible)
759 sig = "elm,action,focus_highlight,show";
761 sig = "elm,action,focus_highlight,hide";
764 common_visible = sd->focus_highlight.cur.visible;
766 _elm_win_focus_highlight_visible_set(sd, common_visible);
768 elm_widget_signal_emit(target, sig, "elm");
770 if ((!target) || (!common_visible) || (sd->focus_highlight.cur.handled))
773 if (sd->focus_highlight.theme_changed)
776 if (sd->focus_highlight.style)
777 str = sd->focus_highlight.style;
780 elm_widget_theme_object_set
781 (sd->obj, fobj, "focus_highlight", "top", str);
782 sd->focus_highlight.theme_changed = EINA_FALSE;
784 if (sd->focus_highlight.animate)
786 str = edje_object_data_get(sd->focus_highlight.fobj, "animate");
787 sd->focus_highlight.animate_supported = ((str) && (!strcmp(str, "on")));
790 sd->focus_highlight.animate_supported = EINA_FALSE;
793 if ((sd->focus_highlight.animate_supported) && (previous) &&
794 (!sd->focus_highlight.prev.handled))
795 _elm_win_focus_highlight_anim_setup(sd, fobj);
797 _elm_win_focus_highlight_simple_setup(sd, fobj);
798 evas_object_raise(fobj);
801 sd->focus_highlight.geometry_changed = EINA_FALSE;
802 sd->focus_highlight.prev = sd->focus_highlight.cur;
806 _elm_win_focus_highlight_reconfigure_job(void *data)
808 ELM_WIN_DATA_GET(data, sd);
809 _elm_win_focus_highlight_reconfigure(sd);
813 _elm_win_focus_highlight_reconfigure_job_start(Elm_Win_Smart_Data *sd)
815 if (sd->focus_highlight.reconf_job)
816 ecore_job_del(sd->focus_highlight.reconf_job);
818 sd->focus_highlight.reconf_job = ecore_job_add(
819 _elm_win_focus_highlight_reconfigure_job, sd->obj);
823 _elm_win_focus_in(Ecore_Evas *ee)
825 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
827 unsigned int order = 0;
829 EINA_SAFETY_ON_NULL_RETURN(sd);
833 _elm_widget_top_win_focused_set(obj, EINA_TRUE);
834 if (!elm_widget_focus_order_get(obj)
835 || (obj == elm_widget_newest_focus_order_get(obj, &order, EINA_TRUE)))
837 elm_widget_focus_steal(obj);
840 elm_widget_focus_restore(obj);
841 evas_object_smart_callback_call(obj, SIG_FOCUS_IN, NULL);
842 evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL);
843 sd->focus_highlight.cur.visible = EINA_TRUE;
844 _elm_win_focus_highlight_reconfigure_job_start(sd);
847 edje_object_signal_emit(sd->frame_obj, "elm,action,focus", "elm");
851 /* else if (sd->img_obj) */
857 _elm_win_focus_out(Ecore_Evas *ee)
859 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
862 EINA_SAFETY_ON_NULL_RETURN(sd);
866 elm_object_focus_set(obj, EINA_FALSE);
867 _elm_widget_top_win_focused_set(obj, EINA_FALSE);
868 evas_object_smart_callback_call(obj, SIG_FOCUS_OUT, NULL);
869 evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL);
870 sd->focus_highlight.cur.visible = EINA_FALSE;
871 _elm_win_focus_highlight_reconfigure_job_start(sd);
874 edje_object_signal_emit(sd->frame_obj, "elm,action,unfocus", "elm");
878 _elm_access_object_hilight_disable(evas_object_evas_get(obj));
881 /* if (sd->img_obj) */
887 _elm_win_available_profiles_del(Elm_Win_Smart_Data *sd)
889 if (!sd->profile.available_list) return;
892 for (i = 0; i < sd->profile.count; i++)
893 ELM_SAFE_FREE(sd->profile.available_list[i], eina_stringshare_del);
894 sd->profile.count = 0;
895 ELM_SAFE_FREE(sd->profile.available_list, free);
899 _elm_win_profile_del(Elm_Win_Smart_Data *sd)
901 ELM_SAFE_FREE(sd->profile.name, eina_stringshare_del);
905 _elm_win_profile_set(Elm_Win_Smart_Data *sd, const char *profile)
907 Eina_Bool changed = EINA_FALSE;
910 if (sd->profile.name)
912 if (strcmp(sd->profile.name, profile) != 0)
914 eina_stringshare_replace(&(sd->profile.name), profile);
920 sd->profile.name = eina_stringshare_add(profile);
925 _elm_win_profile_del(sd);
931 _elm_win_profile_update(Elm_Win_Smart_Data *sd)
933 if (sd->profile.available_list)
935 Eina_Bool found = EINA_FALSE;
936 if (sd->profile.name)
939 for (i = 0; i < sd->profile.count; i++)
941 if (!strcmp(sd->profile.name,
942 sd->profile.available_list[i]))
950 /* If current profile is not present in an available profiles,
951 * change current profile to the 1st element of an array.
954 _elm_win_profile_set(sd, sd->profile.available_list[0]);
957 _elm_config_profile_set(sd->profile.name);
961 Eina_List *sub, *l = NULL;
963 sub = ecore_evas_sub_ecore_evas_list_get(sd->ee);
964 EINA_LIST_FOREACH(sub, l, ee2)
965 ecore_evas_window_profile_set(ee2, sd->profile.name);
967 evas_object_smart_callback_call(sd->obj, SIG_PROFILE_CHANGED, NULL);
971 _elm_win_state_change(Ecore_Evas *ee)
973 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
975 Eina_Bool ch_withdrawn = EINA_FALSE;
976 Eina_Bool ch_sticky = EINA_FALSE;
977 Eina_Bool ch_iconified = EINA_FALSE;
978 Eina_Bool ch_fullscreen = EINA_FALSE;
979 Eina_Bool ch_maximized = EINA_FALSE;
980 Eina_Bool ch_profile = EINA_FALSE;
983 EINA_SAFETY_ON_NULL_RETURN(sd);
987 if (sd->withdrawn != ecore_evas_withdrawn_get(sd->ee))
989 sd->withdrawn = ecore_evas_withdrawn_get(sd->ee);
990 ch_withdrawn = EINA_TRUE;
992 if (sd->sticky != ecore_evas_sticky_get(sd->ee))
994 sd->sticky = ecore_evas_sticky_get(sd->ee);
995 ch_sticky = EINA_TRUE;
997 if (sd->iconified != ecore_evas_iconified_get(sd->ee))
999 sd->iconified = ecore_evas_iconified_get(sd->ee);
1000 ch_iconified = EINA_TRUE;
1002 if (sd->fullscreen != ecore_evas_fullscreen_get(sd->ee))
1004 sd->fullscreen = ecore_evas_fullscreen_get(sd->ee);
1005 ch_fullscreen = EINA_TRUE;
1007 if (sd->maximized != ecore_evas_maximized_get(sd->ee))
1009 sd->maximized = ecore_evas_maximized_get(sd->ee);
1010 ch_maximized = EINA_TRUE;
1014 profile = ecore_evas_window_profile_get(sd->ee);
1015 ch_profile = _elm_win_profile_set(sd, profile);
1017 _elm_win_state_eval_queue();
1019 if ((ch_withdrawn) || (ch_iconified))
1022 evas_object_smart_callback_call(obj, SIG_WITHDRAWN, NULL);
1023 else if (sd->iconified)
1024 evas_object_smart_callback_call(obj, SIG_ICONIFIED, NULL);
1026 evas_object_smart_callback_call(obj, SIG_NORMAL, NULL);
1031 evas_object_smart_callback_call(obj, SIG_STICK, NULL);
1033 evas_object_smart_callback_call(obj, SIG_UNSTICK, NULL);
1038 evas_object_smart_callback_call(obj, SIG_FULLSCREEN, NULL);
1040 evas_object_smart_callback_call(obj, SIG_UNFULLSCREEN, NULL);
1045 evas_object_smart_callback_call(obj, SIG_MAXIMIZED, NULL);
1047 evas_object_smart_callback_call(obj, SIG_UNMAXIMIZED, NULL);
1051 _elm_win_profile_update(sd);
1056 _elm_win_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
1058 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1063 _elm_win_smart_focus_next(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1065 Elm_Focus_Direction dir = va_arg(*list, Elm_Focus_Direction);
1066 Evas_Object **next = va_arg(*list, Evas_Object **);
1067 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1068 if (ret) *ret = EINA_FALSE;
1070 Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
1072 const Eina_List *items;
1073 void *(*list_data_get)(const Eina_List *list);
1078 if (!(items = elm_widget_focus_custom_chain_get(obj)))
1080 items = wd->subobjs;
1084 list_data_get = eina_list_data_get;
1086 elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next);
1090 if (ret) *ret = EINA_TRUE;
1094 *next = (Evas_Object *)obj;
1099 _elm_win_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
1101 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1106 _elm_win_smart_focus_direction(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1108 const Evas_Object *base = va_arg(*list, Evas_Object *);
1109 double degree = va_arg(*list, double);
1110 Evas_Object **direction = va_arg(*list, Evas_Object **);
1111 double *weight = va_arg(*list, double *);
1112 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1113 if (ret) *ret = EINA_FALSE;
1114 Eina_Bool int_ret = EINA_FALSE;
1116 const Eina_List *items;
1117 void *(*list_data_get)(const Eina_List *list);
1119 Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
1124 if (!(items = elm_widget_focus_custom_chain_get(obj)))
1125 items = wd->subobjs;
1127 list_data_get = eina_list_data_get;
1129 int_ret = elm_widget_focus_list_direction_get
1130 (obj, base, items, list_data_get, degree, direction, weight);
1131 if (ret) *ret = int_ret;
1136 _elm_win_smart_on_focus(Eo *obj, void *_pd, va_list *list)
1138 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1139 if (ret) *ret = EINA_TRUE;
1140 Elm_Win_Smart_Data *sd = _pd;
1141 Eina_Bool int_ret = EINA_FALSE;
1143 eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
1144 if (!int_ret) return;
1147 evas_object_focus_set(sd->img_obj, elm_widget_focus_get(obj));
1149 evas_object_focus_set(obj, elm_widget_focus_get(obj));
1153 _elm_win_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1155 Evas_Object *source = va_arg(*list, Evas_Object *);
1157 Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
1158 void *event_info = va_arg(*list, void *);
1159 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1160 if (ret) *ret = EINA_FALSE;
1162 Evas_Event_Key_Down *ev = event_info;
1164 if (elm_widget_disabled_get(obj)) return;
1166 if (type != EVAS_CALLBACK_KEY_DOWN)
1169 if ((!strcmp(ev->key, "Tab")) ||
1170 (!strcmp(ev->key, "ISO_Left_Tab")))
1172 if (evas_key_modifier_is_set(ev->modifiers, "Control") ||
1173 evas_key_modifier_is_set(ev->modifiers, "Alt"))
1175 if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
1176 elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
1178 elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
1182 else if ((!strcmp(ev->key, "Left")) ||
1183 ((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
1185 elm_widget_focus_cycle(obj, ELM_FOCUS_LEFT);
1189 else if ((!strcmp(ev->key, "Right")) ||
1190 ((!strcmp(ev->key, "KP_Right")) && (!ev->string)))
1192 elm_widget_focus_cycle(obj, ELM_FOCUS_RIGHT);
1196 else if ((!strcmp(ev->key, "Up")) ||
1197 ((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
1199 elm_widget_focus_cycle(obj, ELM_FOCUS_UP);
1203 else if ((!strcmp(ev->key, "Down")) ||
1204 ((!strcmp(ev->key, "KP_Down")) && (!ev->string)))
1206 elm_widget_focus_cycle(obj, ELM_FOCUS_DOWN);
1214 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1215 if (ret) *ret = EINA_TRUE;
1219 _deferred_ecore_evas_free(void *data)
1221 ecore_evas_free(data);
1222 _elm_win_deferred_free--;
1226 _elm_win_smart_show(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1228 Elm_Win_Smart_Data *sd = _pd;
1230 if (!evas_object_visible_get(obj))
1231 _elm_win_state_eval_queue();
1232 eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
1236 if (sd->shot.info) _shot_handle(sd);
1240 _elm_win_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1242 Elm_Win_Smart_Data *sd = _pd;
1244 if (evas_object_visible_get(obj))
1245 _elm_win_state_eval_queue();
1246 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
1252 evas_object_hide(sd->frame_obj);
1256 evas_object_hide(sd->img_obj);
1258 if (sd->pointer.obj)
1260 evas_object_hide(sd->pointer.obj);
1261 ecore_evas_hide(sd->pointer.ee);
1266 _elm_win_on_parent_del(void *data,
1269 void *event_info __UNUSED__)
1271 ELM_WIN_DATA_GET(data, sd);
1273 if (obj == sd->parent) sd->parent = NULL;
1277 _elm_win_focus_target_move(void *data,
1279 Evas_Object *obj __UNUSED__,
1280 void *event_info __UNUSED__)
1282 ELM_WIN_DATA_GET(data, sd);
1284 sd->focus_highlight.geometry_changed = EINA_TRUE;
1285 _elm_win_focus_highlight_reconfigure_job_start(sd);
1289 _elm_win_focus_target_resize(void *data,
1291 Evas_Object *obj __UNUSED__,
1292 void *event_info __UNUSED__)
1294 ELM_WIN_DATA_GET(data, sd);
1296 sd->focus_highlight.geometry_changed = EINA_TRUE;
1297 _elm_win_focus_highlight_reconfigure_job_start(sd);
1301 _elm_win_focus_target_del(void *data,
1303 Evas_Object *obj __UNUSED__,
1304 void *event_info __UNUSED__)
1306 ELM_WIN_DATA_GET(data, sd);
1308 sd->focus_highlight.cur.target = NULL;
1310 _elm_win_focus_highlight_reconfigure_job_start(sd);
1313 static Evas_Object *
1314 _elm_win_focus_target_get(Evas_Object *obj)
1316 Evas_Object *o = obj;
1320 if (elm_widget_is(o))
1322 if (!elm_widget_highlight_ignore_get(o))
1324 o = elm_widget_parent_get(o);
1326 o = evas_object_smart_parent_get(o);
1330 o = elm_widget_parent_widget_get(o);
1332 o = evas_object_smart_parent_get(o);
1341 _elm_win_focus_target_callbacks_add(Elm_Win_Smart_Data *sd)
1343 Evas_Object *obj = sd->focus_highlight.cur.target;
1346 evas_object_event_callback_add
1347 (obj, EVAS_CALLBACK_MOVE, _elm_win_focus_target_move, sd->obj);
1348 evas_object_event_callback_add
1349 (obj, EVAS_CALLBACK_RESIZE, _elm_win_focus_target_resize, sd->obj);
1350 evas_object_event_callback_add
1351 (obj, EVAS_CALLBACK_DEL, _elm_win_focus_target_del, sd->obj);
1355 _elm_win_focus_target_callbacks_del(Elm_Win_Smart_Data *sd)
1357 Evas_Object *obj = sd->focus_highlight.cur.target;
1359 evas_object_event_callback_del_full
1360 (obj, EVAS_CALLBACK_MOVE, _elm_win_focus_target_move, sd->obj);
1361 evas_object_event_callback_del_full
1362 (obj, EVAS_CALLBACK_RESIZE, _elm_win_focus_target_resize, sd->obj);
1363 evas_object_event_callback_del_full
1364 (obj, EVAS_CALLBACK_DEL, _elm_win_focus_target_del, sd->obj);
1368 _elm_win_object_focus_in(void *data,
1372 Evas_Object *obj = event_info, *target;
1373 ELM_WIN_DATA_GET(data, sd);
1375 if (sd->focus_highlight.cur.target == obj)
1378 target = _elm_win_focus_target_get(obj);
1379 sd->focus_highlight.cur.target = target;
1380 if (elm_widget_highlight_in_theme_get(target))
1381 sd->focus_highlight.cur.handled = EINA_TRUE;
1383 _elm_win_focus_target_callbacks_add(sd);
1385 _elm_win_focus_highlight_reconfigure_job_start(sd);
1389 _elm_win_object_focus_out(void *data,
1391 void *event_info __UNUSED__)
1393 ELM_WIN_DATA_GET(data, sd);
1395 if (!sd->focus_highlight.cur.target)
1398 if (!sd->focus_highlight.cur.handled)
1399 _elm_win_focus_target_callbacks_del(sd);
1401 sd->focus_highlight.cur.target = NULL;
1402 sd->focus_highlight.cur.handled = EINA_FALSE;
1404 _elm_win_focus_highlight_reconfigure_job_start(sd);
1408 _elm_win_focus_highlight_shutdown(Elm_Win_Smart_Data *sd)
1410 _elm_win_focus_highlight_reconfigure_job_stop(sd);
1411 if (sd->focus_highlight.cur.target)
1413 elm_widget_signal_emit(sd->focus_highlight.cur.target,
1414 "elm,action,focus_highlight,hide", "elm");
1415 _elm_win_focus_target_callbacks_del(sd);
1416 sd->focus_highlight.cur.target = NULL;
1418 ELM_SAFE_FREE(sd->focus_highlight.fobj, evas_object_del);
1420 evas_event_callback_del_full
1421 (sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
1422 _elm_win_object_focus_in, sd->obj);
1423 evas_event_callback_del_full
1424 (sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
1425 _elm_win_object_focus_out, sd->obj);
1429 _elm_win_on_img_obj_del(void *data,
1431 Evas_Object *obj __UNUSED__,
1432 void *event_info __UNUSED__)
1434 ELM_WIN_DATA_GET(data, sd);
1439 _elm_win_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1441 Elm_Win_Smart_Data *sd = _pd;
1443 evas_object_event_callback_del_full(sd->layout,
1444 EVAS_CALLBACK_CHANGED_SIZE_HINTS,
1445 _elm_win_on_resize_obj_changed_size_hints,
1447 evas_object_del(sd->box);
1448 evas_object_del(sd->layout);
1450 /* NB: child deletion handled by parent's smart del */
1452 if ((trap) && (trap->del))
1453 trap->del(sd->trap_data, obj);
1457 evas_object_event_callback_del_full
1458 (sd->parent, EVAS_CALLBACK_DEL, _elm_win_on_parent_del, obj);
1462 if (sd->autodel_clear) *(sd->autodel_clear) = -1;
1464 _elm_win_list = eina_list_remove(_elm_win_list, obj);
1466 _elm_win_state_eval_queue();
1470 ecore_evas_callback_delete_request_set(sd->ee, NULL);
1471 ecore_evas_callback_resize_set(sd->ee, NULL);
1474 if (sd->deferred_resize_job) ecore_job_del(sd->deferred_resize_job);
1475 if (sd->deferred_child_eval_job) ecore_job_del(sd->deferred_child_eval_job);
1476 if (sd->shot.info) eina_stringshare_del(sd->shot.info);
1477 if (sd->shot.timer) ecore_timer_del(sd->shot.timer);
1479 #ifdef HAVE_ELEMENTARY_X
1480 if (sd->x.client_message_handler)
1481 ecore_event_handler_del(sd->x.client_message_handler);
1482 if (sd->x.property_handler)
1483 ecore_event_handler_del(sd->x.property_handler);
1488 evas_object_event_callback_del_full
1489 (sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, obj);
1496 ecore_job_add(_deferred_ecore_evas_free, sd->ee);
1497 _elm_win_deferred_free++;
1501 _elm_win_focus_highlight_shutdown(sd);
1502 eina_stringshare_del(sd->focus_highlight.style);
1504 if (sd->title) eina_stringshare_del(sd->title);
1505 if (sd->icon_name) eina_stringshare_del(sd->icon_name);
1506 if (sd->role) eina_stringshare_del(sd->role);
1507 if (sd->icon) evas_object_del(sd->icon);
1509 if (sd->main_menu) evas_object_del(sd->main_menu);
1511 _elm_win_profile_del(sd);
1512 _elm_win_available_profiles_del(sd);
1514 /* Don't let callback in the air that point to sd */
1515 ecore_evas_callback_delete_request_set(sd->ee, NULL);
1516 ecore_evas_callback_resize_set(sd->ee, NULL);
1517 ecore_evas_callback_mouse_in_set(sd->ee, NULL);
1518 ecore_evas_callback_focus_in_set(sd->ee, NULL);
1519 ecore_evas_callback_focus_out_set(sd->ee, NULL);
1520 ecore_evas_callback_move_set(sd->ee, NULL);
1521 ecore_evas_callback_state_change_set(sd->ee, NULL);
1523 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
1525 if ((!_elm_win_list) &&
1526 (elm_policy_get(ELM_POLICY_QUIT) == ELM_POLICY_QUIT_LAST_WINDOW_CLOSED))
1528 edje_file_cache_flush();
1529 edje_collection_cache_flush();
1530 evas_image_cache_flush(evas_object_evas_get(obj));
1531 evas_font_cache_flush(evas_object_evas_get(obj));
1537 _elm_win_obj_intercept_show(void *data,
1540 ELM_WIN_DATA_GET(data, sd);
1542 // this is called to make sure all smart containers have calculated their
1543 // sizes BEFORE we show the window to make sure it initially appears at
1544 // our desired size (ie min size is known first)
1545 evas_smart_objects_calculate(evas_object_evas_get(obj));
1548 evas_object_show(sd->frame_obj);
1552 evas_object_show(sd->img_obj);
1554 if (sd->pointer.obj)
1556 ecore_evas_show(sd->pointer.ee);
1557 evas_object_show(sd->pointer.obj);
1559 evas_object_show(obj);
1563 _elm_win_smart_move(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1565 Evas_Coord x = va_arg(*list, Evas_Coord);
1566 Evas_Coord y = va_arg(*list, Evas_Coord);
1567 Elm_Win_Smart_Data *sd = _pd;
1571 if ((x != sd->screen.x) || (y != sd->screen.y))
1575 evas_object_smart_callback_call(obj, SIG_MOVED, NULL);
1581 TRAP(sd, move, x, y);
1582 if (!ecore_evas_override_get(sd->ee)) return;
1585 eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y));
1587 if (ecore_evas_override_get(sd->ee))
1591 evas_object_smart_callback_call(obj, SIG_MOVED, NULL);
1595 /* FIXME: We should update ecore_wl_window_location here !! */
1607 _elm_win_smart_resize(Eo *obj, void *_pd, va_list *list)
1609 Evas_Coord w = va_arg(*list, Evas_Coord);
1610 Evas_Coord h = va_arg(*list, Evas_Coord);
1612 Elm_Win_Smart_Data *sd = _pd;
1614 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
1622 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sw, &sh);
1629 evas_object_image_size_set(sd->img_obj, w, h);
1632 TRAP(sd, resize, w, h);
1636 _elm_win_delete_request(Ecore_Evas *ee)
1638 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
1641 EINA_SAFETY_ON_NULL_RETURN(sd);
1645 int autodel = sd->autodel;
1646 sd->autodel_clear = &autodel;
1647 evas_object_ref(obj);
1648 evas_object_smart_callback_call(obj, SIG_DELETE_REQUEST, NULL);
1649 // FIXME: if above callback deletes - then the below will be invalid
1650 if (autodel) evas_object_del(obj);
1651 else sd->autodel_clear = NULL;
1652 evas_object_unref(obj);
1656 _elm_ee_xwin_get(const Ecore_Evas *ee)
1658 #ifdef HAVE_ELEMENTARY_X
1659 Ecore_X_Window xwin = 0;
1662 if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_X11))
1664 if (ee) xwin = ecore_evas_software_x11_window_get(ee);
1666 else if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_FB) ||
1667 EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_16_WINCE) ||
1668 EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_SDL) ||
1669 EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_16_SDL) ||
1670 EE_ENGINE_COMPARE(ee, ELM_OPENGL_SDL) ||
1671 EE_ENGINE_COMPARE(ee, ELM_OPENGL_COCOA))
1674 else if (EE_ENGINE_COMPARE(ee, ELM_OPENGL_X11))
1676 if (ee) xwin = ecore_evas_gl_x11_window_get(ee);
1678 else if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_WIN32))
1680 if (ee) xwin = (long)ecore_evas_win32_window_get(ee);
1688 #ifdef HAVE_ELEMENTARY_X
1690 _elm_win_xwindow_get(Elm_Win_Smart_Data *sd)
1692 sd->x.xwin = _elm_ee_xwin_get(sd->ee);
1696 #ifdef HAVE_ELEMENTARY_X
1698 _elm_win_xwin_update(Elm_Win_Smart_Data *sd)
1702 _elm_win_xwindow_get(sd);
1705 ELM_WIN_DATA_GET(sd->parent, sdp);
1709 ecore_x_icccm_transient_for_set(sd->x.xwin, sdp->x.xwin);
1713 if (!sd->x.xwin) return; /* nothing more to do */
1716 if (!s) s = _elm_appname;
1718 if (sd->icon_name) s = sd->icon_name;
1719 ecore_x_icccm_icon_name_set(sd->x.xwin, s);
1720 ecore_x_netwm_icon_name_set(sd->x.xwin, s);
1723 if (s) ecore_x_icccm_window_role_set(sd->x.xwin, s);
1730 data = evas_object_image_data_get(sd->icon, EINA_FALSE);
1734 int w = 0, h = 0, stride, x, y;
1738 evas_object_image_size_get(sd->icon, &w, &h);
1739 stride = evas_object_image_stride_get(sd->icon);
1740 if ((w > 0) && (h > 0) &&
1741 (stride >= (int)(w * sizeof(unsigned int))))
1745 ic.data = malloc(w * h * sizeof(unsigned int));
1749 p = (unsigned char *)data;
1750 p2 = (unsigned int *)ic.data;
1751 for (y = 0; y < h; y++)
1753 for (x = 0; x < w; x++)
1755 *p2 = *((unsigned int *)p);
1756 p += sizeof(unsigned int);
1759 p += (stride - (w * sizeof(unsigned int)));
1761 ecore_x_netwm_icons_set(sd->x.xwin, &ic, 1);
1765 evas_object_image_data_set(sd->icon, data);
1772 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_NORMAL);
1775 case ELM_WIN_DIALOG_BASIC:
1776 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DIALOG);
1779 case ELM_WIN_DESKTOP:
1780 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DESKTOP);
1784 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DOCK);
1787 case ELM_WIN_TOOLBAR:
1788 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_TOOLBAR);
1792 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_MENU);
1795 case ELM_WIN_UTILITY:
1796 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_UTILITY);
1799 case ELM_WIN_SPLASH:
1800 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_SPLASH);
1803 case ELM_WIN_DROPDOWN_MENU:
1804 ecore_x_netwm_window_type_set
1805 (sd->x.xwin, ECORE_X_WINDOW_TYPE_DROPDOWN_MENU);
1808 case ELM_WIN_POPUP_MENU:
1809 ecore_x_netwm_window_type_set
1810 (sd->x.xwin, ECORE_X_WINDOW_TYPE_POPUP_MENU);
1813 case ELM_WIN_TOOLTIP:
1814 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_TOOLTIP);
1817 case ELM_WIN_NOTIFICATION:
1818 ecore_x_netwm_window_type_set
1819 (sd->x.xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
1823 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_COMBO);
1827 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DND);
1833 ecore_x_e_virtual_keyboard_state_set
1834 (sd->x.xwin, (Ecore_X_Virtual_Keyboard_State)sd->kbdmode);
1835 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
1836 ecore_x_e_illume_indicator_state_set
1837 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
1838 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
1839 ecore_x_e_illume_indicator_state_set
1840 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
1848 * Resize the window according to window layout's min and weight.
1849 * If the window layout's weight is 0.0, the window max is limited to layout's
1852 * This is called when the window layout's weight hint is changed or when the
1853 * window is rotated.
1855 * @param obj window object
1858 _elm_win_resize_objects_eval(Evas_Object *obj)
1860 ELM_WIN_DATA_GET(obj, sd);
1861 Evas_Coord w, h, minw, minh, maxw, maxh;
1864 evas_object_size_hint_min_get(sd->layout, &minw, &minh);
1865 if (minw < 1) minw = 1;
1866 if (minh < 1) minh = 1;
1868 evas_object_size_hint_weight_get(sd->layout, &wx, &wy);
1869 if (!wx) maxw = minw;
1871 if (!wy) maxh = minh;
1874 evas_object_size_hint_min_set(obj, minw, minh);
1875 evas_object_size_hint_max_set(obj, maxw, maxh);
1876 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
1877 if (w < minw) w = minw;
1878 if (h < minh) h = minh;
1879 if (w > maxw) w = maxw;
1880 if (h > maxh) h = maxh;
1881 evas_object_move(obj, 0, 0);
1882 evas_object_resize(obj, w, h);
1886 _elm_win_on_resize_obj_changed_size_hints(void *data,
1888 Evas_Object *obj __UNUSED__,
1889 void *event_info __UNUSED__)
1891 _elm_win_resize_objects_eval(data);
1895 _elm_win_shutdown(void)
1897 while (_elm_win_list) evas_object_del(_elm_win_list->data);
1898 ELM_SAFE_FREE(_elm_win_state_eval_job, ecore_job_del);
1902 _elm_win_rescale(Elm_Theme *th,
1903 Eina_Bool use_theme)
1910 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1911 elm_widget_theme(obj);
1915 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1916 elm_widget_theme_specific(obj, th, EINA_FALSE);
1921 _elm_win_access(Eina_Bool is_access)
1928 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1930 elm_widget_access(obj, is_access);
1932 /* floating orphan object. if there are A, B, C objects and user does
1933 as below, then there would be floating orphan objects.
1935 1. elm_object_content_set(layout, A);
1936 2. elm_object_content_set(layout, B);
1937 3. elm_object_content_set(layout, C);
1939 now, the object A and B are floating orphan objects */
1944 fobj = evas_object_below_get(fobj);
1947 if (elm_widget_is(fobj) && !elm_widget_parent_get(fobj))
1949 elm_widget_access(fobj, is_access);
1955 evas = evas_object_evas_get(obj);
1956 if (evas) _elm_access_object_hilight_disable(evas);
1962 _elm_win_translate(void)
1967 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1968 elm_widget_translate(obj);
1971 #ifdef HAVE_ELEMENTARY_X
1973 _elm_win_client_message(void *data,
1974 int type __UNUSED__,
1977 ELM_WIN_DATA_GET(data, sd);
1978 Ecore_X_Event_Client_Message *e = event;
1980 if (e->format != 32) return ECORE_CALLBACK_PASS_ON;
1981 if (e->message_type == ECORE_X_ATOM_E_COMP_FLUSH)
1983 if ((unsigned int)e->data.l[0] == sd->x.xwin)
1985 Evas *evas = evas_object_evas_get(sd->obj);
1988 edje_file_cache_flush();
1989 edje_collection_cache_flush();
1990 evas_image_cache_flush(evas);
1991 evas_font_cache_flush(evas);
1995 else if (e->message_type == ECORE_X_ATOM_E_COMP_DUMP)
1997 if ((unsigned int)e->data.l[0] == sd->x.xwin)
1999 Evas *evas = evas_object_evas_get(sd->obj);
2002 edje_file_cache_flush();
2003 edje_collection_cache_flush();
2004 evas_image_cache_flush(evas);
2005 evas_font_cache_flush(evas);
2006 evas_render_dump(evas);
2010 else if (e->message_type == ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL)
2012 if ((unsigned int)e->data.l[0] == sd->x.xwin)
2014 if ((unsigned int)e->data.l[1] ==
2015 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT)
2017 // XXX: call right access func
2019 else if ((unsigned int)e->data.l[1] ==
2020 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_PREV)
2022 // XXX: call right access func
2024 else if ((unsigned int)e->data.l[1] ==
2025 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE)
2027 _elm_access_highlight_object_activate
2028 (sd->obj, ELM_ACTIVATE_DEFAULT);
2030 else if ((unsigned int)e->data.l[1] ==
2031 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ)
2033 /* there would be better way to read highlight object */
2035 evas = evas_object_evas_get(sd->obj);
2036 if (!evas) return ECORE_CALLBACK_PASS_ON;
2038 _elm_access_mouse_event_enabled_set(EINA_TRUE);
2040 evas_event_feed_mouse_in(evas, 0, NULL);
2041 evas_event_feed_mouse_move
2042 (evas, e->data.l[2], e->data.l[3], 0, NULL);
2044 _elm_access_mouse_event_enabled_set(EINA_FALSE);
2046 else if ((unsigned int)e->data.l[1] ==
2047 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_NEXT)
2049 _elm_access_highlight_cycle(sd->obj, ELM_FOCUS_NEXT);
2051 else if ((unsigned int)e->data.l[1] ==
2052 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_PREV)
2054 _elm_access_highlight_cycle(sd->obj, ELM_FOCUS_PREVIOUS);
2056 else if ((unsigned int)e->data.l[1] ==
2057 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP)
2059 _elm_access_highlight_object_activate
2060 (sd->obj, ELM_ACTIVATE_UP);
2062 else if ((unsigned int)e->data.l[1] ==
2063 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN)
2065 _elm_access_highlight_object_activate
2066 (sd->obj, ELM_ACTIVATE_DOWN);
2070 return ECORE_CALLBACK_PASS_ON;
2074 _elm_win_property_change(void *data,
2075 int type __UNUSED__,
2078 ELM_WIN_DATA_GET(data, sd);
2079 Ecore_X_Event_Window_Property *e = event;
2081 if (e->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE)
2083 if (e->win == sd->x.xwin)
2085 sd->indmode = (Elm_Win_Indicator_Mode)ecore_x_e_illume_indicator_state_get(e->win);
2086 evas_object_smart_callback_call(sd->obj, SIG_INDICATOR_PROP_CHANGED, NULL);
2089 return ECORE_CALLBACK_PASS_ON;
2094 _elm_win_focus_highlight_hide(void *data __UNUSED__,
2096 const char *emission __UNUSED__,
2097 const char *source __UNUSED__)
2099 evas_object_hide(obj);
2103 _elm_win_focus_highlight_anim_end(void *data,
2105 const char *emission __UNUSED__,
2106 const char *source __UNUSED__)
2108 ELM_WIN_DATA_GET(data, sd);
2110 _elm_win_focus_highlight_simple_setup(sd, obj);
2114 _elm_win_focus_highlight_init(Elm_Win_Smart_Data *sd)
2116 evas_event_callback_add(sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
2117 _elm_win_object_focus_in, sd->obj);
2118 evas_event_callback_add(sd->evas,
2119 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
2120 _elm_win_object_focus_out, sd->obj);
2122 sd->focus_highlight.cur.target = evas_focus_get(sd->evas);
2123 sd->focus_highlight.fobj = edje_object_add(sd->evas);
2124 sd->focus_highlight.theme_changed = EINA_TRUE;
2126 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2127 "elm,action,focus,hide,end", "",
2128 _elm_win_focus_highlight_hide, NULL);
2129 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2130 "elm,action,focus,anim,end", "",
2131 _elm_win_focus_highlight_anim_end, sd->obj);
2132 _elm_win_focus_highlight_reconfigure_job_start(sd);
2136 _elm_win_frame_cb_move_start(void *data,
2137 Evas_Object *obj __UNUSED__,
2138 const char *sig __UNUSED__,
2141 ELM_WIN_DATA_GET(data, sd);
2145 #ifdef HAVE_ELEMENTARY_WAYLAND
2146 if (!strcmp(source, "elm"))
2147 ecore_wl_window_cursor_from_name_set(sd->wl.win, ELM_CURSOR_HAND1);
2149 ecore_wl_window_cursor_default_restore(sd->wl.win);
2154 /* FIXME: Change mouse pointer */
2156 /* NB: Wayland handles moving surfaces by itself so we cannot
2157 * specify a specific x/y we want. Instead, we will pass in the
2158 * existing x/y values so they can be recorded as 'previous'
2159 * position. The new position will get updated automatically when
2160 * the move is finished */
2162 ecore_evas_wayland_move(sd->ee, sd->screen.x, sd->screen.y);
2166 _elm_win_frame_cb_move_stop(void *data,
2167 Evas_Object *obj __UNUSED__,
2168 const char *sig __UNUSED__,
2169 const char *source __UNUSED__)
2171 ELM_WIN_DATA_GET(data, sd);
2175 #ifdef HAVE_ELEMENTARY_WAYLAND
2176 ecore_wl_window_cursor_default_restore(sd->wl.win);
2180 #ifdef HAVE_ELEMENTARY_WAYLAND
2187 static struct _resize_info _border_side[4] =
2189 { ELM_CURSOR_TOP_SIDE, 1 },
2190 { ELM_CURSOR_LEFT_SIDE, 4 },
2191 { ELM_CURSOR_BOTTOM_SIDE, 2 },
2192 { ELM_CURSOR_RIGHT_SIDE, 8 },
2195 static struct _resize_info _border_corner[4] =
2197 { ELM_CURSOR_TOP_LEFT_CORNER, 5 },
2198 { ELM_CURSOR_BOTTOM_LEFT_CORNER, 6 },
2199 { ELM_CURSOR_BOTTOM_RIGHT_CORNER, 10 },
2200 { ELM_CURSOR_TOP_RIGHT_CORNER, 9 },
2205 _elm_win_frame_obj_move(void *data,
2207 Evas_Object *obj __UNUSED__,
2208 void *event_info __UNUSED__)
2210 Elm_Win_Smart_Data *sd;
2216 if (!(sd = data)) return;
2217 if (!sd->client_obj) return;
2219 evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
2220 evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
2221 evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
2223 evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
2224 if ((x != (ox - fx)) || (y != (oy - fy)) ||
2225 (w != (fw - ow)) || (h != (fh - oh)))
2227 evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
2228 (fw - ow), (fh - oh));
2231 #ifdef HAVE_ELEMENTARY_WAYLAND
2232 ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -(fy - sy), sw, sh);
2237 _elm_win_frame_obj_resize(void *data,
2239 Evas_Object *obj __UNUSED__,
2240 void *event_info __UNUSED__)
2242 Elm_Win_Smart_Data *sd;
2248 if (!(sd = data)) return;
2249 if (!sd->client_obj) return;
2251 evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
2252 evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
2253 evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
2255 evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
2256 if ((x != (ox - fx)) || (y != (oy - fy)) ||
2257 (w != (fw - ow)) || (h != (fh - oh)))
2259 evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
2260 (fw - ow), (fh - oh));
2263 #ifdef HAVE_ELEMENTARY_WAYLAND
2264 ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -(fy - sy), sw, sh);
2269 _elm_win_frame_cb_resize_show(void *data,
2270 Evas_Object *obj __UNUSED__,
2271 const char *sig __UNUSED__,
2274 ELM_WIN_DATA_GET(data, sd);
2277 if (sd->resizing) return;
2279 #ifdef HAVE_ELEMENTARY_WAYLAND
2282 if (!strcmp(source, "elm.event.resize.t"))
2283 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2284 _border_side[(0 + i) % 4].name);
2285 else if (!strcmp(source, "elm.event.resize.b"))
2286 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2287 _border_side[(2 + i) % 4].name);
2288 else if (!strcmp(source, "elm.event.resize.l"))
2289 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2290 _border_side[(1 + i) % 4].name);
2291 else if (!strcmp(source, "elm.event.resize.r"))
2292 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2293 _border_side[(3 + i) % 4].name);
2294 else if (!strcmp(source, "elm.event.resize.tl"))
2295 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2296 _border_corner[(0 + i) % 4].name);
2297 else if (!strcmp(source, "elm.event.resize.tr"))
2298 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2299 _border_corner[(3 + i) % 4].name);
2300 else if (!strcmp(source, "elm.event.resize.bl"))
2301 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2302 _border_corner[(1 + i) % 4].name);
2303 else if (!strcmp(source, "elm.event.resize.br"))
2304 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2305 _border_corner[(2 + i) % 4].name);
2307 ecore_wl_window_cursor_default_restore(sd->wl.win);
2314 _elm_win_frame_cb_resize_hide(void *data,
2315 Evas_Object *obj __UNUSED__,
2316 const char *sig __UNUSED__,
2317 const char *source __UNUSED__)
2319 ELM_WIN_DATA_GET(data, sd);
2322 if (sd->resizing) return;
2324 #ifdef HAVE_ELEMENTARY_WAYLAND
2325 ecore_wl_window_cursor_default_restore(sd->wl.win);
2330 _elm_win_frame_cb_resize_start(void *data,
2331 Evas_Object *obj __UNUSED__,
2332 const char *sig __UNUSED__,
2335 #ifdef HAVE_ELEMENTARY_WAYLAND
2336 ELM_WIN_DATA_GET(data, sd);
2340 if (sd->resizing) return;
2342 sd->resizing = EINA_TRUE;
2344 if (!strcmp(source, "elm.event.resize.t"))
2345 sd->resize_location = _border_side[(0 + i) % 4].location;
2346 else if (!strcmp(source, "elm.event.resize.b"))
2347 sd->resize_location = _border_side[(2 + i) % 4].location;
2348 else if (!strcmp(source, "elm.event.resize.l"))
2349 sd->resize_location = _border_side[(1 + i) % 4].location;
2350 else if (!strcmp(source, "elm.event.resize.r"))
2351 sd->resize_location = _border_side[(3 + i) % 4].location;
2352 else if (!strcmp(source, "elm.event.resize.tl"))
2353 sd->resize_location = _border_corner[(0 + i) % 4].location;
2354 else if (!strcmp(source, "elm.event.resize.tr"))
2355 sd->resize_location = _border_corner[(3 + i) % 4].location;
2356 else if (!strcmp(source, "elm.event.resize.bl"))
2357 sd->resize_location = _border_corner[(1 + i) % 4].location;
2358 else if (!strcmp(source, "elm.event.resize.br"))
2359 sd->resize_location = _border_corner[(2 + i) % 4].location;
2361 sd->resize_location = 0;
2363 if (sd->resize_location > 0)
2364 ecore_evas_wayland_resize(sd->ee, sd->resize_location);
2372 _elm_win_frame_cb_minimize(void *data,
2373 Evas_Object *obj __UNUSED__,
2374 const char *sig __UNUSED__,
2375 const char *source __UNUSED__)
2377 ELM_WIN_DATA_GET(data, sd);
2380 // sd->iconified = EINA_TRUE;
2381 TRAP(sd, iconified_set, EINA_TRUE);
2385 _elm_win_frame_cb_maximize(void *data,
2386 Evas_Object *obj __UNUSED__,
2387 const char *sig __UNUSED__,
2388 const char *source __UNUSED__)
2390 ELM_WIN_DATA_GET(data, sd);
2393 if (sd->maximized) sd->maximized = EINA_FALSE;
2394 else sd->maximized = EINA_TRUE;
2395 TRAP(sd, maximized_set, sd->maximized);
2399 _elm_win_frame_cb_close(void *data,
2400 Evas_Object *obj __UNUSED__,
2401 const char *sig __UNUSED__,
2402 const char *source __UNUSED__)
2404 ELM_WIN_DATA_GET(data, sd);
2407 /* FIXME: After the current freeze, this should be handled differently.
2409 * Ideally, we would want to mimic the X11 backend and use something
2410 * like ECORE_WL_EVENT_WINDOW_DELETE and handle the delete_request
2411 * inside of ecore_evas. That would be the 'proper' way, but since we are
2412 * in a freeze right now, I cannot add a new event value, or a new
2413 * event structure to ecore_wayland.
2415 * So yes, this is a temporary 'stop-gap' solution which will be fixed
2416 * when the freeze is over, but it does fix a trac bug for now, and in a
2417 * way which does not break API or the freeze. - dh
2424 int autodel = sd->autodel;
2425 sd->autodel_clear = &autodel;
2426 evas_object_ref(win);
2427 evas_object_smart_callback_call(win, SIG_DELETE_REQUEST, NULL);
2428 // FIXME: if above callback deletes - then the below will be invalid
2429 if (autodel) evas_object_del(win);
2430 else sd->autodel_clear = NULL;
2431 evas_object_unref(win);
2435 _elm_win_frame_add(Elm_Win_Smart_Data *sd,
2438 Evas_Object *obj = sd->obj;
2442 sd->frame_obj = edje_object_add(sd->evas);
2443 layer = evas_object_layer_get(obj);
2444 evas_object_layer_set(sd->frame_obj, layer + 1);
2445 if (!elm_widget_theme_object_set
2446 (sd->obj, sd->frame_obj, "border", "base", style))
2448 evas_object_del(sd->frame_obj);
2449 sd->frame_obj = NULL;
2453 sd->spacer_obj = evas_object_rectangle_add(sd->evas);
2454 evas_object_color_set(sd->spacer_obj, 0, 0, 0, 0);
2455 evas_object_repeat_events_set(sd->spacer_obj, EINA_TRUE);
2456 edje_object_part_swallow(sd->frame_obj, "elm.swallow.frame_spacer",
2459 sd->client_obj = evas_object_rectangle_add(sd->evas);
2460 evas_object_color_set(sd->client_obj, 0, 0, 0, 0);
2461 /* NB: Tried pass_events here, but that fails to send events */
2462 evas_object_repeat_events_set(sd->client_obj, EINA_TRUE);
2463 edje_object_part_swallow(sd->frame_obj, "elm.swallow.client",
2466 evas_object_is_frame_object_set(sd->frame_obj, EINA_TRUE);
2468 evas_object_event_callback_add
2469 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
2470 evas_object_event_callback_add
2471 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
2473 /* NB: Do NOT remove these calls !! Needed to calculate proper
2474 * framespace on inital show of the window */
2475 edje_object_size_min_calc(sd->frame_obj, &mw, &mh);
2476 evas_object_move(sd->frame_obj, 0, 0);
2477 evas_object_resize(sd->frame_obj, mw, mh);
2478 evas_object_smart_calculate(sd->frame_obj);
2480 edje_object_signal_callback_add
2481 (sd->frame_obj, "elm,action,move,start", "elm",
2482 _elm_win_frame_cb_move_start, obj);
2483 edje_object_signal_callback_add
2484 (sd->frame_obj, "elm,action,move,stop", "elm",
2485 _elm_win_frame_cb_move_stop, obj);
2486 edje_object_signal_callback_add
2487 (sd->frame_obj, "elm,action,resize,show", "*",
2488 _elm_win_frame_cb_resize_show, obj);
2489 edje_object_signal_callback_add
2490 (sd->frame_obj, "elm,action,resize,hide", "*",
2491 _elm_win_frame_cb_resize_hide, obj);
2492 edje_object_signal_callback_add
2493 (sd->frame_obj, "elm,action,resize,start", "*",
2494 _elm_win_frame_cb_resize_start, obj);
2495 edje_object_signal_callback_add
2496 (sd->frame_obj, "elm,action,minimize", "elm",
2497 _elm_win_frame_cb_minimize, obj);
2498 edje_object_signal_callback_add
2499 (sd->frame_obj, "elm,action,maximize", "elm",
2500 _elm_win_frame_cb_maximize, obj);
2501 edje_object_signal_callback_add
2502 (sd->frame_obj, "elm,action,close", "elm", _elm_win_frame_cb_close, obj);
2506 edje_object_part_text_escaped_set
2507 (sd->frame_obj, "elm.text.title", sd->title);
2510 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
2511 ecore_evas_resize(sd->ee, w, h);
2515 _elm_win_frame_del(Elm_Win_Smart_Data *sd)
2521 evas_object_del(sd->client_obj);
2522 sd->client_obj = NULL;
2527 evas_object_event_callback_del_full
2528 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
2529 evas_object_event_callback_del_full
2530 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
2532 edje_object_signal_callback_del
2533 (sd->frame_obj, "elm,action,move,start", "elm",
2534 _elm_win_frame_cb_move_start);
2535 edje_object_signal_callback_del
2536 (sd->frame_obj, "elm,action,move,stop", "elm",
2537 _elm_win_frame_cb_move_stop);
2538 edje_object_signal_callback_del
2539 (sd->frame_obj, "elm,action,resize,show", "*",
2540 _elm_win_frame_cb_resize_show);
2541 edje_object_signal_callback_del
2542 (sd->frame_obj, "elm,action,resize,hide", "*",
2543 _elm_win_frame_cb_resize_hide);
2544 edje_object_signal_callback_del
2545 (sd->frame_obj, "elm,action,resize,start", "*",
2546 _elm_win_frame_cb_resize_start);
2547 edje_object_signal_callback_del
2548 (sd->frame_obj, "elm,action,minimize", "elm",
2549 _elm_win_frame_cb_minimize);
2550 edje_object_signal_callback_del
2551 (sd->frame_obj, "elm,action,maximize", "elm",
2552 _elm_win_frame_cb_maximize);
2553 edje_object_signal_callback_del
2554 (sd->frame_obj, "elm,action,close", "elm",
2555 _elm_win_frame_cb_close);
2557 evas_object_del(sd->frame_obj);
2558 sd->frame_obj = NULL;
2561 evas_output_framespace_set(sd->evas, 0, 0, 0, 0);
2562 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
2563 ecore_evas_resize(sd->ee, w, h);
2568 _debug_key_down(void *data __UNUSED__,
2573 Evas_Event_Key_Down *ev = event_info;
2575 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
2578 if ((strcmp(ev->key, "F12")) ||
2579 (!evas_key_modifier_is_set(ev->modifiers, "Control")))
2582 INF("Tree graph generated.");
2583 elm_object_tree_dot_dump(obj, "./dump.dot");
2589 _win_img_hide(void *data,
2591 Evas_Object *obj __UNUSED__,
2592 void *event_info __UNUSED__)
2594 elm_widget_focus_hide_handle(data);
2598 _win_img_mouse_up(void *data,
2600 Evas_Object *obj __UNUSED__,
2603 Evas_Event_Mouse_Up *ev = event_info;
2604 if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
2605 elm_widget_focus_mouse_up_handle(data);
2609 _win_img_focus_in(void *data,
2611 Evas_Object *obj __UNUSED__,
2612 void *event_info __UNUSED__)
2614 elm_widget_focus_steal(data);
2618 _win_img_focus_out(void *data,
2620 Evas_Object *obj __UNUSED__,
2621 void *event_info __UNUSED__)
2623 elm_widget_focused_object_clear(data);
2627 _win_inlined_image_set(Elm_Win_Smart_Data *sd)
2629 evas_object_image_alpha_set(sd->img_obj, EINA_FALSE);
2630 evas_object_image_filled_set(sd->img_obj, EINA_TRUE);
2632 evas_object_event_callback_add
2633 (sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, sd->obj);
2634 evas_object_event_callback_add
2635 (sd->img_obj, EVAS_CALLBACK_HIDE, _win_img_hide, sd->obj);
2636 evas_object_event_callback_add
2637 (sd->img_obj, EVAS_CALLBACK_MOUSE_UP, _win_img_mouse_up, sd->obj);
2638 evas_object_event_callback_add
2639 (sd->img_obj, EVAS_CALLBACK_FOCUS_IN, _win_img_focus_in, sd->obj);
2640 evas_object_event_callback_add
2641 (sd->img_obj, EVAS_CALLBACK_FOCUS_OUT, _win_img_focus_out, sd->obj);
2645 _elm_win_on_icon_del(void *data,
2648 void *event_info __UNUSED__)
2650 ELM_WIN_DATA_GET(data, sd);
2652 if (sd->icon == obj) sd->icon = NULL;
2656 _elm_win_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
2658 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
2660 elm_widget_can_focus_set(obj, EINA_TRUE);
2662 elm_widget_highlight_ignore_set(obj, EINA_TRUE);
2665 #ifdef HAVE_ELEMENTARY_X
2667 _elm_x_io_err(void *data __UNUSED__)
2672 EINA_LIST_FOREACH(_elm_win_list, l, obj)
2673 evas_object_smart_callback_call(obj, SIG_IOERR, NULL);
2679 elm_win_add(Evas_Object *parent,
2683 Evas_Object *obj = eo_add_custom(MY_CLASS, parent, elm_obj_win_constructor(name, type));
2689 _elm_win_cb_hide(void *data __UNUSED__,
2691 Evas_Object *obj __UNUSED__,
2692 void *event_info __UNUSED__)
2694 _elm_win_state_eval_queue();
2698 _elm_win_cb_show(void *data __UNUSED__,
2700 Evas_Object *obj __UNUSED__,
2701 void *event_info __UNUSED__)
2703 _elm_win_state_eval_queue();
2709 * Recalculate the size of window considering its resize objects' weight and
2710 * min size. If any of its resize objects' weight equals to 0.0, window
2711 * layout's weight will be set to 0.0.
2713 * @param o box object
2714 * @param p box's private data
2715 * @param data window object
2718 _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
2722 Evas_Object_Box_Option *opt;
2723 Evas_Coord x, y, w, h;
2725 Evas_Coord minw = -1, minh = -1;
2726 double weight_x = EVAS_HINT_EXPAND;
2727 double weight_y = EVAS_HINT_EXPAND;
2729 EINA_LIST_FOREACH(p->children, l, opt)
2732 evas_object_size_hint_weight_get(child, &wx, &wy);
2733 if (wx == 0.0) weight_x = 0;
2734 if (wy == 0.0) weight_y = 0;
2736 evas_object_size_hint_min_get(child, &w, &h);
2737 if (w > minw) minw = w;
2738 if (h > minh) minh = h;
2741 evas_object_size_hint_min_set(o, minw, minh);
2742 evas_object_geometry_get(o, &x, &y, &w, &h);
2743 if (w < minw) w = minw;
2744 if (h < minh) h = minh;
2745 evas_object_resize(o, w, h);
2747 EINA_LIST_FOREACH(p->children, l, opt)
2750 evas_object_move(child, x, y);
2751 evas_object_resize(child, w, h);
2754 ELM_WIN_DATA_GET(data, sd);
2755 evas_object_size_hint_weight_set(sd->layout, weight_x, weight_y);
2756 evas_object_smart_changed(sd->layout);
2760 _win_constructor(Eo *obj, void *_pd, va_list *list)
2762 Elm_Win_Smart_Data *sd = _pd;
2763 sd->obj = obj; // in ctor
2765 const char *name = va_arg(*list, const char *);
2766 Elm_Win_Type type = va_arg(*list, Elm_Win_Type);
2767 Evas_Object *parent;
2770 const char *fontpath, *fallback = NULL;
2772 Elm_Win_Smart_Data tmp_sd;
2774 eo_do(obj, eo_parent_get(&parent));
2776 /* just to store some data while trying out to create a canvas */
2777 memset(&tmp_sd, 0, sizeof(Elm_Win_Smart_Data));
2779 #define FALLBACK_TRY(engine) \
2781 CRITICAL(engine " engine creation failed. Trying default."); \
2783 #define FALLBACK_STORE(engine) \
2786 CRITICAL(engine "Fallback to %s successful.", engine); \
2787 fallback = engine; \
2792 case ELM_WIN_INLINED_IMAGE:
2795 e = evas_object_evas_get(parent);
2800 ee = ecore_evas_ecore_evas_get(e);
2803 tmp_sd.img_obj = ecore_evas_object_image_new(ee);
2804 if (!tmp_sd.img_obj) break;
2806 tmp_sd.ee = ecore_evas_object_ecore_evas_get(tmp_sd.img_obj);
2809 evas_object_del(tmp_sd.img_obj);
2810 tmp_sd.img_obj = NULL;
2815 case ELM_WIN_SOCKET_IMAGE:
2816 tmp_sd.ee = ecore_evas_extn_socket_new(1, 1);
2820 if (ENGINE_COMPARE(ELM_SOFTWARE_X11))
2822 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2823 FALLBACK_TRY("Software X11");
2826 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2827 FALLBACK_STORE("Software FB");
2830 else if (ENGINE_COMPARE(ELM_SOFTWARE_FB))
2832 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2833 FALLBACK_TRY("Software FB");
2836 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2837 FALLBACK_STORE("Software X11");
2840 else if (ENGINE_COMPARE(ELM_OPENGL_X11))
2845 if (_elm_config->vsync)
2847 opt[opt_i] = ECORE_EVAS_GL_X11_OPT_VSYNC;
2854 tmp_sd.ee = ecore_evas_gl_x11_options_new
2855 (NULL, 0, 0, 0, 1, 1, opt);
2857 tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 1, 1);
2858 FALLBACK_TRY("OpenGL");
2861 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2862 FALLBACK_STORE("Software X11");
2865 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2866 FALLBACK_STORE("Software FB");
2870 else if (ENGINE_COMPARE(ELM_SOFTWARE_WIN32))
2872 tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
2873 FALLBACK_TRY("Software Win32");
2875 else if (ENGINE_COMPARE(ELM_SOFTWARE_PSL1GHT))
2877 tmp_sd.ee = ecore_evas_psl1ght_new(NULL, 1, 1);
2878 FALLBACK_TRY("PSL1GHT");
2880 else if (ENGINE_COMPARE(ELM_SOFTWARE_SDL))
2882 tmp_sd.ee = ecore_evas_sdl_new(NULL, 0, 0, 0, 0, 0, 1);
2883 FALLBACK_TRY("Software SDL");
2886 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2887 FALLBACK_STORE("Software X11");
2890 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2891 FALLBACK_STORE("Software FB");
2895 else if (ENGINE_COMPARE(ELM_SOFTWARE_16_SDL))
2897 tmp_sd.ee = ecore_evas_sdl16_new(NULL, 0, 0, 0, 0, 0, 1);
2898 FALLBACK_TRY("Software-16-SDL");
2901 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2902 FALLBACK_STORE("Software X11");
2905 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2906 FALLBACK_STORE("Software FB");
2910 else if (ENGINE_COMPARE(ELM_OPENGL_SDL))
2912 tmp_sd.ee = ecore_evas_gl_sdl_new(NULL, 1, 1, 0, 0);
2913 FALLBACK_TRY("OpenGL SDL");
2916 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2917 FALLBACK_STORE("Software X11");
2920 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2921 FALLBACK_STORE("Software FB");
2925 else if (ENGINE_COMPARE(ELM_OPENGL_COCOA))
2927 tmp_sd.ee = ecore_evas_cocoa_new(NULL, 1, 1, 0, 0);
2928 FALLBACK_TRY("OpenGL Cocoa");
2930 else if (ENGINE_COMPARE(ELM_BUFFER))
2932 tmp_sd.ee = ecore_evas_buffer_new(1, 1);
2934 else if (ENGINE_COMPARE(ELM_EWS))
2936 tmp_sd.ee = ecore_evas_ews_new(0, 0, 1, 1);
2938 else if (ENGINE_COMPARE(ELM_WAYLAND_SHM))
2940 tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 0);
2942 else if (ENGINE_COMPARE(ELM_WAYLAND_EGL))
2944 tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0);
2946 else if (!strncmp(ENGINE_GET(), "shot:", 5))
2948 tmp_sd.ee = ecore_evas_buffer_new(1, 1);
2949 ecore_evas_manual_render_set(tmp_sd.ee, EINA_TRUE);
2950 tmp_sd.shot.info = eina_stringshare_add
2959 ERR("Cannot create window.");
2964 eo_do(obj, eo_parent_set(ecore_evas_get(tmp_sd.ee)));
2965 eo_do_super(obj, MY_CLASS, eo_constructor());
2967 evas_obj_type_set(MY_CLASS_NAME),
2968 evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
2970 if (getenv("ELM_FIRST_FRAME"))
2971 evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
2972 _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));
2974 /* copying possibly altered fields back */
2975 #define SD_CPY(_field) \
2978 sd->_field = tmp_sd._field; \
2986 if ((trap) && (trap->add))
2987 sd->trap_data = trap->add(obj);
2989 /* complementary actions, which depend on final smart data
2991 if (type == ELM_WIN_INLINED_IMAGE)
2992 _win_inlined_image_set(sd);
2994 #ifdef HAVE_ELEMENTARY_X
2995 else if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
2996 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
2997 ENGINE_COMPARE(ELM_SOFTWARE_8_X11) ||
2998 ENGINE_COMPARE(ELM_OPENGL_X11))
3000 sd->x.client_message_handler = ecore_event_handler_add
3001 (ECORE_X_EVENT_CLIENT_MESSAGE, _elm_win_client_message, obj);
3002 sd->x.property_handler = ecore_event_handler_add
3003 (ECORE_X_EVENT_WINDOW_PROPERTY, _elm_win_property_change, obj);
3007 else if (!strncmp(ENGINE_GET(), "shot:", 5))
3010 sd->kbdmode = ELM_WIN_KEYBOARD_UNKNOWN;
3011 sd->indmode = ELM_WIN_INDICATOR_UNKNOWN;
3013 #ifdef HAVE_ELEMENTARY_X
3014 _elm_win_xwindow_get(sd);
3017 ecore_x_io_error_handler_set(_elm_x_io_err, NULL);
3021 #ifdef HAVE_ELEMENTARY_WAYLAND
3022 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
3023 sd->wl.win = ecore_evas_wayland_window_get(sd->ee);
3026 if ((_elm_config->bgpixmap)
3027 #ifdef HAVE_ELEMENTARY_X
3029 (((sd->x.xwin) && (!ecore_x_screen_is_composited(0))) ||
3034 TRAP(sd, avoid_damage_set, ECORE_EVAS_AVOID_DAMAGE_EXPOSE);
3035 // bg pixmap done by x - has other issues like can be redrawn by x before it
3036 // is filled/ready by app
3037 // TRAP(sd, avoid_damage_set, ECORE_EVAS_AVOID_DAMAGE_BUILT_IN);
3040 sd->parent = parent;
3043 evas_object_event_callback_add
3044 (sd->parent, EVAS_CALLBACK_DEL, _elm_win_on_parent_del, obj);
3046 sd->evas = ecore_evas_get(sd->ee);
3048 evas_object_color_set(obj, 0, 0, 0, 0);
3049 evas_object_move(obj, 0, 0);
3050 evas_object_resize(obj, 1, 1);
3051 evas_object_layer_set(obj, 50);
3052 evas_object_pass_events_set(obj, EINA_TRUE);
3054 if (type == ELM_WIN_INLINED_IMAGE)
3055 elm_widget_parent2_set(obj, parent);
3057 /* use own version of ecore_evas_object_associate() that does TRAP() */
3058 ecore_evas_data_set(sd->ee, "elm_win", obj);
3060 evas_object_event_callback_add
3061 (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3062 _elm_win_obj_callback_changed_size_hints, obj);
3064 evas_object_intercept_raise_callback_add
3065 (obj, _elm_win_obj_intercept_raise, obj);
3066 evas_object_intercept_lower_callback_add
3067 (obj, _elm_win_obj_intercept_lower, obj);
3068 evas_object_intercept_stack_above_callback_add
3069 (obj, _elm_win_obj_intercept_stack_above, obj);
3070 evas_object_intercept_stack_below_callback_add
3071 (obj, _elm_win_obj_intercept_stack_below, obj);
3072 evas_object_intercept_layer_set_callback_add
3073 (obj, _elm_win_obj_intercept_layer_set, obj);
3074 evas_object_intercept_show_callback_add
3075 (obj, _elm_win_obj_intercept_show, obj);
3077 TRAP(sd, name_class_set, name, _elm_appname);
3078 ecore_evas_callback_delete_request_set(sd->ee, _elm_win_delete_request);
3079 ecore_evas_callback_resize_set(sd->ee, _elm_win_resize);
3080 ecore_evas_callback_mouse_in_set(sd->ee, _elm_win_mouse_in);
3081 ecore_evas_callback_focus_in_set(sd->ee, _elm_win_focus_in);
3082 ecore_evas_callback_focus_out_set(sd->ee, _elm_win_focus_out);
3083 ecore_evas_callback_move_set(sd->ee, _elm_win_move);
3084 ecore_evas_callback_state_change_set(sd->ee, _elm_win_state_change);
3085 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _elm_win_cb_hide, NULL);
3086 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _elm_win_cb_show, NULL);
3088 evas_image_cache_set(sd->evas, (_elm_config->image_cache * 1024));
3089 evas_font_cache_set(sd->evas, (_elm_config->font_cache * 1024));
3091 EINA_LIST_FOREACH(_elm_config->font_dirs, l, fontpath)
3092 evas_font_path_append(sd->evas, fontpath);
3094 if (!_elm_config->font_hinting)
3095 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_NONE);
3096 else if (_elm_config->font_hinting == 1)
3097 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_AUTO);
3098 else if (_elm_config->font_hinting == 2)
3099 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_BYTECODE);
3101 #ifdef HAVE_ELEMENTARY_X
3102 _elm_win_xwin_update(sd);
3105 _elm_win_list = eina_list_append(_elm_win_list, obj);
3108 if (((fallback) && (!strcmp(fallback, "Software FB"))) ||
3109 ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))
3111 TRAP(sd, fullscreen_set, 1);
3113 else if ((type != ELM_WIN_INLINED_IMAGE) &&
3114 (ENGINE_COMPARE(ELM_WAYLAND_SHM) ||
3115 ENGINE_COMPARE(ELM_WAYLAND_EGL)))
3116 _elm_win_frame_add(sd, "default");
3118 if (_elm_config->focus_highlight_enable)
3119 elm_win_focus_highlight_enabled_set(obj, EINA_TRUE);
3120 if (_elm_config->focus_highlight_animate)
3121 elm_win_focus_highlight_animate_set(obj, EINA_TRUE);
3124 Evas_Modifier_Mask mask = evas_key_modifier_mask_get(sd->evas, "Control");
3125 evas_object_event_callback_add
3126 (obj, EVAS_CALLBACK_KEY_DOWN, _debug_key_down, NULL);
3128 if (evas_object_key_grab(obj, "F12", mask, 0, EINA_TRUE))
3129 INF("Ctrl+F12 key combination exclusive for dot tree generation\n");
3131 ERR("failed to grab F12 key to elm widgets (dot) tree generation");
3134 if ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_ON) ||
3135 ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_AUTO) &&
3136 (((fallback) && (!strcmp(fallback, "Software FB"))) ||
3137 ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))))
3140 Evas_Coord mw = 1, mh = 1, hx = 0, hy = 0;
3142 sd->pointer.obj = o = edje_object_add(ecore_evas_get(tmp_sd.ee));
3143 _elm_theme_object_set(obj, o, "pointer", "base", "default");
3144 edje_object_size_min_calc(o, &mw, &mh);
3145 evas_object_resize(o, mw, mh);
3146 edje_object_part_geometry_get(o, "elm.swallow.hotspot",
3147 &hx, &hy, NULL, NULL);
3148 sd->pointer.hot_x = hx;
3149 sd->pointer.hot_y = hy;
3150 evas_object_show(o);
3151 ecore_evas_object_cursor_set(tmp_sd.ee, o, EVAS_LAYER_MAX, hx, hy);
3153 else if (_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_OFF)
3158 sd->layout = edje_object_add(sd->evas);
3159 _elm_theme_object_set(obj, sd->layout, "win", "base", "default");
3160 sd->box = evas_object_box_add(sd->evas);
3161 evas_object_box_layout_set(sd->box, _window_layout_stack, obj, NULL);
3162 edje_object_part_swallow(sd->layout, "elm.swallow.contents", sd->box);
3163 evas_object_move(sd->layout, 0, 0);
3164 evas_object_resize(sd->layout, 1, 1);
3165 edje_object_update_hints_set(sd->layout, EINA_TRUE);
3166 evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3167 _elm_win_on_resize_obj_changed_size_hints, obj);
3168 evas_object_show(sd->layout);
3172 _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
3175 ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME);
3179 elm_win_util_standard_add(const char *name,
3182 Evas_Object *win, *bg;
3184 win = elm_win_add(NULL, name, ELM_WIN_BASIC);
3185 if (!win) return NULL;
3187 elm_win_title_set(win, title);
3188 bg = elm_bg_add(win);
3191 evas_object_del(win);
3194 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
3195 elm_win_resize_object_add(win, bg);
3196 evas_object_show(bg);
3202 elm_win_resize_object_add(Evas_Object *obj,
3203 Evas_Object *subobj)
3206 eo_do(obj, elm_obj_win_resize_object_add(subobj));
3210 _resize_object_add(Eo *obj, void *_pd, va_list *list)
3212 Evas_Object *subobj = va_arg(*list, Evas_Object *);
3214 Elm_Win_Smart_Data *sd = _pd;
3216 elm_widget_sub_object_add(obj, subobj);
3218 if (!evas_object_box_append(sd->box, subobj))
3219 ERR("could not append %p to box", subobj);
3223 elm_win_resize_object_del(Evas_Object *obj,
3224 Evas_Object *subobj)
3227 eo_do(obj, elm_obj_win_resize_object_del(subobj));
3231 _resize_object_del(Eo *obj, void *_pd, va_list *list)
3233 Evas_Object *subobj = va_arg(*list, Evas_Object *);
3234 Elm_Win_Smart_Data *sd = _pd;
3236 if (!elm_widget_sub_object_del(obj, subobj))
3237 ERR("could not remove sub object %p from %p", subobj, obj);
3239 evas_object_box_remove(sd->box, subobj);
3243 elm_win_title_set(Evas_Object *obj,
3247 eo_do(obj, elm_obj_win_title_set(title));
3251 _title_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3253 const char *title = va_arg(*list, const char *);
3254 Elm_Win_Smart_Data *sd = _pd;
3257 eina_stringshare_replace(&(sd->title), title);
3258 TRAP(sd, title_set, sd->title);
3260 edje_object_part_text_escaped_set
3261 (sd->frame_obj, "elm.text.title", sd->title);
3265 elm_win_title_get(const Evas_Object *obj)
3267 ELM_WIN_CHECK(obj) NULL;
3268 const char *ret = NULL;
3269 eo_do((Eo *) obj, elm_obj_win_title_get(&ret));
3274 _title_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3276 const char **ret = va_arg(*list, const char **);
3277 Elm_Win_Smart_Data *sd = _pd;
3282 elm_win_icon_name_set(Evas_Object *obj,
3283 const char *icon_name)
3286 eo_do(obj, elm_obj_win_icon_name_set(icon_name));
3290 _icon_name_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3292 const char *icon_name = va_arg(*list, const char *);
3293 Elm_Win_Smart_Data *sd = _pd;
3295 if (!icon_name) return;
3296 eina_stringshare_replace(&(sd->icon_name), icon_name);
3297 #ifdef HAVE_ELEMENTARY_X
3298 _elm_win_xwin_update(sd);
3303 elm_win_icon_name_get(const Evas_Object *obj)
3305 ELM_WIN_CHECK(obj) NULL;
3306 const char *ret = NULL;
3307 eo_do((Eo *) obj, elm_obj_win_icon_name_get(&ret));
3312 _icon_name_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3314 const char **ret = va_arg(*list, const char **);
3315 Elm_Win_Smart_Data *sd = _pd;
3316 *ret = sd->icon_name;
3320 elm_win_role_set(Evas_Object *obj, const char *role)
3323 eo_do(obj, elm_obj_win_role_set(role));
3327 _role_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3329 const char *role = va_arg(*list, const char *);
3330 Elm_Win_Smart_Data *sd = _pd;
3333 eina_stringshare_replace(&(sd->role), role);
3334 #ifdef HAVE_ELEMENTARY_X
3335 _elm_win_xwin_update(sd);
3340 elm_win_role_get(const Evas_Object *obj)
3342 ELM_WIN_CHECK(obj) NULL;
3343 const char *ret = NULL;
3344 eo_do((Eo *) obj, elm_obj_win_role_get(&ret));
3349 _role_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3351 const char **ret = va_arg(*list, const char **);
3352 Elm_Win_Smart_Data *sd = _pd;
3357 elm_win_icon_object_set(Evas_Object *obj,
3361 eo_do(obj, elm_obj_win_icon_object_set(icon));
3365 _icon_object_set(Eo *obj, void *_pd, va_list *list)
3367 Evas_Object *icon = va_arg(*list, Evas_Object *);
3368 Elm_Win_Smart_Data *sd = _pd;
3371 evas_object_event_callback_del_full
3372 (sd->icon, EVAS_CALLBACK_DEL, _elm_win_on_icon_del, obj);
3375 evas_object_event_callback_add
3376 (sd->icon, EVAS_CALLBACK_DEL, _elm_win_on_icon_del, obj);
3377 #ifdef HAVE_ELEMENTARY_X
3378 _elm_win_xwin_update(sd);
3382 EAPI const Evas_Object *
3383 elm_win_icon_object_get(const Evas_Object *obj)
3385 ELM_WIN_CHECK(obj) NULL;
3386 const Evas_Object *ret = NULL;
3387 eo_do((Eo *) obj, elm_obj_win_icon_object_get(&ret));
3392 _icon_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3394 const Evas_Object **ret = va_arg(*list, const Evas_Object **);
3395 Elm_Win_Smart_Data *sd = _pd;
3400 elm_win_autodel_set(Evas_Object *obj,
3404 eo_do(obj, elm_obj_win_autodel_set(autodel));
3408 _autodel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3410 Eina_Bool autodel = va_arg(*list, int);
3411 Elm_Win_Smart_Data *sd = _pd;
3412 sd->autodel = autodel;
3416 elm_win_autodel_get(const Evas_Object *obj)
3418 ELM_WIN_CHECK(obj) EINA_FALSE;
3419 Eina_Bool ret = EINA_FALSE;
3420 eo_do((Eo *) obj, elm_obj_win_autodel_get(&ret));
3425 _autodel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3427 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3428 Elm_Win_Smart_Data *sd = _pd;
3433 elm_win_activate(Evas_Object *obj)
3436 eo_do(obj, elm_obj_win_activate());
3440 _activate(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3442 Elm_Win_Smart_Data *sd = _pd;
3447 elm_win_lower(Evas_Object *obj)
3450 eo_do(obj, elm_obj_win_lower());
3454 _lower(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3456 Elm_Win_Smart_Data *sd = _pd;
3461 elm_win_raise(Evas_Object *obj)
3464 eo_do(obj, elm_obj_win_raise());
3468 _raise(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3470 Elm_Win_Smart_Data *sd = _pd;
3475 elm_win_center(Evas_Object *obj,
3480 eo_do(obj, elm_obj_win_center(h, v));
3484 _center(Eo *obj, void *_pd, va_list *list)
3486 Eina_Bool h = va_arg(*list, int);
3487 Eina_Bool v = va_arg(*list, int);
3488 int win_w, win_h, screen_w, screen_h, nx, ny;
3490 Elm_Win_Smart_Data *sd = _pd;
3492 if ((trap) && (trap->center) && (!trap->center(sd->trap_data, obj)))
3495 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &screen_w, &screen_h);
3496 if ((!screen_w) || (!screen_h)) return;
3498 evas_object_geometry_get(obj, NULL, NULL, &win_w, &win_h);
3499 if ((!win_w) || (!win_h)) return;
3501 if (h) nx = win_w >= screen_w ? 0 : (screen_w / 2) - (win_w / 2);
3502 else nx = sd->screen.x;
3503 if (v) ny = win_h >= screen_h ? 0 : (screen_h / 2) - (win_h / 2);
3504 else ny = sd->screen.y;
3508 evas_object_move(obj, nx, ny);
3512 elm_win_borderless_set(Evas_Object *obj,
3513 Eina_Bool borderless)
3516 eo_do(obj, elm_obj_win_borderless_set(borderless));
3520 _borderless_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3522 Eina_Bool borderless = va_arg(*list, int);
3523 Elm_Win_Smart_Data *sd = _pd;
3527 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3528 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3529 _elm_win_frame_del(sd);
3533 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3534 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3535 _elm_win_frame_add(sd, "default");
3538 evas_object_show(sd->frame_obj);
3541 TRAP(sd, borderless_set, borderless);
3542 #ifdef HAVE_ELEMENTARY_X
3543 _elm_win_xwin_update(sd);
3548 elm_win_borderless_get(const Evas_Object *obj)
3550 ELM_WIN_CHECK(obj) EINA_FALSE;
3551 Eina_Bool ret = EINA_FALSE;
3552 eo_do((Eo *) obj, elm_obj_win_borderless_get(&ret));
3557 _borderless_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3559 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3560 Elm_Win_Smart_Data *sd = _pd;
3561 *ret = ecore_evas_borderless_get(sd->ee);
3565 elm_win_shaped_set(Evas_Object *obj,
3569 eo_do(obj, elm_obj_win_shaped_set(shaped));
3573 _shaped_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3575 Eina_Bool shaped = va_arg(*list, int);
3576 Elm_Win_Smart_Data *sd = _pd;
3578 TRAP(sd, shaped_set, shaped);
3579 #ifdef HAVE_ELEMENTARY_X
3580 _elm_win_xwin_update(sd);
3585 elm_win_shaped_get(const Evas_Object *obj)
3587 ELM_WIN_CHECK(obj) EINA_FALSE;
3588 Eina_Bool ret = EINA_FALSE;
3589 eo_do((Eo *) obj, elm_obj_win_shaped_get(&ret));
3594 _shaped_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3596 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3597 Elm_Win_Smart_Data *sd = _pd;
3598 *ret = ecore_evas_shaped_get(sd->ee);
3602 elm_win_alpha_set(Evas_Object *obj,
3606 eo_do(obj, elm_obj_win_alpha_set(enabled));
3610 _alpha_set(Eo *obj, void *_pd, va_list *list)
3612 Eina_Bool enabled = va_arg(*list, int);
3613 Elm_Win_Smart_Data *sd = _pd;
3617 evas_object_image_alpha_set(sd->img_obj, enabled);
3618 ecore_evas_alpha_set(sd->ee, enabled);
3622 #ifdef HAVE_ELEMENTARY_X
3627 if (!ecore_x_screen_is_composited(0))
3628 elm_win_shaped_set(obj, enabled);
3630 TRAP(sd, alpha_set, enabled);
3633 TRAP(sd, alpha_set, enabled);
3634 _elm_win_xwin_update(sd);
3638 TRAP(sd, alpha_set, enabled);
3643 elm_win_alpha_get(const Evas_Object *obj)
3645 ELM_WIN_CHECK(obj) EINA_FALSE;
3646 Eina_Bool ret = EINA_FALSE;
3647 eo_do((Eo *) obj, elm_obj_win_alpha_get(&ret));
3652 _alpha_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3654 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3655 Elm_Win_Smart_Data *sd = _pd;
3659 *ret = evas_object_image_alpha_get(sd->img_obj);
3663 *ret = ecore_evas_alpha_get(sd->ee);
3668 elm_win_override_set(Evas_Object *obj,
3672 eo_do(obj, elm_obj_win_override_set(override));
3676 _override_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3678 Eina_Bool override = va_arg(*list, int);
3679 Elm_Win_Smart_Data *sd = _pd;
3681 TRAP(sd, override_set, override);
3682 #ifdef HAVE_ELEMENTARY_X
3683 _elm_win_xwin_update(sd);
3688 elm_win_override_get(const Evas_Object *obj)
3690 ELM_WIN_CHECK(obj) EINA_FALSE;
3691 Eina_Bool ret = EINA_FALSE;
3692 eo_do((Eo *) obj, elm_obj_win_override_get(&ret));
3697 _override_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3699 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3700 Elm_Win_Smart_Data *sd = _pd;
3701 *ret = ecore_evas_override_get(sd->ee);
3705 elm_win_fullscreen_set(Evas_Object *obj,
3706 Eina_Bool fullscreen)
3709 eo_do(obj, elm_obj_win_fullscreen_set(fullscreen));
3713 _fullscreen_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3715 Eina_Bool fullscreen = va_arg(*list, int);
3716 Elm_Win_Smart_Data *sd = _pd;
3717 // YYY: handle if sd->img_obj
3718 if (ENGINE_COMPARE(ELM_SOFTWARE_FB) ||
3719 ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE))
3721 // these engines... can ONLY be fullscreen
3726 // sd->fullscreen = fullscreen;
3728 TRAP(sd, fullscreen_set, fullscreen);
3732 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3733 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3734 _elm_win_frame_del(sd);
3738 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3739 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3740 _elm_win_frame_add(sd, "default");
3743 evas_object_show(sd->frame_obj);
3745 #ifdef HAVE_ELEMENTARY_X
3746 _elm_win_xwin_update(sd);
3752 elm_win_fullscreen_get(const Evas_Object *obj)
3754 ELM_WIN_CHECK(obj) EINA_FALSE;
3755 Eina_Bool ret = EINA_FALSE;
3756 eo_do((Eo *) obj, elm_obj_win_fullscreen_get(&ret));
3761 _fullscreen_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3763 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3764 Elm_Win_Smart_Data *sd = _pd;
3766 if (EE_ENGINE_COMPARE(sd->ee, ELM_SOFTWARE_FB) ||
3767 EE_ENGINE_COMPARE(sd->ee, ELM_SOFTWARE_16_WINCE))
3769 // these engines... can ONLY be fullscreen
3774 *ret = sd->fullscreen;
3779 elm_win_main_menu_get(const Evas_Object *obj)
3781 ELM_WIN_CHECK(obj) NULL;
3783 eo_do((Eo *) obj, elm_obj_win_main_menu_get(&ret));
3788 _dbus_menu_set(Eina_Bool dbus_connect, void *data)
3790 ELM_WIN_DATA_GET_OR_RETURN(data, sd);
3794 DBG("Setting menu to D-Bus");
3795 edje_object_part_unswallow(sd->layout, sd->main_menu);
3796 edje_object_signal_emit(sd->layout, "elm,action,hide_menu", "elm");
3797 _elm_menu_menu_bar_hide(sd->main_menu);
3801 DBG("Setting menu to local mode");
3802 edje_object_part_swallow(sd->layout, "elm.swallow.menu", sd->main_menu);
3803 edje_object_signal_emit(sd->layout, "elm,action,show_menu", "elm");
3804 evas_object_show(sd->main_menu);
3809 _main_menu_get(Eo *obj, void *_pd, va_list *list)
3811 Eo **ret = va_arg(*list, Eo **);
3812 Elm_Win_Smart_Data *sd = _pd;
3813 Eina_Bool use_dbus = EINA_FALSE;
3815 if (sd->main_menu) goto end;
3817 sd->main_menu = elm_menu_add(obj);
3818 _elm_menu_menu_bar_set(sd->main_menu, EINA_TRUE);
3820 #ifdef HAVE_ELEMENTARY_X
3821 if (!_elm_config->disable_external_menu && sd->x.xwin) use_dbus = EINA_TRUE;
3824 #ifdef HAVE_ELEMENTARY_X
3825 if (use_dbus && _elm_dbus_menu_register(sd->main_menu))
3827 _elm_dbus_menu_app_menu_register(sd->x.xwin, sd->main_menu,
3828 _dbus_menu_set, obj);
3832 _dbus_menu_set(EINA_FALSE, obj);
3835 *ret = sd->main_menu;
3839 elm_win_maximized_set(Evas_Object *obj,
3840 Eina_Bool maximized)
3843 eo_do(obj, elm_obj_win_maximized_set(maximized));
3847 _maximized_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3849 Eina_Bool maximized = va_arg(*list, int);
3850 Elm_Win_Smart_Data *sd = _pd;
3852 // sd->maximized = maximized;
3853 // YYY: handle if sd->img_obj
3854 TRAP(sd, maximized_set, maximized);
3855 #ifdef HAVE_ELEMENTARY_X
3856 _elm_win_xwin_update(sd);
3861 elm_win_maximized_get(const Evas_Object *obj)
3863 ELM_WIN_CHECK(obj) EINA_FALSE;
3864 Eina_Bool ret = EINA_FALSE;
3865 eo_do((Eo *) obj, elm_obj_win_maximized_get(&ret));
3870 _maximized_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3872 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3873 Elm_Win_Smart_Data *sd = _pd;
3874 *ret = sd->maximized;
3878 elm_win_iconified_set(Evas_Object *obj,
3879 Eina_Bool iconified)
3882 eo_do(obj, elm_obj_win_iconified_set(iconified));
3886 _iconified_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3888 Eina_Bool iconified = va_arg(*list, int);
3889 Elm_Win_Smart_Data *sd = _pd;
3891 // sd->iconified = iconified;
3892 TRAP(sd, iconified_set, iconified);
3893 #ifdef HAVE_ELEMENTARY_X
3894 _elm_win_xwin_update(sd);
3899 elm_win_iconified_get(const Evas_Object *obj)
3901 ELM_WIN_CHECK(obj) EINA_FALSE;
3902 Eina_Bool ret = EINA_FALSE;
3903 eo_do((Eo *) obj, elm_obj_win_iconified_get(&ret));
3908 _iconified_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3910 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3911 Elm_Win_Smart_Data *sd = _pd;
3912 *ret = sd->iconified;
3916 elm_win_withdrawn_set(Evas_Object *obj,
3917 Eina_Bool withdrawn)
3920 eo_do(obj, elm_obj_win_withdrawn_set(withdrawn));
3924 _withdrawn_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3926 Eina_Bool withdrawn = va_arg(*list, int);
3927 Elm_Win_Smart_Data *sd = _pd;
3929 // sd->withdrawn = withdrawn;
3930 TRAP(sd, withdrawn_set, withdrawn);
3931 #ifdef HAVE_ELEMENTARY_X
3932 _elm_win_xwin_update(sd);
3937 elm_win_withdrawn_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_withdrawn_get(&ret));
3946 _withdrawn_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->withdrawn;
3954 elm_win_available_profiles_set(Evas_Object *obj,
3955 const char **profiles,
3959 eo_do((Eo *) obj, elm_obj_win_available_profiles_set(profiles, count));
3963 _available_profiles_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3965 const char **profiles = va_arg(*list, const char **);
3966 unsigned int count = va_arg(*list, unsigned int);
3967 Elm_Win_Smart_Data *sd = _pd;
3968 Eina_Bool found = EINA_FALSE;
3970 _elm_win_available_profiles_del(sd);
3971 if ((profiles) && (count >= 1))
3973 sd->profile.available_list = calloc(count, sizeof(char *));
3974 if (sd->profile.available_list)
3976 if (!sd->profile.name) found = EINA_TRUE;
3979 for (i = 0; i < count; i++)
3981 sd->profile.available_list[i] = eina_stringshare_add(profiles[i]);
3983 /* check to see if a given array has a current profile of elm_win */
3984 if ((sd->profile.name) &&
3985 (!strcmp(sd->profile.name, profiles[i])))
3990 sd->profile.count = count;
3994 if (ecore_evas_window_profile_supported_get(sd->ee))
3996 ecore_evas_window_available_profiles_set(sd->ee,
3997 sd->profile.available_list,
4000 /* current profile of elm_win is wrong, change profile */
4001 if ((sd->profile.available_list) && (!found))
4003 eina_stringshare_replace(&(sd->profile.name),
4004 sd->profile.available_list[0]);
4005 ecore_evas_window_profile_set(sd->ee, sd->profile.name);
4011 if (sd->profile.available_list)
4012 _elm_win_profile_update(sd);
4017 elm_win_available_profiles_get(Evas_Object *obj,
4019 unsigned int *count)
4021 ELM_WIN_CHECK(obj) EINA_FALSE;
4022 Eina_Bool ret = EINA_FALSE;
4023 eo_do((Eo *) obj, elm_obj_win_available_profiles_get(&ret, profiles, count));
4028 _available_profiles_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4030 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4031 char ***profiles = va_arg(*list, char ***);
4032 unsigned int *count = va_arg(*list, unsigned int *);
4033 Elm_Win_Smart_Data *sd = _pd;
4036 if (ecore_evas_window_profile_supported_get(sd->ee))
4038 res = ecore_evas_window_available_profiles_get(sd->ee,
4044 if (profiles) *profiles = (char **)sd->profile.available_list;
4045 if (count) *count = sd->profile.count;
4052 elm_win_profile_set(Evas_Object *obj,
4053 const char *profile)
4056 eo_do((Eo *) obj, elm_obj_win_profile_set(profile));
4060 _profile_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4062 const char *profile = va_arg(*list, const char *);
4063 Elm_Win_Smart_Data *sd = _pd;
4065 /* check to see if a given profile is present in an available profiles */
4066 if ((profile) && (sd->profile.available_list))
4068 Eina_Bool found = EINA_FALSE;
4070 for (i = 0; i < sd->profile.count; i++)
4072 if (!strcmp(profile,
4073 sd->profile.available_list[i]))
4082 if (ecore_evas_window_profile_supported_get(sd->ee))
4084 if (!profile) _elm_win_profile_del(sd);
4085 ecore_evas_window_profile_set(sd->ee, profile);
4089 if (_elm_win_profile_set(sd, profile))
4090 _elm_win_profile_update(sd);
4095 elm_win_profile_get(const Evas_Object *obj)
4097 ELM_WIN_CHECK(obj) NULL;
4098 const char *ret = NULL;
4099 eo_do((Eo *) obj, elm_obj_win_profile_get(&ret));
4104 _profile_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4106 const char **ret = va_arg(*list, const char **);
4107 Elm_Win_Smart_Data *sd = _pd;
4108 *ret = sd->profile.name;
4112 elm_win_urgent_set(Evas_Object *obj,
4116 eo_do(obj, elm_obj_win_urgent_set(urgent));
4120 _urgent_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4122 Eina_Bool urgent = va_arg(*list, int);
4123 Elm_Win_Smart_Data *sd = _pd;
4125 sd->urgent = urgent;
4126 TRAP(sd, urgent_set, urgent);
4127 #ifdef HAVE_ELEMENTARY_X
4128 _elm_win_xwin_update(sd);
4133 elm_win_urgent_get(const Evas_Object *obj)
4135 ELM_WIN_CHECK(obj) EINA_FALSE;
4136 Eina_Bool ret = EINA_FALSE;
4137 eo_do((Eo *) obj, elm_obj_win_urgent_get(&ret));
4142 _urgent_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4144 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4145 Elm_Win_Smart_Data *sd = _pd;
4150 elm_win_demand_attention_set(Evas_Object *obj,
4151 Eina_Bool demand_attention)
4154 eo_do(obj, elm_obj_win_demand_attention_set(demand_attention));
4158 _demand_attention_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4160 Eina_Bool demand_attention = va_arg(*list, int);
4161 Elm_Win_Smart_Data *sd = _pd;
4163 sd->demand_attention = demand_attention;
4164 TRAP(sd, demand_attention_set, demand_attention);
4165 #ifdef HAVE_ELEMENTARY_X
4166 _elm_win_xwin_update(sd);
4171 elm_win_demand_attention_get(const Evas_Object *obj)
4173 ELM_WIN_CHECK(obj) EINA_FALSE;
4174 Eina_Bool ret = EINA_FALSE;
4175 eo_do((Eo *) obj, elm_obj_win_demand_attention_get(&ret));
4180 _demand_attention_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4182 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4183 Elm_Win_Smart_Data *sd = _pd;
4184 *ret = sd->demand_attention;
4188 elm_win_modal_set(Evas_Object *obj,
4192 eo_do(obj, elm_obj_win_modal_set(modal));
4196 _modal_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4198 Eina_Bool modal = va_arg(*list, int);
4199 Elm_Win_Smart_Data *sd = _pd;
4202 TRAP(sd, modal_set, modal);
4203 #ifdef HAVE_ELEMENTARY_X
4204 _elm_win_xwin_update(sd);
4209 elm_win_modal_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_modal_get(&ret));
4218 _modal_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_aspect_set(Evas_Object *obj,
4230 eo_do(obj, elm_obj_win_aspect_set(aspect));
4234 _aspect_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4236 double aspect = va_arg(*list, double);
4237 Elm_Win_Smart_Data *sd = _pd;
4239 sd->aspect = aspect;
4240 TRAP(sd, aspect_set, aspect);
4241 #ifdef HAVE_ELEMENTARY_X
4242 _elm_win_xwin_update(sd);
4247 elm_win_aspect_get(const Evas_Object *obj)
4249 ELM_WIN_CHECK(obj) 0.0;
4251 eo_do((Eo *) obj, elm_obj_win_aspect_get(&ret));
4256 _aspect_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4258 double *ret = va_arg(*list, double *);
4259 Elm_Win_Smart_Data *sd = _pd;
4264 elm_win_size_base_set(Evas_Object *obj, int w, int h)
4267 eo_do(obj, elm_obj_win_size_base_set(w, h));
4271 _size_base_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4273 int w = va_arg(*list, int);
4274 int h = va_arg(*list, int);
4275 Elm_Win_Smart_Data *sd = _pd;
4276 sd->size_base_w = w;
4277 sd->size_base_h = h;
4278 TRAP(sd, size_base_set, w, h);
4279 #ifdef HAVE_ELEMENTARY_X
4280 _elm_win_xwin_update(sd);
4285 elm_win_size_base_get(Evas_Object *obj, int *w, int *h)
4288 eo_do(obj, elm_obj_win_size_base_get(w, h));
4292 _size_base_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4294 int *w = va_arg(*list, int *);
4295 int *h = va_arg(*list, int *);
4297 Elm_Win_Smart_Data *sd = _pd;
4298 if (w) *w = sd->size_base_w;
4299 if (w) *h = sd->size_base_h;
4303 elm_win_size_step_set(Evas_Object *obj, int w, int h)
4306 eo_do(obj, elm_obj_win_size_step_set(w, h));
4310 _size_step_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4312 int w = va_arg(*list, int);
4313 int h = va_arg(*list, int);
4314 Elm_Win_Smart_Data *sd = _pd;
4315 sd->size_step_w = w;
4316 sd->size_step_h = h;
4317 TRAP(sd, size_step_set, w, h);
4318 #ifdef HAVE_ELEMENTARY_X
4319 _elm_win_xwin_update(sd);
4324 elm_win_size_step_get(Evas_Object *obj, int *w, int *h)
4327 eo_do(obj, elm_obj_win_size_step_get(w, h));
4331 _size_step_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4333 int *w = va_arg(*list, int *);
4334 int *h = va_arg(*list, int *);
4335 Elm_Win_Smart_Data *sd = _pd;
4336 if (w) *w = sd->size_step_w;
4337 if (w) *h = sd->size_step_h;
4341 elm_win_layer_set(Evas_Object *obj,
4345 eo_do(obj, elm_obj_win_layer_set(layer));
4349 _layer_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4351 int layer = va_arg(*list, int);
4352 Elm_Win_Smart_Data *sd = _pd;
4354 TRAP(sd, layer_set, layer);
4355 #ifdef HAVE_ELEMENTARY_X
4356 _elm_win_xwin_update(sd);
4361 elm_win_layer_get(const Evas_Object *obj)
4363 ELM_WIN_CHECK(obj) - 1;
4365 eo_do((Eo *) obj, elm_obj_win_layer_get(&ret));
4370 _layer_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4372 int *ret = va_arg(*list, int *);
4373 Elm_Win_Smart_Data *sd = _pd;
4374 *ret = ecore_evas_layer_get(sd->ee);
4378 elm_win_norender_push(Evas_Object *obj)
4381 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4384 if (sd->norender == 1) ecore_evas_manual_render_set(sd->ee, EINA_TRUE);
4388 elm_win_norender_pop(Evas_Object *obj)
4391 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4393 if (sd->norender <= 0) return;
4395 if (sd->norender == 0) ecore_evas_manual_render_set(sd->ee, EINA_FALSE);
4399 elm_win_norender_get(Evas_Object *obj)
4401 ELM_WIN_CHECK(obj) - 1;
4402 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, -1);
4403 return sd->norender;
4407 elm_win_render(Evas_Object *obj)
4410 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4411 ecore_evas_manual_render(sd->ee);
4415 _win_rotation_degree_check(int rotation)
4417 if ((rotation > 360) || (rotation < 0))
4419 WRN("Rotation degree should be 0 ~ 360 (passed degree: %d)", rotation);
4421 if (rotation < 0) rotation += 360;
4427 elm_win_rotation_set(Evas_Object *obj,
4431 eo_do(obj, elm_obj_win_rotation_set(rotation));
4435 _win_rotate(Evas_Object *obj, Elm_Win_Smart_Data *sd, int rotation, Eina_Bool resize)
4437 rotation = _win_rotation_degree_check(rotation);
4438 if (sd->rot == rotation) return;
4440 if (resize) TRAP(sd, rotation_with_resize_set, rotation);
4441 else TRAP(sd, rotation_set, rotation);
4442 evas_object_size_hint_min_set(obj, -1, -1);
4443 evas_object_size_hint_max_set(obj, -1, -1);
4444 _elm_win_resize_objects_eval(obj);
4445 #ifdef HAVE_ELEMENTARY_X
4446 _elm_win_xwin_update(sd);
4448 elm_widget_orientation_set(obj, rotation);
4449 evas_object_smart_callback_call(obj, SIG_ROTATION_CHANGED, NULL);
4453 _rotation_set(Eo *obj, void *_pd, va_list *list)
4455 int rotation = va_arg(*list, int);
4456 Elm_Win_Smart_Data *sd = _pd;
4457 _win_rotate(obj, sd, rotation, EINA_FALSE);
4461 elm_win_rotation_with_resize_set(Evas_Object *obj,
4465 eo_do(obj, elm_obj_win_rotation_with_resize_set(rotation));
4469 _rotation_with_resize_set(Eo *obj, void *_pd, va_list *list)
4471 int rotation = va_arg(*list, int);
4472 Elm_Win_Smart_Data *sd = _pd;
4473 _win_rotate(obj, sd, rotation, EINA_TRUE);
4477 elm_win_rotation_get(const Evas_Object *obj)
4479 ELM_WIN_CHECK(obj) - 1;
4481 eo_do((Eo *) obj, elm_obj_win_rotation_get(&ret));
4486 _rotation_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4488 int *ret = va_arg(*list, int *);
4489 Elm_Win_Smart_Data *sd = _pd;
4494 elm_win_sticky_set(Evas_Object *obj,
4498 eo_do(obj, elm_obj_win_sticky_set(sticky));
4502 _sticky_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4504 Eina_Bool sticky = va_arg(*list, int);
4505 Elm_Win_Smart_Data *sd = _pd;
4507 // sd->sticky = sticky;
4508 TRAP(sd, sticky_set, sticky);
4509 #ifdef HAVE_ELEMENTARY_X
4510 _elm_win_xwin_update(sd);
4515 elm_win_sticky_get(const Evas_Object *obj)
4517 ELM_WIN_CHECK(obj) EINA_FALSE;
4518 Eina_Bool ret = EINA_FALSE;
4519 eo_do((Eo *) obj, elm_obj_win_sticky_get(&ret));
4524 _sticky_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4526 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4527 Elm_Win_Smart_Data *sd = _pd;
4532 elm_win_keyboard_mode_set(Evas_Object *obj,
4533 Elm_Win_Keyboard_Mode mode)
4536 eo_do(obj, elm_obj_win_keyboard_mode_set(mode));
4540 _keyboard_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4542 Elm_Win_Keyboard_Mode mode = va_arg(*list, Elm_Win_Keyboard_Mode);
4543 Elm_Win_Smart_Data *sd = _pd;
4545 if (mode == sd->kbdmode) return;
4546 #ifdef HAVE_ELEMENTARY_X
4547 _elm_win_xwindow_get(sd);
4550 #ifdef HAVE_ELEMENTARY_X
4552 ecore_x_e_virtual_keyboard_state_set
4553 (sd->x.xwin, (Ecore_X_Virtual_Keyboard_State)sd->kbdmode);
4557 EAPI Elm_Win_Keyboard_Mode
4558 elm_win_keyboard_mode_get(const Evas_Object *obj)
4560 ELM_WIN_CHECK(obj) ELM_WIN_KEYBOARD_UNKNOWN;
4561 Elm_Win_Keyboard_Mode ret = ELM_WIN_KEYBOARD_UNKNOWN;
4562 eo_do((Eo *) obj, elm_obj_win_keyboard_mode_get(&ret));
4567 _keyboard_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4569 Elm_Win_Keyboard_Mode *ret = va_arg(*list, Elm_Win_Keyboard_Mode *);
4570 Elm_Win_Smart_Data *sd = _pd;
4575 elm_win_keyboard_win_set(Evas_Object *obj,
4576 Eina_Bool is_keyboard)
4579 eo_do(obj, elm_obj_win_keyboard_win_set(is_keyboard));
4583 _keyboard_win_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4585 Eina_Bool is_keyboard = va_arg(*list, int);
4586 Elm_Win_Smart_Data *sd = _pd;
4588 #ifdef HAVE_ELEMENTARY_X
4589 _elm_win_xwindow_get(sd);
4591 ecore_x_e_virtual_keyboard_set(sd->x.xwin, is_keyboard);
4598 elm_win_keyboard_win_get(const Evas_Object *obj)
4600 ELM_WIN_CHECK(obj) EINA_FALSE;
4601 Eina_Bool ret = EINA_FALSE;
4602 eo_do((Eo *) obj, elm_obj_win_keyboard_win_get(&ret));
4607 _keyboard_win_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4609 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4610 Elm_Win_Smart_Data *sd = _pd;
4612 #ifdef HAVE_ELEMENTARY_X
4613 _elm_win_xwindow_get(sd);
4616 *ret = ecore_x_e_virtual_keyboard_get(sd->x.xwin);
4624 elm_win_indicator_mode_set(Evas_Object *obj,
4625 Elm_Win_Indicator_Mode mode)
4628 eo_do(obj, elm_obj_win_indicator_mode_set(mode));
4632 _indicator_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4634 Elm_Win_Indicator_Mode mode = va_arg(*list, Elm_Win_Indicator_Mode);
4635 Elm_Win_Smart_Data *sd = _pd;
4637 if (mode == sd->indmode) return;
4638 #ifdef HAVE_ELEMENTARY_X
4639 _elm_win_xwindow_get(sd);
4642 #ifdef HAVE_ELEMENTARY_X
4645 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
4646 ecore_x_e_illume_indicator_state_set
4647 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
4648 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
4649 ecore_x_e_illume_indicator_state_set
4650 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
4653 evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
4656 EAPI Elm_Win_Indicator_Mode
4657 elm_win_indicator_mode_get(const Evas_Object *obj)
4659 ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_UNKNOWN;
4660 Elm_Win_Indicator_Mode ret = ELM_WIN_INDICATOR_UNKNOWN;
4661 eo_do((Eo *) obj, elm_obj_win_indicator_mode_get(&ret));
4666 _indicator_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4668 Elm_Win_Indicator_Mode *ret = va_arg(*list, Elm_Win_Indicator_Mode *);
4669 Elm_Win_Smart_Data *sd = _pd;
4674 elm_win_indicator_opacity_set(Evas_Object *obj,
4675 Elm_Win_Indicator_Opacity_Mode mode)
4678 eo_do(obj, elm_obj_win_indicator_opacity_set(mode));
4682 _indicator_opacity_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4684 Elm_Win_Indicator_Opacity_Mode mode = va_arg(*list, Elm_Win_Indicator_Opacity_Mode);
4685 Elm_Win_Smart_Data *sd = _pd;
4687 if (mode == sd->ind_o_mode) return;
4688 sd->ind_o_mode = mode;
4689 #ifdef HAVE_ELEMENTARY_X
4690 _elm_win_xwindow_get(sd);
4693 if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
4694 ecore_x_e_illume_indicator_opacity_set
4695 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_OPAQUE);
4696 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSLUCENT)
4697 ecore_x_e_illume_indicator_opacity_set
4698 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
4699 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
4700 ecore_x_e_illume_indicator_opacity_set
4701 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
4704 evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
4707 EAPI Elm_Win_Indicator_Opacity_Mode
4708 elm_win_indicator_opacity_get(const Evas_Object *obj)
4710 ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
4711 Elm_Win_Indicator_Opacity_Mode ret = ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
4712 eo_do((Eo *) obj, elm_obj_win_indicator_opacity_get(&ret));
4717 _indicator_opacity_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4719 Elm_Win_Indicator_Opacity_Mode *ret = va_arg(*list, Elm_Win_Indicator_Opacity_Mode *);
4720 Elm_Win_Smart_Data *sd = _pd;
4721 *ret = sd->ind_o_mode;
4725 elm_win_screen_position_get(const Evas_Object *obj,
4730 eo_do((Eo *) obj, elm_obj_win_screen_position_get(x, y));
4734 _screen_position_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4736 int *x = va_arg(*list, int *);
4737 int *y = va_arg(*list, int *);
4738 Elm_Win_Smart_Data *sd = _pd;
4740 if (x) *x = sd->screen.x;
4741 if (y) *y = sd->screen.y;
4745 elm_win_focus_get(const Evas_Object *obj)
4747 ELM_WIN_CHECK(obj) EINA_FALSE;
4748 Eina_Bool ret = EINA_FALSE;
4749 eo_do((Eo *) obj, elm_obj_win_focus_get(&ret));
4754 _focus_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4756 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4757 Elm_Win_Smart_Data *sd = _pd;
4758 *ret = ecore_evas_focus_get(sd->ee);
4762 elm_win_screen_constrain_set(Evas_Object *obj,
4763 Eina_Bool constrain)
4766 eo_do(obj, elm_obj_win_screen_constrain_set(constrain));
4770 _screen_constrain_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4772 Eina_Bool constrain = va_arg(*list, int);
4773 Elm_Win_Smart_Data *sd = _pd;
4774 sd->constrain = !!constrain;
4778 elm_win_screen_constrain_get(Evas_Object *obj)
4780 ELM_WIN_CHECK(obj) EINA_FALSE;
4781 Eina_Bool ret = EINA_FALSE;
4782 eo_do(obj, elm_obj_win_screen_constrain_get(&ret));
4787 _screen_constrain_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4789 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4790 Elm_Win_Smart_Data *sd = _pd;
4791 *ret = sd->constrain;
4795 elm_win_screen_size_get(const Evas_Object *obj,
4802 eo_do((Eo *) obj, elm_obj_win_screen_size_get(x, y, w, h));
4806 _screen_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4808 int *x = va_arg(*list, int *);
4809 int *y = va_arg(*list, int *);
4810 int *w = va_arg(*list, int *);
4811 int *h = va_arg(*list, int *);
4812 Elm_Win_Smart_Data *sd = _pd;
4814 ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
4818 elm_win_screen_dpi_get(const Evas_Object *obj,
4823 eo_do((Eo *) obj, elm_obj_win_screen_dpi_get(xdpi, ydpi));
4827 _screen_dpi_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4829 int *xdpi = va_arg(*list, int *);
4830 int *ydpi = va_arg(*list, int *);
4831 Elm_Win_Smart_Data *sd = _pd;
4833 ecore_evas_screen_dpi_get(sd->ee, xdpi, ydpi);
4837 elm_win_conformant_set(Evas_Object *obj,
4838 Eina_Bool conformant)
4841 eo_do(obj, elm_obj_win_conformant_set(conformant));
4845 _conformant_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4847 Eina_Bool conformant = va_arg(*list, int);
4848 Elm_Win_Smart_Data *sd = _pd;
4850 #ifdef HAVE_ELEMENTARY_X
4851 _elm_win_xwindow_get(sd);
4853 ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
4860 elm_win_conformant_get(const Evas_Object *obj)
4862 ELM_WIN_CHECK(obj) EINA_FALSE;
4863 Eina_Bool ret = EINA_FALSE;
4864 eo_do((Eo *) obj, elm_obj_win_conformant_get(&ret));
4869 _conformant_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4871 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4872 Elm_Win_Smart_Data *sd = _pd;
4875 #ifdef HAVE_ELEMENTARY_X
4876 _elm_win_xwindow_get(sd);
4878 *ret = ecore_x_e_illume_conformant_get(sd->x.xwin);
4883 elm_win_quickpanel_set(Evas_Object *obj,
4884 Eina_Bool quickpanel)
4887 eo_do(obj, elm_obj_win_quickpanel_set(quickpanel));
4891 _quickpanel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4893 Eina_Bool quickpanel = va_arg(*list, int);
4894 Elm_Win_Smart_Data *sd = _pd;
4895 #ifdef HAVE_ELEMENTARY_X
4896 _elm_win_xwindow_get(sd);
4899 ecore_x_e_illume_quickpanel_set(sd->x.xwin, quickpanel);
4902 Ecore_X_Window_State states[2];
4904 states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
4905 states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
4906 ecore_x_netwm_window_state_set(sd->x.xwin, states, 2);
4907 ecore_x_icccm_hints_set(sd->x.xwin, 0, 0, 0, 0, 0, 0, 0);
4916 elm_win_quickpanel_get(const Evas_Object *obj)
4918 ELM_WIN_CHECK(obj) EINA_FALSE;
4919 Eina_Bool ret = EINA_FALSE;
4920 eo_do((Eo *) obj, elm_obj_win_quickpanel_get(&ret));
4925 _quickpanel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4927 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4928 Elm_Win_Smart_Data *sd = _pd;
4931 #ifdef HAVE_ELEMENTARY_X
4932 _elm_win_xwindow_get(sd);
4934 *ret = ecore_x_e_illume_quickpanel_get(sd->x.xwin);
4939 elm_win_quickpanel_priority_major_set(Evas_Object *obj,
4943 eo_do(obj, elm_obj_win_quickpanel_priority_major_set(priority));
4947 _quickpanel_priority_major_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4949 int priority = va_arg(*list, int);
4950 Elm_Win_Smart_Data *sd = _pd;
4952 #ifdef HAVE_ELEMENTARY_X
4953 _elm_win_xwindow_get(sd);
4955 ecore_x_e_illume_quickpanel_priority_major_set(sd->x.xwin, priority);
4962 elm_win_quickpanel_priority_major_get(const Evas_Object *obj)
4964 ELM_WIN_CHECK(obj) - 1;
4966 eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_major_get(&ret));
4971 _quickpanel_priority_major_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4973 int *ret = va_arg(*list, int *);
4974 Elm_Win_Smart_Data *sd = _pd;
4977 #ifdef HAVE_ELEMENTARY_X
4978 _elm_win_xwindow_get(sd);
4980 *ret = ecore_x_e_illume_quickpanel_priority_major_get(sd->x.xwin);
4985 elm_win_quickpanel_priority_minor_set(Evas_Object *obj,
4989 eo_do(obj, elm_obj_win_quickpanel_priority_minor_set(priority));
4993 _quickpanel_priority_minor_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4995 int priority = va_arg(*list, int);
4996 Elm_Win_Smart_Data *sd = _pd;
4998 #ifdef HAVE_ELEMENTARY_X
4999 _elm_win_xwindow_get(sd);
5001 ecore_x_e_illume_quickpanel_priority_minor_set(sd->x.xwin, priority);
5008 elm_win_quickpanel_priority_minor_get(const Evas_Object *obj)
5010 ELM_WIN_CHECK(obj) - 1;
5012 eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_minor_get(&ret));
5017 _quickpanel_priority_minor_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5019 int *ret = va_arg(*list, int *);
5020 Elm_Win_Smart_Data *sd = _pd;
5023 #ifdef HAVE_ELEMENTARY_X
5024 _elm_win_xwindow_get(sd);
5026 *ret = ecore_x_e_illume_quickpanel_priority_minor_get(sd->x.xwin);
5031 elm_win_quickpanel_zone_set(Evas_Object *obj,
5035 eo_do(obj, elm_obj_win_quickpanel_zone_set(zone));
5039 _quickpanel_zone_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5041 int zone = va_arg(*list, int);
5042 Elm_Win_Smart_Data *sd = _pd;
5044 #ifdef HAVE_ELEMENTARY_X
5045 _elm_win_xwindow_get(sd);
5047 ecore_x_e_illume_quickpanel_zone_set(sd->x.xwin, zone);
5054 elm_win_quickpanel_zone_get(const Evas_Object *obj)
5056 ELM_WIN_CHECK(obj) 0;
5058 eo_do((Eo *) obj, elm_obj_win_quickpanel_zone_get(&ret));
5063 _quickpanel_zone_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5065 int *ret = va_arg(*list, int *);
5066 Elm_Win_Smart_Data *sd = _pd;
5069 #ifdef HAVE_ELEMENTARY_X
5070 _elm_win_xwindow_get(sd);
5072 *ret = ecore_x_e_illume_quickpanel_zone_get(sd->x.xwin);
5077 elm_win_prop_focus_skip_set(Evas_Object *obj,
5081 eo_do(obj, elm_obj_win_prop_focus_skip_set(skip));
5085 _prop_focus_skip_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5087 Eina_Bool skip = va_arg(*list, int);
5088 Elm_Win_Smart_Data *sd = _pd;
5090 sd->skip_focus = skip;
5091 TRAP(sd, focus_skip_set, skip);
5095 elm_win_illume_command_send(Evas_Object *obj,
5096 Elm_Illume_Command command,
5100 eo_do(obj, elm_obj_win_illume_command_send(command, params));
5104 _illume_command_send(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5106 Elm_Illume_Command command = va_arg(*list, Elm_Illume_Command);
5107 void *params = va_arg(*list, void *);
5109 Elm_Win_Smart_Data *sd = _pd;
5111 #ifdef HAVE_ELEMENTARY_X
5112 _elm_win_xwindow_get(sd);
5117 case ELM_ILLUME_COMMAND_FOCUS_BACK:
5118 ecore_x_e_illume_focus_back_send(sd->x.xwin);
5121 case ELM_ILLUME_COMMAND_FOCUS_FORWARD:
5122 ecore_x_e_illume_focus_forward_send(sd->x.xwin);
5125 case ELM_ILLUME_COMMAND_FOCUS_HOME:
5126 ecore_x_e_illume_focus_home_send(sd->x.xwin);
5129 case ELM_ILLUME_COMMAND_CLOSE:
5130 ecore_x_e_illume_close_send(sd->x.xwin);
5143 elm_win_inlined_image_object_get(Evas_Object *obj)
5145 ELM_WIN_CHECK(obj) NULL;
5146 Evas_Object *ret = NULL;
5147 eo_do(obj, elm_obj_win_inlined_image_object_get(&ret));
5152 _inlined_image_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5154 Evas_Object **ret = va_arg(*list, Evas_Object **);
5155 Elm_Win_Smart_Data *sd = _pd;
5160 elm_win_focus_highlight_enabled_set(Evas_Object *obj,
5164 eo_do(obj, elm_obj_win_focus_highlight_enabled_set(enabled));
5168 _focus_highlight_enabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5170 Eina_Bool enabled = va_arg(*list, int);
5171 Elm_Win_Smart_Data *sd = _pd;
5173 enabled = !!enabled;
5174 if (sd->focus_highlight.enabled == enabled)
5177 sd->focus_highlight.enabled = enabled;
5179 if (sd->focus_highlight.enabled)
5180 _elm_win_focus_highlight_init(sd);
5182 _elm_win_focus_highlight_shutdown(sd);
5186 elm_win_focus_highlight_enabled_get(const Evas_Object *obj)
5188 ELM_WIN_CHECK(obj) EINA_FALSE;
5189 Eina_Bool ret = EINA_FALSE;
5190 eo_do((Eo *) obj, elm_obj_win_focus_highlight_enabled_get(&ret));
5195 _focus_highlight_enabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5197 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5198 Elm_Win_Smart_Data *sd = _pd;
5199 *ret = sd->focus_highlight.enabled;
5203 elm_win_focus_highlight_style_set(Evas_Object *obj,
5207 eo_do(obj, elm_obj_win_focus_highlight_style_set(style));
5211 _focus_highlight_style_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5213 const char *style = va_arg(*list, const char *);
5214 Elm_Win_Smart_Data *sd = _pd;
5216 eina_stringshare_replace(&sd->focus_highlight.style, style);
5217 sd->focus_highlight.theme_changed = EINA_TRUE;
5218 _elm_win_focus_highlight_reconfigure_job_start(sd);
5222 elm_win_focus_highlight_style_get(const Evas_Object *obj)
5224 ELM_WIN_CHECK(obj) NULL;
5225 const char *ret = NULL;
5226 eo_do((Eo *) obj, elm_obj_win_focus_highlight_style_get(&ret));
5231 _focus_highlight_style_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5233 const char **ret = va_arg(*list, const char **);
5234 Elm_Win_Smart_Data *sd = _pd;
5235 *ret = sd->focus_highlight.style;
5239 elm_win_focus_highlight_animate_set(Evas_Object *obj,
5243 eo_do(obj, elm_obj_win_focus_highlight_animate_set(animate));
5247 _focus_highlight_animate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5249 Eina_Bool animate = va_arg(*list, int);
5250 Elm_Win_Smart_Data *sd = _pd;
5252 animate = !!animate;
5253 if (sd->focus_highlight.animate == animate)
5256 sd->focus_highlight.animate = animate;
5257 sd->focus_highlight.theme_changed = EINA_TRUE;
5258 _elm_win_focus_highlight_reconfigure_job_start(sd);
5262 elm_win_focus_highlight_animate_get(const Evas_Object *obj)
5264 ELM_WIN_CHECK(obj) EINA_FALSE;
5265 Eina_Bool ret = EINA_FALSE;
5266 eo_do((Eo *) obj, elm_obj_win_focus_highlight_animate_get(&ret));
5271 _focus_highlight_animate_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5273 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5274 Elm_Win_Smart_Data *sd = _pd;
5275 *ret = sd->focus_highlight.animate;
5279 elm_win_socket_listen(Evas_Object *obj,
5280 const char *svcname,
5284 ELM_WIN_CHECK(obj) EINA_FALSE;
5285 Eina_Bool ret = EINA_FALSE;
5286 eo_do(obj, elm_obj_win_socket_listen(svcname, svcnum, svcsys, &ret));
5291 _socket_listen(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5293 const char *svcname = va_arg(*list, const char *);
5294 int svcnum = va_arg(*list, int);
5295 Eina_Bool svcsys = va_arg(*list, int);
5296 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5297 Elm_Win_Smart_Data *sd = _pd;
5300 if (!sd->ee) return;
5302 if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys))
5308 /* windowing specific calls - shall we do this differently? */
5311 elm_win_xwindow_get(const Evas_Object *obj)
5315 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
5317 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5318 return _elm_ee_xwin_get(ee);
5321 ELM_WIN_CHECK(obj) 0;
5322 Ecore_X_Window ret = 0;
5323 eo_do((Eo *) obj, elm_obj_win_xwindow_get(&ret));
5328 _xwindow_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5330 Ecore_X_Window *ret = va_arg(*list, Ecore_X_Window *);
5331 Elm_Win_Smart_Data *sd = _pd;
5333 #ifdef HAVE_ELEMENTARY_X
5341 *ret = elm_win_xwindow_get(sd->parent);
5348 EAPI Ecore_Wl_Window *
5349 elm_win_wl_window_get(const Evas_Object *obj)
5351 if (!obj) return NULL;
5353 if ((!ENGINE_COMPARE(ELM_WAYLAND_SHM)) &&
5354 (!ENGINE_COMPARE(ELM_WAYLAND_EGL)))
5357 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
5359 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5360 return ecore_evas_wayland_window_get(ee);
5363 ELM_WIN_CHECK(obj) NULL;
5364 Ecore_Wl_Window *ret = NULL;
5365 eo_do((Eo *) obj, elm_obj_win_wl_window_get(&ret));
5370 _wl_window_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
5372 Ecore_Wl_Window **ret = va_arg(*list, Ecore_Wl_Window **);
5373 #if HAVE_ELEMENTARY_WAYLAND
5374 Elm_Win_Smart_Data *sd = _pd;
5382 *ret = elm_win_wl_window_get(sd->parent);
5390 elm_win_trap_set(const Elm_Win_Trap *t)
5392 DBG("old %p, new %p", trap, t);
5394 if ((t) && (t->version != ELM_WIN_TRAP_VERSION))
5396 CRITICAL("trying to set a trap version %lu while %lu was expected!",
5397 t->version, ELM_WIN_TRAP_VERSION);
5406 elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
5409 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
5411 if (floating == sd->floating) return;
5412 sd->floating = floating;
5413 #ifdef HAVE_ELEMENTARY_X
5414 _elm_win_xwindow_get(sd);
5418 ecore_x_e_illume_window_state_set
5419 (sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_FLOATING);
5421 ecore_x_e_illume_window_state_set
5422 (sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_NORMAL);
5428 elm_win_floating_mode_get(const Evas_Object *obj)
5430 ELM_WIN_CHECK(obj) EINA_FALSE;
5431 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
5433 return sd->floating;
5437 _window_id_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
5439 Ecore_Window *ret = va_arg(*list, Ecore_Window *);
5440 Elm_Win_Smart_Data *sd = _pd;
5442 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
5444 #if HAVE_ELEMENTARY_WAYLAND
5447 *ret = (Ecore_Window)sd->wl.win->surface_id;
5452 Ecore_Wl_Window *parent;
5454 parent = elm_win_wl_window_get(sd->parent);
5455 if (parent) *ret = (Ecore_Window)parent->surface_id;
5462 #ifdef HAVE_ELEMENTARY_X
5463 _elm_win_xwindow_get(sd);
5466 *ret = (Ecore_Window)sd->x.xwin;
5471 *ret = (Ecore_Window)elm_win_xwindow_get(sd->parent);
5481 elm_win_window_id_get(const Evas_Object *obj)
5485 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
5487 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5488 return ecore_evas_window_get(ee);
5491 ELM_WIN_CHECK(obj) 0;
5492 Ecore_Window ret = 0;
5493 eo_do((Eo *) obj, elm_obj_win_window_id_get(&ret));
5498 _class_constructor(Eo_Class *klass)
5500 const Eo_Op_Func_Description func_desc[] = {
5501 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
5502 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_win_smart_add),
5503 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_win_smart_del),
5504 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_win_smart_resize),
5505 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_win_smart_move),
5506 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_SHOW), _elm_win_smart_show),
5507 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_HIDE), _elm_win_smart_hide),
5509 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_win_smart_on_focus),
5510 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_win_smart_event),
5511 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_win_smart_focus_next_manager_is),
5512 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_win_smart_focus_next),
5513 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_win_smart_focus_direction_manager_is),
5514 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION), _elm_win_smart_focus_direction),
5516 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR), _win_constructor),
5517 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD), _resize_object_add),
5518 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL), _resize_object_del),
5519 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_SET), _title_set),
5520 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_GET), _title_get),
5521 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET), _icon_name_set),
5522 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET), _icon_name_get),
5523 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_SET), _role_set),
5524 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_GET), _role_get),
5525 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET), _icon_object_set),
5526 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET), _icon_object_get),
5527 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET), _autodel_set),
5528 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET), _autodel_get),
5529 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ACTIVATE), _activate),
5530 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LOWER), _lower),
5531 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RAISE), _raise),
5532 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CENTER), _center),
5533 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET), _borderless_set),
5534 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET), _borderless_get),
5535 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_SET), _shaped_set),
5536 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_GET), _shaped_get),
5537 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_SET), _alpha_set),
5538 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_GET), _alpha_get),
5539 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET), _override_set),
5540 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET), _override_get),
5541 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET), _fullscreen_set),
5542 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET), _fullscreen_get),
5543 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET), _main_menu_get),
5544 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET), _maximized_set),
5545 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET), _maximized_get),
5546 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET), _iconified_set),
5547 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET), _iconified_get),
5548 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET), _withdrawn_set),
5549 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET), _withdrawn_get),
5550 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET), _available_profiles_set),
5551 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET), _available_profiles_get),
5552 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_SET), _profile_set),
5553 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_GET), _profile_get),
5554 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_SET), _urgent_set),
5555 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_GET), _urgent_get),
5556 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET), _demand_attention_set),
5557 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET), _demand_attention_get),
5558 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_SET), _modal_set),
5559 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_GET), _modal_get),
5560 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_SET), _aspect_set),
5561 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_GET), _aspect_get),
5562 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET), _size_base_set),
5563 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET), _size_base_get),
5564 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET), _size_step_set),
5565 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET), _size_step_get),
5566 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_SET), _layer_set),
5567 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_GET), _layer_get),
5568 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_SET), _rotation_set),
5569 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET), _rotation_with_resize_set),
5570 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_GET), _rotation_get),
5571 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_SET), _sticky_set),
5572 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_GET), _sticky_get),
5573 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET), _keyboard_mode_set),
5574 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET), _keyboard_mode_get),
5575 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET), _keyboard_win_set),
5576 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET), _keyboard_win_get),
5577 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET), _indicator_mode_set),
5578 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET), _indicator_mode_get),
5579 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET), _indicator_opacity_set),
5580 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET), _indicator_opacity_get),
5581 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET), _screen_position_get),
5582 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_GET), _focus_get),
5583 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET), _screen_constrain_set),
5584 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET), _screen_constrain_get),
5585 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET), _screen_size_get),
5586 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET), _screen_dpi_get),
5587 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET), _conformant_set),
5588 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET), _conformant_get),
5589 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET), _quickpanel_set),
5590 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET), _quickpanel_get),
5591 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET), _quickpanel_priority_major_set),
5592 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET), _quickpanel_priority_major_get),
5593 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET), _quickpanel_priority_minor_set),
5594 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET), _quickpanel_priority_minor_get),
5595 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET), _quickpanel_zone_set),
5596 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET), _quickpanel_zone_get),
5597 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET), _prop_focus_skip_set),
5598 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND), _illume_command_send),
5599 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET), _inlined_image_object_get),
5600 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET), _focus_highlight_enabled_set),
5601 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET), _focus_highlight_enabled_get),
5602 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET), _focus_highlight_style_set),
5603 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET), _focus_highlight_style_get),
5604 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET), _focus_highlight_animate_set),
5605 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET), _focus_highlight_animate_get),
5606 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN), _socket_listen),
5607 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET), _xwindow_get),
5608 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET), _wl_window_get),
5609 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET), _window_id_get),
5613 eo_class_funcs_set(klass, func_desc);
5615 evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
5618 static const Eo_Op_Description op_desc[] = {
5619 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR, "Adds a window object."),
5620 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD, "Add subobj as a resize object of window obj."),
5621 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL, "Delete subobj as a resize object of window obj."),
5622 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_SET, "Set the title of the window."),
5623 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_GET, "Get the title of the window."),
5624 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET, "Set the icon name of the window."),
5625 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET, "Get the icon name of the window."),
5626 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_SET, "Set the role of the window."),
5627 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_GET, "Get the role of the window."),
5628 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET, "Set a window object's icon."),
5629 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET, "Get the icon object used for the window."),
5630 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET, "Set the window's autodel state."),
5631 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET, "Get the window's autodel state."),
5632 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ACTIVATE, "Activate a window object."),
5633 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LOWER, "Lower a window object."),
5634 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RAISE, "Raise a window object."),
5635 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CENTER, "Center a window on its screen."),
5636 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET, "Set the borderless state of a window."),
5637 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET, "Get the borderless state of a window."),
5638 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_SET, "Set the shaped state of a window."),
5639 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_GET, "Get the shaped state of a window."),
5640 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_SET, "Set the alpha channel state of a window."),
5641 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_GET, "Get the alpha channel state of a window."),
5642 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET, "Set the override state of a window."),
5643 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET, "Get the override state of a window."),
5644 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET, "Set the fullscreen state of a window."),
5645 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET, "Get the fullscreen state of a window."),
5646 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET, "Get the Main Menu of a window."),
5647 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET, "Set the maximized state of a window."),
5648 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET, "Get the maximized state of a window."),
5649 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET, "Set the iconified state of a window."),
5650 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET, "Get the iconified state of a window."),
5651 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET, "Set the withdrawn state of a window."),
5652 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET, "Get the withdrawn state of a window."),
5653 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET, "Set the array of available profiles to a window."),
5654 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET, "Get the array of available profiles of a window."),
5655 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_SET, "Set the profile of a window."),
5656 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_GET, "Get the profile of a window."),
5657 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_SET, "Set the urgent state of a window."),
5658 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_GET, "Get the urgent state of a window."),
5659 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET, "Set the demand_attention state of a window."),
5660 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET, "Get the demand_attention state of a window."),
5661 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_SET, "Set the modal state of a window."),
5662 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_GET, "Get the modal state of a window."),
5663 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_SET, "Set the aspect ratio of a window."),
5664 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_GET, "Get the aspect ratio of a window."),
5665 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET, "Set the base window size used with stepping calculation."),
5666 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET, "Get the base size of a window."),
5667 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET, "Set the window stepping used with sizing calculation."),
5668 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET, "Get the stepping of a window."),
5669 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_SET, "Set the layer of the window."),
5670 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_GET, "Get the layer of the window."),
5671 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_SET, "Set the rotation of the window."),
5672 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET, "Rotates the window and resizes it."),
5673 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_GET, "Get the rotation of the window."),
5674 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_SET, "Set the sticky state of the window."),
5675 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_GET, "Get the sticky state of the window."),
5676 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET, "Sets the keyboard mode of the window."),
5677 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET, "Get the keyboard mode of the window."),
5678 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET, "Sets whether the window is a keyboard."),
5679 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET, "Get whether the window is a keyboard."),
5680 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET, "Sets the indicator mode of the window."),
5681 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET, "Get the indicator mode of the window."),
5682 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET, "Sets the indicator opacity mode of the window."),
5683 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET, "Get the indicator opacity mode of the window."),
5684 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET, "Get the screen position of a window."),
5685 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_GET, "Determine whether a window has focus."),
5686 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."),
5687 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."),
5688 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET, "Get screen geometry details for the screen that a window is on."),
5689 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET, "Get screen dpi for the screen that a window is on."),
5690 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET, "Set if this window is an illume conformant window."),
5691 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET, "Get if this window is an illume conformant window."),
5692 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET, "Set a window to be an illume quickpanel window."),
5693 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET, "Get if this window is a quickpanel or not."),
5694 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET, "Set the major priority of a quickpanel window."),
5695 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET, "Get the major priority of a quickpanel window."),
5696 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET, "Set the minor priority of a quickpanel window."),
5697 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET, "Get the minor priority of a quickpanel window."),
5698 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET, "Set which zone this quickpanel should appear in."),
5699 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET, "Get which zone this quickpanel should appear in."),
5700 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET, "Set the window to be skipped by keyboard focus."),
5701 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND, "Send a command to the windowing environment."),
5702 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET, "Get the inlined image object handle."),
5703 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET, "Set the enabled status for the focus highlight in a window."),
5704 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET, "Get the enabled value of the focus highlight for this window."),
5705 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET, "Set the style for the focus highlight on this window."),
5706 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET, "Get the style set for the focus highlight object."),
5707 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET, "Set the animate status for the focus highlight for this window."),
5708 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET, "Get the animate status for the focus highlight for this window."),
5709 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN, "Create a socket to provide the service for Plug widget."),
5710 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET, "Get the Ecore_X_Window of an Evas_Object."),
5711 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET, "Get the Ecore_Wl_Window of an Evas_Object."),
5712 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET, "Get the Ecore_Window of an Evas_Object."),
5713 EO_OP_DESCRIPTION_SENTINEL
5716 static const Eo_Class_Description class_desc = {
5719 EO_CLASS_TYPE_REGULAR,
5720 EO_CLASS_DESCRIPTION_OPS(&ELM_OBJ_WIN_BASE_ID, op_desc, ELM_OBJ_WIN_SUB_ID_LAST),
5722 sizeof(Elm_Win_Smart_Data),
5727 EO_DEFINE_CLASS(elm_obj_win_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, NULL);