} shot;
Eina_Bool autodel : 1;
int *autodel_clear, rot;
+ int show_count;
struct {
int x, y;
} screen;
static const char SIG_FOCUS_OUT[] = "focus,out";
static const char SIG_FOCUS_IN[] = "focus,in";
static const char SIG_MOVED[] = "moved";
+static const char SIG_THEME_CHANGED[] = "theme,changed";
static const Evas_Smart_Cb_Description _signals[] = {
{SIG_DELETE_REQUEST, ""},
sprintf(repname + (dotptr - tmp), "%03i",
win->shot.shot_counter + 1);
strcat(repname, dotptr);
+ free(tmp);
return repname;
}
}
if (!obj) return;
win = elm_widget_data_get(obj);
if (!win) return;
- elm_widget_focus_restore(win->win_obj);
- if (!elm_object_focus_get(win->win_obj))
- elm_object_focus_set(win->win_obj, EINA_TRUE);
+ _elm_widget_top_win_focused_set(win->win_obj, EINA_TRUE);
+ if (win->show_count == 1)
+ {
+ elm_object_focus_set(win->win_obj, EINA_TRUE);
+ win->show_count++;
+ }
+ else
+ elm_widget_focus_restore(win->win_obj);
evas_object_smart_callback_call(win->win_obj, SIG_FOCUS_IN, NULL);
win->focus_highlight.cur.visible = EINA_TRUE;
_elm_win_focus_highlight_reconfigure_job_start(win);
win = elm_widget_data_get(obj);
if (!win) return;
elm_object_focus_set(win->win_obj, EINA_FALSE);
+ _elm_widget_top_win_focused_set(win->win_obj, EINA_FALSE);
evas_object_smart_callback_call(win->win_obj, SIG_FOCUS_OUT, NULL);
win->focus_highlight.cur.visible = EINA_FALSE;
_elm_win_focus_highlight_reconfigure_job_start(win);
}
static void
-_elm_win_obj_callback_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
+_elm_win_obj_callback_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Elm_Win *win = data;
- elm_object_focus_set(obj, EINA_TRUE);
+ if (!win->show_count) win->show_count++;
if (win->shot.info) _shot_handle(win);
}
if (win->deferred_child_eval_job) ecore_job_del(win->deferred_child_eval_job);
if (win->shot.info) eina_stringshare_del(win->shot.info);
if (win->shot.timer) ecore_timer_del(win->shot.timer);
+ evas_object_event_callback_del_full(win->win_obj, EVAS_CALLBACK_DEL,
+ _elm_win_obj_callback_del, win);
while (((child = evas_object_bottom_get(win->evas))) &&
(child != obj))
{
}
}
+void
+_elm_win_translate(void)
+{
+ const Eina_List *l;
+ Evas_Object *obj;
+
+ EINA_LIST_FOREACH(_elm_win_list, l, obj)
+ elm_widget_translate(obj);
+}
+
#ifdef HAVE_ELEMENTARY_X
static Eina_Bool
_elm_win_client_message(void *data, int type __UNUSED__, void *event)
win = ELM_NEW(Elm_Win);
-#define FALLBACK_TRY(engine) \
- if (!win->ee) \
- do { \
- CRITICAL(engine " engine creation failed. Trying software X11."); \
- elm_engine_set(ELM_SOFTWARE_X11); \
- win->ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1); \
+#define FALLBACK_TRY(engine) \
+ if (!win->ee) \
+ do { \
+ CRITICAL(engine " engine creation failed. Trying default."); \
+ win->ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL); \
+ if (win->ee) \
+ elm_engine_set(ecore_evas_engine_name_get(win->ee)); \
} while (0)
#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
win->client_message_handler = ecore_event_handler_add
(ECORE_X_EVENT_CLIENT_MESSAGE, _elm_win_client_message, win);
#endif
+ FALLBACK_TRY("Sofware X11");
}
else if (ENGINE_COMPARE(ELM_SOFTWARE_FB))
{
{
win->ee = ecore_evas_buffer_new(1, 1);
}
+ else if (ENGINE_COMPARE(ELM_EWS))
+ {
+ win->ee = ecore_evas_ews_new(0, 0, 1, 1);
+ }
else if (!strncmp(_elm_config->engine, "shot:", 5))
{
win->ee = ecore_evas_buffer_new(1, 1);
evas_object_pass_events_set(win->win_obj, EINA_TRUE);
if (type == ELM_WIN_INLINED_IMAGE)
- elm_widget_parent2_set(win->win_obj, parent);
+ elm_widget_parent2_set(win->win_obj, parent);
ecore_evas_object_associate(win->ee, win->win_obj,
ECORE_EVAS_OBJECT_ASSOCIATE_BASE |
ECORE_EVAS_OBJECT_ASSOCIATE_STACK |
evas_object_event_callback_add(win->win_obj, EVAS_CALLBACK_RESIZE,
_elm_win_obj_callback_resize, win);
if (win->img_obj)
- evas_object_intercept_move_callback_add(win->win_obj,
- _elm_win_obj_intercept_move, win);
+ evas_object_intercept_move_callback_add(win->win_obj,
+ _elm_win_obj_intercept_move, win);
evas_object_intercept_show_callback_add(win->win_obj,
_elm_win_obj_intercept_show, win);
evas_image_cache_set(win->evas, (_elm_config->image_cache * 1024));
evas_font_cache_set(win->evas, (_elm_config->font_cache * 1024));
EINA_LIST_FOREACH(_elm_config->font_dirs, l, fontpath)
- evas_font_path_append(win->evas, fontpath);
+ evas_font_path_append(win->evas, fontpath);
if (!_elm_config->font_hinting)
evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_NONE);
else if (_elm_config->font_hinting == 1)
Eina_Bool ret = evas_object_key_grab(win->win_obj, "F12", mask, 0,
EINA_TRUE);
- printf("Key F12 exclusive for dot tree generation. (%d)\n", ret);
+ printf("Ctrl+F12 key combination exclusive for dot tree generation\n");
#endif
evas_object_smart_callbacks_descriptions_set(win->win_obj, _signals);
else if (win->img_obj)
{
evas_object_image_alpha_set(win->img_obj, alpha);
+ ecore_evas_alpha_set(win->ee, alpha);
}
else
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
win = elm_widget_data_get(obj);
if (!win) return EINA_FALSE;
+ if (win->frame_obj)
+ {
+ }
+ else if (win->img_obj)
+ {
+ return evas_object_image_alpha_get(win->img_obj);
+ }
return ecore_evas_alpha_get(win->ee);
}
if (wd->content)
edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content);
_sizing_eval(obj);
+
+ evas_object_smart_callback_call(obj, SIG_THEME_CHANGED, NULL);
}
static Eina_Bool
return 0;
}
-/**
- * Get the Ecore_X_Window of an Evas_Object
- *
- * @param obj The object
- *
- * @return The Ecore_X_Window of @p obj
- *
- * @ingroup Win
- */
EAPI Ecore_X_Window
elm_win_xwindow_get(const Evas_Object *obj)
{
if (win->parent) return elm_win_xwindow_get(win->parent);
#endif
return 0;
- win = NULL;
}