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_highlight_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_DATA_GET_OR_RETURN(obj, wd);
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_DATA_GET_OR_RETURN(obj, wd);
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 *src = va_arg(*list, Evas_Object *);
1156 Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
1157 Evas_Event_Key_Down *ev = va_arg(*list, void *);
1158 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1160 if (ret) *ret = EINA_FALSE;
1163 if (elm_widget_disabled_get(obj)) return;
1164 if (type != EVAS_CALLBACK_KEY_DOWN) return;
1166 if ((!strcmp(ev->key, "Tab")) ||
1167 (!strcmp(ev->key, "ISO_Left_Tab")))
1169 if (evas_key_modifier_is_set(ev->modifiers, "Control") ||
1170 evas_key_modifier_is_set(ev->modifiers, "Alt"))
1172 if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
1173 elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
1175 elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
1179 else if ((!strcmp(ev->key, "Left")) ||
1180 ((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
1182 elm_widget_focus_cycle(obj, ELM_FOCUS_LEFT);
1186 else if ((!strcmp(ev->key, "Right")) ||
1187 ((!strcmp(ev->key, "KP_Right")) && (!ev->string)))
1189 elm_widget_focus_cycle(obj, ELM_FOCUS_RIGHT);
1193 else if ((!strcmp(ev->key, "Up")) ||
1194 ((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
1196 elm_widget_focus_cycle(obj, ELM_FOCUS_UP);
1200 else if ((!strcmp(ev->key, "Down")) ||
1201 ((!strcmp(ev->key, "KP_Down")) && (!ev->string)))
1203 elm_widget_focus_cycle(obj, ELM_FOCUS_DOWN);
1211 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1212 if (ret) *ret = EINA_TRUE;
1216 _deferred_ecore_evas_free(void *data)
1218 ecore_evas_free(data);
1219 _elm_win_deferred_free--;
1223 _elm_win_smart_show(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1225 Elm_Win_Smart_Data *sd = _pd;
1227 if (!evas_object_visible_get(obj))
1228 _elm_win_state_eval_queue();
1229 eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
1233 if (sd->shot.info) _shot_handle(sd);
1237 _elm_win_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1239 Elm_Win_Smart_Data *sd = _pd;
1241 if (evas_object_visible_get(obj))
1242 _elm_win_state_eval_queue();
1243 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
1249 evas_object_hide(sd->frame_obj);
1253 evas_object_hide(sd->img_obj);
1255 if (sd->pointer.obj)
1257 evas_object_hide(sd->pointer.obj);
1258 ecore_evas_hide(sd->pointer.ee);
1263 _elm_win_on_parent_del(void *data,
1266 void *event_info __UNUSED__)
1268 ELM_WIN_DATA_GET(data, sd);
1270 if (obj == sd->parent) sd->parent = NULL;
1274 _elm_win_focus_target_move(void *data,
1276 Evas_Object *obj __UNUSED__,
1277 void *event_info __UNUSED__)
1279 ELM_WIN_DATA_GET(data, sd);
1281 sd->focus_highlight.geometry_changed = EINA_TRUE;
1282 _elm_win_focus_highlight_reconfigure_job_start(sd);
1286 _elm_win_focus_target_resize(void *data,
1288 Evas_Object *obj __UNUSED__,
1289 void *event_info __UNUSED__)
1291 ELM_WIN_DATA_GET(data, sd);
1293 sd->focus_highlight.geometry_changed = EINA_TRUE;
1294 _elm_win_focus_highlight_reconfigure_job_start(sd);
1298 _elm_win_focus_target_del(void *data,
1300 Evas_Object *obj __UNUSED__,
1301 void *event_info __UNUSED__)
1303 ELM_WIN_DATA_GET(data, sd);
1305 sd->focus_highlight.cur.target = NULL;
1307 _elm_win_focus_highlight_reconfigure_job_start(sd);
1310 static Evas_Object *
1311 _elm_win_focus_target_get(Evas_Object *obj)
1313 Evas_Object *o = obj;
1317 if (elm_widget_is(o))
1319 if (!elm_widget_highlight_ignore_get(o))
1321 o = elm_widget_parent_get(o);
1323 o = evas_object_smart_parent_get(o);
1327 o = elm_widget_parent_widget_get(o);
1329 o = evas_object_smart_parent_get(o);
1338 _elm_win_focus_target_callbacks_add(Elm_Win_Smart_Data *sd)
1340 Evas_Object *obj = sd->focus_highlight.cur.target;
1343 evas_object_event_callback_add
1344 (obj, EVAS_CALLBACK_MOVE, _elm_win_focus_target_move, sd->obj);
1345 evas_object_event_callback_add
1346 (obj, EVAS_CALLBACK_RESIZE, _elm_win_focus_target_resize, sd->obj);
1347 evas_object_event_callback_add
1348 (obj, EVAS_CALLBACK_DEL, _elm_win_focus_target_del, sd->obj);
1352 _elm_win_focus_target_callbacks_del(Elm_Win_Smart_Data *sd)
1354 Evas_Object *obj = sd->focus_highlight.cur.target;
1356 evas_object_event_callback_del_full
1357 (obj, EVAS_CALLBACK_MOVE, _elm_win_focus_target_move, sd->obj);
1358 evas_object_event_callback_del_full
1359 (obj, EVAS_CALLBACK_RESIZE, _elm_win_focus_target_resize, sd->obj);
1360 evas_object_event_callback_del_full
1361 (obj, EVAS_CALLBACK_DEL, _elm_win_focus_target_del, sd->obj);
1365 _elm_win_object_focus_in(void *data,
1369 Evas_Object *obj = event_info, *target;
1370 ELM_WIN_DATA_GET(data, sd);
1372 if (sd->focus_highlight.cur.target == obj)
1375 target = _elm_win_focus_target_get(obj);
1376 sd->focus_highlight.cur.target = target;
1377 if (elm_widget_highlight_in_theme_get(target))
1378 sd->focus_highlight.cur.handled = EINA_TRUE;
1380 _elm_win_focus_target_callbacks_add(sd);
1382 _elm_win_focus_highlight_reconfigure_job_start(sd);
1386 _elm_win_object_focus_out(void *data,
1388 void *event_info __UNUSED__)
1390 ELM_WIN_DATA_GET(data, sd);
1392 if (!sd->focus_highlight.cur.target)
1395 if (!sd->focus_highlight.cur.handled)
1396 _elm_win_focus_target_callbacks_del(sd);
1398 sd->focus_highlight.cur.target = NULL;
1399 sd->focus_highlight.cur.handled = EINA_FALSE;
1401 _elm_win_focus_highlight_reconfigure_job_start(sd);
1405 _elm_win_focus_highlight_shutdown(Elm_Win_Smart_Data *sd)
1407 _elm_win_focus_highlight_reconfigure_job_stop(sd);
1408 if (sd->focus_highlight.cur.target)
1410 elm_widget_signal_emit(sd->focus_highlight.cur.target,
1411 "elm,action,focus_highlight,hide", "elm");
1412 _elm_win_focus_target_callbacks_del(sd);
1413 sd->focus_highlight.cur.target = NULL;
1415 ELM_SAFE_FREE(sd->focus_highlight.fobj, evas_object_del);
1417 evas_event_callback_del_full
1418 (sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
1419 _elm_win_object_focus_in, sd->obj);
1420 evas_event_callback_del_full
1421 (sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
1422 _elm_win_object_focus_out, sd->obj);
1426 _elm_win_on_img_obj_del(void *data,
1428 Evas_Object *obj __UNUSED__,
1429 void *event_info __UNUSED__)
1431 ELM_WIN_DATA_GET(data, sd);
1436 _elm_win_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1438 Elm_Win_Smart_Data *sd = _pd;
1440 evas_object_event_callback_del_full(sd->layout,
1441 EVAS_CALLBACK_CHANGED_SIZE_HINTS,
1442 _elm_win_on_resize_obj_changed_size_hints,
1444 evas_object_del(sd->box);
1445 evas_object_del(sd->layout);
1447 /* NB: child deletion handled by parent's smart del */
1449 if ((trap) && (trap->del))
1450 trap->del(sd->trap_data, obj);
1454 evas_object_event_callback_del_full
1455 (sd->parent, EVAS_CALLBACK_DEL, _elm_win_on_parent_del, obj);
1459 if (sd->autodel_clear) *(sd->autodel_clear) = -1;
1461 _elm_win_list = eina_list_remove(_elm_win_list, obj);
1463 _elm_win_state_eval_queue();
1467 ecore_evas_callback_delete_request_set(sd->ee, NULL);
1468 ecore_evas_callback_resize_set(sd->ee, NULL);
1471 if (sd->deferred_resize_job) ecore_job_del(sd->deferred_resize_job);
1472 if (sd->deferred_child_eval_job) ecore_job_del(sd->deferred_child_eval_job);
1473 if (sd->shot.info) eina_stringshare_del(sd->shot.info);
1474 if (sd->shot.timer) ecore_timer_del(sd->shot.timer);
1476 #ifdef HAVE_ELEMENTARY_X
1477 if (sd->x.client_message_handler)
1478 ecore_event_handler_del(sd->x.client_message_handler);
1479 if (sd->x.property_handler)
1480 ecore_event_handler_del(sd->x.property_handler);
1485 evas_object_event_callback_del_full
1486 (sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, obj);
1493 ecore_job_add(_deferred_ecore_evas_free, sd->ee);
1494 _elm_win_deferred_free++;
1498 _elm_win_focus_highlight_shutdown(sd);
1499 eina_stringshare_del(sd->focus_highlight.style);
1501 if (sd->title) eina_stringshare_del(sd->title);
1502 if (sd->icon_name) eina_stringshare_del(sd->icon_name);
1503 if (sd->role) eina_stringshare_del(sd->role);
1504 if (sd->icon) evas_object_del(sd->icon);
1506 if (sd->main_menu) evas_object_del(sd->main_menu);
1508 _elm_win_profile_del(sd);
1509 _elm_win_available_profiles_del(sd);
1511 /* Don't let callback in the air that point to sd */
1512 ecore_evas_callback_delete_request_set(sd->ee, NULL);
1513 ecore_evas_callback_resize_set(sd->ee, NULL);
1514 ecore_evas_callback_mouse_in_set(sd->ee, NULL);
1515 ecore_evas_callback_focus_in_set(sd->ee, NULL);
1516 ecore_evas_callback_focus_out_set(sd->ee, NULL);
1517 ecore_evas_callback_move_set(sd->ee, NULL);
1518 ecore_evas_callback_state_change_set(sd->ee, NULL);
1520 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
1522 if ((!_elm_win_list) &&
1523 (elm_policy_get(ELM_POLICY_QUIT) == ELM_POLICY_QUIT_LAST_WINDOW_CLOSED))
1525 edje_file_cache_flush();
1526 edje_collection_cache_flush();
1527 evas_image_cache_flush(evas_object_evas_get(obj));
1528 evas_font_cache_flush(evas_object_evas_get(obj));
1534 _elm_win_obj_intercept_show(void *data,
1537 ELM_WIN_DATA_GET(data, sd);
1539 // this is called to make sure all smart containers have calculated their
1540 // sizes BEFORE we show the window to make sure it initially appears at
1541 // our desired size (ie min size is known first)
1542 evas_smart_objects_calculate(evas_object_evas_get(obj));
1545 evas_object_show(sd->frame_obj);
1549 evas_object_show(sd->img_obj);
1551 if (sd->pointer.obj)
1553 ecore_evas_show(sd->pointer.ee);
1554 evas_object_show(sd->pointer.obj);
1556 evas_object_show(obj);
1560 _elm_win_smart_move(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1562 Evas_Coord x = va_arg(*list, Evas_Coord);
1563 Evas_Coord y = va_arg(*list, Evas_Coord);
1564 Elm_Win_Smart_Data *sd = _pd;
1568 if ((x != sd->screen.x) || (y != sd->screen.y))
1572 evas_object_smart_callback_call(obj, SIG_MOVED, NULL);
1578 TRAP(sd, move, x, y);
1579 if (!ecore_evas_override_get(sd->ee)) return;
1582 eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y));
1584 if (ecore_evas_override_get(sd->ee))
1588 evas_object_smart_callback_call(obj, SIG_MOVED, NULL);
1592 /* FIXME: We should update ecore_wl_window_location here !! */
1604 _elm_win_smart_resize(Eo *obj, void *_pd, va_list *list)
1606 Evas_Coord w = va_arg(*list, Evas_Coord);
1607 Evas_Coord h = va_arg(*list, Evas_Coord);
1609 Elm_Win_Smart_Data *sd = _pd;
1611 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
1619 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sw, &sh);
1626 evas_object_image_size_set(sd->img_obj, w, h);
1629 TRAP(sd, resize, w, h);
1633 _elm_win_delete_request(Ecore_Evas *ee)
1635 Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
1638 EINA_SAFETY_ON_NULL_RETURN(sd);
1642 int autodel = sd->autodel;
1643 sd->autodel_clear = &autodel;
1644 evas_object_ref(obj);
1645 evas_object_smart_callback_call(obj, SIG_DELETE_REQUEST, NULL);
1646 // FIXME: if above callback deletes - then the below will be invalid
1647 if (autodel) evas_object_del(obj);
1648 else sd->autodel_clear = NULL;
1649 evas_object_unref(obj);
1653 _elm_ee_xwin_get(const Ecore_Evas *ee)
1655 #ifdef HAVE_ELEMENTARY_X
1656 Ecore_X_Window xwin = 0;
1659 if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_X11))
1661 if (ee) xwin = ecore_evas_software_x11_window_get(ee);
1663 else if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_FB) ||
1664 EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_16_WINCE) ||
1665 EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_SDL) ||
1666 EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_16_SDL) ||
1667 EE_ENGINE_COMPARE(ee, ELM_OPENGL_SDL) ||
1668 EE_ENGINE_COMPARE(ee, ELM_OPENGL_COCOA))
1671 else if (EE_ENGINE_COMPARE(ee, ELM_OPENGL_X11))
1673 if (ee) xwin = ecore_evas_gl_x11_window_get(ee);
1675 else if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_WIN32))
1677 if (ee) xwin = (long)ecore_evas_win32_window_get(ee);
1685 #ifdef HAVE_ELEMENTARY_X
1687 _elm_win_xwindow_get(Elm_Win_Smart_Data *sd)
1689 sd->x.xwin = _elm_ee_xwin_get(sd->ee);
1693 #ifdef HAVE_ELEMENTARY_X
1695 _elm_win_xwin_update(Elm_Win_Smart_Data *sd)
1699 _elm_win_xwindow_get(sd);
1702 ELM_WIN_DATA_GET(sd->parent, sdp);
1706 ecore_x_icccm_transient_for_set(sd->x.xwin, sdp->x.xwin);
1710 if (!sd->x.xwin) return; /* nothing more to do */
1713 if (!s) s = _elm_appname;
1715 if (sd->icon_name) s = sd->icon_name;
1716 ecore_x_icccm_icon_name_set(sd->x.xwin, s);
1717 ecore_x_netwm_icon_name_set(sd->x.xwin, s);
1720 if (s) ecore_x_icccm_window_role_set(sd->x.xwin, s);
1727 data = evas_object_image_data_get(sd->icon, EINA_FALSE);
1731 int w = 0, h = 0, stride, x, y;
1735 evas_object_image_size_get(sd->icon, &w, &h);
1736 stride = evas_object_image_stride_get(sd->icon);
1737 if ((w > 0) && (h > 0) &&
1738 (stride >= (int)(w * sizeof(unsigned int))))
1742 ic.data = malloc(w * h * sizeof(unsigned int));
1746 p = (unsigned char *)data;
1747 p2 = (unsigned int *)ic.data;
1748 for (y = 0; y < h; y++)
1750 for (x = 0; x < w; x++)
1752 *p2 = *((unsigned int *)p);
1753 p += sizeof(unsigned int);
1756 p += (stride - (w * sizeof(unsigned int)));
1758 ecore_x_netwm_icons_set(sd->x.xwin, &ic, 1);
1762 evas_object_image_data_set(sd->icon, data);
1769 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_NORMAL);
1772 case ELM_WIN_DIALOG_BASIC:
1773 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DIALOG);
1776 case ELM_WIN_DESKTOP:
1777 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DESKTOP);
1781 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DOCK);
1784 case ELM_WIN_TOOLBAR:
1785 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_TOOLBAR);
1789 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_MENU);
1792 case ELM_WIN_UTILITY:
1793 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_UTILITY);
1796 case ELM_WIN_SPLASH:
1797 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_SPLASH);
1800 case ELM_WIN_DROPDOWN_MENU:
1801 ecore_x_netwm_window_type_set
1802 (sd->x.xwin, ECORE_X_WINDOW_TYPE_DROPDOWN_MENU);
1805 case ELM_WIN_POPUP_MENU:
1806 ecore_x_netwm_window_type_set
1807 (sd->x.xwin, ECORE_X_WINDOW_TYPE_POPUP_MENU);
1810 case ELM_WIN_TOOLTIP:
1811 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_TOOLTIP);
1814 case ELM_WIN_NOTIFICATION:
1815 ecore_x_netwm_window_type_set
1816 (sd->x.xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
1820 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_COMBO);
1824 ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_DND);
1830 ecore_x_e_virtual_keyboard_state_set
1831 (sd->x.xwin, (Ecore_X_Virtual_Keyboard_State)sd->kbdmode);
1832 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
1833 ecore_x_e_illume_indicator_state_set
1834 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
1835 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
1836 ecore_x_e_illume_indicator_state_set
1837 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
1845 * Resize the window according to window layout's min and weight.
1846 * If the window layout's weight is 0.0, the window max is limited to layout's
1849 * This is called when the window layout's weight hint is changed or when the
1850 * window is rotated.
1852 * @param obj window object
1855 _elm_win_resize_objects_eval(Evas_Object *obj)
1857 ELM_WIN_DATA_GET(obj, sd);
1858 Evas_Coord w, h, minw, minh, maxw, maxh;
1861 evas_object_size_hint_min_get(sd->layout, &minw, &minh);
1862 if (minw < 1) minw = 1;
1863 if (minh < 1) minh = 1;
1865 evas_object_size_hint_weight_get(sd->layout, &wx, &wy);
1866 if (!wx) maxw = minw;
1868 if (!wy) maxh = minh;
1871 evas_object_size_hint_min_set(obj, minw, minh);
1872 evas_object_size_hint_max_set(obj, maxw, maxh);
1873 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
1874 if (w < minw) w = minw;
1875 if (h < minh) h = minh;
1876 if (w > maxw) w = maxw;
1877 if (h > maxh) h = maxh;
1878 evas_object_move(obj, 0, 0);
1879 evas_object_resize(obj, w, h);
1883 _elm_win_on_resize_obj_changed_size_hints(void *data,
1885 Evas_Object *obj __UNUSED__,
1886 void *event_info __UNUSED__)
1888 _elm_win_resize_objects_eval(data);
1892 _elm_win_shutdown(void)
1894 while (_elm_win_list) evas_object_del(_elm_win_list->data);
1895 ELM_SAFE_FREE(_elm_win_state_eval_job, ecore_job_del);
1899 _elm_win_rescale(Elm_Theme *th,
1900 Eina_Bool use_theme)
1907 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1908 elm_widget_theme(obj);
1912 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1913 elm_widget_theme_specific(obj, th, EINA_FALSE);
1918 _elm_win_access(Eina_Bool is_access)
1925 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1927 elm_widget_access(obj, is_access);
1929 /* floating orphan object. if there are A, B, C objects and user does
1930 as below, then there would be floating orphan objects.
1932 1. elm_object_content_set(layout, A);
1933 2. elm_object_content_set(layout, B);
1934 3. elm_object_content_set(layout, C);
1936 now, the object A and B are floating orphan objects */
1941 fobj = evas_object_below_get(fobj);
1944 if (elm_widget_is(fobj) && !elm_widget_parent_get(fobj))
1946 elm_widget_access(fobj, is_access);
1952 evas = evas_object_evas_get(obj);
1953 if (evas) _elm_access_object_highlight_disable(evas);
1959 _elm_win_translate(void)
1964 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1965 elm_widget_translate(obj);
1968 #ifdef HAVE_ELEMENTARY_X
1970 _elm_win_client_message(void *data,
1971 int type __UNUSED__,
1974 ELM_WIN_DATA_GET(data, sd);
1975 Ecore_X_Event_Client_Message *e = event;
1977 if (e->format != 32) return ECORE_CALLBACK_PASS_ON;
1978 if (e->message_type == ECORE_X_ATOM_E_COMP_FLUSH)
1980 if ((unsigned int)e->data.l[0] == sd->x.xwin)
1982 Evas *evas = evas_object_evas_get(sd->obj);
1985 edje_file_cache_flush();
1986 edje_collection_cache_flush();
1987 evas_image_cache_flush(evas);
1988 evas_font_cache_flush(evas);
1992 else if (e->message_type == ECORE_X_ATOM_E_COMP_DUMP)
1994 if ((unsigned int)e->data.l[0] == sd->x.xwin)
1996 Evas *evas = evas_object_evas_get(sd->obj);
1999 edje_file_cache_flush();
2000 edje_collection_cache_flush();
2001 evas_image_cache_flush(evas);
2002 evas_font_cache_flush(evas);
2003 evas_render_dump(evas);
2007 else if (e->message_type == ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL)
2009 if ((unsigned int)e->data.l[0] == sd->x.xwin)
2011 if ((unsigned int)e->data.l[1] ==
2012 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT)
2014 // XXX: call right access func
2016 else if ((unsigned int)e->data.l[1] ==
2017 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_PREV)
2019 // XXX: call right access func
2021 else if ((unsigned int)e->data.l[1] ==
2022 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE)
2024 _elm_access_highlight_object_activate
2025 (sd->obj, ELM_ACTIVATE_DEFAULT);
2027 else if ((unsigned int)e->data.l[1] ==
2028 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ)
2030 /* there would be better way to read highlight object */
2032 evas = evas_object_evas_get(sd->obj);
2033 if (!evas) return ECORE_CALLBACK_PASS_ON;
2035 _elm_access_mouse_event_enabled_set(EINA_TRUE);
2037 evas_event_feed_mouse_in(evas, 0, NULL);
2038 evas_event_feed_mouse_move
2039 (evas, e->data.l[2], e->data.l[3], 0, NULL);
2041 _elm_access_mouse_event_enabled_set(EINA_FALSE);
2043 else if ((unsigned int)e->data.l[1] ==
2044 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_NEXT)
2046 _elm_access_highlight_cycle(sd->obj, ELM_FOCUS_NEXT);
2048 else if ((unsigned int)e->data.l[1] ==
2049 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_PREV)
2051 _elm_access_highlight_cycle(sd->obj, ELM_FOCUS_PREVIOUS);
2053 else if ((unsigned int)e->data.l[1] ==
2054 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP)
2056 _elm_access_highlight_object_activate
2057 (sd->obj, ELM_ACTIVATE_UP);
2059 else if ((unsigned int)e->data.l[1] ==
2060 ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN)
2062 _elm_access_highlight_object_activate
2063 (sd->obj, ELM_ACTIVATE_DOWN);
2067 return ECORE_CALLBACK_PASS_ON;
2071 _elm_win_property_change(void *data,
2072 int type __UNUSED__,
2075 ELM_WIN_DATA_GET(data, sd);
2076 Ecore_X_Event_Window_Property *e = event;
2078 if (e->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE)
2080 if (e->win == sd->x.xwin)
2082 sd->indmode = (Elm_Win_Indicator_Mode)ecore_x_e_illume_indicator_state_get(e->win);
2083 evas_object_smart_callback_call(sd->obj, SIG_INDICATOR_PROP_CHANGED, NULL);
2086 return ECORE_CALLBACK_PASS_ON;
2091 _elm_win_focus_highlight_hide(void *data __UNUSED__,
2093 const char *emission __UNUSED__,
2094 const char *source __UNUSED__)
2096 evas_object_hide(obj);
2100 _elm_win_focus_highlight_anim_end(void *data,
2102 const char *emission __UNUSED__,
2103 const char *source __UNUSED__)
2105 ELM_WIN_DATA_GET(data, sd);
2107 _elm_win_focus_highlight_simple_setup(sd, obj);
2111 _elm_win_focus_highlight_init(Elm_Win_Smart_Data *sd)
2113 evas_event_callback_add(sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
2114 _elm_win_object_focus_in, sd->obj);
2115 evas_event_callback_add(sd->evas,
2116 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
2117 _elm_win_object_focus_out, sd->obj);
2119 sd->focus_highlight.cur.target = evas_focus_get(sd->evas);
2120 sd->focus_highlight.fobj = edje_object_add(sd->evas);
2121 sd->focus_highlight.theme_changed = EINA_TRUE;
2123 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2124 "elm,action,focus,hide,end", "*",
2125 _elm_win_focus_highlight_hide, NULL);
2126 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2127 "elm,action,focus,anim,end", "*",
2128 _elm_win_focus_highlight_anim_end, sd->obj);
2129 _elm_win_focus_highlight_reconfigure_job_start(sd);
2133 _elm_win_frame_cb_move_start(void *data,
2134 Evas_Object *obj __UNUSED__,
2135 const char *sig __UNUSED__,
2138 ELM_WIN_DATA_GET(data, sd);
2142 #ifdef HAVE_ELEMENTARY_WAYLAND
2143 if (!strcmp(source, "elm"))
2144 ecore_wl_window_cursor_from_name_set(sd->wl.win, ELM_CURSOR_HAND1);
2146 ecore_wl_window_cursor_default_restore(sd->wl.win);
2151 /* FIXME: Change mouse pointer */
2153 /* NB: Wayland handles moving surfaces by itself so we cannot
2154 * specify a specific x/y we want. Instead, we will pass in the
2155 * existing x/y values so they can be recorded as 'previous'
2156 * position. The new position will get updated automatically when
2157 * the move is finished */
2159 ecore_evas_wayland_move(sd->ee, sd->screen.x, sd->screen.y);
2163 _elm_win_frame_cb_move_stop(void *data,
2164 Evas_Object *obj __UNUSED__,
2165 const char *sig __UNUSED__,
2166 const char *source __UNUSED__)
2168 ELM_WIN_DATA_GET(data, sd);
2172 #ifdef HAVE_ELEMENTARY_WAYLAND
2173 ecore_wl_window_cursor_default_restore(sd->wl.win);
2177 #ifdef HAVE_ELEMENTARY_WAYLAND
2184 static struct _resize_info _border_side[4] =
2186 { ELM_CURSOR_TOP_SIDE, 1 },
2187 { ELM_CURSOR_LEFT_SIDE, 4 },
2188 { ELM_CURSOR_BOTTOM_SIDE, 2 },
2189 { ELM_CURSOR_RIGHT_SIDE, 8 },
2192 static struct _resize_info _border_corner[4] =
2194 { ELM_CURSOR_TOP_LEFT_CORNER, 5 },
2195 { ELM_CURSOR_BOTTOM_LEFT_CORNER, 6 },
2196 { ELM_CURSOR_BOTTOM_RIGHT_CORNER, 10 },
2197 { ELM_CURSOR_TOP_RIGHT_CORNER, 9 },
2202 _elm_win_frame_obj_update(Elm_Win_Smart_Data *sd)
2208 evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
2209 evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
2210 evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
2212 evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
2214 if ((x != (ox - fx)) || (y != (oy - fy)) ||
2215 (w != (fw - ow)) || (h != (fh - oh)))
2217 evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
2218 (fw - ow), (fh - oh));
2221 #ifdef HAVE_ELEMENTARY_WAYLAND
2222 ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -(fy - sy), sw, sh);
2227 _elm_win_frame_obj_move(void *data,
2229 Evas_Object *obj __UNUSED__,
2230 void *event_info __UNUSED__)
2232 Elm_Win_Smart_Data *sd;
2234 if (!(sd = data)) return;
2235 if (!sd->client_obj) return;
2237 _elm_win_frame_obj_update(sd);
2241 _elm_win_frame_obj_resize(void *data,
2243 Evas_Object *obj __UNUSED__,
2244 void *event_info __UNUSED__)
2246 Elm_Win_Smart_Data *sd;
2248 if (!(sd = data)) return;
2249 if (!sd->client_obj) return;
2251 _elm_win_frame_obj_update(sd);
2255 _elm_win_frame_cb_resize_show(void *data,
2256 Evas_Object *obj __UNUSED__,
2257 const char *sig __UNUSED__,
2260 ELM_WIN_DATA_GET(data, sd);
2263 if (sd->resizing) return;
2265 #ifdef HAVE_ELEMENTARY_WAYLAND
2268 if (!strcmp(source, "elm.event.resize.t"))
2269 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2270 _border_side[(0 + i) % 4].name);
2271 else if (!strcmp(source, "elm.event.resize.b"))
2272 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2273 _border_side[(2 + i) % 4].name);
2274 else if (!strcmp(source, "elm.event.resize.l"))
2275 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2276 _border_side[(1 + i) % 4].name);
2277 else if (!strcmp(source, "elm.event.resize.r"))
2278 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2279 _border_side[(3 + i) % 4].name);
2280 else if (!strcmp(source, "elm.event.resize.tl"))
2281 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2282 _border_corner[(0 + i) % 4].name);
2283 else if (!strcmp(source, "elm.event.resize.tr"))
2284 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2285 _border_corner[(3 + i) % 4].name);
2286 else if (!strcmp(source, "elm.event.resize.bl"))
2287 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2288 _border_corner[(1 + i) % 4].name);
2289 else if (!strcmp(source, "elm.event.resize.br"))
2290 ecore_wl_window_cursor_from_name_set(sd->wl.win,
2291 _border_corner[(2 + i) % 4].name);
2293 ecore_wl_window_cursor_default_restore(sd->wl.win);
2300 _elm_win_frame_cb_resize_hide(void *data,
2301 Evas_Object *obj __UNUSED__,
2302 const char *sig __UNUSED__,
2303 const char *source __UNUSED__)
2305 ELM_WIN_DATA_GET(data, sd);
2308 if (sd->resizing) return;
2310 #ifdef HAVE_ELEMENTARY_WAYLAND
2311 ecore_wl_window_cursor_default_restore(sd->wl.win);
2316 _elm_win_frame_cb_resize_start(void *data,
2317 Evas_Object *obj __UNUSED__,
2318 const char *sig __UNUSED__,
2321 #ifdef HAVE_ELEMENTARY_WAYLAND
2322 ELM_WIN_DATA_GET(data, sd);
2326 if (sd->resizing) return;
2328 sd->resizing = EINA_TRUE;
2330 if (!strcmp(source, "elm.event.resize.t"))
2331 sd->resize_location = _border_side[(0 + i) % 4].location;
2332 else if (!strcmp(source, "elm.event.resize.b"))
2333 sd->resize_location = _border_side[(2 + i) % 4].location;
2334 else if (!strcmp(source, "elm.event.resize.l"))
2335 sd->resize_location = _border_side[(1 + i) % 4].location;
2336 else if (!strcmp(source, "elm.event.resize.r"))
2337 sd->resize_location = _border_side[(3 + i) % 4].location;
2338 else if (!strcmp(source, "elm.event.resize.tl"))
2339 sd->resize_location = _border_corner[(0 + i) % 4].location;
2340 else if (!strcmp(source, "elm.event.resize.tr"))
2341 sd->resize_location = _border_corner[(3 + i) % 4].location;
2342 else if (!strcmp(source, "elm.event.resize.bl"))
2343 sd->resize_location = _border_corner[(1 + i) % 4].location;
2344 else if (!strcmp(source, "elm.event.resize.br"))
2345 sd->resize_location = _border_corner[(2 + i) % 4].location;
2347 sd->resize_location = 0;
2349 if (sd->resize_location > 0)
2350 ecore_evas_wayland_resize(sd->ee, sd->resize_location);
2358 _elm_win_frame_cb_minimize(void *data,
2359 Evas_Object *obj __UNUSED__,
2360 const char *sig __UNUSED__,
2361 const char *source __UNUSED__)
2363 ELM_WIN_DATA_GET(data, sd);
2366 // sd->iconified = EINA_TRUE;
2367 TRAP(sd, iconified_set, EINA_TRUE);
2371 _elm_win_frame_maximized_state_update(Elm_Win_Smart_Data *sd, Eina_Bool maximized)
2373 const char *emission;
2376 emission = "elm,state,maximized";
2378 emission = "elm,state,unmaximized";
2380 edje_object_signal_emit(sd->frame_obj, emission, "elm");
2381 edje_object_message_signal_process(sd->frame_obj);
2382 evas_object_smart_calculate(sd->frame_obj);
2384 _elm_win_frame_obj_update(sd);
2388 _elm_win_frame_cb_maximize(void *data,
2389 Evas_Object *obj __UNUSED__,
2390 const char *sig __UNUSED__,
2391 const char *source __UNUSED__)
2394 ELM_WIN_DATA_GET(data, sd);
2397 if (sd->maximized) value = EINA_FALSE;
2398 else value = EINA_TRUE;
2400 _elm_win_frame_maximized_state_update(sd, value);
2402 TRAP(sd, maximized_set, value);
2406 _elm_win_frame_cb_close(void *data,
2407 Evas_Object *obj __UNUSED__,
2408 const char *sig __UNUSED__,
2409 const char *source __UNUSED__)
2411 ELM_WIN_DATA_GET(data, sd);
2414 /* FIXME: After the current freeze, this should be handled differently.
2416 * Ideally, we would want to mimic the X11 backend and use something
2417 * like ECORE_WL_EVENT_WINDOW_DELETE and handle the delete_request
2418 * inside of ecore_evas. That would be the 'proper' way, but since we are
2419 * in a freeze right now, I cannot add a new event value, or a new
2420 * event structure to ecore_wayland.
2422 * So yes, this is a temporary 'stop-gap' solution which will be fixed
2423 * when the freeze is over, but it does fix a trac bug for now, and in a
2424 * way which does not break API or the freeze. - dh
2431 int autodel = sd->autodel;
2432 sd->autodel_clear = &autodel;
2433 evas_object_ref(win);
2434 evas_object_smart_callback_call(win, SIG_DELETE_REQUEST, NULL);
2435 // FIXME: if above callback deletes - then the below will be invalid
2436 if (autodel) evas_object_del(win);
2437 else sd->autodel_clear = NULL;
2438 evas_object_unref(win);
2442 _elm_win_frame_add(Elm_Win_Smart_Data *sd,
2445 Evas_Object *obj = sd->obj;
2449 sd->frame_obj = edje_object_add(sd->evas);
2450 layer = evas_object_layer_get(obj);
2451 evas_object_layer_set(sd->frame_obj, layer + 1);
2452 if (!elm_widget_theme_object_set
2453 (sd->obj, sd->frame_obj, "border", "base", style))
2455 evas_object_del(sd->frame_obj);
2456 sd->frame_obj = NULL;
2460 sd->spacer_obj = evas_object_rectangle_add(sd->evas);
2461 evas_object_color_set(sd->spacer_obj, 0, 0, 0, 0);
2462 evas_object_repeat_events_set(sd->spacer_obj, EINA_TRUE);
2463 edje_object_part_swallow(sd->frame_obj, "elm.swallow.frame_spacer",
2466 sd->client_obj = evas_object_rectangle_add(sd->evas);
2467 evas_object_color_set(sd->client_obj, 0, 0, 0, 0);
2468 /* NB: Tried pass_events here, but that fails to send events */
2469 evas_object_repeat_events_set(sd->client_obj, EINA_TRUE);
2470 edje_object_part_swallow(sd->frame_obj, "elm.swallow.client",
2473 evas_object_is_frame_object_set(sd->frame_obj, EINA_TRUE);
2475 evas_object_event_callback_add
2476 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
2477 evas_object_event_callback_add
2478 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
2480 /* NB: Do NOT remove these calls !! Needed to calculate proper
2481 * framespace on inital show of the window */
2482 edje_object_size_min_calc(sd->frame_obj, &mw, &mh);
2483 evas_object_move(sd->frame_obj, 0, 0);
2484 evas_object_resize(sd->frame_obj, mw, mh);
2485 evas_object_smart_calculate(sd->frame_obj);
2487 edje_object_signal_callback_add
2488 (sd->frame_obj, "elm,action,move,start", "elm",
2489 _elm_win_frame_cb_move_start, obj);
2490 edje_object_signal_callback_add
2491 (sd->frame_obj, "elm,action,move,stop", "elm",
2492 _elm_win_frame_cb_move_stop, obj);
2493 edje_object_signal_callback_add
2494 (sd->frame_obj, "elm,action,resize,show", "*",
2495 _elm_win_frame_cb_resize_show, obj);
2496 edje_object_signal_callback_add
2497 (sd->frame_obj, "elm,action,resize,hide", "*",
2498 _elm_win_frame_cb_resize_hide, obj);
2499 edje_object_signal_callback_add
2500 (sd->frame_obj, "elm,action,resize,start", "*",
2501 _elm_win_frame_cb_resize_start, obj);
2502 edje_object_signal_callback_add
2503 (sd->frame_obj, "elm,action,minimize", "elm",
2504 _elm_win_frame_cb_minimize, obj);
2505 edje_object_signal_callback_add
2506 (sd->frame_obj, "elm,action,maximize", "elm",
2507 _elm_win_frame_cb_maximize, obj);
2508 edje_object_signal_callback_add
2509 (sd->frame_obj, "elm,action,close", "elm", _elm_win_frame_cb_close, obj);
2513 edje_object_part_text_escaped_set
2514 (sd->frame_obj, "elm.text.title", sd->title);
2517 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
2518 ecore_evas_resize(sd->ee, w, h);
2522 _elm_win_frame_del(Elm_Win_Smart_Data *sd)
2528 evas_object_del(sd->client_obj);
2529 sd->client_obj = NULL;
2534 evas_object_event_callback_del_full
2535 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
2536 evas_object_event_callback_del_full
2537 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
2539 edje_object_signal_callback_del
2540 (sd->frame_obj, "elm,action,move,start", "elm",
2541 _elm_win_frame_cb_move_start);
2542 edje_object_signal_callback_del
2543 (sd->frame_obj, "elm,action,move,stop", "elm",
2544 _elm_win_frame_cb_move_stop);
2545 edje_object_signal_callback_del
2546 (sd->frame_obj, "elm,action,resize,show", "*",
2547 _elm_win_frame_cb_resize_show);
2548 edje_object_signal_callback_del
2549 (sd->frame_obj, "elm,action,resize,hide", "*",
2550 _elm_win_frame_cb_resize_hide);
2551 edje_object_signal_callback_del
2552 (sd->frame_obj, "elm,action,resize,start", "*",
2553 _elm_win_frame_cb_resize_start);
2554 edje_object_signal_callback_del
2555 (sd->frame_obj, "elm,action,minimize", "elm",
2556 _elm_win_frame_cb_minimize);
2557 edje_object_signal_callback_del
2558 (sd->frame_obj, "elm,action,maximize", "elm",
2559 _elm_win_frame_cb_maximize);
2560 edje_object_signal_callback_del
2561 (sd->frame_obj, "elm,action,close", "elm",
2562 _elm_win_frame_cb_close);
2564 evas_object_del(sd->frame_obj);
2565 sd->frame_obj = NULL;
2568 evas_output_framespace_set(sd->evas, 0, 0, 0, 0);
2569 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
2570 ecore_evas_resize(sd->ee, w, h);
2575 _debug_key_down(void *data __UNUSED__,
2580 Evas_Event_Key_Down *ev = event_info;
2582 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
2585 if ((strcmp(ev->key, "F12")) ||
2586 (!evas_key_modifier_is_set(ev->modifiers, "Control")))
2589 INF("Tree graph generated.");
2590 elm_object_tree_dot_dump(obj, "./dump.dot");
2596 _win_img_hide(void *data,
2598 Evas_Object *obj __UNUSED__,
2599 void *event_info __UNUSED__)
2601 elm_widget_focus_hide_handle(data);
2605 _win_img_mouse_up(void *data,
2607 Evas_Object *obj __UNUSED__,
2610 Evas_Event_Mouse_Up *ev = event_info;
2611 if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
2612 elm_widget_focus_mouse_up_handle(data);
2616 _win_img_focus_in(void *data,
2618 Evas_Object *obj __UNUSED__,
2619 void *event_info __UNUSED__)
2621 elm_widget_focus_steal(data);
2625 _win_img_focus_out(void *data,
2627 Evas_Object *obj __UNUSED__,
2628 void *event_info __UNUSED__)
2630 elm_widget_focused_object_clear(data);
2634 _win_inlined_image_set(Elm_Win_Smart_Data *sd)
2636 evas_object_image_alpha_set(sd->img_obj, EINA_FALSE);
2637 evas_object_image_filled_set(sd->img_obj, EINA_TRUE);
2639 evas_object_event_callback_add
2640 (sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, sd->obj);
2641 evas_object_event_callback_add
2642 (sd->img_obj, EVAS_CALLBACK_HIDE, _win_img_hide, sd->obj);
2643 evas_object_event_callback_add
2644 (sd->img_obj, EVAS_CALLBACK_MOUSE_UP, _win_img_mouse_up, sd->obj);
2645 evas_object_event_callback_add
2646 (sd->img_obj, EVAS_CALLBACK_FOCUS_IN, _win_img_focus_in, sd->obj);
2647 evas_object_event_callback_add
2648 (sd->img_obj, EVAS_CALLBACK_FOCUS_OUT, _win_img_focus_out, sd->obj);
2652 _elm_win_on_icon_del(void *data,
2655 void *event_info __UNUSED__)
2657 ELM_WIN_DATA_GET(data, sd);
2659 if (sd->icon == obj) sd->icon = NULL;
2663 _elm_win_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
2665 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
2667 elm_widget_can_focus_set(obj, EINA_TRUE);
2669 elm_widget_highlight_ignore_set(obj, EINA_TRUE);
2672 #ifdef HAVE_ELEMENTARY_X
2674 _elm_x_io_err(void *data __UNUSED__)
2679 EINA_LIST_FOREACH(_elm_win_list, l, obj)
2680 evas_object_smart_callback_call(obj, SIG_IOERR, NULL);
2686 elm_win_add(Evas_Object *parent,
2690 Evas_Object *obj = eo_add_custom(MY_CLASS, parent, elm_obj_win_constructor(name, type));
2696 _elm_win_cb_hide(void *data __UNUSED__,
2698 Evas_Object *obj __UNUSED__,
2699 void *event_info __UNUSED__)
2701 _elm_win_state_eval_queue();
2705 _elm_win_cb_show(void *data __UNUSED__,
2707 Evas_Object *obj __UNUSED__,
2708 void *event_info __UNUSED__)
2710 _elm_win_state_eval_queue();
2716 * Recalculate the size of window considering its resize objects' weight and
2717 * min size. If any of its resize objects' weight equals to 0.0, window
2718 * layout's weight will be set to 0.0.
2720 * @param o box object
2721 * @param p box's private data
2722 * @param data window object
2725 _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
2729 Evas_Object_Box_Option *opt;
2730 Evas_Coord x, y, w, h;
2732 Evas_Coord minw = -1, minh = -1;
2733 double weight_x = EVAS_HINT_EXPAND;
2734 double weight_y = EVAS_HINT_EXPAND;
2736 EINA_LIST_FOREACH(p->children, l, opt)
2739 evas_object_size_hint_weight_get(child, &wx, &wy);
2740 if (wx == 0.0) weight_x = 0;
2741 if (wy == 0.0) weight_y = 0;
2743 evas_object_size_hint_min_get(child, &w, &h);
2744 if (w > minw) minw = w;
2745 if (h > minh) minh = h;
2748 evas_object_size_hint_min_set(o, minw, minh);
2749 evas_object_geometry_get(o, &x, &y, &w, &h);
2750 if (w < minw) w = minw;
2751 if (h < minh) h = minh;
2752 evas_object_resize(o, w, h);
2754 EINA_LIST_FOREACH(p->children, l, opt)
2757 evas_object_move(child, x, y);
2758 evas_object_resize(child, w, h);
2761 ELM_WIN_DATA_GET(data, sd);
2762 evas_object_size_hint_weight_set(sd->layout, weight_x, weight_y);
2763 evas_object_smart_changed(sd->layout);
2767 _win_constructor(Eo *obj, void *_pd, va_list *list)
2769 Elm_Win_Smart_Data *sd = _pd;
2770 sd->obj = obj; // in ctor
2772 const char *name = va_arg(*list, const char *);
2773 Elm_Win_Type type = va_arg(*list, Elm_Win_Type);
2774 Evas_Object *parent;
2777 const char *fontpath, *fallback = NULL;
2779 Elm_Win_Smart_Data tmp_sd;
2781 eo_do(obj, eo_parent_get(&parent));
2783 /* just to store some data while trying out to create a canvas */
2784 memset(&tmp_sd, 0, sizeof(Elm_Win_Smart_Data));
2786 #define FALLBACK_TRY(engine) \
2788 CRITICAL(engine " engine creation failed. Trying default."); \
2790 #define FALLBACK_STORE(engine) \
2793 CRITICAL(engine "Fallback to %s successful.", engine); \
2794 fallback = engine; \
2799 case ELM_WIN_INLINED_IMAGE:
2802 e = evas_object_evas_get(parent);
2807 ee = ecore_evas_ecore_evas_get(e);
2810 tmp_sd.img_obj = ecore_evas_object_image_new(ee);
2811 if (!tmp_sd.img_obj) break;
2813 tmp_sd.ee = ecore_evas_object_ecore_evas_get(tmp_sd.img_obj);
2816 evas_object_del(tmp_sd.img_obj);
2817 tmp_sd.img_obj = NULL;
2822 case ELM_WIN_SOCKET_IMAGE:
2823 tmp_sd.ee = ecore_evas_extn_socket_new(1, 1);
2827 if (ENGINE_COMPARE(ELM_SOFTWARE_X11))
2829 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2830 FALLBACK_TRY("Software X11");
2833 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2834 FALLBACK_STORE("Software FB");
2837 else if (ENGINE_COMPARE(ELM_SOFTWARE_FB))
2839 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2840 FALLBACK_TRY("Software FB");
2843 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2844 FALLBACK_STORE("Software X11");
2847 else if (ENGINE_COMPARE(ELM_OPENGL_X11))
2852 if (_elm_config->vsync)
2854 opt[opt_i] = ECORE_EVAS_GL_X11_OPT_VSYNC;
2861 tmp_sd.ee = ecore_evas_gl_x11_options_new
2862 (NULL, 0, 0, 0, 1, 1, opt);
2864 tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 1, 1);
2865 FALLBACK_TRY("OpenGL");
2868 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2869 FALLBACK_STORE("Software X11");
2872 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2873 FALLBACK_STORE("Software FB");
2877 else if (ENGINE_COMPARE(ELM_SOFTWARE_WIN32))
2879 tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
2880 FALLBACK_TRY("Software Win32");
2882 else if (ENGINE_COMPARE(ELM_SOFTWARE_PSL1GHT))
2884 tmp_sd.ee = ecore_evas_psl1ght_new(NULL, 1, 1);
2885 FALLBACK_TRY("PSL1GHT");
2887 else if (ENGINE_COMPARE(ELM_SOFTWARE_SDL))
2889 tmp_sd.ee = ecore_evas_sdl_new(NULL, 0, 0, 0, 0, 0, 1);
2890 FALLBACK_TRY("Software SDL");
2893 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2894 FALLBACK_STORE("Software X11");
2897 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2898 FALLBACK_STORE("Software FB");
2902 else if (ENGINE_COMPARE(ELM_SOFTWARE_16_SDL))
2904 tmp_sd.ee = ecore_evas_sdl16_new(NULL, 0, 0, 0, 0, 0, 1);
2905 FALLBACK_TRY("Software-16-SDL");
2908 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2909 FALLBACK_STORE("Software X11");
2912 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2913 FALLBACK_STORE("Software FB");
2917 else if (ENGINE_COMPARE(ELM_OPENGL_SDL))
2919 tmp_sd.ee = ecore_evas_gl_sdl_new(NULL, 1, 1, 0, 0);
2920 FALLBACK_TRY("OpenGL SDL");
2923 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
2924 FALLBACK_STORE("Software X11");
2927 tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
2928 FALLBACK_STORE("Software FB");
2932 else if (ENGINE_COMPARE(ELM_OPENGL_COCOA))
2934 tmp_sd.ee = ecore_evas_cocoa_new(NULL, 1, 1, 0, 0);
2935 FALLBACK_TRY("OpenGL Cocoa");
2937 else if (ENGINE_COMPARE(ELM_BUFFER))
2939 tmp_sd.ee = ecore_evas_buffer_new(1, 1);
2941 else if (ENGINE_COMPARE(ELM_EWS))
2943 tmp_sd.ee = ecore_evas_ews_new(0, 0, 1, 1);
2945 else if (ENGINE_COMPARE(ELM_WAYLAND_SHM))
2947 tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 0);
2949 else if (ENGINE_COMPARE(ELM_WAYLAND_EGL))
2951 tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0);
2953 else if (!strncmp(ENGINE_GET(), "shot:", 5))
2955 tmp_sd.ee = ecore_evas_buffer_new(1, 1);
2956 ecore_evas_manual_render_set(tmp_sd.ee, EINA_TRUE);
2957 tmp_sd.shot.info = eina_stringshare_add
2966 ERR("Cannot create window.");
2971 eo_do(obj, eo_parent_set(ecore_evas_get(tmp_sd.ee)));
2972 eo_do_super(obj, MY_CLASS, eo_constructor());
2974 evas_obj_type_set(MY_CLASS_NAME),
2975 evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
2977 if (getenv("ELM_FIRST_FRAME"))
2978 evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
2979 _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));
2981 /* copying possibly altered fields back */
2982 #define SD_CPY(_field) \
2985 sd->_field = tmp_sd._field; \
2993 if ((trap) && (trap->add))
2994 sd->trap_data = trap->add(obj);
2996 /* complementary actions, which depend on final smart data
2998 if (type == ELM_WIN_INLINED_IMAGE)
2999 _win_inlined_image_set(sd);
3001 #ifdef HAVE_ELEMENTARY_X
3002 else if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
3003 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
3004 ENGINE_COMPARE(ELM_SOFTWARE_8_X11) ||
3005 ENGINE_COMPARE(ELM_OPENGL_X11))
3007 sd->x.client_message_handler = ecore_event_handler_add
3008 (ECORE_X_EVENT_CLIENT_MESSAGE, _elm_win_client_message, obj);
3009 sd->x.property_handler = ecore_event_handler_add
3010 (ECORE_X_EVENT_WINDOW_PROPERTY, _elm_win_property_change, obj);
3014 else if (!strncmp(ENGINE_GET(), "shot:", 5))
3017 sd->kbdmode = ELM_WIN_KEYBOARD_UNKNOWN;
3018 sd->indmode = ELM_WIN_INDICATOR_UNKNOWN;
3020 #ifdef HAVE_ELEMENTARY_X
3021 _elm_win_xwindow_get(sd);
3024 ecore_x_io_error_handler_set(_elm_x_io_err, NULL);
3028 #ifdef HAVE_ELEMENTARY_WAYLAND
3029 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
3030 sd->wl.win = ecore_evas_wayland_window_get(sd->ee);
3033 if ((_elm_config->bgpixmap)
3034 #ifdef HAVE_ELEMENTARY_X
3036 (((sd->x.xwin) && (!ecore_x_screen_is_composited(0))) ||
3041 TRAP(sd, avoid_damage_set, ECORE_EVAS_AVOID_DAMAGE_EXPOSE);
3042 // bg pixmap done by x - has other issues like can be redrawn by x before it
3043 // is filled/ready by app
3044 // TRAP(sd, avoid_damage_set, ECORE_EVAS_AVOID_DAMAGE_BUILT_IN);
3047 sd->parent = parent;
3050 evas_object_event_callback_add
3051 (sd->parent, EVAS_CALLBACK_DEL, _elm_win_on_parent_del, obj);
3053 sd->evas = ecore_evas_get(sd->ee);
3055 evas_object_color_set(obj, 0, 0, 0, 0);
3056 evas_object_move(obj, 0, 0);
3057 evas_object_resize(obj, 1, 1);
3058 evas_object_layer_set(obj, 50);
3059 evas_object_pass_events_set(obj, EINA_TRUE);
3061 if (type == ELM_WIN_INLINED_IMAGE)
3062 elm_widget_parent2_set(obj, parent);
3064 /* use own version of ecore_evas_object_associate() that does TRAP() */
3065 ecore_evas_data_set(sd->ee, "elm_win", obj);
3067 evas_object_event_callback_add
3068 (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3069 _elm_win_obj_callback_changed_size_hints, obj);
3071 evas_object_intercept_raise_callback_add
3072 (obj, _elm_win_obj_intercept_raise, obj);
3073 evas_object_intercept_lower_callback_add
3074 (obj, _elm_win_obj_intercept_lower, obj);
3075 evas_object_intercept_stack_above_callback_add
3076 (obj, _elm_win_obj_intercept_stack_above, obj);
3077 evas_object_intercept_stack_below_callback_add
3078 (obj, _elm_win_obj_intercept_stack_below, obj);
3079 evas_object_intercept_layer_set_callback_add
3080 (obj, _elm_win_obj_intercept_layer_set, obj);
3081 evas_object_intercept_show_callback_add
3082 (obj, _elm_win_obj_intercept_show, obj);
3084 TRAP(sd, name_class_set, name, _elm_appname);
3085 ecore_evas_callback_delete_request_set(sd->ee, _elm_win_delete_request);
3086 ecore_evas_callback_resize_set(sd->ee, _elm_win_resize);
3087 ecore_evas_callback_mouse_in_set(sd->ee, _elm_win_mouse_in);
3088 ecore_evas_callback_focus_in_set(sd->ee, _elm_win_focus_in);
3089 ecore_evas_callback_focus_out_set(sd->ee, _elm_win_focus_out);
3090 ecore_evas_callback_move_set(sd->ee, _elm_win_move);
3091 ecore_evas_callback_state_change_set(sd->ee, _elm_win_state_change);
3092 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _elm_win_cb_hide, NULL);
3093 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _elm_win_cb_show, NULL);
3095 evas_image_cache_set(sd->evas, (_elm_config->image_cache * 1024));
3096 evas_font_cache_set(sd->evas, (_elm_config->font_cache * 1024));
3098 EINA_LIST_FOREACH(_elm_config->font_dirs, l, fontpath)
3099 evas_font_path_append(sd->evas, fontpath);
3101 if (!_elm_config->font_hinting)
3102 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_NONE);
3103 else if (_elm_config->font_hinting == 1)
3104 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_AUTO);
3105 else if (_elm_config->font_hinting == 2)
3106 evas_font_hinting_set(sd->evas, EVAS_FONT_HINTING_BYTECODE);
3108 #ifdef HAVE_ELEMENTARY_X
3109 _elm_win_xwin_update(sd);
3112 _elm_win_list = eina_list_append(_elm_win_list, obj);
3115 if (((fallback) && (!strcmp(fallback, "Software FB"))) ||
3116 ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))
3118 TRAP(sd, fullscreen_set, 1);
3120 else if ((type != ELM_WIN_INLINED_IMAGE) &&
3121 (ENGINE_COMPARE(ELM_WAYLAND_SHM) ||
3122 ENGINE_COMPARE(ELM_WAYLAND_EGL)))
3123 _elm_win_frame_add(sd, "default");
3125 if (_elm_config->focus_highlight_enable)
3126 elm_win_focus_highlight_enabled_set(obj, EINA_TRUE);
3127 if (_elm_config->focus_highlight_animate)
3128 elm_win_focus_highlight_animate_set(obj, EINA_TRUE);
3131 Evas_Modifier_Mask mask = evas_key_modifier_mask_get(sd->evas, "Control");
3132 evas_object_event_callback_add
3133 (obj, EVAS_CALLBACK_KEY_DOWN, _debug_key_down, NULL);
3135 if (evas_object_key_grab(obj, "F12", mask, 0, EINA_TRUE))
3136 INF("Ctrl+F12 key combination exclusive for dot tree generation\n");
3138 ERR("failed to grab F12 key to elm widgets (dot) tree generation");
3141 if ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_ON) ||
3142 ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_AUTO) &&
3143 (((fallback) && (!strcmp(fallback, "Software FB"))) ||
3144 ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))))
3147 Evas_Coord mw = 1, mh = 1, hx = 0, hy = 0;
3149 sd->pointer.obj = o = edje_object_add(ecore_evas_get(tmp_sd.ee));
3150 _elm_theme_object_set(obj, o, "pointer", "base", "default");
3151 edje_object_size_min_calc(o, &mw, &mh);
3152 evas_object_resize(o, mw, mh);
3153 edje_object_part_geometry_get(o, "elm.swallow.hotspot",
3154 &hx, &hy, NULL, NULL);
3155 sd->pointer.hot_x = hx;
3156 sd->pointer.hot_y = hy;
3157 evas_object_show(o);
3158 ecore_evas_object_cursor_set(tmp_sd.ee, o, EVAS_LAYER_MAX, hx, hy);
3160 else if (_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_OFF)
3165 sd->layout = edje_object_add(sd->evas);
3166 _elm_theme_object_set(obj, sd->layout, "win", "base", "default");
3167 sd->box = evas_object_box_add(sd->evas);
3168 evas_object_box_layout_set(sd->box, _window_layout_stack, obj, NULL);
3169 edje_object_part_swallow(sd->layout, "elm.swallow.contents", sd->box);
3170 evas_object_move(sd->layout, 0, 0);
3171 evas_object_resize(sd->layout, 1, 1);
3172 edje_object_update_hints_set(sd->layout, EINA_TRUE);
3173 evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3174 _elm_win_on_resize_obj_changed_size_hints, obj);
3175 evas_object_show(sd->layout);
3179 _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
3182 ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME);
3186 elm_win_util_standard_add(const char *name,
3189 Evas_Object *win, *bg;
3191 win = elm_win_add(NULL, name, ELM_WIN_BASIC);
3192 if (!win) return NULL;
3194 elm_win_title_set(win, title);
3195 bg = elm_bg_add(win);
3198 evas_object_del(win);
3201 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
3202 elm_win_resize_object_add(win, bg);
3203 evas_object_show(bg);
3209 elm_win_resize_object_add(Evas_Object *obj,
3210 Evas_Object *subobj)
3213 eo_do(obj, elm_obj_win_resize_object_add(subobj));
3217 _resize_object_add(Eo *obj, void *_pd, va_list *list)
3219 Evas_Object *subobj = va_arg(*list, Evas_Object *);
3221 Elm_Win_Smart_Data *sd = _pd;
3223 elm_widget_sub_object_add(obj, subobj);
3225 if (!evas_object_box_append(sd->box, subobj))
3226 ERR("could not append %p to box", subobj);
3230 elm_win_resize_object_del(Evas_Object *obj,
3231 Evas_Object *subobj)
3234 eo_do(obj, elm_obj_win_resize_object_del(subobj));
3238 _resize_object_del(Eo *obj, void *_pd, va_list *list)
3240 Evas_Object *subobj = va_arg(*list, Evas_Object *);
3241 Elm_Win_Smart_Data *sd = _pd;
3243 if (!elm_widget_sub_object_del(obj, subobj))
3244 ERR("could not remove sub object %p from %p", subobj, obj);
3246 evas_object_box_remove(sd->box, subobj);
3250 elm_win_title_set(Evas_Object *obj,
3254 eo_do(obj, elm_obj_win_title_set(title));
3258 _title_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3260 const char *title = va_arg(*list, const char *);
3261 Elm_Win_Smart_Data *sd = _pd;
3264 eina_stringshare_replace(&(sd->title), title);
3265 TRAP(sd, title_set, sd->title);
3267 edje_object_part_text_escaped_set
3268 (sd->frame_obj, "elm.text.title", sd->title);
3272 elm_win_title_get(const Evas_Object *obj)
3274 ELM_WIN_CHECK(obj) NULL;
3275 const char *ret = NULL;
3276 eo_do((Eo *) obj, elm_obj_win_title_get(&ret));
3281 _title_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3283 const char **ret = va_arg(*list, const char **);
3284 Elm_Win_Smart_Data *sd = _pd;
3289 elm_win_icon_name_set(Evas_Object *obj,
3290 const char *icon_name)
3293 eo_do(obj, elm_obj_win_icon_name_set(icon_name));
3297 _icon_name_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3299 const char *icon_name = va_arg(*list, const char *);
3300 Elm_Win_Smart_Data *sd = _pd;
3302 if (!icon_name) return;
3303 eina_stringshare_replace(&(sd->icon_name), icon_name);
3304 #ifdef HAVE_ELEMENTARY_X
3305 _elm_win_xwin_update(sd);
3310 elm_win_icon_name_get(const Evas_Object *obj)
3312 ELM_WIN_CHECK(obj) NULL;
3313 const char *ret = NULL;
3314 eo_do((Eo *) obj, elm_obj_win_icon_name_get(&ret));
3319 _icon_name_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3321 const char **ret = va_arg(*list, const char **);
3322 Elm_Win_Smart_Data *sd = _pd;
3323 *ret = sd->icon_name;
3327 elm_win_role_set(Evas_Object *obj, const char *role)
3330 eo_do(obj, elm_obj_win_role_set(role));
3334 _role_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3336 const char *role = va_arg(*list, const char *);
3337 Elm_Win_Smart_Data *sd = _pd;
3340 eina_stringshare_replace(&(sd->role), role);
3341 #ifdef HAVE_ELEMENTARY_X
3342 _elm_win_xwin_update(sd);
3347 elm_win_role_get(const Evas_Object *obj)
3349 ELM_WIN_CHECK(obj) NULL;
3350 const char *ret = NULL;
3351 eo_do((Eo *) obj, elm_obj_win_role_get(&ret));
3356 _role_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3358 const char **ret = va_arg(*list, const char **);
3359 Elm_Win_Smart_Data *sd = _pd;
3364 elm_win_icon_object_set(Evas_Object *obj,
3368 eo_do(obj, elm_obj_win_icon_object_set(icon));
3372 _icon_object_set(Eo *obj, void *_pd, va_list *list)
3374 Evas_Object *icon = va_arg(*list, Evas_Object *);
3375 Elm_Win_Smart_Data *sd = _pd;
3378 evas_object_event_callback_del_full
3379 (sd->icon, EVAS_CALLBACK_DEL, _elm_win_on_icon_del, obj);
3382 evas_object_event_callback_add
3383 (sd->icon, EVAS_CALLBACK_DEL, _elm_win_on_icon_del, obj);
3384 #ifdef HAVE_ELEMENTARY_X
3385 _elm_win_xwin_update(sd);
3389 EAPI const Evas_Object *
3390 elm_win_icon_object_get(const Evas_Object *obj)
3392 ELM_WIN_CHECK(obj) NULL;
3393 const Evas_Object *ret = NULL;
3394 eo_do((Eo *) obj, elm_obj_win_icon_object_get(&ret));
3399 _icon_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3401 const Evas_Object **ret = va_arg(*list, const Evas_Object **);
3402 Elm_Win_Smart_Data *sd = _pd;
3407 elm_win_autodel_set(Evas_Object *obj,
3411 eo_do(obj, elm_obj_win_autodel_set(autodel));
3415 _autodel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3417 Eina_Bool autodel = va_arg(*list, int);
3418 Elm_Win_Smart_Data *sd = _pd;
3419 sd->autodel = autodel;
3423 elm_win_autodel_get(const Evas_Object *obj)
3425 ELM_WIN_CHECK(obj) EINA_FALSE;
3426 Eina_Bool ret = EINA_FALSE;
3427 eo_do((Eo *) obj, elm_obj_win_autodel_get(&ret));
3432 _autodel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3434 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3435 Elm_Win_Smart_Data *sd = _pd;
3440 elm_win_activate(Evas_Object *obj)
3443 eo_do(obj, elm_obj_win_activate());
3447 _activate(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3449 Elm_Win_Smart_Data *sd = _pd;
3454 elm_win_lower(Evas_Object *obj)
3457 eo_do(obj, elm_obj_win_lower());
3461 _lower(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3463 Elm_Win_Smart_Data *sd = _pd;
3468 elm_win_raise(Evas_Object *obj)
3471 eo_do(obj, elm_obj_win_raise());
3475 _raise(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3477 Elm_Win_Smart_Data *sd = _pd;
3482 elm_win_center(Evas_Object *obj,
3487 eo_do(obj, elm_obj_win_center(h, v));
3491 _center(Eo *obj, void *_pd, va_list *list)
3493 Eina_Bool h = va_arg(*list, int);
3494 Eina_Bool v = va_arg(*list, int);
3495 int win_w, win_h, screen_w, screen_h, nx, ny;
3497 Elm_Win_Smart_Data *sd = _pd;
3499 if ((trap) && (trap->center) && (!trap->center(sd->trap_data, obj)))
3502 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &screen_w, &screen_h);
3503 if ((!screen_w) || (!screen_h)) return;
3505 evas_object_geometry_get(obj, NULL, NULL, &win_w, &win_h);
3506 if ((!win_w) || (!win_h)) return;
3508 if (h) nx = win_w >= screen_w ? 0 : (screen_w / 2) - (win_w / 2);
3509 else nx = sd->screen.x;
3510 if (v) ny = win_h >= screen_h ? 0 : (screen_h / 2) - (win_h / 2);
3511 else ny = sd->screen.y;
3515 evas_object_move(obj, nx, ny);
3519 elm_win_borderless_set(Evas_Object *obj,
3520 Eina_Bool borderless)
3523 eo_do(obj, elm_obj_win_borderless_set(borderless));
3527 _borderless_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3529 Eina_Bool borderless = va_arg(*list, int);
3530 Elm_Win_Smart_Data *sd = _pd;
3534 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3535 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3536 _elm_win_frame_del(sd);
3540 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3541 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3542 _elm_win_frame_add(sd, "default");
3545 evas_object_show(sd->frame_obj);
3548 TRAP(sd, borderless_set, borderless);
3549 #ifdef HAVE_ELEMENTARY_X
3550 _elm_win_xwin_update(sd);
3555 elm_win_borderless_get(const Evas_Object *obj)
3557 ELM_WIN_CHECK(obj) EINA_FALSE;
3558 Eina_Bool ret = EINA_FALSE;
3559 eo_do((Eo *) obj, elm_obj_win_borderless_get(&ret));
3564 _borderless_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3566 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3567 Elm_Win_Smart_Data *sd = _pd;
3568 *ret = ecore_evas_borderless_get(sd->ee);
3572 elm_win_shaped_set(Evas_Object *obj,
3576 eo_do(obj, elm_obj_win_shaped_set(shaped));
3580 _shaped_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3582 Eina_Bool shaped = va_arg(*list, int);
3583 Elm_Win_Smart_Data *sd = _pd;
3585 TRAP(sd, shaped_set, shaped);
3586 #ifdef HAVE_ELEMENTARY_X
3587 _elm_win_xwin_update(sd);
3592 elm_win_shaped_get(const Evas_Object *obj)
3594 ELM_WIN_CHECK(obj) EINA_FALSE;
3595 Eina_Bool ret = EINA_FALSE;
3596 eo_do((Eo *) obj, elm_obj_win_shaped_get(&ret));
3601 _shaped_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3603 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3604 Elm_Win_Smart_Data *sd = _pd;
3605 *ret = ecore_evas_shaped_get(sd->ee);
3609 elm_win_alpha_set(Evas_Object *obj,
3613 eo_do(obj, elm_obj_win_alpha_set(enabled));
3617 _alpha_set(Eo *obj, void *_pd, va_list *list)
3619 Eina_Bool enabled = va_arg(*list, int);
3620 Elm_Win_Smart_Data *sd = _pd;
3624 evas_object_image_alpha_set(sd->img_obj, enabled);
3625 ecore_evas_alpha_set(sd->ee, enabled);
3629 #ifdef HAVE_ELEMENTARY_X
3634 if (!ecore_x_screen_is_composited(0))
3635 elm_win_shaped_set(obj, enabled);
3637 TRAP(sd, alpha_set, enabled);
3640 TRAP(sd, alpha_set, enabled);
3641 _elm_win_xwin_update(sd);
3645 TRAP(sd, alpha_set, enabled);
3650 elm_win_alpha_get(const Evas_Object *obj)
3652 ELM_WIN_CHECK(obj) EINA_FALSE;
3653 Eina_Bool ret = EINA_FALSE;
3654 eo_do((Eo *) obj, elm_obj_win_alpha_get(&ret));
3659 _alpha_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3661 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3662 Elm_Win_Smart_Data *sd = _pd;
3666 *ret = evas_object_image_alpha_get(sd->img_obj);
3670 *ret = ecore_evas_alpha_get(sd->ee);
3675 elm_win_override_set(Evas_Object *obj,
3679 eo_do(obj, elm_obj_win_override_set(override));
3683 _override_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3685 Eina_Bool override = va_arg(*list, int);
3686 Elm_Win_Smart_Data *sd = _pd;
3688 TRAP(sd, override_set, override);
3689 #ifdef HAVE_ELEMENTARY_X
3690 _elm_win_xwin_update(sd);
3695 elm_win_override_get(const Evas_Object *obj)
3697 ELM_WIN_CHECK(obj) EINA_FALSE;
3698 Eina_Bool ret = EINA_FALSE;
3699 eo_do((Eo *) obj, elm_obj_win_override_get(&ret));
3704 _override_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3706 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3707 Elm_Win_Smart_Data *sd = _pd;
3708 *ret = ecore_evas_override_get(sd->ee);
3712 elm_win_fullscreen_set(Evas_Object *obj,
3713 Eina_Bool fullscreen)
3716 eo_do(obj, elm_obj_win_fullscreen_set(fullscreen));
3720 _fullscreen_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3722 Eina_Bool fullscreen = va_arg(*list, int);
3723 Elm_Win_Smart_Data *sd = _pd;
3724 // YYY: handle if sd->img_obj
3725 if (ENGINE_COMPARE(ELM_SOFTWARE_FB) ||
3726 ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE))
3728 // these engines... can ONLY be fullscreen
3733 // sd->fullscreen = fullscreen;
3735 TRAP(sd, fullscreen_set, fullscreen);
3739 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3740 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3741 _elm_win_frame_del(sd);
3745 if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
3746 EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
3747 _elm_win_frame_add(sd, "default");
3750 evas_object_show(sd->frame_obj);
3752 #ifdef HAVE_ELEMENTARY_X
3753 _elm_win_xwin_update(sd);
3759 elm_win_fullscreen_get(const Evas_Object *obj)
3761 ELM_WIN_CHECK(obj) EINA_FALSE;
3762 Eina_Bool ret = EINA_FALSE;
3763 eo_do((Eo *) obj, elm_obj_win_fullscreen_get(&ret));
3768 _fullscreen_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3770 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3771 Elm_Win_Smart_Data *sd = _pd;
3773 if (EE_ENGINE_COMPARE(sd->ee, ELM_SOFTWARE_FB) ||
3774 EE_ENGINE_COMPARE(sd->ee, ELM_SOFTWARE_16_WINCE))
3776 // these engines... can ONLY be fullscreen
3781 *ret = sd->fullscreen;
3786 elm_win_main_menu_get(const Evas_Object *obj)
3788 ELM_WIN_CHECK(obj) NULL;
3790 eo_do((Eo *) obj, elm_obj_win_main_menu_get(&ret));
3795 _dbus_menu_set(Eina_Bool dbus_connect, void *data)
3797 ELM_WIN_DATA_GET_OR_RETURN(data, sd);
3801 DBG("Setting menu to D-Bus");
3802 edje_object_part_unswallow(sd->layout, sd->main_menu);
3803 edje_object_signal_emit(sd->layout, "elm,action,hide_menu", "elm");
3804 _elm_menu_menu_bar_hide(sd->main_menu);
3808 DBG("Setting menu to local mode");
3809 edje_object_part_swallow(sd->layout, "elm.swallow.menu", sd->main_menu);
3810 edje_object_signal_emit(sd->layout, "elm,action,show_menu", "elm");
3811 evas_object_show(sd->main_menu);
3816 _main_menu_get(Eo *obj, void *_pd, va_list *list)
3818 Eo **ret = va_arg(*list, Eo **);
3819 Elm_Win_Smart_Data *sd = _pd;
3820 Eina_Bool use_dbus = EINA_FALSE;
3822 if (sd->main_menu) goto end;
3824 sd->main_menu = elm_menu_add(obj);
3825 _elm_menu_menu_bar_set(sd->main_menu, EINA_TRUE);
3827 #ifdef HAVE_ELEMENTARY_X
3828 if (!_elm_config->disable_external_menu && sd->x.xwin) use_dbus = EINA_TRUE;
3831 #ifdef HAVE_ELEMENTARY_X
3832 if (use_dbus && _elm_dbus_menu_register(sd->main_menu))
3834 _elm_dbus_menu_app_menu_register(sd->x.xwin, sd->main_menu,
3835 _dbus_menu_set, obj);
3839 _dbus_menu_set(EINA_FALSE, obj);
3842 *ret = sd->main_menu;
3846 elm_win_maximized_set(Evas_Object *obj,
3847 Eina_Bool maximized)
3850 eo_do(obj, elm_obj_win_maximized_set(maximized));
3854 _maximized_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3856 Eina_Bool maximized = va_arg(*list, int);
3857 Elm_Win_Smart_Data *sd = _pd;
3859 _elm_win_frame_maximized_state_update(sd, maximized);
3860 // YYY: handle if sd->img_obj
3861 TRAP(sd, maximized_set, maximized);
3862 #ifdef HAVE_ELEMENTARY_X
3863 _elm_win_xwin_update(sd);
3868 elm_win_maximized_get(const Evas_Object *obj)
3870 ELM_WIN_CHECK(obj) EINA_FALSE;
3871 Eina_Bool ret = EINA_FALSE;
3872 eo_do((Eo *) obj, elm_obj_win_maximized_get(&ret));
3877 _maximized_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3879 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3880 Elm_Win_Smart_Data *sd = _pd;
3881 *ret = sd->maximized;
3885 elm_win_iconified_set(Evas_Object *obj,
3886 Eina_Bool iconified)
3889 eo_do(obj, elm_obj_win_iconified_set(iconified));
3893 _iconified_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3895 Eina_Bool iconified = va_arg(*list, int);
3896 Elm_Win_Smart_Data *sd = _pd;
3898 // sd->iconified = iconified;
3899 TRAP(sd, iconified_set, iconified);
3900 #ifdef HAVE_ELEMENTARY_X
3901 _elm_win_xwin_update(sd);
3906 elm_win_iconified_get(const Evas_Object *obj)
3908 ELM_WIN_CHECK(obj) EINA_FALSE;
3909 Eina_Bool ret = EINA_FALSE;
3910 eo_do((Eo *) obj, elm_obj_win_iconified_get(&ret));
3915 _iconified_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3917 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3918 Elm_Win_Smart_Data *sd = _pd;
3919 *ret = sd->iconified;
3923 elm_win_withdrawn_set(Evas_Object *obj,
3924 Eina_Bool withdrawn)
3927 eo_do(obj, elm_obj_win_withdrawn_set(withdrawn));
3931 _withdrawn_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3933 Eina_Bool withdrawn = va_arg(*list, int);
3934 Elm_Win_Smart_Data *sd = _pd;
3936 // sd->withdrawn = withdrawn;
3937 TRAP(sd, withdrawn_set, withdrawn);
3938 #ifdef HAVE_ELEMENTARY_X
3939 _elm_win_xwin_update(sd);
3944 elm_win_withdrawn_get(const Evas_Object *obj)
3946 ELM_WIN_CHECK(obj) EINA_FALSE;
3947 Eina_Bool ret = EINA_FALSE;
3948 eo_do((Eo *) obj, elm_obj_win_withdrawn_get(&ret));
3953 _withdrawn_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3955 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3956 Elm_Win_Smart_Data *sd = _pd;
3957 *ret = sd->withdrawn;
3961 elm_win_available_profiles_set(Evas_Object *obj,
3962 const char **profiles,
3966 eo_do((Eo *) obj, elm_obj_win_available_profiles_set(profiles, count));
3970 _available_profiles_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3972 const char **profiles = va_arg(*list, const char **);
3973 unsigned int count = va_arg(*list, unsigned int);
3974 Elm_Win_Smart_Data *sd = _pd;
3975 Eina_Bool found = EINA_FALSE;
3977 _elm_win_available_profiles_del(sd);
3978 if ((profiles) && (count >= 1))
3980 sd->profile.available_list = calloc(count, sizeof(char *));
3981 if (sd->profile.available_list)
3983 if (!sd->profile.name) found = EINA_TRUE;
3986 for (i = 0; i < count; i++)
3988 sd->profile.available_list[i] = eina_stringshare_add(profiles[i]);
3990 /* check to see if a given array has a current profile of elm_win */
3991 if ((sd->profile.name) &&
3992 (!strcmp(sd->profile.name, profiles[i])))
3997 sd->profile.count = count;
4001 if (ecore_evas_window_profile_supported_get(sd->ee))
4003 ecore_evas_window_available_profiles_set(sd->ee,
4004 sd->profile.available_list,
4007 /* current profile of elm_win is wrong, change profile */
4008 if ((sd->profile.available_list) && (!found))
4010 eina_stringshare_replace(&(sd->profile.name),
4011 sd->profile.available_list[0]);
4012 ecore_evas_window_profile_set(sd->ee, sd->profile.name);
4018 if (sd->profile.available_list)
4019 _elm_win_profile_update(sd);
4024 elm_win_available_profiles_get(Evas_Object *obj,
4026 unsigned int *count)
4028 ELM_WIN_CHECK(obj) EINA_FALSE;
4029 Eina_Bool ret = EINA_FALSE;
4030 eo_do((Eo *) obj, elm_obj_win_available_profiles_get(&ret, profiles, count));
4035 _available_profiles_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4037 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4038 char ***profiles = va_arg(*list, char ***);
4039 unsigned int *count = va_arg(*list, unsigned int *);
4040 Elm_Win_Smart_Data *sd = _pd;
4043 if (ecore_evas_window_profile_supported_get(sd->ee))
4045 res = ecore_evas_window_available_profiles_get(sd->ee,
4051 if (profiles) *profiles = (char **)sd->profile.available_list;
4052 if (count) *count = sd->profile.count;
4059 elm_win_profile_set(Evas_Object *obj,
4060 const char *profile)
4063 eo_do((Eo *) obj, elm_obj_win_profile_set(profile));
4067 _profile_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4069 const char *profile = va_arg(*list, const char *);
4070 Elm_Win_Smart_Data *sd = _pd;
4072 /* check to see if a given profile is present in an available profiles */
4073 if ((profile) && (sd->profile.available_list))
4075 Eina_Bool found = EINA_FALSE;
4077 for (i = 0; i < sd->profile.count; i++)
4079 if (!strcmp(profile,
4080 sd->profile.available_list[i]))
4089 if (ecore_evas_window_profile_supported_get(sd->ee))
4091 if (!profile) _elm_win_profile_del(sd);
4092 ecore_evas_window_profile_set(sd->ee, profile);
4096 if (_elm_win_profile_set(sd, profile))
4097 _elm_win_profile_update(sd);
4102 elm_win_profile_get(const Evas_Object *obj)
4104 ELM_WIN_CHECK(obj) NULL;
4105 const char *ret = NULL;
4106 eo_do((Eo *) obj, elm_obj_win_profile_get(&ret));
4111 _profile_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4113 const char **ret = va_arg(*list, const char **);
4114 Elm_Win_Smart_Data *sd = _pd;
4115 *ret = sd->profile.name;
4119 elm_win_urgent_set(Evas_Object *obj,
4123 eo_do(obj, elm_obj_win_urgent_set(urgent));
4127 _urgent_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4129 Eina_Bool urgent = va_arg(*list, int);
4130 Elm_Win_Smart_Data *sd = _pd;
4132 sd->urgent = urgent;
4133 TRAP(sd, urgent_set, urgent);
4134 #ifdef HAVE_ELEMENTARY_X
4135 _elm_win_xwin_update(sd);
4140 elm_win_urgent_get(const Evas_Object *obj)
4142 ELM_WIN_CHECK(obj) EINA_FALSE;
4143 Eina_Bool ret = EINA_FALSE;
4144 eo_do((Eo *) obj, elm_obj_win_urgent_get(&ret));
4149 _urgent_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4151 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4152 Elm_Win_Smart_Data *sd = _pd;
4157 elm_win_demand_attention_set(Evas_Object *obj,
4158 Eina_Bool demand_attention)
4161 eo_do(obj, elm_obj_win_demand_attention_set(demand_attention));
4165 _demand_attention_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4167 Eina_Bool demand_attention = va_arg(*list, int);
4168 Elm_Win_Smart_Data *sd = _pd;
4170 sd->demand_attention = demand_attention;
4171 TRAP(sd, demand_attention_set, demand_attention);
4172 #ifdef HAVE_ELEMENTARY_X
4173 _elm_win_xwin_update(sd);
4178 elm_win_demand_attention_get(const Evas_Object *obj)
4180 ELM_WIN_CHECK(obj) EINA_FALSE;
4181 Eina_Bool ret = EINA_FALSE;
4182 eo_do((Eo *) obj, elm_obj_win_demand_attention_get(&ret));
4187 _demand_attention_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4189 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4190 Elm_Win_Smart_Data *sd = _pd;
4191 *ret = sd->demand_attention;
4195 elm_win_modal_set(Evas_Object *obj,
4199 eo_do(obj, elm_obj_win_modal_set(modal));
4203 _modal_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4205 Eina_Bool modal = va_arg(*list, int);
4206 Elm_Win_Smart_Data *sd = _pd;
4209 TRAP(sd, modal_set, modal);
4210 #ifdef HAVE_ELEMENTARY_X
4211 _elm_win_xwin_update(sd);
4216 elm_win_modal_get(const Evas_Object *obj)
4218 ELM_WIN_CHECK(obj) EINA_FALSE;
4219 Eina_Bool ret = EINA_FALSE;
4220 eo_do((Eo *) obj, elm_obj_win_modal_get(&ret));
4225 _modal_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4227 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4228 Elm_Win_Smart_Data *sd = _pd;
4233 elm_win_aspect_set(Evas_Object *obj,
4237 eo_do(obj, elm_obj_win_aspect_set(aspect));
4241 _aspect_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4243 double aspect = va_arg(*list, double);
4244 Elm_Win_Smart_Data *sd = _pd;
4246 sd->aspect = aspect;
4247 TRAP(sd, aspect_set, aspect);
4248 #ifdef HAVE_ELEMENTARY_X
4249 _elm_win_xwin_update(sd);
4254 elm_win_aspect_get(const Evas_Object *obj)
4256 ELM_WIN_CHECK(obj) 0.0;
4258 eo_do((Eo *) obj, elm_obj_win_aspect_get(&ret));
4263 _aspect_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4265 double *ret = va_arg(*list, double *);
4266 Elm_Win_Smart_Data *sd = _pd;
4271 elm_win_size_base_set(Evas_Object *obj, int w, int h)
4274 eo_do(obj, elm_obj_win_size_base_set(w, h));
4278 _size_base_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4280 int w = va_arg(*list, int);
4281 int h = va_arg(*list, int);
4282 Elm_Win_Smart_Data *sd = _pd;
4283 sd->size_base_w = w;
4284 sd->size_base_h = h;
4285 TRAP(sd, size_base_set, w, h);
4286 #ifdef HAVE_ELEMENTARY_X
4287 _elm_win_xwin_update(sd);
4292 elm_win_size_base_get(Evas_Object *obj, int *w, int *h)
4295 eo_do(obj, elm_obj_win_size_base_get(w, h));
4299 _size_base_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4301 int *w = va_arg(*list, int *);
4302 int *h = va_arg(*list, int *);
4304 Elm_Win_Smart_Data *sd = _pd;
4305 if (w) *w = sd->size_base_w;
4306 if (w) *h = sd->size_base_h;
4310 elm_win_size_step_set(Evas_Object *obj, int w, int h)
4313 eo_do(obj, elm_obj_win_size_step_set(w, h));
4317 _size_step_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4319 int w = va_arg(*list, int);
4320 int h = va_arg(*list, int);
4321 Elm_Win_Smart_Data *sd = _pd;
4322 sd->size_step_w = w;
4323 sd->size_step_h = h;
4324 TRAP(sd, size_step_set, w, h);
4325 #ifdef HAVE_ELEMENTARY_X
4326 _elm_win_xwin_update(sd);
4331 elm_win_size_step_get(Evas_Object *obj, int *w, int *h)
4334 eo_do(obj, elm_obj_win_size_step_get(w, h));
4338 _size_step_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4340 int *w = va_arg(*list, int *);
4341 int *h = va_arg(*list, int *);
4342 Elm_Win_Smart_Data *sd = _pd;
4343 if (w) *w = sd->size_step_w;
4344 if (w) *h = sd->size_step_h;
4348 elm_win_layer_set(Evas_Object *obj,
4352 eo_do(obj, elm_obj_win_layer_set(layer));
4356 _layer_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4358 int layer = va_arg(*list, int);
4359 Elm_Win_Smart_Data *sd = _pd;
4361 TRAP(sd, layer_set, layer);
4362 #ifdef HAVE_ELEMENTARY_X
4363 _elm_win_xwin_update(sd);
4368 elm_win_layer_get(const Evas_Object *obj)
4370 ELM_WIN_CHECK(obj) - 1;
4372 eo_do((Eo *) obj, elm_obj_win_layer_get(&ret));
4377 _layer_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4379 int *ret = va_arg(*list, int *);
4380 Elm_Win_Smart_Data *sd = _pd;
4381 *ret = ecore_evas_layer_get(sd->ee);
4385 elm_win_norender_push(Evas_Object *obj)
4388 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4391 if (sd->norender == 1) ecore_evas_manual_render_set(sd->ee, EINA_TRUE);
4395 elm_win_norender_pop(Evas_Object *obj)
4398 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4400 if (sd->norender <= 0) return;
4402 if (sd->norender == 0) ecore_evas_manual_render_set(sd->ee, EINA_FALSE);
4406 elm_win_norender_get(Evas_Object *obj)
4408 ELM_WIN_CHECK(obj) - 1;
4409 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, -1);
4410 return sd->norender;
4414 elm_win_render(Evas_Object *obj)
4417 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
4418 ecore_evas_manual_render(sd->ee);
4422 _win_rotation_degree_check(int rotation)
4424 if ((rotation > 360) || (rotation < 0))
4426 WRN("Rotation degree should be 0 ~ 360 (passed degree: %d)", rotation);
4428 if (rotation < 0) rotation += 360;
4434 elm_win_rotation_set(Evas_Object *obj,
4438 eo_do(obj, elm_obj_win_rotation_set(rotation));
4442 _win_rotate(Evas_Object *obj, Elm_Win_Smart_Data *sd, int rotation, Eina_Bool resize)
4444 rotation = _win_rotation_degree_check(rotation);
4445 if (sd->rot == rotation) return;
4447 if (resize) TRAP(sd, rotation_with_resize_set, rotation);
4448 else TRAP(sd, rotation_set, rotation);
4449 evas_object_size_hint_min_set(obj, -1, -1);
4450 evas_object_size_hint_max_set(obj, -1, -1);
4451 _elm_win_resize_objects_eval(obj);
4452 #ifdef HAVE_ELEMENTARY_X
4453 _elm_win_xwin_update(sd);
4455 elm_widget_orientation_set(obj, rotation);
4456 evas_object_smart_callback_call(obj, SIG_ROTATION_CHANGED, NULL);
4460 _rotation_set(Eo *obj, void *_pd, va_list *list)
4462 int rotation = va_arg(*list, int);
4463 Elm_Win_Smart_Data *sd = _pd;
4464 _win_rotate(obj, sd, rotation, EINA_FALSE);
4468 elm_win_rotation_with_resize_set(Evas_Object *obj,
4472 eo_do(obj, elm_obj_win_rotation_with_resize_set(rotation));
4476 _rotation_with_resize_set(Eo *obj, void *_pd, va_list *list)
4478 int rotation = va_arg(*list, int);
4479 Elm_Win_Smart_Data *sd = _pd;
4480 _win_rotate(obj, sd, rotation, EINA_TRUE);
4484 elm_win_rotation_get(const Evas_Object *obj)
4486 ELM_WIN_CHECK(obj) - 1;
4488 eo_do((Eo *) obj, elm_obj_win_rotation_get(&ret));
4493 _rotation_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4495 int *ret = va_arg(*list, int *);
4496 Elm_Win_Smart_Data *sd = _pd;
4501 elm_win_sticky_set(Evas_Object *obj,
4505 eo_do(obj, elm_obj_win_sticky_set(sticky));
4509 _sticky_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4511 Eina_Bool sticky = va_arg(*list, int);
4512 Elm_Win_Smart_Data *sd = _pd;
4514 // sd->sticky = sticky;
4515 TRAP(sd, sticky_set, sticky);
4516 #ifdef HAVE_ELEMENTARY_X
4517 _elm_win_xwin_update(sd);
4522 elm_win_sticky_get(const Evas_Object *obj)
4524 ELM_WIN_CHECK(obj) EINA_FALSE;
4525 Eina_Bool ret = EINA_FALSE;
4526 eo_do((Eo *) obj, elm_obj_win_sticky_get(&ret));
4531 _sticky_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4533 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4534 Elm_Win_Smart_Data *sd = _pd;
4539 elm_win_keyboard_mode_set(Evas_Object *obj,
4540 Elm_Win_Keyboard_Mode mode)
4543 eo_do(obj, elm_obj_win_keyboard_mode_set(mode));
4547 _keyboard_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4549 Elm_Win_Keyboard_Mode mode = va_arg(*list, Elm_Win_Keyboard_Mode);
4550 Elm_Win_Smart_Data *sd = _pd;
4552 if (mode == sd->kbdmode) return;
4553 #ifdef HAVE_ELEMENTARY_X
4554 _elm_win_xwindow_get(sd);
4557 #ifdef HAVE_ELEMENTARY_X
4559 ecore_x_e_virtual_keyboard_state_set
4560 (sd->x.xwin, (Ecore_X_Virtual_Keyboard_State)sd->kbdmode);
4564 EAPI Elm_Win_Keyboard_Mode
4565 elm_win_keyboard_mode_get(const Evas_Object *obj)
4567 ELM_WIN_CHECK(obj) ELM_WIN_KEYBOARD_UNKNOWN;
4568 Elm_Win_Keyboard_Mode ret = ELM_WIN_KEYBOARD_UNKNOWN;
4569 eo_do((Eo *) obj, elm_obj_win_keyboard_mode_get(&ret));
4574 _keyboard_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4576 Elm_Win_Keyboard_Mode *ret = va_arg(*list, Elm_Win_Keyboard_Mode *);
4577 Elm_Win_Smart_Data *sd = _pd;
4582 elm_win_keyboard_win_set(Evas_Object *obj,
4583 Eina_Bool is_keyboard)
4586 eo_do(obj, elm_obj_win_keyboard_win_set(is_keyboard));
4590 _keyboard_win_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4592 Eina_Bool is_keyboard = va_arg(*list, int);
4593 Elm_Win_Smart_Data *sd = _pd;
4595 #ifdef HAVE_ELEMENTARY_X
4596 _elm_win_xwindow_get(sd);
4598 ecore_x_e_virtual_keyboard_set(sd->x.xwin, is_keyboard);
4605 elm_win_keyboard_win_get(const Evas_Object *obj)
4607 ELM_WIN_CHECK(obj) EINA_FALSE;
4608 Eina_Bool ret = EINA_FALSE;
4609 eo_do((Eo *) obj, elm_obj_win_keyboard_win_get(&ret));
4614 _keyboard_win_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4616 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4617 Elm_Win_Smart_Data *sd = _pd;
4619 #ifdef HAVE_ELEMENTARY_X
4620 _elm_win_xwindow_get(sd);
4623 *ret = ecore_x_e_virtual_keyboard_get(sd->x.xwin);
4631 elm_win_indicator_mode_set(Evas_Object *obj,
4632 Elm_Win_Indicator_Mode mode)
4635 eo_do(obj, elm_obj_win_indicator_mode_set(mode));
4639 _indicator_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4641 Elm_Win_Indicator_Mode mode = va_arg(*list, Elm_Win_Indicator_Mode);
4642 Elm_Win_Smart_Data *sd = _pd;
4644 if (mode == sd->indmode) return;
4645 #ifdef HAVE_ELEMENTARY_X
4646 _elm_win_xwindow_get(sd);
4649 #ifdef HAVE_ELEMENTARY_X
4652 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
4653 ecore_x_e_illume_indicator_state_set
4654 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
4655 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
4656 ecore_x_e_illume_indicator_state_set
4657 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
4660 evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
4663 EAPI Elm_Win_Indicator_Mode
4664 elm_win_indicator_mode_get(const Evas_Object *obj)
4666 ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_UNKNOWN;
4667 Elm_Win_Indicator_Mode ret = ELM_WIN_INDICATOR_UNKNOWN;
4668 eo_do((Eo *) obj, elm_obj_win_indicator_mode_get(&ret));
4673 _indicator_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4675 Elm_Win_Indicator_Mode *ret = va_arg(*list, Elm_Win_Indicator_Mode *);
4676 Elm_Win_Smart_Data *sd = _pd;
4681 elm_win_indicator_opacity_set(Evas_Object *obj,
4682 Elm_Win_Indicator_Opacity_Mode mode)
4685 eo_do(obj, elm_obj_win_indicator_opacity_set(mode));
4689 _indicator_opacity_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4691 Elm_Win_Indicator_Opacity_Mode mode = va_arg(*list, Elm_Win_Indicator_Opacity_Mode);
4692 Elm_Win_Smart_Data *sd = _pd;
4694 if (mode == sd->ind_o_mode) return;
4695 sd->ind_o_mode = mode;
4696 #ifdef HAVE_ELEMENTARY_X
4697 _elm_win_xwindow_get(sd);
4700 if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
4701 ecore_x_e_illume_indicator_opacity_set
4702 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_OPAQUE);
4703 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSLUCENT)
4704 ecore_x_e_illume_indicator_opacity_set
4705 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
4706 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
4707 ecore_x_e_illume_indicator_opacity_set
4708 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
4711 evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
4714 EAPI Elm_Win_Indicator_Opacity_Mode
4715 elm_win_indicator_opacity_get(const Evas_Object *obj)
4717 ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
4718 Elm_Win_Indicator_Opacity_Mode ret = ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
4719 eo_do((Eo *) obj, elm_obj_win_indicator_opacity_get(&ret));
4724 _indicator_opacity_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4726 Elm_Win_Indicator_Opacity_Mode *ret = va_arg(*list, Elm_Win_Indicator_Opacity_Mode *);
4727 Elm_Win_Smart_Data *sd = _pd;
4728 *ret = sd->ind_o_mode;
4732 elm_win_screen_position_get(const Evas_Object *obj,
4737 eo_do((Eo *) obj, elm_obj_win_screen_position_get(x, y));
4741 _screen_position_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4743 int *x = va_arg(*list, int *);
4744 int *y = va_arg(*list, int *);
4745 Elm_Win_Smart_Data *sd = _pd;
4747 if (x) *x = sd->screen.x;
4748 if (y) *y = sd->screen.y;
4752 elm_win_focus_get(const Evas_Object *obj)
4754 ELM_WIN_CHECK(obj) EINA_FALSE;
4755 Eina_Bool ret = EINA_FALSE;
4756 eo_do((Eo *) obj, elm_obj_win_focus_get(&ret));
4761 _focus_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4763 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4764 Elm_Win_Smart_Data *sd = _pd;
4765 *ret = ecore_evas_focus_get(sd->ee);
4769 elm_win_screen_constrain_set(Evas_Object *obj,
4770 Eina_Bool constrain)
4773 eo_do(obj, elm_obj_win_screen_constrain_set(constrain));
4777 _screen_constrain_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4779 Eina_Bool constrain = va_arg(*list, int);
4780 Elm_Win_Smart_Data *sd = _pd;
4781 sd->constrain = !!constrain;
4785 elm_win_screen_constrain_get(Evas_Object *obj)
4787 ELM_WIN_CHECK(obj) EINA_FALSE;
4788 Eina_Bool ret = EINA_FALSE;
4789 eo_do(obj, elm_obj_win_screen_constrain_get(&ret));
4794 _screen_constrain_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4796 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4797 Elm_Win_Smart_Data *sd = _pd;
4798 *ret = sd->constrain;
4802 elm_win_screen_size_get(const Evas_Object *obj,
4809 eo_do((Eo *) obj, elm_obj_win_screen_size_get(x, y, w, h));
4813 _screen_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4815 int *x = va_arg(*list, int *);
4816 int *y = va_arg(*list, int *);
4817 int *w = va_arg(*list, int *);
4818 int *h = va_arg(*list, int *);
4819 Elm_Win_Smart_Data *sd = _pd;
4821 ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
4825 elm_win_screen_dpi_get(const Evas_Object *obj,
4830 eo_do((Eo *) obj, elm_obj_win_screen_dpi_get(xdpi, ydpi));
4834 _screen_dpi_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4836 int *xdpi = va_arg(*list, int *);
4837 int *ydpi = va_arg(*list, int *);
4838 Elm_Win_Smart_Data *sd = _pd;
4840 ecore_evas_screen_dpi_get(sd->ee, xdpi, ydpi);
4844 elm_win_conformant_set(Evas_Object *obj,
4845 Eina_Bool conformant)
4848 eo_do(obj, elm_obj_win_conformant_set(conformant));
4852 _conformant_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4854 Eina_Bool conformant = va_arg(*list, int);
4855 Elm_Win_Smart_Data *sd = _pd;
4857 #ifdef HAVE_ELEMENTARY_X
4858 _elm_win_xwindow_get(sd);
4860 ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
4867 elm_win_conformant_get(const Evas_Object *obj)
4869 ELM_WIN_CHECK(obj) EINA_FALSE;
4870 Eina_Bool ret = EINA_FALSE;
4871 eo_do((Eo *) obj, elm_obj_win_conformant_get(&ret));
4876 _conformant_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4878 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4879 Elm_Win_Smart_Data *sd = _pd;
4882 #ifdef HAVE_ELEMENTARY_X
4883 _elm_win_xwindow_get(sd);
4885 *ret = ecore_x_e_illume_conformant_get(sd->x.xwin);
4890 elm_win_quickpanel_set(Evas_Object *obj,
4891 Eina_Bool quickpanel)
4894 eo_do(obj, elm_obj_win_quickpanel_set(quickpanel));
4898 _quickpanel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4900 Eina_Bool quickpanel = va_arg(*list, int);
4901 Elm_Win_Smart_Data *sd = _pd;
4902 #ifdef HAVE_ELEMENTARY_X
4903 _elm_win_xwindow_get(sd);
4906 ecore_x_e_illume_quickpanel_set(sd->x.xwin, quickpanel);
4909 Ecore_X_Window_State states[2];
4911 states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
4912 states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
4913 ecore_x_netwm_window_state_set(sd->x.xwin, states, 2);
4914 ecore_x_icccm_hints_set(sd->x.xwin, 0, 0, 0, 0, 0, 0, 0);
4923 elm_win_quickpanel_get(const Evas_Object *obj)
4925 ELM_WIN_CHECK(obj) EINA_FALSE;
4926 Eina_Bool ret = EINA_FALSE;
4927 eo_do((Eo *) obj, elm_obj_win_quickpanel_get(&ret));
4932 _quickpanel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4934 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4935 Elm_Win_Smart_Data *sd = _pd;
4938 #ifdef HAVE_ELEMENTARY_X
4939 _elm_win_xwindow_get(sd);
4941 *ret = ecore_x_e_illume_quickpanel_get(sd->x.xwin);
4946 elm_win_quickpanel_priority_major_set(Evas_Object *obj,
4950 eo_do(obj, elm_obj_win_quickpanel_priority_major_set(priority));
4954 _quickpanel_priority_major_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4956 int priority = va_arg(*list, int);
4957 Elm_Win_Smart_Data *sd = _pd;
4959 #ifdef HAVE_ELEMENTARY_X
4960 _elm_win_xwindow_get(sd);
4962 ecore_x_e_illume_quickpanel_priority_major_set(sd->x.xwin, priority);
4969 elm_win_quickpanel_priority_major_get(const Evas_Object *obj)
4971 ELM_WIN_CHECK(obj) - 1;
4973 eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_major_get(&ret));
4978 _quickpanel_priority_major_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4980 int *ret = va_arg(*list, int *);
4981 Elm_Win_Smart_Data *sd = _pd;
4984 #ifdef HAVE_ELEMENTARY_X
4985 _elm_win_xwindow_get(sd);
4987 *ret = ecore_x_e_illume_quickpanel_priority_major_get(sd->x.xwin);
4992 elm_win_quickpanel_priority_minor_set(Evas_Object *obj,
4996 eo_do(obj, elm_obj_win_quickpanel_priority_minor_set(priority));
5000 _quickpanel_priority_minor_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5002 int priority = va_arg(*list, int);
5003 Elm_Win_Smart_Data *sd = _pd;
5005 #ifdef HAVE_ELEMENTARY_X
5006 _elm_win_xwindow_get(sd);
5008 ecore_x_e_illume_quickpanel_priority_minor_set(sd->x.xwin, priority);
5015 elm_win_quickpanel_priority_minor_get(const Evas_Object *obj)
5017 ELM_WIN_CHECK(obj) - 1;
5019 eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_minor_get(&ret));
5024 _quickpanel_priority_minor_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5026 int *ret = va_arg(*list, int *);
5027 Elm_Win_Smart_Data *sd = _pd;
5030 #ifdef HAVE_ELEMENTARY_X
5031 _elm_win_xwindow_get(sd);
5033 *ret = ecore_x_e_illume_quickpanel_priority_minor_get(sd->x.xwin);
5038 elm_win_quickpanel_zone_set(Evas_Object *obj,
5042 eo_do(obj, elm_obj_win_quickpanel_zone_set(zone));
5046 _quickpanel_zone_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5048 int zone = va_arg(*list, int);
5049 Elm_Win_Smart_Data *sd = _pd;
5051 #ifdef HAVE_ELEMENTARY_X
5052 _elm_win_xwindow_get(sd);
5054 ecore_x_e_illume_quickpanel_zone_set(sd->x.xwin, zone);
5061 elm_win_quickpanel_zone_get(const Evas_Object *obj)
5063 ELM_WIN_CHECK(obj) 0;
5065 eo_do((Eo *) obj, elm_obj_win_quickpanel_zone_get(&ret));
5070 _quickpanel_zone_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5072 int *ret = va_arg(*list, int *);
5073 Elm_Win_Smart_Data *sd = _pd;
5076 #ifdef HAVE_ELEMENTARY_X
5077 _elm_win_xwindow_get(sd);
5079 *ret = ecore_x_e_illume_quickpanel_zone_get(sd->x.xwin);
5084 elm_win_prop_focus_skip_set(Evas_Object *obj,
5088 eo_do(obj, elm_obj_win_prop_focus_skip_set(skip));
5092 _prop_focus_skip_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5094 Eina_Bool skip = va_arg(*list, int);
5095 Elm_Win_Smart_Data *sd = _pd;
5097 sd->skip_focus = skip;
5098 TRAP(sd, focus_skip_set, skip);
5102 elm_win_illume_command_send(Evas_Object *obj,
5103 Elm_Illume_Command command,
5107 eo_do(obj, elm_obj_win_illume_command_send(command, params));
5111 _illume_command_send(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5113 Elm_Illume_Command command = va_arg(*list, Elm_Illume_Command);
5114 void *params = va_arg(*list, void *);
5116 Elm_Win_Smart_Data *sd = _pd;
5118 #ifdef HAVE_ELEMENTARY_X
5119 _elm_win_xwindow_get(sd);
5124 case ELM_ILLUME_COMMAND_FOCUS_BACK:
5125 ecore_x_e_illume_focus_back_send(sd->x.xwin);
5128 case ELM_ILLUME_COMMAND_FOCUS_FORWARD:
5129 ecore_x_e_illume_focus_forward_send(sd->x.xwin);
5132 case ELM_ILLUME_COMMAND_FOCUS_HOME:
5133 ecore_x_e_illume_focus_home_send(sd->x.xwin);
5136 case ELM_ILLUME_COMMAND_CLOSE:
5137 ecore_x_e_illume_close_send(sd->x.xwin);
5150 elm_win_inlined_image_object_get(Evas_Object *obj)
5152 ELM_WIN_CHECK(obj) NULL;
5153 Evas_Object *ret = NULL;
5154 eo_do(obj, elm_obj_win_inlined_image_object_get(&ret));
5159 _inlined_image_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5161 Evas_Object **ret = va_arg(*list, Evas_Object **);
5162 Elm_Win_Smart_Data *sd = _pd;
5167 elm_win_focus_highlight_enabled_set(Evas_Object *obj,
5171 eo_do(obj, elm_obj_win_focus_highlight_enabled_set(enabled));
5175 _focus_highlight_enabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5177 Eina_Bool enabled = va_arg(*list, int);
5178 Elm_Win_Smart_Data *sd = _pd;
5180 enabled = !!enabled;
5181 if (sd->focus_highlight.enabled == enabled)
5184 sd->focus_highlight.enabled = enabled;
5186 if (sd->focus_highlight.enabled)
5187 _elm_win_focus_highlight_init(sd);
5189 _elm_win_focus_highlight_shutdown(sd);
5193 elm_win_focus_highlight_enabled_get(const Evas_Object *obj)
5195 ELM_WIN_CHECK(obj) EINA_FALSE;
5196 Eina_Bool ret = EINA_FALSE;
5197 eo_do((Eo *) obj, elm_obj_win_focus_highlight_enabled_get(&ret));
5202 _focus_highlight_enabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5204 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5205 Elm_Win_Smart_Data *sd = _pd;
5206 *ret = sd->focus_highlight.enabled;
5210 elm_win_focus_highlight_style_set(Evas_Object *obj,
5214 eo_do(obj, elm_obj_win_focus_highlight_style_set(style));
5218 _elm_win_smart_theme(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
5220 Elm_Win_Smart_Data *sd = _pd;
5221 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5222 Eina_Bool int_ret = EINA_FALSE;
5224 if (ret) *ret = EINA_TRUE;
5226 eo_do_super(obj, MY_CLASS, elm_wdg_theme(&int_ret));
5227 if (!int_ret) return;
5229 sd->focus_highlight.theme_changed = EINA_TRUE;
5230 _elm_win_focus_highlight_reconfigure_job_start(sd);
5232 if (ret) *ret = EINA_TRUE;
5236 _focus_highlight_style_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5238 const char *style = va_arg(*list, const char *);
5239 Elm_Win_Smart_Data *sd = _pd;
5241 eina_stringshare_replace(&sd->focus_highlight.style, style);
5242 sd->focus_highlight.theme_changed = EINA_TRUE;
5243 _elm_win_focus_highlight_reconfigure_job_start(sd);
5247 elm_win_focus_highlight_style_get(const Evas_Object *obj)
5249 ELM_WIN_CHECK(obj) NULL;
5250 const char *ret = NULL;
5251 eo_do((Eo *) obj, elm_obj_win_focus_highlight_style_get(&ret));
5256 _focus_highlight_style_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5258 const char **ret = va_arg(*list, const char **);
5259 Elm_Win_Smart_Data *sd = _pd;
5260 *ret = sd->focus_highlight.style;
5264 elm_win_focus_highlight_animate_set(Evas_Object *obj,
5268 eo_do(obj, elm_obj_win_focus_highlight_animate_set(animate));
5272 _focus_highlight_animate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5274 Eina_Bool animate = va_arg(*list, int);
5275 Elm_Win_Smart_Data *sd = _pd;
5277 animate = !!animate;
5278 if (sd->focus_highlight.animate == animate)
5281 sd->focus_highlight.animate = animate;
5282 sd->focus_highlight.theme_changed = EINA_TRUE;
5283 _elm_win_focus_highlight_reconfigure_job_start(sd);
5287 elm_win_focus_highlight_animate_get(const Evas_Object *obj)
5289 ELM_WIN_CHECK(obj) EINA_FALSE;
5290 Eina_Bool ret = EINA_FALSE;
5291 eo_do((Eo *) obj, elm_obj_win_focus_highlight_animate_get(&ret));
5296 _focus_highlight_animate_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5298 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5299 Elm_Win_Smart_Data *sd = _pd;
5300 *ret = sd->focus_highlight.animate;
5304 elm_win_socket_listen(Evas_Object *obj,
5305 const char *svcname,
5309 ELM_WIN_CHECK(obj) EINA_FALSE;
5310 Eina_Bool ret = EINA_FALSE;
5311 eo_do(obj, elm_obj_win_socket_listen(svcname, svcnum, svcsys, &ret));
5316 _socket_listen(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5318 const char *svcname = va_arg(*list, const char *);
5319 int svcnum = va_arg(*list, int);
5320 Eina_Bool svcsys = va_arg(*list, int);
5321 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
5322 Elm_Win_Smart_Data *sd = _pd;
5325 if (!sd->ee) return;
5327 if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys))
5333 /* windowing specific calls - shall we do this differently? */
5336 elm_win_xwindow_get(const Evas_Object *obj)
5340 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
5342 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5343 return _elm_ee_xwin_get(ee);
5346 ELM_WIN_CHECK(obj) 0;
5347 Ecore_X_Window ret = 0;
5348 eo_do((Eo *) obj, elm_obj_win_xwindow_get(&ret));
5353 _xwindow_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5355 Ecore_X_Window *ret = va_arg(*list, Ecore_X_Window *);
5356 Elm_Win_Smart_Data *sd = _pd;
5358 #ifdef HAVE_ELEMENTARY_X
5366 *ret = elm_win_xwindow_get(sd->parent);
5373 EAPI Ecore_Wl_Window *
5374 elm_win_wl_window_get(const Evas_Object *obj)
5376 if (!obj) return NULL;
5378 if ((!ENGINE_COMPARE(ELM_WAYLAND_SHM)) &&
5379 (!ENGINE_COMPARE(ELM_WAYLAND_EGL)))
5382 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
5384 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5385 return ecore_evas_wayland_window_get(ee);
5388 ELM_WIN_CHECK(obj) NULL;
5389 Ecore_Wl_Window *ret = NULL;
5390 eo_do((Eo *) obj, elm_obj_win_wl_window_get(&ret));
5395 _wl_window_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
5397 Ecore_Wl_Window **ret = va_arg(*list, Ecore_Wl_Window **);
5398 #if HAVE_ELEMENTARY_WAYLAND
5399 Elm_Win_Smart_Data *sd = _pd;
5407 *ret = elm_win_wl_window_get(sd->parent);
5415 elm_win_trap_set(const Elm_Win_Trap *t)
5417 DBG("old %p, new %p", trap, t);
5419 if ((t) && (t->version != ELM_WIN_TRAP_VERSION))
5421 CRITICAL("trying to set a trap version %lu while %lu was expected!",
5422 t->version, ELM_WIN_TRAP_VERSION);
5431 elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
5434 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
5436 if (floating == sd->floating) return;
5437 sd->floating = floating;
5438 #ifdef HAVE_ELEMENTARY_X
5439 _elm_win_xwindow_get(sd);
5443 ecore_x_e_illume_window_state_set
5444 (sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_FLOATING);
5446 ecore_x_e_illume_window_state_set
5447 (sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_NORMAL);
5453 elm_win_floating_mode_get(const Evas_Object *obj)
5455 ELM_WIN_CHECK(obj) EINA_FALSE;
5456 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
5458 return sd->floating;
5462 _window_id_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
5464 Ecore_Window *ret = va_arg(*list, Ecore_Window *);
5465 Elm_Win_Smart_Data *sd = _pd;
5467 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
5469 #if HAVE_ELEMENTARY_WAYLAND
5472 *ret = (Ecore_Window)sd->wl.win->surface_id;
5477 Ecore_Wl_Window *parent;
5479 parent = elm_win_wl_window_get(sd->parent);
5480 if (parent) *ret = (Ecore_Window)parent->surface_id;
5487 #ifdef HAVE_ELEMENTARY_X
5488 _elm_win_xwindow_get(sd);
5491 *ret = (Ecore_Window)sd->x.xwin;
5496 *ret = (Ecore_Window)elm_win_xwindow_get(sd->parent);
5506 elm_win_window_id_get(const Evas_Object *obj)
5510 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
5512 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5513 return ecore_evas_window_get(ee);
5516 ELM_WIN_CHECK(obj) 0;
5517 Ecore_Window ret = 0;
5518 eo_do((Eo *) obj, elm_obj_win_window_id_get(&ret));
5523 _class_constructor(Eo_Class *klass)
5525 const Eo_Op_Func_Description func_desc[] = {
5526 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
5527 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_win_smart_add),
5528 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_win_smart_del),
5529 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_win_smart_resize),
5530 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_win_smart_move),
5531 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_SHOW), _elm_win_smart_show),
5532 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_HIDE), _elm_win_smart_hide),
5534 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_win_smart_on_focus),
5535 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_win_smart_event),
5536 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_win_smart_focus_next_manager_is),
5537 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_win_smart_focus_next),
5538 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_win_smart_focus_direction_manager_is),
5539 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION), _elm_win_smart_focus_direction),
5540 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_win_smart_theme),
5542 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR), _win_constructor),
5543 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD), _resize_object_add),
5544 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL), _resize_object_del),
5545 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_SET), _title_set),
5546 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_GET), _title_get),
5547 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET), _icon_name_set),
5548 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET), _icon_name_get),
5549 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_SET), _role_set),
5550 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_GET), _role_get),
5551 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET), _icon_object_set),
5552 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET), _icon_object_get),
5553 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET), _autodel_set),
5554 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET), _autodel_get),
5555 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ACTIVATE), _activate),
5556 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LOWER), _lower),
5557 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RAISE), _raise),
5558 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CENTER), _center),
5559 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET), _borderless_set),
5560 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET), _borderless_get),
5561 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_SET), _shaped_set),
5562 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_GET), _shaped_get),
5563 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_SET), _alpha_set),
5564 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_GET), _alpha_get),
5565 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET), _override_set),
5566 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET), _override_get),
5567 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET), _fullscreen_set),
5568 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET), _fullscreen_get),
5569 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET), _main_menu_get),
5570 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET), _maximized_set),
5571 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET), _maximized_get),
5572 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET), _iconified_set),
5573 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET), _iconified_get),
5574 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET), _withdrawn_set),
5575 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET), _withdrawn_get),
5576 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET), _available_profiles_set),
5577 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET), _available_profiles_get),
5578 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_SET), _profile_set),
5579 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_GET), _profile_get),
5580 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_SET), _urgent_set),
5581 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_GET), _urgent_get),
5582 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET), _demand_attention_set),
5583 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET), _demand_attention_get),
5584 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_SET), _modal_set),
5585 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_GET), _modal_get),
5586 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_SET), _aspect_set),
5587 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_GET), _aspect_get),
5588 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET), _size_base_set),
5589 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET), _size_base_get),
5590 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET), _size_step_set),
5591 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET), _size_step_get),
5592 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_SET), _layer_set),
5593 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_GET), _layer_get),
5594 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_SET), _rotation_set),
5595 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET), _rotation_with_resize_set),
5596 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_GET), _rotation_get),
5597 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_SET), _sticky_set),
5598 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_GET), _sticky_get),
5599 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET), _keyboard_mode_set),
5600 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET), _keyboard_mode_get),
5601 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET), _keyboard_win_set),
5602 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET), _keyboard_win_get),
5603 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET), _indicator_mode_set),
5604 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET), _indicator_mode_get),
5605 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET), _indicator_opacity_set),
5606 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET), _indicator_opacity_get),
5607 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET), _screen_position_get),
5608 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_GET), _focus_get),
5609 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET), _screen_constrain_set),
5610 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET), _screen_constrain_get),
5611 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET), _screen_size_get),
5612 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET), _screen_dpi_get),
5613 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET), _conformant_set),
5614 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET), _conformant_get),
5615 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET), _quickpanel_set),
5616 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET), _quickpanel_get),
5617 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET), _quickpanel_priority_major_set),
5618 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET), _quickpanel_priority_major_get),
5619 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET), _quickpanel_priority_minor_set),
5620 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET), _quickpanel_priority_minor_get),
5621 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET), _quickpanel_zone_set),
5622 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET), _quickpanel_zone_get),
5623 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET), _prop_focus_skip_set),
5624 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND), _illume_command_send),
5625 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET), _inlined_image_object_get),
5626 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET), _focus_highlight_enabled_set),
5627 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET), _focus_highlight_enabled_get),
5628 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET), _focus_highlight_style_set),
5629 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET), _focus_highlight_style_get),
5630 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET), _focus_highlight_animate_set),
5631 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET), _focus_highlight_animate_get),
5632 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN), _socket_listen),
5633 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET), _xwindow_get),
5634 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET), _wl_window_get),
5635 EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET), _window_id_get),
5639 eo_class_funcs_set(klass, func_desc);
5641 evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
5644 static const Eo_Op_Description op_desc[] = {
5645 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR, "Adds a window object."),
5646 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD, "Add subobj as a resize object of window obj."),
5647 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL, "Delete subobj as a resize object of window obj."),
5648 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_SET, "Set the title of the window."),
5649 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_GET, "Get the title of the window."),
5650 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET, "Set the icon name of the window."),
5651 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET, "Get the icon name of the window."),
5652 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_SET, "Set the role of the window."),
5653 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_GET, "Get the role of the window."),
5654 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET, "Set a window object's icon."),
5655 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET, "Get the icon object used for the window."),
5656 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET, "Set the window's autodel state."),
5657 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET, "Get the window's autodel state."),
5658 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ACTIVATE, "Activate a window object."),
5659 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LOWER, "Lower a window object."),
5660 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RAISE, "Raise a window object."),
5661 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CENTER, "Center a window on its screen."),
5662 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET, "Set the borderless state of a window."),
5663 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET, "Get the borderless state of a window."),
5664 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_SET, "Set the shaped state of a window."),
5665 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_GET, "Get the shaped state of a window."),
5666 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_SET, "Set the alpha channel state of a window."),
5667 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_GET, "Get the alpha channel state of a window."),
5668 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET, "Set the override state of a window."),
5669 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET, "Get the override state of a window."),
5670 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET, "Set the fullscreen state of a window."),
5671 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET, "Get the fullscreen state of a window."),
5672 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET, "Get the Main Menu of a window."),
5673 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET, "Set the maximized state of a window."),
5674 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET, "Get the maximized state of a window."),
5675 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET, "Set the iconified state of a window."),
5676 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET, "Get the iconified state of a window."),
5677 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET, "Set the withdrawn state of a window."),
5678 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET, "Get the withdrawn state of a window."),
5679 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET, "Set the array of available profiles to a window."),
5680 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET, "Get the array of available profiles of a window."),
5681 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_SET, "Set the profile of a window."),
5682 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_GET, "Get the profile of a window."),
5683 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_SET, "Set the urgent state of a window."),
5684 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_GET, "Get the urgent state of a window."),
5685 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET, "Set the demand_attention state of a window."),
5686 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET, "Get the demand_attention state of a window."),
5687 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_SET, "Set the modal state of a window."),
5688 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_GET, "Get the modal state of a window."),
5689 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_SET, "Set the aspect ratio of a window."),
5690 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_GET, "Get the aspect ratio of a window."),
5691 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET, "Set the base window size used with stepping calculation."),
5692 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET, "Get the base size of a window."),
5693 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET, "Set the window stepping used with sizing calculation."),
5694 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET, "Get the stepping of a window."),
5695 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_SET, "Set the layer of the window."),
5696 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_GET, "Get the layer of the window."),
5697 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_SET, "Set the rotation of the window."),
5698 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET, "Rotates the window and resizes it."),
5699 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_GET, "Get the rotation of the window."),
5700 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_SET, "Set the sticky state of the window."),
5701 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_GET, "Get the sticky state of the window."),
5702 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET, "Sets the keyboard mode of the window."),
5703 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET, "Get the keyboard mode of the window."),
5704 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET, "Sets whether the window is a keyboard."),
5705 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET, "Get whether the window is a keyboard."),
5706 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET, "Sets the indicator mode of the window."),
5707 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET, "Get the indicator mode of the window."),
5708 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET, "Sets the indicator opacity mode of the window."),
5709 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET, "Get the indicator opacity mode of the window."),
5710 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET, "Get the screen position of a window."),
5711 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_GET, "Determine whether a window has focus."),
5712 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."),
5713 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."),
5714 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET, "Get screen geometry details for the screen that a window is on."),
5715 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET, "Get screen dpi for the screen that a window is on."),
5716 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET, "Set if this window is an illume conformant window."),
5717 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET, "Get if this window is an illume conformant window."),
5718 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET, "Set a window to be an illume quickpanel window."),
5719 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET, "Get if this window is a quickpanel or not."),
5720 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET, "Set the major priority of a quickpanel window."),
5721 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET, "Get the major priority of a quickpanel window."),
5722 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET, "Set the minor priority of a quickpanel window."),
5723 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET, "Get the minor priority of a quickpanel window."),
5724 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET, "Set which zone this quickpanel should appear in."),
5725 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET, "Get which zone this quickpanel should appear in."),
5726 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET, "Set the window to be skipped by keyboard focus."),
5727 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND, "Send a command to the windowing environment."),
5728 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET, "Get the inlined image object handle."),
5729 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET, "Set the enabled status for the focus highlight in a window."),
5730 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET, "Get the enabled value of the focus highlight for this window."),
5731 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET, "Set the style for the focus highlight on this window."),
5732 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET, "Get the style set for the focus highlight object."),
5733 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET, "Set the animate status for the focus highlight for this window."),
5734 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET, "Get the animate status for the focus highlight for this window."),
5735 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN, "Create a socket to provide the service for Plug widget."),
5736 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET, "Get the Ecore_X_Window of an Evas_Object."),
5737 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET, "Get the Ecore_Wl_Window of an Evas_Object."),
5738 EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET, "Get the Ecore_Window of an Evas_Object."),
5739 EO_OP_DESCRIPTION_SENTINEL
5742 static const Eo_Class_Description class_desc = {
5745 EO_CLASS_TYPE_REGULAR,
5746 EO_CLASS_DESCRIPTION_OPS(&ELM_OBJ_WIN_BASE_ID, op_desc, ELM_OBJ_WIN_SUB_ID_LAST),
5748 sizeof(Elm_Win_Smart_Data),
5753 EO_DEFINE_CLASS(elm_obj_win_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, NULL);