#include "elm_priv.h"
#include "elm_widget_menu.h"
-EAPI Eo_Op ELM_OBJ_WIN_BASE_ID = EO_NOOP;
+#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
-#define MY_CLASS ELM_OBJ_WIN_CLASS
+#include "elm_interface_atspi_accessible.h"
+#include "elm_interface_atspi_accessible.eo.h"
+#include "elm_interface_atspi_window.eo.h"
+#include "elm_interface_atspi_widget.eo.h"
-#define MY_CLASS_NAME "elm_win"
+#define MY_CLASS ELM_WIN_CLASS
+
+#define MY_CLASS_NAME "Elm_Win"
+#define MY_CLASS_NAME_LEGACY "elm_win"
static const Elm_Win_Trap *trap = NULL;
while (0)
#define ELM_WIN_DATA_GET(o, sd) \
- Elm_Win_Smart_Data * sd = eo_data_scope_get(o, MY_CLASS)
+ Elm_Win_Data * sd = eo_data_scope_get(o, MY_CLASS)
#define ELM_WIN_DATA_GET_OR_RETURN(o, ptr) \
ELM_WIN_DATA_GET(o, ptr); \
if (!ptr) \
{ \
- CRITICAL("No widget data for object %p (%s)", \
+ CRI("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
return; \
}
ELM_WIN_DATA_GET(o, ptr); \
if (!ptr) \
{ \
- CRITICAL("No widget data for object %p (%s)", \
+ CRI("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
return val; \
}
if (!obj || !eo_isa(obj, MY_CLASS)) \
return
+#define DECREMENT_MODALITY() \
+ EINA_LIST_FOREACH(_elm_win_list, l, current) \
+ { \
+ ELM_WIN_DATA_GET_OR_RETURN(current, cursd); \
+ if ((obj != current) && (cursd->modal_count > 0)) \
+ { \
+ cursd->modal_count--; \
+ } \
+ if (cursd->modal_count == 0) \
+ { \
+ edje_object_signal_emit(cursd->layout, \
+ "elm,action,hide_blocker", "elm"); \
+ evas_object_smart_callback_call(cursd->main_menu, \
+ "elm,action,unblock_menu", NULL); \
+ } \
+ }
+
+#define INCREMENT_MODALITY() \
+ EINA_LIST_FOREACH(_elm_win_list, l, current) \
+ { \
+ ELM_WIN_DATA_GET_OR_RETURN(current, cursd); \
+ if (obj != current) \
+ { \
+ cursd->modal_count++; \
+ } \
+ if (cursd->modal_count > 0) \
+ { \
+ edje_object_signal_emit(cursd->layout, \
+ "elm,action,show_blocker", "elm"); \
+ evas_object_smart_callback_call(cursd->main_menu, \
+ "elm,action,block_menu", NULL); \
+ } \
+ }
+
#define ENGINE_GET() (_elm_preferred_engine ? _elm_preferred_engine : (_elm_config->engine ? _elm_config->engine : ""))
#define ENGINE_COMPARE(name) (!strcmp(ENGINE_GET(), name))
-#define EE_ENGINE_COMPARE(ee, name) (!strcmp(ecore_evas_engine_name_get(ee), name))
-typedef struct _Elm_Win_Smart_Data Elm_Win_Smart_Data;
+typedef struct _Elm_Win_Data Elm_Win_Data;
-struct _Elm_Win_Smart_Data
+struct _Elm_Win_Data
{
Ecore_Evas *ee;
Evas *evas;
{
Evas_Object *target;
Eina_Bool visible : 1;
- Eina_Bool handled : 1;
+ Eina_Bool in_theme: 1; /**< focus highlight is handled by theme.
+ this is set true if edc data item "focus_highlight" is set to "on" during focus in callback. */
} cur, prev;
const char *style;
const char **available_list;
unsigned int count;
} profile;
+ struct
+ {
+ int preferred_rot; /* indicates preferred rotation value, -1 means invalid. */
+ int *rots; /* indicates available rotations */
+ unsigned int count; /* number of elements in available rotations */
+ Eina_Bool wm_supported : 1; /* set true when the window manager support window rotation */
+ Eina_Bool use : 1; /* set ture when application use window manager rotation. */
+ } wm_rot;
void *trap_data;
int size_base_w, size_base_h;
int size_step_w, size_step_h;
int norender;
+ int modal_count;
Eina_Bool urgent : 1;
Eina_Bool modal : 1;
Eina_Bool demand_attention : 1;
static const char SIG_PROFILE_CHANGED[] = "profile,changed";
static const char SIG_FOCUSED[] = "focused";
static const char SIG_UNFOCUSED[] = "unfocused";
+static const char SIG_WM_ROTATION_CHANGED[] = "wm,rotation,changed";
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_DELETE_REQUEST, ""},
{SIG_PROFILE_CHANGED, ""},
{SIG_FOCUSED, ""},
{SIG_UNFOCUSED, ""},
+ {SIG_WM_ROTATION_CHANGED, ""},
+ {NULL, NULL}
+};
+
+static Eina_Bool _key_action_return(Evas_Object *obj, const char *params);
+static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
+
+static const Elm_Action key_actions[] = {
+ {"return", _key_action_return},
+ {"move", _key_action_move},
{NULL, NULL}
};
Evas *e,
Evas_Object *obj,
void *event_info);
+static void
+_elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj);
+
+#ifdef HAVE_ELEMENTARY_X
+static void _elm_win_xwin_update(Elm_Win_Data *sd);
+#endif
EAPI double _elm_startup_time = 0;
}
static void
-_elm_win_state_eval(void *data __UNUSED__)
+_elm_win_state_eval(void *data EINA_UNUSED)
{
Eina_List *l;
Evas_Object *obj;
static void
_elm_win_state_eval_queue(void)
{
- if (_elm_win_state_eval_job) ecore_job_del(_elm_win_state_eval_job);
+ ecore_job_del(_elm_win_state_eval_job);
_elm_win_state_eval_job = ecore_job_add(_elm_win_state_eval, NULL);
}
// ELM_ENGINE="shot:delay=0.1:file=my-window.png"
static double
-_shot_delay_get(Elm_Win_Smart_Data *sd)
+_shot_delay_get(Elm_Win_Data *sd)
{
char *p, *pd;
char *d = strdup(sd->shot.info);
}
static char *
-_shot_file_get(Elm_Win_Smart_Data *sd)
+_shot_file_get(Elm_Win_Data *sd)
{
char *p;
char *tmp = strdup(sd->shot.info);
}
static int
-_shot_repeat_count_get(Elm_Win_Smart_Data *sd)
+_shot_repeat_count_get(Elm_Win_Data *sd)
{
char *p, *pd;
char *d = strdup(sd->shot.info);
}
static char *
-_shot_key_get(Elm_Win_Smart_Data *sd __UNUSED__)
+_shot_key_get(Elm_Win_Data *sd EINA_UNUSED)
{
return NULL;
}
static char *
-_shot_flags_get(Elm_Win_Smart_Data *sd __UNUSED__)
+_shot_flags_get(Elm_Win_Data *sd EINA_UNUSED)
{
return NULL;
}
static void
-_shot_do(Elm_Win_Smart_Data *sd)
+_shot_do(Elm_Win_Data *sd)
{
Ecore_Evas *ee;
Evas_Object *o;
file, key, flags);
}
free(file);
- if (key) free(key);
- if (flags) free(flags);
+ free(key);
+ free(flags);
ecore_evas_free(ee);
if (sd->shot.repeat_count) sd->shot.shot_counter++;
}
}
static void
-_shot_init(Elm_Win_Smart_Data *sd)
+_shot_init(Elm_Win_Data *sd)
{
if (!sd->shot.info) return;
}
static void
-_shot_handle(Elm_Win_Smart_Data *sd)
+_shot_handle(Elm_Win_Data *sd)
{
if (!sd->shot.info) return;
/* elm-win specific associate, does the trap while ecore_evas_object_associate()
* does not.
*/
-static Elm_Win_Smart_Data *
+static Elm_Win_Data *
_elm_win_associate_get(const Ecore_Evas *ee)
{
- ELM_WIN_DATA_GET(ecore_evas_data_get(ee, "elm_win"), sd);
+ Evas_Object *obj = ecore_evas_data_get(ee, "elm_win");
+ if (!obj) return NULL;
+ ELM_WIN_DATA_GET(obj, sd);
return sd;
}
/* Interceptors Callbacks */
static void
-_elm_win_obj_intercept_raise(void *data, Evas_Object *obj __UNUSED__)
+_elm_win_obj_intercept_raise(void *data, Evas_Object *obj EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
TRAP(sd, raise);
}
static void
-_elm_win_obj_intercept_lower(void *data, Evas_Object *obj __UNUSED__)
+_elm_win_obj_intercept_lower(void *data, Evas_Object *obj EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
TRAP(sd, lower);
}
static void
-_elm_win_obj_intercept_stack_above(void *data __UNUSED__, Evas_Object *obj __UNUSED__, Evas_Object *above __UNUSED__)
+_elm_win_obj_intercept_stack_above(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Object *above EINA_UNUSED)
{
INF("TODO: %s", __FUNCTION__);
}
static void
-_elm_win_obj_intercept_stack_below(void *data __UNUSED__, Evas_Object *obj __UNUSED__, Evas_Object *below __UNUSED__)
+_elm_win_obj_intercept_stack_below(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Object *below EINA_UNUSED)
{
INF("TODO: %s", __FUNCTION__);
}
static void
-_elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj __UNUSED__, int l)
+_elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj EINA_UNUSED, int l)
{
ELM_WIN_DATA_GET(data, sd);
TRAP(sd, layer_set, l);
/* Event Callbacks */
static void
-_elm_win_obj_callback_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
+_elm_win_obj_callback_changed_size_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
Evas_Coord w, h;
static void
_elm_win_move(Ecore_Evas *ee)
{
- Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
+ Elm_Win_Data *sd = _elm_win_associate_get(ee);
int x, y;
- EINA_SAFETY_ON_NULL_RETURN(sd);
+ if (!sd) return;
ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
sd->screen.x = x;
sd->screen.y = y;
evas_object_smart_callback_call(sd->obj, SIG_MOVED, NULL);
+ evas_nochange_push(evas_object_evas_get(sd->obj));
+ evas_object_move(sd->obj, x, y);
+ evas_nochange_pop(evas_object_evas_get(sd->obj));
}
static void
static void
_elm_win_resize(Ecore_Evas *ee)
{
- Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
- EINA_SAFETY_ON_NULL_RETURN(sd);
+ Elm_Win_Data *sd = _elm_win_associate_get(ee);
+ if (!sd) return;
- if (sd->deferred_resize_job) ecore_job_del(sd->deferred_resize_job);
+ ecore_job_del(sd->deferred_resize_job);
sd->deferred_resize_job = ecore_job_add(_elm_win_resize_job, sd->obj);
}
static void
_elm_win_mouse_in(Ecore_Evas *ee)
{
- Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
- EINA_SAFETY_ON_NULL_RETURN(sd);
+ Elm_Win_Data *sd = _elm_win_associate_get(ee);
+ if (!sd) return;
if (sd->resizing) sd->resizing = EINA_FALSE;
}
static void
-_elm_win_focus_highlight_reconfigure_job_stop(Elm_Win_Smart_Data *sd)
+_elm_win_focus_highlight_reconfigure_job_stop(Elm_Win_Data *sd)
{
ELM_SAFE_FREE(sd->focus_highlight.reconf_job, ecore_job_del);
}
static void
-_elm_win_focus_highlight_visible_set(Elm_Win_Smart_Data *sd,
+_elm_win_focus_highlight_visible_set(Elm_Win_Data *sd,
Eina_Bool visible)
{
Evas_Object *fobj = sd->focus_highlight.fobj;
}
static void
-_elm_win_focus_highlight_anim_setup(Elm_Win_Smart_Data *sd,
+_elm_win_focus_highlight_anim_setup(Elm_Win_Data *sd,
Evas_Object *obj)
{
Evas_Coord tx, ty, tw, th;
- Evas_Coord w, h, px, py, pw, ph;
+ Evas_Coord px, py, pw, ph;
Edje_Message_Int_Set *m;
- Evas_Object *previous = sd->focus_highlight.prev.target;
Evas_Object *target = sd->focus_highlight.cur.target;
- evas_object_geometry_get(sd->obj, NULL, NULL, &w, &h);
- evas_object_geometry_get(target, &tx, &ty, &tw, &th);
- evas_object_geometry_get(previous, &px, &py, &pw, &ph);
+ evas_object_geometry_get(obj, &px, &py, &pw, &ph);
+ elm_widget_focus_highlight_geometry_get(target, &tx, &ty, &tw, &th);
evas_object_move(obj, tx, ty);
evas_object_resize(obj, tw, th);
- evas_object_clip_unset(obj);
+
+ if ((px == tx) && (py == ty) && (pw == tw) && (ph == th)) return;
+
+ if (!_elm_config->focus_highlight_clip_disable)
+ evas_object_clip_unset(obj);
m = alloca(sizeof(*m) + (sizeof(int) * 8));
m->count = 8;
}
static void
-_elm_win_focus_highlight_simple_setup(Elm_Win_Smart_Data *sd,
+_elm_win_focus_highlight_simple_setup(Elm_Win_Data *sd,
Evas_Object *obj)
{
Evas_Object *clip, *target = sd->focus_highlight.cur.target;
Evas_Coord x, y, w, h;
- clip = evas_object_clip_get(target);
- evas_object_geometry_get(target, &x, &y, &w, &h);
+ elm_widget_focus_highlight_geometry_get(target, &x, &y, &w, &h);
evas_object_move(obj, x, y);
evas_object_resize(obj, w, h);
- evas_object_clip_set(obj, clip);
+
+ if (!_elm_config->focus_highlight_clip_disable)
+ {
+ clip = evas_object_clip_get(target);
+ if (clip) evas_object_clip_set(obj, clip);
+ }
+
+ edje_object_signal_emit(obj, "elm,state,anim,stop", "elm");
+}
+
+static void
+_elm_win_focus_prev_target_del(void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ ELM_WIN_DATA_GET(data, sd);
+ sd->focus_highlight.prev.target = NULL;
}
static void
-_elm_win_focus_highlight_reconfigure(Elm_Win_Smart_Data *sd)
+_elm_win_focus_highlight_reconfigure_job(void *data)
{
+ ELM_WIN_DATA_GET(data, sd);
Evas_Object *target = sd->focus_highlight.cur.target;
Evas_Object *previous = sd->focus_highlight.prev.target;
Evas_Object *fobj = sd->focus_highlight.fobj;
Eina_Bool visible_changed;
Eina_Bool common_visible;
const char *sig = NULL;
+ const char *focus_style_target = NULL;
+ const char *focus_style_previous = NULL;
_elm_win_focus_highlight_reconfigure_job_stop(sd);
(!sd->focus_highlight.theme_changed))
return;
- if ((previous) && (sd->focus_highlight.prev.handled))
- elm_widget_signal_emit
- (previous, "elm,action,focus_highlight,hide", "elm");
+ if ((previous) && (sd->focus_highlight.prev.in_theme))
+ {
+ evas_object_event_callback_del_full
+ (previous, EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data);
+ elm_widget_signal_emit
+ (previous, "elm,action,focus_highlight,hide", "elm");
+ }
if (!target)
common_visible = EINA_FALSE;
- else if (sd->focus_highlight.cur.handled)
+ else if (sd->focus_highlight.cur.in_theme)
{
common_visible = EINA_FALSE;
if (sd->focus_highlight.cur.visible)
else
common_visible = sd->focus_highlight.cur.visible;
- _elm_win_focus_highlight_visible_set(sd, common_visible);
if (sig)
elm_widget_signal_emit(target, sig, "elm");
- if ((!target) || (!common_visible) || (sd->focus_highlight.cur.handled))
+ if ((!target) || (!common_visible) || (sd->focus_highlight.cur.in_theme))
goto the_end;
- if (sd->focus_highlight.theme_changed)
+ if (previous)
+ focus_style_previous = elm_widget_focus_highlight_style_get(previous);
+ focus_style_target = elm_widget_focus_highlight_style_get(target);
+
+ if (sd->focus_highlight.theme_changed ||
+ (focus_style_target != focus_style_previous))
{
const char *str;
- if (sd->focus_highlight.style)
+
+ if (focus_style_target)
+ str = focus_style_target;
+ else if (sd->focus_highlight.style)
str = sd->focus_highlight.style;
else
str = "default";
+
elm_widget_theme_object_set
(sd->obj, fobj, "focus_highlight", "top", str);
sd->focus_highlight.theme_changed = EINA_FALSE;
}
if ((sd->focus_highlight.animate_supported) && (previous) &&
- (!sd->focus_highlight.prev.handled))
+ (!sd->focus_highlight.prev.in_theme))
_elm_win_focus_highlight_anim_setup(sd, fobj);
else
_elm_win_focus_highlight_simple_setup(sd, fobj);
evas_object_raise(fobj);
the_end:
+ _elm_win_focus_highlight_visible_set(sd, common_visible);
sd->focus_highlight.geometry_changed = EINA_FALSE;
sd->focus_highlight.prev = sd->focus_highlight.cur;
+ evas_object_event_callback_add
+ (sd->focus_highlight.prev.target,
+ EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data);
}
static void
-_elm_win_focus_highlight_reconfigure_job(void *data)
-{
- ELM_WIN_DATA_GET(data, sd);
- _elm_win_focus_highlight_reconfigure(sd);
-}
-
-static void
-_elm_win_focus_highlight_reconfigure_job_start(Elm_Win_Smart_Data *sd)
+_elm_win_focus_highlight_reconfigure_job_start(Elm_Win_Data *sd)
{
- if (sd->focus_highlight.reconf_job)
- ecore_job_del(sd->focus_highlight.reconf_job);
+ ecore_job_del(sd->focus_highlight.reconf_job);
sd->focus_highlight.reconf_job = ecore_job_add(
_elm_win_focus_highlight_reconfigure_job, sd->obj);
static void
_elm_win_focus_in(Ecore_Evas *ee)
{
- Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
+ Elm_Win_Data *sd = _elm_win_associate_get(ee);
Evas_Object *obj;
unsigned int order = 0;
- EINA_SAFETY_ON_NULL_RETURN(sd);
+ if ((!sd) || (sd->modal_count)) return;
obj = sd->obj;
static void
_elm_win_focus_out(Ecore_Evas *ee)
{
- Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
+ Elm_Win_Data *sd = _elm_win_associate_get(ee);
Evas_Object *obj;
- EINA_SAFETY_ON_NULL_RETURN(sd);
+ if (!sd) return;
obj = sd->obj;
}
/* access */
- _elm_access_object_hilight_disable(evas_object_evas_get(obj));
+ _elm_access_object_highlight_disable(evas_object_evas_get(obj));
/* do nothing */
/* if (sd->img_obj) */
}
static void
-_elm_win_available_profiles_del(Elm_Win_Smart_Data *sd)
+_elm_win_available_profiles_del(Elm_Win_Data *sd)
{
if (!sd->profile.available_list) return;
}
static void
-_elm_win_profile_del(Elm_Win_Smart_Data *sd)
+_elm_win_profile_del(Elm_Win_Data *sd)
{
ELM_SAFE_FREE(sd->profile.name, eina_stringshare_del);
}
static Eina_Bool
-_elm_win_profile_set(Elm_Win_Smart_Data *sd, const char *profile)
+_internal_elm_win_profile_set(Elm_Win_Data *sd, const char *profile)
{
Eina_Bool changed = EINA_FALSE;
if (profile)
}
static void
-_elm_win_profile_update(Elm_Win_Smart_Data *sd)
+_elm_win_profile_update(Elm_Win_Data *sd)
{
if (sd->profile.available_list)
{
* change current profile to the 1st element of an array.
*/
if (!found)
- _elm_win_profile_set(sd, sd->profile.available_list[0]);
+ _internal_elm_win_profile_set(sd, sd->profile.available_list[0]);
}
_elm_config_profile_set(sd->profile.name);
static void
_elm_win_state_change(Ecore_Evas *ee)
{
- Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
+ Elm_Win_Data *sd = _elm_win_associate_get(ee);
Evas_Object *obj;
Eina_Bool ch_withdrawn = EINA_FALSE;
Eina_Bool ch_sticky = EINA_FALSE;
Eina_Bool ch_fullscreen = EINA_FALSE;
Eina_Bool ch_maximized = EINA_FALSE;
Eina_Bool ch_profile = EINA_FALSE;
+ Eina_Bool ch_wm_rotation = EINA_FALSE;
const char *profile;
- EINA_SAFETY_ON_NULL_RETURN(sd);
+ if (!sd) return;
obj = sd->obj;
ch_maximized = EINA_TRUE;
}
-
profile = ecore_evas_window_profile_get(sd->ee);
- ch_profile = _elm_win_profile_set(sd, profile);
+ ch_profile = _internal_elm_win_profile_set(sd, profile);
+
+ if (sd->wm_rot.use)
+ {
+ if (sd->rot != ecore_evas_rotation_get(sd->ee))
+ {
+ sd->rot = ecore_evas_rotation_get(sd->ee);
+ ch_wm_rotation = EINA_TRUE;
+ }
+ }
_elm_win_state_eval_queue();
{
_elm_win_profile_update(sd);
}
+ if (ch_wm_rotation)
+ {
+ evas_object_size_hint_min_set(obj, -1, -1);
+ evas_object_size_hint_max_set(obj, -1, -1);
+#ifdef HAVE_ELEMENTARY_X
+ _elm_win_xwin_update(sd);
+#endif
+ elm_widget_orientation_set(obj, sd->rot);
+ evas_object_smart_callback_call(obj, SIG_ROTATION_CHANGED, NULL);
+ evas_object_smart_callback_call(obj, SIG_WM_ROTATION_CHANGED, NULL);
+ }
}
-static void
-_elm_win_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Win_Data *_pd EINA_UNUSED)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- *ret = EINA_TRUE;
+ return EINA_TRUE;
}
-static void
-_elm_win_smart_focus_next(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_elm_widget_focus_next(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next)
{
- Elm_Focus_Direction dir = va_arg(*list, Elm_Focus_Direction);
- Evas_Object **next = va_arg(*list, Evas_Object **);
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
-
- ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
const Eina_List *items;
void *(*list_data_get)(const Eina_List *list);
{
items = wd->subobjs;
if (!items)
- return;
+ return EINA_FALSE;
}
list_data_get = eina_list_data_get;
elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next);
- if (*next)
- {
- if (ret) *ret = EINA_TRUE;
- return;
- }
+ if (*next) return EINA_TRUE;
}
*next = (Evas_Object *)obj;
- return;
+ return EINA_FALSE;
}
-static void
-_elm_win_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Win_Data *_pd EINA_UNUSED)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- *ret = EINA_TRUE;
+ return EINA_TRUE;
}
-static void
-_elm_win_smart_focus_direction(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
-{
- const Evas_Object *base = va_arg(*list, Evas_Object *);
- double degree = va_arg(*list, double);
- Evas_Object **direction = va_arg(*list, Evas_Object **);
- double *weight = va_arg(*list, double *);
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
- Eina_Bool int_ret = EINA_FALSE;
-
+EOLIAN static Eina_Bool
+_elm_win_elm_widget_focus_direction(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, double *weight)
+{
const Eina_List *items;
void *(*list_data_get)(const Eina_List *list);
- ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
/* Focus chain */
if (wd->subobjs)
list_data_get = eina_list_data_get;
- int_ret = elm_widget_focus_list_direction_get
+ return elm_widget_focus_list_direction_get
(obj, base, items, list_data_get, degree, direction, weight);
- if (ret) *ret = int_ret;
}
+
+ return EINA_FALSE;
}
-static void
-_elm_win_smart_on_focus(Eo *obj, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_elm_widget_on_focus(Eo *obj, Elm_Win_Data *sd)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_TRUE;
- Elm_Win_Smart_Data *sd = _pd;
Eina_Bool int_ret = EINA_FALSE;
-
- eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
- if (!int_ret) return;
+ eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus());
+ if (!int_ret) return EINA_TRUE;
if (sd->img_obj)
evas_object_focus_set(sd->img_obj, elm_widget_focus_get(obj));
else
evas_object_focus_set(obj, elm_widget_focus_get(obj));
+
+ return EINA_TRUE;
}
-static void
-_elm_win_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
+static Eina_Bool
+_key_action_return(Evas_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
{
- Evas_Object *source = va_arg(*list, Evas_Object *);
- (void) source;
- Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
-
- Evas_Event_Key_Down *ev = event_info;
-
- if (elm_widget_disabled_get(obj)) return;
-
- if (type != EVAS_CALLBACK_KEY_DOWN)
- return;
-
- if ((!strcmp(ev->key, "Tab")) ||
- (!strcmp(ev->key, "ISO_Left_Tab")))
- {
- if (evas_key_modifier_is_set(ev->modifiers, "Control") ||
- evas_key_modifier_is_set(ev->modifiers, "Alt"))
- return;
- if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
- elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
- else
- elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
-
- goto success;
- }
- else if ((!strcmp(ev->key, "Left")) ||
- ((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
- {
- elm_widget_focus_cycle(obj, ELM_FOCUS_LEFT);
+ return EINA_FALSE;
+}
- goto success;
- }
- else if ((!strcmp(ev->key, "Right")) ||
- ((!strcmp(ev->key, "KP_Right")) && (!ev->string)))
- {
- elm_widget_focus_cycle(obj, ELM_FOCUS_RIGHT);
+static Eina_Bool
+_key_action_move(Evas_Object *obj, const char *params)
+{
+ const char *dir = params;
+
+ if (!strcmp(dir, "previous"))
+ elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
+ else if (!strcmp(dir, "next"))
+ elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
+ else if (!strcmp(dir, "left"))
+ elm_widget_focus_cycle(obj, ELM_FOCUS_LEFT);
+ else if (!strcmp(dir, "right"))
+ elm_widget_focus_cycle(obj, ELM_FOCUS_RIGHT);
+ else if (!strcmp(dir, "up"))
+ elm_widget_focus_cycle(obj, ELM_FOCUS_UP);
+ else if (!strcmp(dir, "down"))
+ elm_widget_focus_cycle(obj, ELM_FOCUS_DOWN);
+ else return EINA_FALSE;
- goto success;
- }
- else if ((!strcmp(ev->key, "Up")) ||
- ((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
- {
- elm_widget_focus_cycle(obj, ELM_FOCUS_UP);
+ return EINA_TRUE;
+}
- goto success;
- }
- else if ((!strcmp(ev->key, "Down")) ||
- ((!strcmp(ev->key, "KP_Down")) && (!ev->string)))
- {
- elm_widget_focus_cycle(obj, ELM_FOCUS_DOWN);
+EOLIAN static Eina_Bool
+_elm_win_elm_widget_event(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info)
+{
+ (void) src;
+ Evas_Event_Key_Down *ev = event_info;
- goto success;
- }
+ if (elm_widget_disabled_get(obj)) return EINA_FALSE;
+ if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
- return;
+ if (!_elm_config_key_binding_call(obj, ev, key_actions))
+ return EINA_FALSE;
-success:
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
- if (ret) *ret = EINA_TRUE;
+ return EINA_TRUE;
}
static void
_elm_win_deferred_free--;
}
-static void
-_elm_win_smart_show(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
+EOLIAN static void
+_elm_win_evas_object_smart_show(Eo *obj, Elm_Win_Data *sd)
{
- Elm_Win_Smart_Data *sd = _pd;
+ if (sd->modal_count) return;
+ const Eina_List *l;
+ Evas_Object *current;
if (!evas_object_visible_get(obj))
_elm_win_state_eval_queue();
eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
+ if ((sd->modal) && (!evas_object_visible_get(obj)))
+ {
+ INCREMENT_MODALITY()
+ }
+
TRAP(sd, show);
if (sd->shot.info) _shot_handle(sd);
}
-static void
-_elm_win_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
+EOLIAN static void
+_elm_win_evas_object_smart_hide(Eo *obj, Elm_Win_Data *sd)
{
- Elm_Win_Smart_Data *sd = _pd;
+ if (sd->modal_count) return;
+ const Eina_List *l;
+ Evas_Object *current;
if (evas_object_visible_get(obj))
_elm_win_state_eval_queue();
eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
+ if ((sd->modal) && (evas_object_visible_get(obj)))
+ {
+ DECREMENT_MODALITY()
+ }
+
TRAP(sd, hide);
if (sd->frame_obj)
static void
_elm_win_on_parent_del(void *data,
- Evas *e __UNUSED__,
+ Evas *e EINA_UNUSED,
Evas_Object *obj,
- void *event_info __UNUSED__)
+ void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
static void
_elm_win_focus_target_move(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
static void
_elm_win_focus_target_resize(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
static void
_elm_win_focus_target_del(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
}
static void
-_elm_win_focus_target_callbacks_add(Elm_Win_Smart_Data *sd)
+_elm_win_focus_target_callbacks_add(Elm_Win_Data *sd)
{
Evas_Object *obj = sd->focus_highlight.cur.target;
if (!obj) return;
}
static void
-_elm_win_focus_target_callbacks_del(Elm_Win_Smart_Data *sd)
+_elm_win_focus_target_callbacks_del(Elm_Win_Data *sd)
{
Evas_Object *obj = sd->focus_highlight.cur.target;
static void
_elm_win_object_focus_in(void *data,
- Evas *e __UNUSED__,
+ Evas *e EINA_UNUSED,
void *event_info)
{
Evas_Object *obj = event_info, *target;
target = _elm_win_focus_target_get(obj);
sd->focus_highlight.cur.target = target;
- if (elm_widget_highlight_in_theme_get(target))
- sd->focus_highlight.cur.handled = EINA_TRUE;
+ if (target && elm_widget_highlight_in_theme_get(target))
+ sd->focus_highlight.cur.in_theme = EINA_TRUE;
else
_elm_win_focus_target_callbacks_add(sd);
static void
_elm_win_object_focus_out(void *data,
- Evas *e __UNUSED__,
- void *event_info __UNUSED__)
+ Evas *e EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
if (!sd->focus_highlight.cur.target)
return;
- if (!sd->focus_highlight.cur.handled)
+ if (!sd->focus_highlight.cur.in_theme)
_elm_win_focus_target_callbacks_del(sd);
sd->focus_highlight.cur.target = NULL;
- sd->focus_highlight.cur.handled = EINA_FALSE;
+ sd->focus_highlight.cur.in_theme = EINA_FALSE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
}
static void
-_elm_win_focus_highlight_shutdown(Elm_Win_Smart_Data *sd)
+_elm_win_focus_highlight_shutdown(Elm_Win_Data *sd)
{
_elm_win_focus_highlight_reconfigure_job_stop(sd);
if (sd->focus_highlight.cur.target)
}
static void
+_win_img_hide(void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ elm_widget_focus_hide_handle(data);
+}
+
+static void
+_win_img_mouse_up(void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info)
+{
+ Evas_Event_Mouse_Up *ev = event_info;
+ if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
+ elm_widget_focus_mouse_up_handle(data);
+}
+
+static void
+_win_img_focus_in(void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ elm_widget_focus_steal(data);
+}
+
+static void
+_win_img_focus_out(void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ elm_widget_focused_object_clear(data);
+}
+
+static void
_elm_win_on_img_obj_del(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
+ _elm_win_img_callbacks_del(sd->obj, sd->img_obj);
sd->img_obj = NULL;
}
static void
-_elm_win_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
+_elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj)
+{
+ evas_object_event_callback_del_full
+ (imgobj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, obj);
+ evas_object_event_callback_del_full
+ (imgobj, EVAS_CALLBACK_HIDE, _win_img_hide, obj);
+ evas_object_event_callback_del_full
+ (imgobj, EVAS_CALLBACK_MOUSE_UP, _win_img_mouse_up, obj);
+ evas_object_event_callback_del_full
+ (imgobj, EVAS_CALLBACK_FOCUS_IN, _win_img_focus_in, obj);
+ evas_object_event_callback_del_full
+ (imgobj, EVAS_CALLBACK_FOCUS_OUT, _win_img_focus_out, obj);
+}
+
+EOLIAN static void
+_elm_win_evas_object_smart_del(Eo *obj, Elm_Win_Data *sd)
{
- Elm_Win_Smart_Data *sd = _pd;
+ const Eina_List *l;
+ Evas_Object *current;
+
+ if ((sd->modal) && (evas_object_visible_get(obj)))
+ {
+ DECREMENT_MODALITY()
+ }
+
+ if ((sd->modal) && (sd->modal_count > 0))
+ ERR("Deleted modal win was blocked by another modal win which was created after creation of that win.");
evas_object_event_callback_del_full(sd->layout,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
ecore_evas_callback_resize_set(sd->ee, NULL);
}
- if (sd->deferred_resize_job) ecore_job_del(sd->deferred_resize_job);
- if (sd->deferred_child_eval_job) ecore_job_del(sd->deferred_child_eval_job);
- if (sd->shot.info) eina_stringshare_del(sd->shot.info);
- if (sd->shot.timer) ecore_timer_del(sd->shot.timer);
+ ecore_job_del(sd->deferred_resize_job);
+ ecore_job_del(sd->deferred_child_eval_job);
+ eina_stringshare_del(sd->shot.info);
+ ecore_timer_del(sd->shot.timer);
#ifdef HAVE_ELEMENTARY_X
- if (sd->x.client_message_handler)
- ecore_event_handler_del(sd->x.client_message_handler);
- if (sd->x.property_handler)
- ecore_event_handler_del(sd->x.property_handler);
+ ecore_event_handler_del(sd->x.client_message_handler);
+ ecore_event_handler_del(sd->x.property_handler);
#endif
if (sd->img_obj)
{
- evas_object_event_callback_del_full
- (sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, obj);
+ _elm_win_img_callbacks_del(obj, sd->img_obj);
sd->img_obj = NULL;
}
else
_elm_win_focus_highlight_shutdown(sd);
eina_stringshare_del(sd->focus_highlight.style);
- if (sd->title) eina_stringshare_del(sd->title);
- if (sd->icon_name) eina_stringshare_del(sd->icon_name);
- if (sd->role) eina_stringshare_del(sd->role);
- if (sd->icon) evas_object_del(sd->icon);
-
- if (sd->main_menu) evas_object_del(sd->main_menu);
+ eina_stringshare_del(sd->title);
+ eina_stringshare_del(sd->icon_name);
+ eina_stringshare_del(sd->role);
+ evas_object_del(sd->icon);
+ evas_object_del(sd->main_menu);
_elm_win_profile_del(sd);
_elm_win_available_profiles_del(sd);
evas_object_show(obj);
}
-static void
-_elm_win_smart_move(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
+EOLIAN static void
+_elm_win_evas_object_smart_move(Eo *obj, Elm_Win_Data *sd, Evas_Coord x, Evas_Coord y)
{
- Evas_Coord x = va_arg(*list, Evas_Coord);
- Evas_Coord y = va_arg(*list, Evas_Coord);
- Elm_Win_Smart_Data *sd = _pd;
-
if (sd->img_obj)
{
if ((x != sd->screen.x) || (y != sd->screen.y))
}
}
-static void
-_elm_win_smart_resize(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_evas_object_smart_resize(Eo *obj, Elm_Win_Data *sd, Evas_Coord w, Evas_Coord h)
{
- Evas_Coord w = va_arg(*list, Evas_Coord);
- Evas_Coord h = va_arg(*list, Evas_Coord);
-
- Elm_Win_Smart_Data *sd = _pd;
-
eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
if (sd->img_obj)
static void
_elm_win_delete_request(Ecore_Evas *ee)
{
- Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
+ Elm_Win_Data *sd = _elm_win_associate_get(ee);
Evas_Object *obj;
- EINA_SAFETY_ON_NULL_RETURN(sd);
+ if (!sd) return;
obj = sd->obj;
_elm_ee_xwin_get(const Ecore_Evas *ee)
{
#ifdef HAVE_ELEMENTARY_X
- Ecore_X_Window xwin = 0;
-
+ const char *engine_name;
if (!ee) return 0;
- if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_X11))
- {
- if (ee) xwin = ecore_evas_software_x11_window_get(ee);
- }
- else if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_FB) ||
- EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_16_WINCE) ||
- EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_SDL) ||
- EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_16_SDL) ||
- EE_ENGINE_COMPARE(ee, ELM_OPENGL_SDL) ||
- EE_ENGINE_COMPARE(ee, ELM_OPENGL_COCOA))
- {
- }
- else if (EE_ENGINE_COMPARE(ee, ELM_OPENGL_X11))
+
+ engine_name = ecore_evas_engine_name_get(ee);
+ if (EINA_UNLIKELY(!engine_name)) return 0;
+
+ if (!strcmp(engine_name, ELM_SOFTWARE_X11))
{
- if (ee) xwin = ecore_evas_gl_x11_window_get(ee);
+ return ecore_evas_software_x11_window_get(ee);
}
- else if (EE_ENGINE_COMPARE(ee, ELM_SOFTWARE_WIN32))
+ else if (!strcmp(engine_name, ELM_OPENGL_X11))
{
- if (ee) xwin = (long)ecore_evas_win32_window_get(ee);
+ return ecore_evas_gl_x11_window_get(ee);
}
- return xwin;
-
+#else
+ (void)ee;
#endif
return 0;
}
#ifdef HAVE_ELEMENTARY_X
static void
-_elm_win_xwindow_get(Elm_Win_Smart_Data *sd)
+_internal_elm_win_xwindow_get(Elm_Win_Data *sd)
{
sd->x.xwin = _elm_ee_xwin_get(sd->ee);
}
#endif
+Ecore_Wl_Window *
+_elm_ee_wlwin_get(const Ecore_Evas *ee)
+{
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ const char *engine_name;
+
+ if (!ee) return NULL;
+
+ engine_name = ecore_evas_engine_name_get(ee);
+ if (EINA_UNLIKELY(!engine_name)) return NULL;
+
+ if ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
+ (!strcmp(engine_name, ELM_WAYLAND_EGL)))
+ {
+ return ecore_evas_wayland_window_get(ee);
+ }
+#else
+ (void)ee;
+#endif
+ return NULL;
+}
+
+#ifdef HAVE_ELEMENTARY_WAYLAND
+static void
+_elm_win_wlwindow_get(Elm_Win_Data *sd)
+{
+ sd->wl.win = _elm_ee_wlwin_get(sd->ee);
+}
+#endif
+
#ifdef HAVE_ELEMENTARY_X
static void
-_elm_win_xwin_update(Elm_Win_Smart_Data *sd)
+_elm_win_xwin_update(Elm_Win_Data *sd)
{
const char *s;
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->parent)
{
ELM_WIN_DATA_GET(sd->parent, sdp);
if (h < minh) h = minh;
if (w > maxw) w = maxw;
if (h > maxh) h = maxh;
- evas_object_move(obj, 0, 0);
evas_object_resize(obj, w, h);
}
static void
_elm_win_on_resize_obj_changed_size_hints(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
_elm_win_resize_objects_eval(data);
}
if (!is_access)
{
evas = evas_object_evas_get(obj);
- if (evas) _elm_access_object_hilight_disable(evas);
+ if (evas) _elm_access_object_highlight_disable(evas);
}
}
}
#ifdef HAVE_ELEMENTARY_X
static Eina_Bool
_elm_win_client_message(void *data,
- int type __UNUSED__,
+ int type EINA_UNUSED,
void *event)
{
ELM_WIN_DATA_GET(data, sd);
static Eina_Bool
_elm_win_property_change(void *data,
- int type __UNUSED__,
+ int type EINA_UNUSED,
void *event)
{
ELM_WIN_DATA_GET(data, sd);
#endif
static void
-_elm_win_focus_highlight_hide(void *data __UNUSED__,
+_elm_win_focus_highlight_hide(void *data EINA_UNUSED,
Evas_Object *obj,
- const char *emission __UNUSED__,
- const char *source __UNUSED__)
+ const char *emission EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
evas_object_hide(obj);
}
static void
_elm_win_focus_highlight_anim_end(void *data,
Evas_Object *obj,
- const char *emission __UNUSED__,
- const char *source __UNUSED__)
+ const char *emission EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
}
static void
-_elm_win_focus_highlight_init(Elm_Win_Smart_Data *sd)
+_elm_win_focus_highlight_init(Elm_Win_Data *sd)
{
evas_event_callback_add(sd->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
_elm_win_object_focus_in, sd->obj);
EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
_elm_win_object_focus_out, sd->obj);
- sd->focus_highlight.cur.target = evas_focus_get(sd->evas);
+ sd->focus_highlight.cur.target = NULL;
sd->focus_highlight.fobj = edje_object_add(sd->evas);
sd->focus_highlight.theme_changed = EINA_TRUE;
static void
_elm_win_frame_cb_move_start(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
const char *source)
{
ELM_WIN_DATA_GET(data, sd);
(void)source;
#endif
- /* FIXME: Change mouse pointer */
-
/* NB: Wayland handles moving surfaces by itself so we cannot
* specify a specific x/y we want. Instead, we will pass in the
* existing x/y values so they can be recorded as 'previous'
static void
_elm_win_frame_cb_move_stop(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
- const char *source __UNUSED__)
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
#endif
static void
-_elm_win_frame_obj_move(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_elm_win_frame_obj_update(Elm_Win_Data *sd)
{
- Elm_Win_Smart_Data *sd;
int fx, fy, fw, fh;
int ox, oy, ow, oh;
int sx, sy, sw, sh;
int x, y, w, h;
-
- if (!(sd = data)) return;
- if (!sd->client_obj) return;
-
evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
+
if ((x != (ox - fx)) || (y != (oy - fy)) ||
(w != (fw - ow)) || (h != (fh - oh)))
{
}
static void
-_elm_win_frame_obj_resize(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_elm_win_frame_obj_move(void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
- Elm_Win_Smart_Data *sd;
- int fx, fy, fw, fh;
- int ox, oy, ow, oh;
- int sx, sy, sw, sh;
- int x, y, w, h;
+ Elm_Win_Data *sd;
if (!(sd = data)) return;
if (!sd->client_obj) return;
- evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
- evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
- evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
+ _elm_win_frame_obj_update(sd);
+}
- evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
- if ((x != (ox - fx)) || (y != (oy - fy)) ||
- (w != (fw - ow)) || (h != (fh - oh)))
- {
- evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
- (fw - ow), (fh - oh));
- }
+static void
+_elm_win_frame_obj_resize(void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ Elm_Win_Data *sd;
-#ifdef HAVE_ELEMENTARY_WAYLAND
- ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -(fy - sy), sw, sh);
-#endif
+ if (!(sd = data)) return;
+ if (!sd->client_obj) return;
+
+ _elm_win_frame_obj_update(sd);
}
static void
_elm_win_frame_cb_resize_show(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
const char *source)
{
ELM_WIN_DATA_GET(data, sd);
static void
_elm_win_frame_cb_resize_hide(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
- const char *source __UNUSED__)
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
static void
_elm_win_frame_cb_resize_start(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
const char *source)
{
#ifdef HAVE_ELEMENTARY_WAYLAND
static void
_elm_win_frame_cb_minimize(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
- const char *source __UNUSED__)
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
}
static void
+_elm_win_frame_maximized_state_update(Elm_Win_Data *sd, Eina_Bool maximized)
+{
+ const char *emission;
+
+ if (maximized)
+ emission = "elm,state,maximized";
+ else
+ emission = "elm,state,unmaximized";
+
+ edje_object_signal_emit(sd->frame_obj, emission, "elm");
+ edje_object_message_signal_process(sd->frame_obj);
+ evas_object_smart_calculate(sd->frame_obj);
+
+ _elm_win_frame_obj_update(sd);
+}
+
+static void
_elm_win_frame_cb_maximize(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
- const char *source __UNUSED__)
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
+ Eina_Bool value;
ELM_WIN_DATA_GET(data, sd);
if (!sd) return;
- if (sd->maximized) sd->maximized = EINA_FALSE;
- else sd->maximized = EINA_TRUE;
- TRAP(sd, maximized_set, sd->maximized);
+ if (sd->maximized) value = EINA_FALSE;
+ else value = EINA_TRUE;
+
+ _elm_win_frame_maximized_state_update(sd, value);
+
+ TRAP(sd, maximized_set, value);
}
static void
_elm_win_frame_cb_close(void *data,
- Evas_Object *obj __UNUSED__,
- const char *sig __UNUSED__,
- const char *source __UNUSED__)
+ Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
Evas_Object *win;
}
static void
-_elm_win_frame_add(Elm_Win_Smart_Data *sd,
+_elm_win_frame_add(Elm_Win_Data *sd,
const char *style)
{
Evas_Object *obj = sd->obj;
if (!elm_widget_theme_object_set
(sd->obj, sd->frame_obj, "border", "base", style))
{
- evas_object_del(sd->frame_obj);
- sd->frame_obj = NULL;
+ ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
return;
}
}
static void
-_elm_win_frame_del(Elm_Win_Smart_Data *sd)
+_elm_win_frame_del(Elm_Win_Data *sd)
{
int w, h;
- if (sd->client_obj)
- {
- evas_object_del(sd->client_obj);
- sd->client_obj = NULL;
- }
+ ELM_SAFE_FREE(sd->client_obj, evas_object_del);
if (sd->frame_obj)
{
(sd->frame_obj, "elm,action,close", "elm",
_elm_win_frame_cb_close);
- evas_object_del(sd->frame_obj);
- sd->frame_obj = NULL;
+ ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
}
evas_output_framespace_set(sd->evas, 0, 0, 0, 0);
#ifdef ELM_DEBUG
static void
-_debug_key_down(void *data __UNUSED__,
- Evas *e __UNUSED__,
+_debug_key_down(void *data EINA_UNUSED,
+ Evas *e EINA_UNUSED,
Evas_Object *obj,
void *event_info)
{
#endif
static void
-_win_img_hide(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_win_inlined_image_set(Elm_Win_Data *sd)
{
- elm_widget_focus_hide_handle(data);
-}
-
-static void
-_win_img_mouse_up(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info)
-{
- Evas_Event_Mouse_Up *ev = event_info;
- if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
- elm_widget_focus_mouse_up_handle(data);
-}
-
-static void
-_win_img_focus_in(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
-{
- elm_widget_focus_steal(data);
-}
-
-static void
-_win_img_focus_out(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
-{
- elm_widget_focused_object_clear(data);
-}
-
-static void
-_win_inlined_image_set(Elm_Win_Smart_Data *sd)
-{
- evas_object_image_alpha_set(sd->img_obj, EINA_FALSE);
- evas_object_image_filled_set(sd->img_obj, EINA_TRUE);
+ evas_object_image_alpha_set(sd->img_obj, EINA_FALSE);
+ evas_object_image_filled_set(sd->img_obj, EINA_TRUE);
evas_object_event_callback_add
(sd->img_obj, EVAS_CALLBACK_DEL, _elm_win_on_img_obj_del, sd->obj);
static void
_elm_win_on_icon_del(void *data,
- Evas *e __UNUSED__,
+ Evas *e EINA_UNUSED,
Evas_Object *obj,
- void *event_info __UNUSED__)
+ void *event_info EINA_UNUSED)
{
ELM_WIN_DATA_GET(data, sd);
if (sd->icon == obj) sd->icon = NULL;
}
-static void
-_elm_win_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
+EOLIAN static void
+_elm_win_evas_object_smart_add(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
#ifdef HAVE_ELEMENTARY_X
static void
-_elm_x_io_err(void *data __UNUSED__)
+_elm_x_io_err(void *data EINA_UNUSED)
{
Eina_List *l;
Evas_Object *obj;
}
static void
-_elm_win_cb_hide(void *data __UNUSED__,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_elm_win_cb_hide(void *data EINA_UNUSED,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
_elm_win_state_eval_queue();
}
static void
-_elm_win_cb_show(void *data __UNUSED__,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_elm_win_cb_show(void *data EINA_UNUSED,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
_elm_win_state_eval_queue();
}
evas_object_smart_changed(sd->layout);
}
-static void
-_win_constructor(Eo *obj, void *_pd, va_list *list)
+static Eina_Bool
+_accel_is_gl(void)
+{
+ const char *env = NULL;
+ const char *str;
+
+ str = _elm_accel_preference;
+ env = getenv("ELM_ACCEL");
+ if (env) str = env;
+ if ((str) &&
+ ((!strcasecmp(str, "gl")) ||
+ (!strcasecmp(str, "opengl")) ||
+ (!strcasecmp(str, "3d")) ||
+ (!strcasecmp(str, "hw")) ||
+ (!strcasecmp(str, "accel")) ||
+ (!strcasecmp(str, "hardware"))
+ ))
+ return EINA_TRUE;
+ return EINA_FALSE;
+}
+
+EOLIAN static void
+_elm_win_constructor(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_Type type)
{
- Elm_Win_Smart_Data *sd = _pd;
sd->obj = obj; // in ctor
- const char *name = va_arg(*list, const char *);
- Elm_Win_Type type = va_arg(*list, Elm_Win_Type);
- Evas_Object *parent;
+ Evas_Object *parent = NULL;
Evas *e;
const Eina_List *l;
- const char *fontpath, *fallback = NULL;
+ const char *fontpath, *engine = NULL, *enginelist[32], *disp;
+ int i;
- Elm_Win_Smart_Data tmp_sd;
+ Elm_Win_Data tmp_sd;
- eo_do(obj, eo_parent_get(&parent));
+ eo_do(obj, parent = eo_parent_get());
/* just to store some data while trying out to create a canvas */
- memset(&tmp_sd, 0, sizeof(Elm_Win_Smart_Data));
-
-#define FALLBACK_TRY(engine) \
- if (!tmp_sd.ee) { \
- CRITICAL(engine " engine creation failed. Trying default."); \
- } while (0)
-#define FALLBACK_STORE(engine) \
- if (tmp_sd.ee) \
- { \
- CRITICAL(engine "Fallback to %s successful.", engine); \
- fallback = engine; \
- }
+ memset(&tmp_sd, 0, sizeof(Elm_Win_Data));
switch (type)
{
case ELM_WIN_INLINED_IMAGE:
if (!parent) break;
- {
- e = evas_object_evas_get(parent);
- Ecore_Evas *ee;
+ {
+ e = evas_object_evas_get(parent);
+ Ecore_Evas *ee;
- if (!e) break;
+ if (!e) break;
- ee = ecore_evas_ecore_evas_get(e);
- if (!ee) break;
+ ee = ecore_evas_ecore_evas_get(e);
+ if (!ee) break;
- tmp_sd.img_obj = ecore_evas_object_image_new(ee);
- if (!tmp_sd.img_obj) break;
+ tmp_sd.img_obj = ecore_evas_object_image_new(ee);
+ if (!tmp_sd.img_obj) break;
- tmp_sd.ee = ecore_evas_object_ecore_evas_get(tmp_sd.img_obj);
- if (!tmp_sd.ee)
- {
- evas_object_del(tmp_sd.img_obj);
- tmp_sd.img_obj = NULL;
- }
- }
+ tmp_sd.ee = ecore_evas_object_ecore_evas_get(tmp_sd.img_obj);
+ if (!tmp_sd.ee)
+ {
+ ELM_SAFE_FREE(tmp_sd.img_obj, evas_object_del);
+ }
+ }
break;
case ELM_WIN_SOCKET_IMAGE:
break;
default:
- if (ENGINE_COMPARE(ELM_SOFTWARE_X11))
+ disp = getenv("ELM_DISPLAY");
+ if ((disp) && (!strcmp(disp, "x11")))
{
- tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
- FALLBACK_TRY("Software X11");
- if (!tmp_sd.ee)
+ if (_accel_is_gl())
{
- tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
- FALLBACK_STORE("Software FB");
+ enginelist[0] = ELM_OPENGL_X11;
+ enginelist[1] = ELM_SOFTWARE_X11;
+ enginelist[2] = NULL;
}
- }
- else if (ENGINE_COMPARE(ELM_SOFTWARE_FB))
- {
- tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
- FALLBACK_TRY("Software FB");
- if (!tmp_sd.ee)
+ else
{
- tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
- FALLBACK_STORE("Software X11");
+ enginelist[0] = ELM_SOFTWARE_X11;
+ enginelist[1] = ELM_OPENGL_X11;
+ enginelist[2] = NULL;
}
}
- else if (ENGINE_COMPARE(ELM_OPENGL_X11))
+ else if ((disp) && (!strcmp(disp, "wl")))
{
- int opt[10];
- int opt_i = 0;
-
- if (_elm_config->vsync)
+ if (_accel_is_gl())
{
- opt[opt_i] = ECORE_EVAS_GL_X11_OPT_VSYNC;
- opt_i++;
- opt[opt_i] = 1;
- opt_i++;
- opt[opt_i] = 0;
+ enginelist[0] = ELM_WAYLAND_EGL;
+ enginelist[1] = ELM_WAYLAND_SHM;
+ enginelist[2] = NULL;
}
- if (opt_i > 0)
- tmp_sd.ee = ecore_evas_gl_x11_options_new
- (NULL, 0, 0, 0, 1, 1, opt);
else
- tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 1, 1);
- FALLBACK_TRY("OpenGL");
- if (!tmp_sd.ee)
{
- tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
- FALLBACK_STORE("Software X11");
- if (!tmp_sd.ee)
- {
- tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
- FALLBACK_STORE("Software FB");
- }
+ enginelist[0] = ELM_WAYLAND_SHM;
+ enginelist[1] = ELM_WAYLAND_EGL;
+ enginelist[2] = NULL;
}
}
- else if (ENGINE_COMPARE(ELM_SOFTWARE_WIN32))
- {
- tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
- FALLBACK_TRY("Software Win32");
- }
- else if (ENGINE_COMPARE(ELM_SOFTWARE_PSL1GHT))
+ else if ((disp) && (!strcmp(disp, "win")))
{
- tmp_sd.ee = ecore_evas_psl1ght_new(NULL, 1, 1);
- FALLBACK_TRY("PSL1GHT");
+ enginelist[1] = ELM_SOFTWARE_WIN32;
+ enginelist[2] = NULL;
}
- else if (ENGINE_COMPARE(ELM_SOFTWARE_SDL))
+ else if ((disp) && (!strcmp(disp, "sdl")))
{
- tmp_sd.ee = ecore_evas_sdl_new(NULL, 0, 0, 0, 0, 0, 1);
- FALLBACK_TRY("Software SDL");
- if (!tmp_sd.ee)
+ if (_accel_is_gl())
{
- tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
- FALLBACK_STORE("Software X11");
- if (!tmp_sd.ee)
- {
- tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
- FALLBACK_STORE("Software FB");
- }
+ enginelist[0] = ELM_OPENGL_SDL;
+ enginelist[1] = ELM_SOFTWARE_SDL;
+ enginelist[2] = NULL;
}
- }
- else if (ENGINE_COMPARE(ELM_SOFTWARE_16_SDL))
- {
- tmp_sd.ee = ecore_evas_sdl16_new(NULL, 0, 0, 0, 0, 0, 1);
- FALLBACK_TRY("Software-16-SDL");
- if (!tmp_sd.ee)
+ else
{
- tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
- FALLBACK_STORE("Software X11");
- if (!tmp_sd.ee)
- {
- tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
- FALLBACK_STORE("Software FB");
- }
+ enginelist[0] = ELM_SOFTWARE_SDL;
+ enginelist[1] = ELM_OPENGL_SDL;
+ enginelist[2] = NULL;
}
}
- else if (ENGINE_COMPARE(ELM_OPENGL_SDL))
+ else if ((disp) && (!strcmp(disp, "mac")))
{
- tmp_sd.ee = ecore_evas_gl_sdl_new(NULL, 1, 1, 0, 0);
- FALLBACK_TRY("OpenGL SDL");
- if (!tmp_sd.ee)
- {
- tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
- FALLBACK_STORE("Software X11");
- if (!tmp_sd.ee)
- {
- tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
- FALLBACK_STORE("Software FB");
- }
- }
+ enginelist[0] = ELM_OPENGL_COCOA;
+ enginelist[1] = NULL;
+ }
+ else if ((disp) && (!strcmp(disp, "ews")))
+ {
+ enginelist[0] = ELM_EWS;
+ enginelist[1] = NULL;
}
- else if (ENGINE_COMPARE(ELM_OPENGL_COCOA))
+ else if ((disp) && (!strcmp(disp, "fb")))
{
- tmp_sd.ee = ecore_evas_cocoa_new(NULL, 1, 1, 0, 0);
- FALLBACK_TRY("OpenGL Cocoa");
+ enginelist[0] = ELM_DRM;
+ enginelist[1] = ELM_SOFTWARE_FB;
+ enginelist[2] = NULL;
}
- else if (ENGINE_COMPARE(ELM_BUFFER))
+ else if ((disp) && (!strcmp(disp, "buffer")))
{
- tmp_sd.ee = ecore_evas_buffer_new(1, 1);
+ enginelist[0] = ELM_BUFFER;
+ enginelist[1] = NULL;
}
- else if (ENGINE_COMPARE(ELM_EWS))
+ else if ((disp) && (!strcmp(disp, "ps3")))
{
- tmp_sd.ee = ecore_evas_ews_new(0, 0, 1, 1);
+ enginelist[0] = ELM_SOFTWARE_PSL1GHT;
+ enginelist[1] = NULL;
}
- else if (ENGINE_COMPARE(ELM_WAYLAND_SHM))
+ else if ((disp) && (!strcmp(disp, "shot")))
{
- tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 0);
+ enginelist[0] = ENGINE_GET();
+ enginelist[1] = NULL;
}
- else if (ENGINE_COMPARE(ELM_WAYLAND_EGL))
+ else
{
- tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0);
+ if (_accel_is_gl())
+ {
+ enginelist[ 0] = ELM_OPENGL_X11;
+ enginelist[ 1] = ELM_WAYLAND_EGL;
+ enginelist[ 2] = ELM_DRM;
+ enginelist[ 3] = ELM_SOFTWARE_FB;
+ enginelist[ 4] = ELM_OPENGL_COCOA;
+ enginelist[ 5] = ELM_OPENGL_SDL;
+ enginelist[ 6] = ELM_SOFTWARE_X11;
+ enginelist[ 7] = ELM_WAYLAND_SHM;
+ enginelist[ 8] = ELM_SOFTWARE_SDL;
+ enginelist[ 9] = ELM_SOFTWARE_PSL1GHT;
+ enginelist[10] = NULL;
+ }
+ else
+ {
+ enginelist[ 0] = ENGINE_GET();
+ enginelist[ 1] = ELM_SOFTWARE_X11;
+ enginelist[ 2] = ELM_WAYLAND_SHM;
+ enginelist[ 3] = ELM_DRM;
+ enginelist[ 4] = ELM_SOFTWARE_FB;
+ enginelist[ 5] = ELM_OPENGL_COCOA;
+ enginelist[ 6] = ELM_SOFTWARE_SDL;
+ enginelist[ 7] = ELM_OPENGL_X11;
+ enginelist[ 8] = ELM_WAYLAND_EGL;
+ enginelist[ 9] = ELM_DRM;
+ enginelist[10] = ELM_OPENGL_SDL;
+ enginelist[11] = ELM_SOFTWARE_WIN32;
+ enginelist[12] = NULL;
+ }
}
- else if (!strncmp(ENGINE_GET(), "shot:", 5))
+ for (i = 0; i < 30; i++)
{
- tmp_sd.ee = ecore_evas_buffer_new(1, 1);
- ecore_evas_manual_render_set(tmp_sd.ee, EINA_TRUE);
- tmp_sd.shot.info = eina_stringshare_add
- (ENGINE_GET() + 5);
+ if ((i > 0) && (!enginelist[i])) break;
+ if (!strcmp(enginelist[i], ELM_SOFTWARE_X11))
+ tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
+ else if (!strcmp(enginelist[i], ELM_OPENGL_X11))
+ {
+ int opt[10], opt_i = 0;
+
+ if (_elm_config->vsync)
+ {
+ opt[opt_i++] = ECORE_EVAS_GL_X11_OPT_VSYNC;
+ opt[opt_i++] = 1;
+ opt[opt_i++] = 0;
+ }
+ if (opt_i > 0)
+ tmp_sd.ee = ecore_evas_gl_x11_options_new(NULL, 0, 0, 0, 1, 1, opt);
+ else
+ tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 1, 1);
+ }
+ else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
+ tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 0);
+ else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
+ tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0);
+ else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
+ tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
+ else if (!strcmp(enginelist[i], ELM_SOFTWARE_SDL))
+ tmp_sd.ee = ecore_evas_sdl_new(NULL, 0, 0, 0, 0, 0, 1);
+ else if (!strcmp(enginelist[i], ELM_OPENGL_SDL))
+ tmp_sd.ee = ecore_evas_gl_sdl_new(NULL, 1, 1, 0, 0);
+ else if (!strcmp(enginelist[i], ELM_OPENGL_COCOA))
+ tmp_sd.ee = ecore_evas_cocoa_new(NULL, 1, 1, 0, 0);
+ else if (!strcmp(enginelist[i], ELM_EWS))
+ tmp_sd.ee = ecore_evas_ews_new(0, 0, 1, 1);
+ else if (!strcmp(enginelist[i], ELM_SOFTWARE_FB))
+ tmp_sd.ee = ecore_evas_fb_new(NULL, 0, 1, 1);
+ else if (!strcmp(enginelist[i], ELM_BUFFER))
+ tmp_sd.ee = ecore_evas_buffer_new(1, 1);
+ else if (!strcmp(enginelist[i], ELM_SOFTWARE_PSL1GHT))
+ tmp_sd.ee = ecore_evas_psl1ght_new(NULL, 1, 1);
+ else if (!strcmp(enginelist[i], ELM_DRM))
+ tmp_sd.ee = ecore_evas_drm_new(NULL, 0, 0, 0, 1, 1);
+ else if (!strncmp(enginelist[i], "shot:", 5))
+ {
+ tmp_sd.ee = ecore_evas_buffer_new(1, 1);
+ ecore_evas_manual_render_set(tmp_sd.ee, EINA_TRUE);
+ tmp_sd.shot.info = eina_stringshare_add(ENGINE_GET() + 5);
+ }
+ engine = enginelist[i];
+ if (tmp_sd.ee) break;
}
-#undef FALLBACK_TRY
break;
}
eo_do(obj, eo_parent_set(ecore_evas_get(tmp_sd.ee)));
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_do(obj,
- evas_obj_type_set(MY_CLASS_NAME),
- evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
+ evas_obj_type_set(MY_CLASS_NAME_LEGACY),
+ evas_obj_smart_callbacks_descriptions_set(_smart_callbacks));
if (getenv("ELM_FIRST_FRAME"))
evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
- _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));
+ _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));
/* copying possibly altered fields back */
#define SD_CPY(_field) \
* pointer */
if (type == ELM_WIN_INLINED_IMAGE)
_win_inlined_image_set(sd);
-
#ifdef HAVE_ELEMENTARY_X
- else if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
- ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
- ENGINE_COMPARE(ELM_SOFTWARE_8_X11) ||
- ENGINE_COMPARE(ELM_OPENGL_X11))
+ else if ((engine) &&
+ ((!strcmp(engine, ELM_SOFTWARE_X11)) ||
+ (!strcmp(engine, ELM_OPENGL_X11))))
{
sd->x.client_message_handler = ecore_event_handler_add
(ECORE_X_EVENT_CLIENT_MESSAGE, _elm_win_client_message, obj);
(ECORE_X_EVENT_WINDOW_PROPERTY, _elm_win_property_change, obj);
}
#endif
-
- else if (!strncmp(ENGINE_GET(), "shot:", 5))
+ else if ((engine) && (!strncmp(engine, "shot:", 5)))
_shot_init(sd);
sd->kbdmode = ELM_WIN_KEYBOARD_UNKNOWN;
sd->indmode = ELM_WIN_INDICATOR_UNKNOWN;
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
ecore_x_io_error_handler_set(_elm_x_io_err, NULL);
#ifdef HAVE_ELEMENTARY_WAYLAND
if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
- sd->wl.win = ecore_evas_wayland_window_get(sd->ee);
+ _elm_win_wlwindow_get(sd);
#endif
if ((_elm_config->bgpixmap)
(((sd->x.xwin) && (!ecore_x_screen_is_composited(0))) ||
(!sd->x.xwin)))
#else
- )
+ )
#endif
TRAP(sd, avoid_damage_set, ECORE_EVAS_AVOID_DAMAGE_EXPOSE);
// bg pixmap done by x - has other issues like can be redrawn by x before it
sd->type = type;
sd->parent = parent;
+ sd->modal_count = 0;
if (sd->parent)
evas_object_event_callback_add
_elm_win_list = eina_list_append(_elm_win_list, obj);
_elm_win_count++;
- if (((fallback) && (!strcmp(fallback, "Software FB"))) ||
- ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))
+ if ((engine) && ((!strcmp(engine, ELM_SOFTWARE_FB)) || (!strcmp(engine, ELM_DRM))))
{
TRAP(sd, fullscreen_set, 1);
}
else if ((type != ELM_WIN_INLINED_IMAGE) &&
- (ENGINE_COMPARE(ELM_WAYLAND_SHM) ||
- ENGINE_COMPARE(ELM_WAYLAND_EGL)))
+ ((engine) &&
+ ((!strcmp(engine, ELM_WAYLAND_SHM) ||
+ (!strcmp(engine, ELM_WAYLAND_EGL))))))
_elm_win_frame_add(sd, "default");
if (_elm_config->focus_highlight_enable)
if ((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_ON) ||
((_elm_config->softcursor_mode == ELM_SOFTCURSOR_MODE_AUTO) &&
- (((fallback) && (!strcmp(fallback, "Software FB"))) ||
- ((!fallback) && (ENGINE_COMPARE(ELM_SOFTWARE_FB))))))
+ ((engine) &&
+ ((!strcmp(engine, ELM_SOFTWARE_FB)) || (!strcmp(engine, ELM_DRM))))))
{
Evas_Object *o;
Evas_Coord mw = 1, mh = 1, hx = 0, hy = 0;
// do nothing
}
+ sd->wm_rot.wm_supported = ecore_evas_wm_rotation_supported_get(sd->ee);
+ sd->wm_rot.preferred_rot = -1; // it means that elm_win doesn't use preferred rotation.
+
sd->layout = edje_object_add(sd->evas);
_elm_theme_object_set(obj, sd->layout, "win", "base", "default");
sd->box = evas_object_box_add(sd->evas);
edje_object_update_hints_set(sd->layout, EINA_TRUE);
evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_elm_win_on_resize_obj_changed_size_hints, obj);
+
+ if (_elm_config->atspi_mode == ELM_ATSPI_MODE_ON)
+ {
+ eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_WINDOW));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(_elm_atspi_root_get(), obj);
+ eo_do(obj, eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, NULL));
+ }
+
evas_object_show(sd->layout);
}
-static void
-_constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
+EOLIAN static void
+_elm_win_eo_base_constructor(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED)
{
eo_error_set(obj);
ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME);
}
+EOLIAN static Elm_Win_Type
+_elm_win_type_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
+{
+ return sd->type;
+}
+
EAPI Evas_Object *
elm_win_util_standard_add(const char *name,
const char *title)
return win;
}
-EAPI void
-elm_win_resize_object_add(Evas_Object *obj,
- Evas_Object *subobj)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_resize_object_add(subobj));
-}
-
-static void
-_resize_object_add(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_resize_object_add(Eo *obj, Elm_Win_Data *sd, Evas_Object *subobj)
{
- Evas_Object *subobj = va_arg(*list, Evas_Object *);
-
- Elm_Win_Smart_Data *sd = _pd;
-
elm_widget_sub_object_add(obj, subobj);
if (!evas_object_box_append(sd->box, subobj))
ERR("could not append %p to box", subobj);
}
-EAPI void
-elm_win_resize_object_del(Evas_Object *obj,
- Evas_Object *subobj)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_resize_object_del(subobj));
-}
-
-static void
-_resize_object_del(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_resize_object_del(Eo *obj, Elm_Win_Data *sd, Evas_Object *subobj)
{
- Evas_Object *subobj = va_arg(*list, Evas_Object *);
- Elm_Win_Smart_Data *sd = _pd;
-
if (!elm_widget_sub_object_del(obj, subobj))
ERR("could not remove sub object %p from %p", subobj, obj);
evas_object_box_remove(sd->box, subobj);
}
-EAPI void
-elm_win_title_set(Evas_Object *obj,
- const char *title)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_title_set(title));
-}
-
-static void
-_title_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_title_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *title)
{
- const char *title = va_arg(*list, const char *);
- Elm_Win_Smart_Data *sd = _pd;
-
if (!title) return;
eina_stringshare_replace(&(sd->title), title);
TRAP(sd, title_set, sd->title);
(sd->frame_obj, "elm.text.title", sd->title);
}
-EAPI const char *
-elm_win_title_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) NULL;
- const char *ret = NULL;
- eo_do((Eo *) obj, elm_obj_win_title_get(&ret));
- return ret;
-}
-
-static void
-_title_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- const char **ret = va_arg(*list, const char **);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->title;
-}
-
-EAPI void
-elm_win_icon_name_set(Evas_Object *obj,
- const char *icon_name)
+EOLIAN static const char*
+_elm_win_title_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_icon_name_set(icon_name));
+ return sd->title;
}
-static void
-_icon_name_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_icon_name_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *icon_name)
{
- const char *icon_name = va_arg(*list, const char *);
- Elm_Win_Smart_Data *sd = _pd;
-
if (!icon_name) return;
eina_stringshare_replace(&(sd->icon_name), icon_name);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI const char *
-elm_win_icon_name_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) NULL;
- const char *ret = NULL;
- eo_do((Eo *) obj, elm_obj_win_icon_name_get(&ret));
- return ret;
-}
-
-static void
-_icon_name_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- const char **ret = va_arg(*list, const char **);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->icon_name;
-}
-
-EAPI void
-elm_win_role_set(Evas_Object *obj, const char *role)
+EOLIAN static const char*
+_elm_win_icon_name_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_role_set(role));
+ return sd->icon_name;
}
-static void
-_role_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_role_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *role)
{
- const char *role = va_arg(*list, const char *);
- Elm_Win_Smart_Data *sd = _pd;
-
if (!role) return;
eina_stringshare_replace(&(sd->role), role);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI const char *
-elm_win_role_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) NULL;
- const char *ret = NULL;
- eo_do((Eo *) obj, elm_obj_win_role_get(&ret));
- return ret;
-}
-
-static void
-_role_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- const char **ret = va_arg(*list, const char **);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->role;
-}
-
-EAPI void
-elm_win_icon_object_set(Evas_Object *obj,
- Evas_Object *icon)
+EOLIAN static const char*
+_elm_win_role_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_icon_object_set(icon));
+ return sd->role;
}
-static void
-_icon_object_set(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_icon_object_set(Eo *obj, Elm_Win_Data *sd, Evas_Object *icon)
{
- Evas_Object *icon = va_arg(*list, Evas_Object *);
- Elm_Win_Smart_Data *sd = _pd;
-
if (sd->icon)
evas_object_event_callback_del_full
(sd->icon, EVAS_CALLBACK_DEL, _elm_win_on_icon_del, obj);
#endif
}
-EAPI const Evas_Object *
-elm_win_icon_object_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) NULL;
- const Evas_Object *ret = NULL;
- eo_do((Eo *) obj, elm_obj_win_icon_object_get(&ret));
- return ret;
-}
-
-static void
-_icon_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- const Evas_Object **ret = va_arg(*list, const Evas_Object **);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->icon;
-}
-
-EAPI void
-elm_win_autodel_set(Evas_Object *obj,
- Eina_Bool autodel)
+EOLIAN static const Evas_Object*
+_elm_win_icon_object_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_autodel_set(autodel));
+ return sd->icon;
}
-static void
-_autodel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_autodel_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool autodel)
{
- Eina_Bool autodel = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
sd->autodel = autodel;
}
-EAPI Eina_Bool
-elm_win_autodel_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_autodel_get(&ret));
- return ret;
-}
-
-static void
-_autodel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->autodel;
-}
-
-EAPI void
-elm_win_activate(Evas_Object *obj)
+EOLIAN static Eina_Bool
+_elm_win_autodel_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_activate());
+ return sd->autodel;
}
-static void
-_activate(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
+EOLIAN static void
+_elm_win_activate(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Elm_Win_Smart_Data *sd = _pd;
TRAP(sd, activate);
}
-EAPI void
-elm_win_lower(Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_lower());
-}
-
-static void
-_lower(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
+EOLIAN static void
+_elm_win_lower(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Elm_Win_Smart_Data *sd = _pd;
TRAP(sd, lower);
}
-EAPI void
-elm_win_raise(Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_raise());
-}
-
-static void
-_raise(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
+EOLIAN static void
+_elm_win_raise(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Elm_Win_Smart_Data *sd = _pd;
TRAP(sd, raise);
}
-EAPI void
-elm_win_center(Evas_Object *obj,
- Eina_Bool h,
- Eina_Bool v)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_center(h, v));
-}
-
-static void
-_center(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_center(Eo *obj, Elm_Win_Data *sd, Eina_Bool h, Eina_Bool v)
{
- Eina_Bool h = va_arg(*list, int);
- Eina_Bool v = va_arg(*list, int);
int win_w, win_h, screen_w, screen_h, nx, ny;
- Elm_Win_Smart_Data *sd = _pd;
-
if ((trap) && (trap->center) && (!trap->center(sd->trap_data, obj)))
return;
evas_object_move(obj, nx, ny);
}
-EAPI void
-elm_win_borderless_set(Evas_Object *obj,
- Eina_Bool borderless)
+EOLIAN static void
+_elm_win_borderless_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool borderless)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_borderless_set(borderless));
-}
+ Eina_Bool need_frame = EINA_FALSE;
-static void
-_borderless_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool borderless = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
+ const char *engine_name = ecore_evas_engine_name_get(sd->ee);
+ need_frame = engine_name &&
+ ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
+ (!strcmp(engine_name, ELM_WAYLAND_EGL)));
+
+ if (need_frame)
+ need_frame = !sd->fullscreen;
if (borderless)
{
- if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
- EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
+ if (need_frame)
_elm_win_frame_del(sd);
}
else
{
- if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
- EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
+ if (need_frame)
_elm_win_frame_add(sd, "default");
if (sd->frame_obj)
#endif
}
-EAPI Eina_Bool
-elm_win_borderless_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_borderless_get(&ret));
- return ret;
-}
-
-static void
-_borderless_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = ecore_evas_borderless_get(sd->ee);
-}
-
-EAPI void
-elm_win_shaped_set(Evas_Object *obj,
- Eina_Bool shaped)
+EOLIAN static Eina_Bool
+_elm_win_borderless_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_shaped_set(shaped));
+ return ecore_evas_borderless_get(sd->ee);
}
-static void
-_shaped_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_shaped_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool shaped)
{
- Eina_Bool shaped = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
TRAP(sd, shaped_set, shaped);
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);
#endif
}
-EAPI Eina_Bool
-elm_win_shaped_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_shaped_get(&ret));
- return ret;
-}
-
-static void
-_shaped_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = ecore_evas_shaped_get(sd->ee);
-}
-
-EAPI void
-elm_win_alpha_set(Evas_Object *obj,
- Eina_Bool enabled)
+EOLIAN static Eina_Bool
+_elm_win_shaped_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_alpha_set(enabled));
+ return ecore_evas_shaped_get(sd->ee);
}
-static void
-_alpha_set(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_alpha_set(Eo *obj, Elm_Win_Data *sd, Eina_Bool enabled)
{
- Eina_Bool enabled = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
if (sd->img_obj)
{
evas_object_image_alpha_set(sd->img_obj, enabled);
}
}
-EAPI Eina_Bool
-elm_win_alpha_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_alpha_get(&ret));
- return ret;
-}
-
-static void
-_alpha_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_alpha_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
-
if (sd->img_obj)
{
- *ret = evas_object_image_alpha_get(sd->img_obj);
+ return evas_object_image_alpha_get(sd->img_obj);
}
else
{
- *ret = ecore_evas_alpha_get(sd->ee);
+ return ecore_evas_alpha_get(sd->ee);
}
-}
-EAPI void
-elm_win_override_set(Evas_Object *obj,
- Eina_Bool override)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_override_set(override));
+ return EINA_FALSE;
}
-static void
-_override_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_override_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool override)
{
- Eina_Bool override = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
TRAP(sd, override_set, override);
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);
#endif
}
-EAPI Eina_Bool
-elm_win_override_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_override_get(&ret));
- return ret;
-}
-
-static void
-_override_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = ecore_evas_override_get(sd->ee);
-}
-
-EAPI void
-elm_win_fullscreen_set(Evas_Object *obj,
- Eina_Bool fullscreen)
+EOLIAN static Eina_Bool
+_elm_win_override_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_fullscreen_set(fullscreen));
+ return ecore_evas_override_get(sd->ee);
}
-static void
-_fullscreen_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_fullscreen_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool fullscreen)
{
- Eina_Bool fullscreen = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
// YYY: handle if sd->img_obj
if (ENGINE_COMPARE(ELM_SOFTWARE_FB) ||
- ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE))
+ ENGINE_COMPARE(ELM_DRM))
{
// these engines... can ONLY be fullscreen
return;
{
// sd->fullscreen = fullscreen;
+ Eina_Bool need_frame = EINA_FALSE;
+
+ const char *engine_name = ecore_evas_engine_name_get(sd->ee);
+ need_frame = engine_name &&
+ ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
+ (!strcmp(engine_name, ELM_WAYLAND_EGL)));
+
+ if (need_frame)
+ need_frame = !ecore_evas_borderless_get(sd->ee);
+
TRAP(sd, fullscreen_set, fullscreen);
if (fullscreen)
{
- if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
- EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
+ if (need_frame)
_elm_win_frame_del(sd);
}
else
{
- if (EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_SHM) ||
- EE_ENGINE_COMPARE(sd->ee, ELM_WAYLAND_EGL))
+ if (need_frame)
_elm_win_frame_add(sd, "default");
if (sd->frame_obj)
}
}
-EAPI Eina_Bool
-elm_win_fullscreen_get(const Evas_Object *obj)
+EOLIAN static Eina_Bool
+_elm_win_fullscreen_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_fullscreen_get(&ret));
- return ret;
-}
+ const char* engine_name = ecore_evas_engine_name_get(sd->ee);
-static void
-_fullscreen_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
-
- if (EE_ENGINE_COMPARE(sd->ee, ELM_SOFTWARE_FB) ||
- EE_ENGINE_COMPARE(sd->ee, ELM_SOFTWARE_16_WINCE))
+ if (engine_name &&
+ ((!strcmp(engine_name, ELM_SOFTWARE_FB)) ||
+ (!strcmp(engine_name, ELM_DRM))))
{
// these engines... can ONLY be fullscreen
- *ret = EINA_TRUE;
+ return EINA_TRUE;
}
else
{
- *ret = sd->fullscreen;
+ return sd->fullscreen;
}
-}
-EAPI Evas_Object *
-elm_win_main_menu_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) NULL;
- Evas_Object *ret;
- eo_do((Eo *) obj, elm_obj_win_main_menu_get(&ret));
- return ret;
+ return EINA_FALSE;
}
static void
}
}
-static void
-_main_menu_get(Eo *obj, void *_pd, va_list *list)
+EOLIAN static Evas_Object *
+_elm_win_main_menu_get(Eo *obj, Elm_Win_Data *sd)
{
- Eo **ret = va_arg(*list, Eo **);
- Elm_Win_Smart_Data *sd = _pd;
Eina_Bool use_dbus = EINA_FALSE;
if (sd->main_menu) goto end;
_dbus_menu_set(EINA_FALSE, obj);
end:
- *ret = sd->main_menu;
-}
-
-EAPI void
-elm_win_maximized_set(Evas_Object *obj,
- Eina_Bool maximized)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_maximized_set(maximized));
+ return sd->main_menu;
}
-static void
-_maximized_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_maximized_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool maximized)
{
- Eina_Bool maximized = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
-// sd->maximized = maximized;
+ _elm_win_frame_maximized_state_update(sd, maximized);
// YYY: handle if sd->img_obj
TRAP(sd, maximized_set, maximized);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI Eina_Bool
-elm_win_maximized_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_maximized_get(&ret));
- return ret;
-}
-
-static void
-_maximized_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->maximized;
-}
-
-EAPI void
-elm_win_iconified_set(Evas_Object *obj,
- Eina_Bool iconified)
+EOLIAN static Eina_Bool
+_elm_win_maximized_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_iconified_set(iconified));
+ return sd->maximized;
}
-static void
-_iconified_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_iconified_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool iconified)
{
- Eina_Bool iconified = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
// sd->iconified = iconified;
TRAP(sd, iconified_set, iconified);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI Eina_Bool
-elm_win_iconified_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_iconified_get(&ret));
- return ret;
-}
-
-static void
-_iconified_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->iconified;
-}
-
-EAPI void
-elm_win_withdrawn_set(Evas_Object *obj,
- Eina_Bool withdrawn)
+EOLIAN static Eina_Bool
+_elm_win_iconified_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_withdrawn_set(withdrawn));
+ return sd->iconified;
}
-static void
-_withdrawn_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_withdrawn_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool withdrawn)
{
- Eina_Bool withdrawn = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
// sd->withdrawn = withdrawn;
TRAP(sd, withdrawn_set, withdrawn);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI Eina_Bool
-elm_win_withdrawn_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_withdrawn_get(&ret));
- return ret;
-}
-
-static void
-_withdrawn_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->withdrawn;
-}
-
-EAPI void
-elm_win_available_profiles_set(Evas_Object *obj,
- const char **profiles,
- unsigned int count)
+EOLIAN static Eina_Bool
+_elm_win_withdrawn_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do((Eo *) obj, elm_obj_win_available_profiles_set(profiles, count));
+ return sd->withdrawn;
}
-static void
-_available_profiles_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_available_profiles_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char **profiles, unsigned int count)
{
- const char **profiles = va_arg(*list, const char **);
- unsigned int count = va_arg(*list, unsigned int);
- Elm_Win_Smart_Data *sd = _pd;
Eina_Bool found = EINA_FALSE;
_elm_win_available_profiles_del(sd);
}
}
-EAPI Eina_Bool
-elm_win_available_profiles_get(Evas_Object *obj,
- char ***profiles,
- unsigned int *count)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_available_profiles_get(&ret, profiles, count));
- return ret;
-}
-
-static void
-_available_profiles_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_available_profiles_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, char ***profiles, unsigned int *count)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- char ***profiles = va_arg(*list, char ***);
- unsigned int *count = va_arg(*list, unsigned int *);
- Elm_Win_Smart_Data *sd = _pd;
- Eina_Bool res;
-
if (ecore_evas_window_profile_supported_get(sd->ee))
{
- res = ecore_evas_window_available_profiles_get(sd->ee,
+ return ecore_evas_window_available_profiles_get(sd->ee,
profiles,
count);
}
{
if (profiles) *profiles = (char **)sd->profile.available_list;
if (count) *count = sd->profile.count;
- res = EINA_TRUE;
+ return EINA_TRUE;
}
- *ret = res;
-}
-
-EAPI void
-elm_win_profile_set(Evas_Object *obj,
- const char *profile)
-{
- ELM_WIN_CHECK(obj);
- eo_do((Eo *) obj, elm_obj_win_profile_set(profile));
}
-static void
-_profile_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_profile_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *profile)
{
- const char *profile = va_arg(*list, const char *);
- Elm_Win_Smart_Data *sd = _pd;
-
/* check to see if a given profile is present in an available profiles */
if ((profile) && (sd->profile.available_list))
{
}
else
{
- if (_elm_win_profile_set(sd, profile))
+ if (_internal_elm_win_profile_set(sd, profile))
_elm_win_profile_update(sd);
}
}
-EAPI const char *
-elm_win_profile_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) NULL;
- const char *ret = NULL;
- eo_do((Eo *) obj, elm_obj_win_profile_get(&ret));
- return ret;
-}
-
-static void
-_profile_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- const char **ret = va_arg(*list, const char **);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->profile.name;
-}
-
-EAPI void
-elm_win_urgent_set(Evas_Object *obj,
- Eina_Bool urgent)
+EOLIAN static const char*
+_elm_win_profile_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_urgent_set(urgent));
+ return sd->profile.name;
}
-static void
-_urgent_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_urgent_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool urgent)
{
- Eina_Bool urgent = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
sd->urgent = urgent;
TRAP(sd, urgent_set, urgent);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI Eina_Bool
-elm_win_urgent_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_urgent_get(&ret));
- return ret;
-}
-
-static void
-_urgent_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->urgent;
-}
-
-EAPI void
-elm_win_demand_attention_set(Evas_Object *obj,
- Eina_Bool demand_attention)
+EOLIAN static Eina_Bool
+_elm_win_urgent_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_demand_attention_set(demand_attention));
+ return sd->urgent;
}
-static void
-_demand_attention_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_demand_attention_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool demand_attention)
{
- Eina_Bool demand_attention = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
sd->demand_attention = demand_attention;
TRAP(sd, demand_attention_set, demand_attention);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI Eina_Bool
-elm_win_demand_attention_get(const Evas_Object *obj)
+EOLIAN static Eina_Bool
+_elm_win_demand_attention_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_demand_attention_get(&ret));
- return ret;
+ return sd->demand_attention;
}
-static void
-_demand_attention_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_modal_set(Eo *obj, Elm_Win_Data *sd, Eina_Bool modal)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->demand_attention;
-}
+ if (sd->modal_count) return;
-EAPI void
-elm_win_modal_set(Evas_Object *obj,
- Eina_Bool modal)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_modal_set(modal));
-}
+ const Eina_List *l;
+ Evas_Object *current;
-static void
-_modal_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool modal = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
+ if ((modal) && (!sd->modal) && (evas_object_visible_get(obj)))
+ {
+ INCREMENT_MODALITY()
+ }
+ else if ((!modal) && (sd->modal) && (evas_object_visible_get(obj)))
+ {
+ DECREMENT_MODALITY()
+ }
sd->modal = modal;
TRAP(sd, modal_set, modal);
#endif
}
-EAPI Eina_Bool
-elm_win_modal_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_modal_get(&ret));
- return ret;
-}
-
-static void
-_modal_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->modal;
-}
-
-EAPI void
-elm_win_aspect_set(Evas_Object *obj,
- double aspect)
+EOLIAN static Eina_Bool
+_elm_win_modal_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_aspect_set(aspect));
+ return sd->modal;
}
-static void
-_aspect_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_aspect_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, double aspect)
{
- double aspect = va_arg(*list, double);
- Elm_Win_Smart_Data *sd = _pd;
-
sd->aspect = aspect;
TRAP(sd, aspect_set, aspect);
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI double
-elm_win_aspect_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) 0.0;
- double ret = 0.0;
- eo_do((Eo *) obj, elm_obj_win_aspect_get(&ret));
- return ret;
-}
-
-static void
-_aspect_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- double *ret = va_arg(*list, double *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->aspect;
-}
-
-EAPI void
-elm_win_size_base_set(Evas_Object *obj, int w, int h)
+EOLIAN static double
+_elm_win_aspect_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_size_base_set(w, h));
+ return sd->aspect;
}
-static void
-_size_base_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_size_base_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
{
- int w = va_arg(*list, int);
- int h = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
sd->size_base_w = w;
sd->size_base_h = h;
TRAP(sd, size_base_set, w, h);
#endif
}
-EAPI void
-elm_win_size_base_get(Evas_Object *obj, int *w, int *h)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_size_base_get(w, h));
-}
-
-static void
-_size_base_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_size_base_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *w, int *h)
{
- int *w = va_arg(*list, int *);
- int *h = va_arg(*list, int *);
-
- Elm_Win_Smart_Data *sd = _pd;
if (w) *w = sd->size_base_w;
if (w) *h = sd->size_base_h;
}
-EAPI void
-elm_win_size_step_set(Evas_Object *obj, int w, int h)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_size_step_set(w, h));
-}
-
-static void
-_size_step_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_size_step_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
{
- int w = va_arg(*list, int);
- int h = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
sd->size_step_w = w;
sd->size_step_h = h;
TRAP(sd, size_step_set, w, h);
#endif
}
-EAPI void
-elm_win_size_step_get(Evas_Object *obj, int *w, int *h)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_size_step_get(w, h));
-}
-
-static void
-_size_step_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_size_step_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *w, int *h)
{
- int *w = va_arg(*list, int *);
- int *h = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
if (w) *w = sd->size_step_w;
if (w) *h = sd->size_step_h;
}
-EAPI void
-elm_win_layer_set(Evas_Object *obj,
- int layer)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_layer_set(layer));
-}
-
-static void
-_layer_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_layer_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int layer)
{
- int layer = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
TRAP(sd, layer_set, layer);
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);
#endif
}
-EAPI int
-elm_win_layer_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) - 1;
- int ret = - 1;
- eo_do((Eo *) obj, elm_obj_win_layer_get(&ret));
- return ret;
-}
-
-static void
-_layer_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static int
+_elm_win_layer_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- int *ret = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = ecore_evas_layer_get(sd->ee);
+ return ecore_evas_layer_get(sd->ee);
}
EAPI void
return rotation;
}
-EAPI void
-elm_win_rotation_set(Evas_Object *obj,
- int rotation)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_rotation_set(rotation));
-}
-
+/*
+ * This API resizes the internal window(ex: X window) and evas_output.
+ * But this does not resize the elm window object and its contents.
+ */
static void
-_win_rotate(Evas_Object *obj, Elm_Win_Smart_Data *sd, int rotation, Eina_Bool resize)
+_win_rotate(Evas_Object *obj, Elm_Win_Data *sd, int rotation, Eina_Bool resize)
{
rotation = _win_rotation_degree_check(rotation);
if (sd->rot == rotation) return;
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);
#endif
+ _elm_win_frame_obj_update(sd);
elm_widget_orientation_set(obj, rotation);
evas_object_smart_callback_call(obj, SIG_ROTATION_CHANGED, NULL);
}
-static void
-_rotation_set(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_rotation_set(Eo *obj, Elm_Win_Data *sd, int rotation)
{
- int rotation = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
_win_rotate(obj, sd, rotation, EINA_FALSE);
}
+/*
+ * This API does not resize the internal window (ex: X window).
+ * But this resizes evas_output, elm window, and its contents.
+ */
+EOLIAN static void
+_elm_win_rotation_with_resize_set(Eo *obj, Elm_Win_Data *sd, int rotation)
+{
+ _win_rotate(obj, sd, rotation, EINA_TRUE);
+}
+
+EOLIAN static int
+_elm_win_rotation_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
+{
+ return sd->rot;
+}
+
+EOLIAN static Eina_Bool
+_elm_win_wm_rotation_supported_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
+{
+ return sd->wm_rot.wm_supported;
+}
+
+/* This will unset a preferred rotation, if given preferred rotation is '-1'.
+ */
EAPI void
-elm_win_rotation_with_resize_set(Evas_Object *obj,
- int rotation)
+elm_win_wm_rotation_preferred_rotation_set(const Evas_Object *obj,
+ int rotation)
{
ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_rotation_with_resize_set(rotation));
+ eo_do((Eo *) obj, elm_obj_win_wm_preferred_rotation_set(rotation));
}
-static void
-_rotation_with_resize_set(Eo *obj, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_wm_preferred_rotation_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int rotation)
{
- int rotation = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
- _win_rotate(obj, sd, rotation, EINA_TRUE);
+ int rot;
+
+ if (!sd->wm_rot.use)
+ sd->wm_rot.use = EINA_TRUE;
+
+ // '-1' means that elm_win doesn't use preferred rotation.
+ if (rotation == -1)
+ rot = -1;
+ else
+ rot = _win_rotation_degree_check(rotation);
+
+ if (sd->wm_rot.preferred_rot == rot) return;
+ sd->wm_rot.preferred_rot = rot;
+
+ ecore_evas_wm_rotation_preferred_rotation_set(sd->ee, rot);
}
-EAPI int
-elm_win_rotation_get(const Evas_Object *obj)
+EOLIAN static int
+_elm_win_wm_preferred_rotation_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) - 1;
- int ret = - 1;
- eo_do((Eo *) obj, elm_obj_win_rotation_get(&ret));
- return ret;
+ return sd->wm_rot.preferred_rot;
}
-static void
-_rotation_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_wm_available_rotations_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const int *rotations, unsigned int count)
{
- int *ret = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->rot;
+ unsigned int i;
+ int r;
+
+ if (!sd->wm_rot.use)
+ sd->wm_rot.use = EINA_TRUE;
+
+ ELM_SAFE_FREE(sd->wm_rot.rots, free);
+ sd->wm_rot.count = 0;
+
+ if (count > 0)
+ {
+ sd->wm_rot.rots = calloc(count, sizeof(int));
+ if (!sd->wm_rot.rots) return;
+ for (i = 0; i < count; i++)
+ {
+ r = _win_rotation_degree_check(rotations[i]);
+ sd->wm_rot.rots[i] = r;
+ }
+ }
+
+ sd->wm_rot.count = count;
+
+ ecore_evas_wm_rotation_available_rotations_set(sd->ee,
+ sd->wm_rot.rots,
+ sd->wm_rot.count);
}
-EAPI void
-elm_win_sticky_set(Evas_Object *obj,
- Eina_Bool sticky)
+EOLIAN static Eina_Bool
+_elm_win_wm_available_rotations_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int **rotations, unsigned int *count)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_sticky_set(sticky));
+ if (!sd->wm_rot.use) return EINA_FALSE;
+
+ if (sd->wm_rot.count > 0)
+ {
+ if (rotations)
+ {
+ *rotations = calloc(sd->wm_rot.count, sizeof(int));
+ if (*rotations)
+ {
+ memcpy(*rotations,
+ sd->wm_rot.rots,
+ sizeof(int) * sd->wm_rot.count);
+ }
+ }
+ }
+
+ if (count) *count = sd->wm_rot.count;
+ return EINA_TRUE;
}
-static void
-_sticky_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_wm_manual_rotation_done_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool set)
{
- Eina_Bool sticky = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
-// sd->sticky = sticky;
- TRAP(sd, sticky_set, sticky);
-#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwin_update(sd);
-#endif
+ if (!sd->wm_rot.use) return;
+ ecore_evas_wm_rotation_manual_rotation_done_set(sd->ee, set);
}
-EAPI Eina_Bool
-elm_win_sticky_get(const Evas_Object *obj)
+EOLIAN static Eina_Bool
+_elm_win_wm_manual_rotation_done_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_sticky_get(&ret));
- return ret;
+ if (!sd->wm_rot.use) return EINA_FALSE;
+ return ecore_evas_wm_rotation_manual_rotation_done_get(sd->ee);
}
-static void
-_sticky_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_wm_manual_rotation_done(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->sticky;
+ if (!sd->wm_rot.use) return;
+ ecore_evas_wm_rotation_manual_rotation_done(sd->ee);
}
-EAPI void
-elm_win_keyboard_mode_set(Evas_Object *obj,
- Elm_Win_Keyboard_Mode mode)
+EOLIAN static void
+_elm_win_sticky_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool sticky)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_keyboard_mode_set(mode));
+// sd->sticky = sticky;
+ TRAP(sd, sticky_set, sticky);
+#ifdef HAVE_ELEMENTARY_X
+ _elm_win_xwin_update(sd);
+#endif
}
-static void
-_keyboard_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_sticky_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Elm_Win_Keyboard_Mode mode = va_arg(*list, Elm_Win_Keyboard_Mode);
- Elm_Win_Smart_Data *sd = _pd;
+ return sd->sticky;
+}
+EOLIAN static void
+_elm_win_keyboard_mode_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Keyboard_Mode mode)
+{
if (mode == sd->kbdmode) return;
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
#endif
sd->kbdmode = mode;
#ifdef HAVE_ELEMENTARY_X
#endif
}
-EAPI Elm_Win_Keyboard_Mode
-elm_win_keyboard_mode_get(const Evas_Object *obj)
+EOLIAN static Elm_Win_Keyboard_Mode
+_elm_win_keyboard_mode_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) ELM_WIN_KEYBOARD_UNKNOWN;
- Elm_Win_Keyboard_Mode ret = ELM_WIN_KEYBOARD_UNKNOWN;
- eo_do((Eo *) obj, elm_obj_win_keyboard_mode_get(&ret));
- return ret;
+ return sd->kbdmode;
}
-static void
-_keyboard_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_keyboard_win_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool is_keyboard)
{
- Elm_Win_Keyboard_Mode *ret = va_arg(*list, Elm_Win_Keyboard_Mode *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->kbdmode;
+#ifdef HAVE_ELEMENTARY_X
+ _internal_elm_win_xwindow_get(sd);
+ if (sd->x.xwin)
+ ecore_x_e_virtual_keyboard_set(sd->x.xwin, is_keyboard);
+#else
+ (void)is_keyboard;
+#endif
}
-EAPI void
-elm_win_keyboard_win_set(Evas_Object *obj,
- Eina_Bool is_keyboard)
+EOLIAN static Eina_Bool
+_elm_win_keyboard_win_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_keyboard_win_set(is_keyboard));
-}
-
-static void
-_keyboard_win_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool is_keyboard = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
-#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- ecore_x_e_virtual_keyboard_set(sd->x.xwin, is_keyboard);
-#else
- (void)is_keyboard;
-#endif
-}
-
-EAPI Eina_Bool
-elm_win_keyboard_win_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_keyboard_win_get(&ret));
- return ret;
-}
-
-static void
-_keyboard_win_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- {
- *ret = ecore_x_e_virtual_keyboard_get(sd->x.xwin);
- return;
- }
+ _internal_elm_win_xwindow_get(sd);
+ if (sd->x.xwin) return ecore_x_e_virtual_keyboard_get(sd->x.xwin);
#endif
- *ret = EINA_FALSE;
-}
-
-EAPI void
-elm_win_indicator_mode_set(Evas_Object *obj,
- Elm_Win_Indicator_Mode mode)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_indicator_mode_set(mode));
+ return EINA_FALSE;
}
-static void
-_indicator_mode_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_indicator_mode_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Indicator_Mode mode)
{
- Elm_Win_Indicator_Mode mode = va_arg(*list, Elm_Win_Indicator_Mode);
- Elm_Win_Smart_Data *sd = _pd;
-
if (mode == sd->indmode) return;
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
#endif
sd->indmode = mode;
#ifdef HAVE_ELEMENTARY_X
evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
}
-EAPI Elm_Win_Indicator_Mode
-elm_win_indicator_mode_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_UNKNOWN;
- Elm_Win_Indicator_Mode ret = ELM_WIN_INDICATOR_UNKNOWN;
- eo_do((Eo *) obj, elm_obj_win_indicator_mode_get(&ret));
- return ret;
-}
-
-static void
-_indicator_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Elm_Win_Indicator_Mode *ret = va_arg(*list, Elm_Win_Indicator_Mode *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->indmode;
-}
-
-EAPI void
-elm_win_indicator_opacity_set(Evas_Object *obj,
- Elm_Win_Indicator_Opacity_Mode mode)
+EOLIAN static Elm_Win_Indicator_Mode
+_elm_win_indicator_mode_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_indicator_opacity_set(mode));
+ return sd->indmode;
}
-static void
-_indicator_opacity_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_indicator_opacity_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Indicator_Opacity_Mode mode)
{
- Elm_Win_Indicator_Opacity_Mode mode = va_arg(*list, Elm_Win_Indicator_Opacity_Mode);
- Elm_Win_Smart_Data *sd = _pd;
-
if (mode == sd->ind_o_mode) return;
sd->ind_o_mode = mode;
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
evas_object_smart_callback_call(obj, SIG_INDICATOR_PROP_CHANGED, NULL);
}
-EAPI Elm_Win_Indicator_Opacity_Mode
-elm_win_indicator_opacity_get(const Evas_Object *obj)
+EOLIAN static Elm_Win_Indicator_Opacity_Mode
+_elm_win_indicator_opacity_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
- Elm_Win_Indicator_Opacity_Mode ret = ELM_WIN_INDICATOR_OPACITY_UNKNOWN;
- eo_do((Eo *) obj, elm_obj_win_indicator_opacity_get(&ret));
- return ret;
+ return sd->ind_o_mode;
}
-static void
-_indicator_opacity_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Elm_Win_Indicator_Opacity_Mode *ret = va_arg(*list, Elm_Win_Indicator_Opacity_Mode *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->ind_o_mode;
-}
-
-EAPI void
-elm_win_screen_position_get(const Evas_Object *obj,
- int *x,
- int *y)
-{
- ELM_WIN_CHECK(obj);
- eo_do((Eo *) obj, elm_obj_win_screen_position_get(x, y));
-}
-
-static void
-_screen_position_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_screen_position_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *x, int *y)
{
- int *x = va_arg(*list, int *);
- int *y = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
-
if (x) *x = sd->screen.x;
if (y) *y = sd->screen.y;
}
-EAPI Eina_Bool
-elm_win_focus_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_focus_get(&ret));
- return ret;
-}
-
-static void
-_focus_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_focus_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = ecore_evas_focus_get(sd->ee);
+ return ecore_evas_focus_get(sd->ee);
}
-EAPI void
-elm_win_screen_constrain_set(Evas_Object *obj,
- Eina_Bool constrain)
+EOLIAN static void
+_elm_win_screen_constrain_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool constrain)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_screen_constrain_set(constrain));
-}
-
-static void
-_screen_constrain_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool constrain = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
sd->constrain = !!constrain;
}
-EAPI Eina_Bool
-elm_win_screen_constrain_get(Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do(obj, elm_obj_win_screen_constrain_get(&ret));
- return ret;
-}
-
-static void
-_screen_constrain_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->constrain;
-}
-
-EAPI void
-elm_win_screen_size_get(const Evas_Object *obj,
- int *x,
- int *y,
- int *w,
- int *h)
+EOLIAN static Eina_Bool
+_elm_win_screen_constrain_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do((Eo *) obj, elm_obj_win_screen_size_get(x, y, w, h));
+ return sd->constrain;
}
-static void
-_screen_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_screen_size_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *x, int *y, int *w, int *h)
{
- int *x = va_arg(*list, int *);
- int *y = va_arg(*list, int *);
- int *w = va_arg(*list, int *);
- int *h = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
-
ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
}
-EAPI void
-elm_win_screen_dpi_get(const Evas_Object *obj,
- int *xdpi,
- int *ydpi)
+EOLIAN static void
+_elm_win_screen_dpi_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *xdpi, int *ydpi)
{
- ELM_WIN_CHECK(obj);
- eo_do((Eo *) obj, elm_obj_win_screen_dpi_get(xdpi, ydpi));
-}
-
-static void
-_screen_dpi_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- int *xdpi = va_arg(*list, int *);
- int *ydpi = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
-
ecore_evas_screen_dpi_get(sd->ee, xdpi, ydpi);
}
-EAPI void
-elm_win_conformant_set(Evas_Object *obj,
- Eina_Bool conformant)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_conformant_set(conformant));
-}
-
-static void
-_conformant_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_conformant_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool conformant)
{
- Eina_Bool conformant = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
#else
#endif
}
-EAPI Eina_Bool
-elm_win_conformant_get(const Evas_Object *obj)
+EOLIAN static Eina_Bool
+_elm_win_conformant_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_conformant_get(&ret));
- return ret;
-}
-
-static void
-_conformant_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = EINA_FALSE;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
- *ret = ecore_x_e_illume_conformant_get(sd->x.xwin);
+ return ecore_x_e_illume_conformant_get(sd->x.xwin);
#endif
-}
-EAPI void
-elm_win_quickpanel_set(Evas_Object *obj,
- Eina_Bool quickpanel)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_quickpanel_set(quickpanel));
+ return EINA_FALSE;
}
-static void
-_quickpanel_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_quickpanel_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool quickpanel)
{
- Eina_Bool quickpanel = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
ecore_x_e_illume_quickpanel_set(sd->x.xwin, quickpanel);
#endif
}
-EAPI Eina_Bool
-elm_win_quickpanel_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_quickpanel_get(&ret));
- return ret;
-}
-
-static void
-_quickpanel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_quickpanel_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = EINA_FALSE;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
- *ret = ecore_x_e_illume_quickpanel_get(sd->x.xwin);
+ return ecore_x_e_illume_quickpanel_get(sd->x.xwin);
#endif
-}
-EAPI void
-elm_win_quickpanel_priority_major_set(Evas_Object *obj,
- int priority)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_quickpanel_priority_major_set(priority));
+ return EINA_FALSE;
}
-static void
-_quickpanel_priority_major_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_quickpanel_priority_major_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int priority)
{
- int priority = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_priority_major_set(sd->x.xwin, priority);
#else
#endif
}
-EAPI int
-elm_win_quickpanel_priority_major_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) - 1;
- int ret = - 1;
- eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_major_get(&ret));
- return ret;
-}
-
-static void
-_quickpanel_priority_major_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static int
+_elm_win_quickpanel_priority_major_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- int *ret = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = -1;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
- *ret = ecore_x_e_illume_quickpanel_priority_major_get(sd->x.xwin);
+ return ecore_x_e_illume_quickpanel_priority_major_get(sd->x.xwin);
#endif
-}
-EAPI void
-elm_win_quickpanel_priority_minor_set(Evas_Object *obj,
- int priority)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_quickpanel_priority_minor_set(priority));
+ return -1;
}
-static void
-_quickpanel_priority_minor_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_quickpanel_priority_minor_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int priority)
{
- int priority = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_priority_minor_set(sd->x.xwin, priority);
#else
#endif
}
-EAPI int
-elm_win_quickpanel_priority_minor_get(const Evas_Object *obj)
+EOLIAN static int
+_elm_win_quickpanel_priority_minor_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) - 1;
- int ret = - 1;
- eo_do((Eo *) obj, elm_obj_win_quickpanel_priority_minor_get(&ret));
- return ret;
-}
-
-static void
-_quickpanel_priority_minor_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- int *ret = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = -1;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
- *ret = ecore_x_e_illume_quickpanel_priority_minor_get(sd->x.xwin);
+ return ecore_x_e_illume_quickpanel_priority_minor_get(sd->x.xwin);
#endif
-}
-EAPI void
-elm_win_quickpanel_zone_set(Evas_Object *obj,
- int zone)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_quickpanel_zone_set(zone));
+ return -1;
}
-static void
-_quickpanel_zone_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_quickpanel_zone_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int zone)
{
- int zone = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_zone_set(sd->x.xwin, zone);
#else
#endif
}
-EAPI int
-elm_win_quickpanel_zone_get(const Evas_Object *obj)
+EOLIAN static int
+_elm_win_quickpanel_zone_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) 0;
- int ret = 0;
- eo_do((Eo *) obj, elm_obj_win_quickpanel_zone_get(&ret));
- return ret;
-}
-
-static void
-_quickpanel_zone_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- int *ret = va_arg(*list, int *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = 0;
-
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
- *ret = ecore_x_e_illume_quickpanel_zone_get(sd->x.xwin);
+ return ecore_x_e_illume_quickpanel_zone_get(sd->x.xwin);
#endif
-}
-EAPI void
-elm_win_prop_focus_skip_set(Evas_Object *obj,
- Eina_Bool skip)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_prop_focus_skip_set(skip));
+ return 0;
}
-static void
-_prop_focus_skip_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_prop_focus_skip_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool skip)
{
- Eina_Bool skip = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
sd->skip_focus = skip;
TRAP(sd, focus_skip_set, skip);
}
-EAPI void
-elm_win_illume_command_send(Evas_Object *obj,
- Elm_Illume_Command command,
- void *params)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_illume_command_send(command, params));
-}
-
-static void
-_illume_command_send(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_illume_command_send(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Illume_Command command, void *params)
{
- Elm_Illume_Command command = va_arg(*list, Elm_Illume_Command);
- void *params = va_arg(*list, void *);
(void) params;
- Elm_Win_Smart_Data *sd = _pd;
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
switch (command)
#endif
}
-EAPI Evas_Object *
-elm_win_inlined_image_object_get(Evas_Object *obj)
+EOLIAN static Evas_Object*
+_elm_win_inlined_image_object_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) NULL;
- Evas_Object *ret = NULL;
- eo_do(obj, elm_obj_win_inlined_image_object_get(&ret));
- return ret;
+ return sd->img_obj;
}
-static void
-_inlined_image_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Evas_Object **ret = va_arg(*list, Evas_Object **);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->img_obj;
-}
-
-EAPI void
-elm_win_focus_highlight_enabled_set(Evas_Object *obj,
- Eina_Bool enabled)
-{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_focus_highlight_enabled_set(enabled));
-}
-
-static void
-_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool enabled)
{
- Eina_Bool enabled = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
enabled = !!enabled;
if (sd->focus_highlight.enabled == enabled)
return;
_elm_win_focus_highlight_shutdown(sd);
}
-EAPI Eina_Bool
-elm_win_focus_highlight_enabled_get(const Evas_Object *obj)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_focus_highlight_enabled_get(&ret));
- return ret;
-}
-
-static void
-_focus_highlight_enabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_focus_highlight_enabled_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->focus_highlight.enabled;
+ return sd->focus_highlight.enabled;
}
-EAPI void
-elm_win_focus_highlight_style_set(Evas_Object *obj,
- const char *style)
+EOLIAN static Eina_Bool
+_elm_win_elm_widget_theme_apply(Eo *obj, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_focus_highlight_style_set(style));
-}
-
-static void
-_elm_win_smart_theme(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
-{
- Elm_Win_Smart_Data *sd = _pd;
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Eina_Bool int_ret = EINA_FALSE;
-
- if (ret) *ret = EINA_TRUE;
-
- eo_do_super(obj, MY_CLASS, elm_wdg_theme(&int_ret));
- if (!int_ret) return;
+ eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply());
+ if (!int_ret) return EINA_TRUE;
sd->focus_highlight.theme_changed = EINA_TRUE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
- if (ret) *ret = EINA_TRUE;
+ return EINA_TRUE;
}
-static void
-_focus_highlight_style_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static void
+_elm_win_focus_highlight_style_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *style)
{
- const char *style = va_arg(*list, const char *);
- Elm_Win_Smart_Data *sd = _pd;
-
eina_stringshare_replace(&sd->focus_highlight.style, style);
sd->focus_highlight.theme_changed = EINA_TRUE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
}
-EAPI const char *
-elm_win_focus_highlight_style_get(const Evas_Object *obj)
+EOLIAN static const char*
+_elm_win_focus_highlight_style_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) NULL;
- const char *ret = NULL;
- eo_do((Eo *) obj, elm_obj_win_focus_highlight_style_get(&ret));
- return ret;
-}
-
-static void
-_focus_highlight_style_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- const char **ret = va_arg(*list, const char **);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->focus_highlight.style;
+ return sd->focus_highlight.style;
}
-EAPI void
-elm_win_focus_highlight_animate_set(Evas_Object *obj,
- Eina_Bool animate)
+EOLIAN static void
+_elm_win_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool animate)
{
- ELM_WIN_CHECK(obj);
- eo_do(obj, elm_obj_win_focus_highlight_animate_set(animate));
-}
-
-static void
-_focus_highlight_animate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- Eina_Bool animate = va_arg(*list, int);
- Elm_Win_Smart_Data *sd = _pd;
-
animate = !!animate;
if (sd->focus_highlight.animate == animate)
return;
_elm_win_focus_highlight_reconfigure_job_start(sd);
}
-EAPI Eina_Bool
-elm_win_focus_highlight_animate_get(const Evas_Object *obj)
+EOLIAN static Eina_Bool
+_elm_win_focus_highlight_animate_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do((Eo *) obj, elm_obj_win_focus_highlight_animate_get(&ret));
- return ret;
+ return sd->focus_highlight.animate;
}
-static void
-_focus_highlight_animate_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Eina_Bool
+_elm_win_socket_listen(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *svcname, int svcnum, Eina_Bool svcsys)
{
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = sd->focus_highlight.animate;
-}
-
-EAPI Eina_Bool
-elm_win_socket_listen(Evas_Object *obj,
- const char *svcname,
- int svcnum,
- Eina_Bool svcsys)
-{
- ELM_WIN_CHECK(obj) EINA_FALSE;
- Eina_Bool ret = EINA_FALSE;
- eo_do(obj, elm_obj_win_socket_listen(svcname, svcnum, svcsys, &ret));
- return ret;
-}
-
-static void
-_socket_listen(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
-{
- const char *svcname = va_arg(*list, const char *);
- int svcnum = va_arg(*list, int);
- Eina_Bool svcsys = va_arg(*list, int);
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Elm_Win_Smart_Data *sd = _pd;
- *ret = EINA_FALSE;
-
- if (!sd->ee) return;
+ if (!sd->ee) return EINA_FALSE;
if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys))
- return;
+ return EINA_FALSE;
- *ret = EINA_TRUE;
+ return EINA_TRUE;
}
/* windowing specific calls - shall we do this differently? */
-EAPI Ecore_X_Window
-elm_win_xwindow_get(const Evas_Object *obj)
-{
- if (!obj) return 0;
-
- if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
- {
- Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
- return _elm_ee_xwin_get(ee);
- }
-
- ELM_WIN_CHECK(obj) 0;
- Ecore_X_Window ret = 0;
- eo_do((Eo *) obj, elm_obj_win_xwindow_get(&ret));
- return ret;
-}
-
-static void
-_xwindow_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+EOLIAN static Ecore_X_Window
+_elm_win_xwindow_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Ecore_X_Window *ret = va_arg(*list, Ecore_X_Window *);
- Elm_Win_Smart_Data *sd = _pd;
-
#ifdef HAVE_ELEMENTARY_X
- if (sd->x.xwin)
- {
- *ret = sd->x.xwin;
- return;
- }
- if (sd->parent)
- {
- *ret = elm_win_xwindow_get(sd->parent);
- return;
- }
+ if (sd->x.xwin) return sd->x.xwin;
+ if (sd->parent) return elm_win_xwindow_get(sd->parent);
#endif
- *ret = 0;
+ return 0;
}
EAPI Ecore_Wl_Window *
(!ENGINE_COMPARE(ELM_WAYLAND_EGL)))
return NULL;
- if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
+ if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
{
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
- return ecore_evas_wayland_window_get(ee);
+ return _elm_ee_wlwin_get(ee);
}
ELM_WIN_CHECK(obj) NULL;
Ecore_Wl_Window *ret = NULL;
- eo_do((Eo *) obj, elm_obj_win_wl_window_get(&ret));
+ eo_do((Eo *) obj, ret = elm_obj_win_wl_window_get());
return ret;
}
-static void
-_wl_window_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
+EOLIAN static Ecore_Wl_Window*
+_elm_win_wl_window_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Ecore_Wl_Window **ret = va_arg(*list, Ecore_Wl_Window **);
#if HAVE_ELEMENTARY_WAYLAND
- Elm_Win_Smart_Data *sd = _pd;
- if (sd->wl.win)
- {
- *ret = sd->wl.win;
- return;
- }
- if (sd->parent)
- {
- *ret = elm_win_wl_window_get(sd->parent);
- return;
- }
+ if (sd->wl.win) return sd->wl.win;
+ if (sd->parent) return elm_win_wl_window_get(sd->parent);
+#else
+ (void)sd;
#endif
- *ret = NULL;
+ return NULL;
}
EAPI Eina_Bool
if ((t) && (t->version != ELM_WIN_TRAP_VERSION))
{
- CRITICAL("trying to set a trap version %lu while %lu was expected!",
+ CRI("trying to set a trap version %lu while %lu was expected!",
t->version, ELM_WIN_TRAP_VERSION);
return EINA_FALSE;
}
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
+ floating = !!floating;
if (floating == sd->floating) return;
sd->floating = floating;
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
if (sd->floating)
return sd->floating;
}
-static void
-_window_id_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
+EOLIAN static Ecore_Window
+_elm_win_window_id_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
- Ecore_Window *ret = va_arg(*list, Ecore_Window *);
- Elm_Win_Smart_Data *sd = _pd;
-
if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
{
#if HAVE_ELEMENTARY_WAYLAND
- if (sd->wl.win)
- {
- *ret = (Ecore_Window)sd->wl.win->surface_id;
- return;
- }
+ if (sd->wl.win) return (Ecore_Window)ecore_wl_window_surface_id_get(sd->wl.win);
if (sd->parent)
{
Ecore_Wl_Window *parent;
parent = elm_win_wl_window_get(sd->parent);
- if (parent) *ret = (Ecore_Window)parent->surface_id;
- return;
+ if (parent) return (Ecore_Window)ecore_wl_window_surface_id_get(parent);
+ return 0;
}
#endif
}
else
{
#ifdef HAVE_ELEMENTARY_X
- _elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- {
- *ret = (Ecore_Window)sd->x.xwin;
- return;
- }
- if (sd->parent)
- {
- *ret = (Ecore_Window)elm_win_xwindow_get(sd->parent);
- return;
- }
+ _internal_elm_win_xwindow_get(sd);
+ if (sd->x.xwin) return (Ecore_Window)sd->x.xwin;
+ if (sd->parent) return (Ecore_Window)elm_win_xwindow_get(sd->parent);
#endif
}
- *ret = 0;
+ return 0;
+}
+
+void
+_elm_win_focus_highlight_in_theme_update(Evas_Object *obj, Eina_Bool in_theme)
+{
+ ELM_WIN_DATA_GET(obj, sd);
+ sd->focus_highlight.cur.in_theme = !!in_theme;
+}
+
+void
+_elm_win_focus_highlight_start(Evas_Object *obj)
+{
+ ELM_WIN_DATA_GET(obj, sd);
+
+ if (!elm_win_focus_highlight_enabled_get(obj)) return;
+ sd->focus_highlight.cur.visible = EINA_TRUE;
+ sd->focus_highlight.geometry_changed = EINA_TRUE;
+ _elm_win_focus_highlight_reconfigure_job(obj);
}
EAPI Ecore_Window
{
if (!obj) return 0;
- if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME))
+ if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
{
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
return ecore_evas_window_get(ee);
ELM_WIN_CHECK(obj) 0;
Ecore_Window ret = 0;
- eo_do((Eo *) obj, elm_obj_win_window_id_get(&ret));
+ eo_do((Eo *) obj, ret = elm_obj_win_window_id_get());
return ret;
}
-static void
-_class_constructor(Eo_Class *klass)
-{
- const Eo_Op_Func_Description func_desc[] = {
- EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
- EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_win_smart_add),
- EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_win_smart_del),
- EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_win_smart_resize),
- EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_win_smart_move),
- EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_SHOW), _elm_win_smart_show),
- EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_HIDE), _elm_win_smart_hide),
-
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_win_smart_on_focus),
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_win_smart_event),
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_win_smart_focus_next_manager_is),
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_win_smart_focus_next),
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_win_smart_focus_direction_manager_is),
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION), _elm_win_smart_focus_direction),
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_win_smart_theme),
-
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR), _win_constructor),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD), _resize_object_add),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL), _resize_object_del),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_SET), _title_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_GET), _title_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET), _icon_name_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET), _icon_name_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_SET), _role_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_GET), _role_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET), _icon_object_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET), _icon_object_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET), _autodel_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET), _autodel_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ACTIVATE), _activate),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LOWER), _lower),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RAISE), _raise),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CENTER), _center),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET), _borderless_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET), _borderless_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_SET), _shaped_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_GET), _shaped_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_SET), _alpha_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_GET), _alpha_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET), _override_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET), _override_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET), _fullscreen_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET), _fullscreen_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET), _main_menu_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET), _maximized_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET), _maximized_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET), _iconified_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET), _iconified_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET), _withdrawn_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET), _withdrawn_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET), _available_profiles_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET), _available_profiles_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_SET), _profile_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_GET), _profile_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_SET), _urgent_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_GET), _urgent_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET), _demand_attention_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET), _demand_attention_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_SET), _modal_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_GET), _modal_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_SET), _aspect_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_GET), _aspect_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET), _size_base_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET), _size_base_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET), _size_step_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET), _size_step_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_SET), _layer_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_GET), _layer_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_SET), _rotation_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET), _rotation_with_resize_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_GET), _rotation_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_SET), _sticky_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_GET), _sticky_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET), _keyboard_mode_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET), _keyboard_mode_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET), _keyboard_win_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET), _keyboard_win_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET), _indicator_mode_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET), _indicator_mode_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET), _indicator_opacity_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET), _indicator_opacity_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET), _screen_position_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_GET), _focus_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET), _screen_constrain_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET), _screen_constrain_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET), _screen_size_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET), _screen_dpi_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET), _conformant_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET), _conformant_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET), _quickpanel_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET), _quickpanel_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET), _quickpanel_priority_major_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET), _quickpanel_priority_major_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET), _quickpanel_priority_minor_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET), _quickpanel_priority_minor_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET), _quickpanel_zone_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET), _quickpanel_zone_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET), _prop_focus_skip_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND), _illume_command_send),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET), _inlined_image_object_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET), _focus_highlight_enabled_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET), _focus_highlight_enabled_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET), _focus_highlight_style_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET), _focus_highlight_style_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET), _focus_highlight_animate_set),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET), _focus_highlight_animate_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN), _socket_listen),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET), _xwindow_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET), _wl_window_get),
- EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET), _window_id_get),
- EO_OP_FUNC_SENTINEL
- };
-
- eo_class_funcs_set(klass, func_desc);
-
- evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
-}
-
-static const Eo_Op_Description op_desc[] = {
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR, "Adds a window object."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD, "Add subobj as a resize object of window obj."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL, "Delete subobj as a resize object of window obj."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_SET, "Set the title of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_GET, "Get the title of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET, "Set the icon name of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET, "Get the icon name of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_SET, "Set the role of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROLE_GET, "Get the role of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET, "Set a window object's icon."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET, "Get the icon object used for the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET, "Set the window's autodel state."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET, "Get the window's autodel state."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ACTIVATE, "Activate a window object."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LOWER, "Lower a window object."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RAISE, "Raise a window object."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CENTER, "Center a window on its screen."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET, "Set the borderless state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET, "Get the borderless state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_SET, "Set the shaped state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SHAPED_GET, "Get the shaped state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_SET, "Set the alpha channel state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ALPHA_GET, "Get the alpha channel state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET, "Set the override state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET, "Get the override state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET, "Set the fullscreen state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET, "Get the fullscreen state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET, "Get the Main Menu of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET, "Set the maximized state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET, "Get the maximized state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET, "Set the iconified state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET, "Get the iconified state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET, "Set the withdrawn state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET, "Get the withdrawn state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET, "Set the array of available profiles to a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET, "Get the array of available profiles of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_SET, "Set the profile of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROFILE_GET, "Get the profile of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_SET, "Set the urgent state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_URGENT_GET, "Get the urgent state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET, "Set the demand_attention state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET, "Get the demand_attention state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_SET, "Set the modal state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_MODAL_GET, "Get the modal state of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_SET, "Set the aspect ratio of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ASPECT_GET, "Get the aspect ratio of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET, "Set the base window size used with stepping calculation."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET, "Get the base size of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET, "Set the window stepping used with sizing calculation."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET, "Get the stepping of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_SET, "Set the layer of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_LAYER_GET, "Get the layer of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_SET, "Set the rotation of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET, "Rotates the window and resizes it."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ROTATION_GET, "Get the rotation of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_SET, "Set the sticky state of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_STICKY_GET, "Get the sticky state of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET, "Sets the keyboard mode of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET, "Get the keyboard mode of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET, "Sets whether the window is a keyboard."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET, "Get whether the window is a keyboard."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET, "Sets the indicator mode of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET, "Get the indicator mode of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET, "Sets the indicator opacity mode of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET, "Get the indicator opacity mode of the window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET, "Get the screen position of a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_GET, "Determine whether a window has focus."),
- 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."),
- 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."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET, "Get screen geometry details for the screen that a window is on."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET, "Get screen dpi for the screen that a window is on."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET, "Set if this window is an illume conformant window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET, "Get if this window is an illume conformant window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET, "Set a window to be an illume quickpanel window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET, "Get if this window is a quickpanel or not."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET, "Set the major priority of a quickpanel window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET, "Get the major priority of a quickpanel window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET, "Set the minor priority of a quickpanel window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET, "Get the minor priority of a quickpanel window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET, "Set which zone this quickpanel should appear in."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET, "Get which zone this quickpanel should appear in."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET, "Set the window to be skipped by keyboard focus."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND, "Send a command to the windowing environment."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET, "Get the inlined image object handle."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET, "Set the enabled status for the focus highlight in a window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET, "Get the enabled value of the focus highlight for this window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET, "Set the style for the focus highlight on this window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET, "Get the style set for the focus highlight object."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_SET, "Set the animate status for the focus highlight for this window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ANIMATE_GET, "Get the animate status for the focus highlight for this window."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN, "Create a socket to provide the service for Plug widget."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET, "Get the Ecore_X_Window of an Evas_Object."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET, "Get the Ecore_Wl_Window of an Evas_Object."),
- EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WINDOW_ID_GET, "Get the Ecore_Window of an Evas_Object."),
- EO_OP_DESCRIPTION_SENTINEL
-};
+EOLIAN static void
+_elm_win_class_constructor(Eo_Class *klass)
+{
+ evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
+}
-static const Eo_Class_Description class_desc = {
- EO_VERSION,
- MY_CLASS_NAME,
- EO_CLASS_TYPE_REGULAR,
- EO_CLASS_DESCRIPTION_OPS(&ELM_OBJ_WIN_BASE_ID, op_desc, ELM_OBJ_WIN_SUB_ID_LAST),
- NULL,
- sizeof(Elm_Win_Smart_Data),
- _class_constructor,
- NULL
-};
+EOLIAN static Eo*
+_elm_win_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
+{
+ // attach all kinds of windows directly to ATSPI application root object
+ return _elm_atspi_root_get();
+}
-EO_DEFINE_CLASS(elm_obj_win_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, NULL);
+#include "elm_win.eo.c"