aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-12-08 17:49:23 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-12-16 16:16:53 +0900
commit48ac4747b1bba858036807c5f3bdacffd147d10e (patch)
tree909a16458e7525a21009887f2c2308e1f2318f24 /src/lib/elementary/efl_ui_win.c
parentevas: Apply clip when rendering a masked mask (diff)
downloadefl-48ac4747b1bba858036807c5f3bdacffd147d10e.tar.gz
efl_ui_win - add window "view stack" api's and ability
this adds the a stack of windows (view stack, something like naviframe but using multiple windows instead) to elementary allowing windows to be put into a stack and treated as one "application" when ijn such a stack with the newest window on top being the active/focused one (or should be). this allows for special show/hide animations as well as possibly special sizing policies and placement policies. @feature
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c60
1 files changed, 53 insertions, 7 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 720a1256de..3c2833e00a 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -155,6 +155,8 @@ struct _Efl_Ui_Win_Data
const char *title;
const char *icon_name;
const char *role;
+ const char *stack_id;
+ const char *stack_master_id;
Eina_Stringshare *name;
Eina_Stringshare *accel_pref;
@@ -256,6 +258,7 @@ struct _Efl_Ui_Win_Data
Eina_Bool application_alpha : 1; /**< alpha value set by an elm_win_alpha_set() api. this has lower priority than theme_alpha */
Eina_Bool tmp_updating_hints : 1;
Eina_Bool single_edje_content: 1; /* hack for E */
+ Eina_Bool shown : 1;
};
struct _Input_Pointer_Iterator
@@ -2213,6 +2216,7 @@ _efl_ui_win_show(Eo *obj, Efl_Ui_Win_Data *sd)
{
Eina_Bool do_eval = EINA_FALSE;
+ sd->shown = EINA_TRUE;
if (sd->modal_count)
{
/* FIXME FIXME FIXME
@@ -2794,6 +2798,8 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd)
eina_stringshare_del(sd->role);
eina_stringshare_del(sd->name);
eina_stringshare_del(sd->accel_pref);
+ eina_stringshare_del(sd->stack_id);
+ eina_stringshare_del(sd->stack_master_id);
evas_object_del(sd->icon);
evas_object_del(sd->main_menu);
@@ -3138,18 +3144,24 @@ _elm_win_xwin_update(Efl_Ui_Win_Data *sd)
if (sd->type == ELM_WIN_FAKE) return;
_internal_elm_win_xwindow_get(sd);
- if (sd->parent)
+
+ if (!sd->x.xwin) return; /* nothing more to do */
+
+ if (sd->stack_master_id)
+ {
+ Ecore_X_Window win = atoi(sd->stack_master_id);
+ if (win) ecore_x_icccm_transient_for_set(sd->x.xwin, win);
+ // XXX: set property saying we are a stack window
+ }
+ else
{
- ELM_WIN_DATA_GET(sd->parent, sdp);
- if (sdp)
+ if (sd->parent)
{
- if (sd->x.xwin)
- ecore_x_icccm_transient_for_set(sd->x.xwin, sdp->x.xwin);
+ ELM_WIN_DATA_GET(sd->parent, sdp);
+ if (sdp) ecore_x_icccm_transient_for_set(sd->x.xwin, sdp->x.xwin);
}
}
- if (!sd->x.xwin) return; /* nothing more to do */
-
s = sd->title;
if (!s) s = _elm_appname;
if (!s) s = "";
@@ -6117,6 +6129,40 @@ _efl_ui_win_focus_highlight_animate_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd
return sd->focus_highlight.animate;
}
+EOLIAN static const char *
+_efl_ui_win_stack_id_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+{
+ return sd->stack_id;
+}
+
+EOLIAN static void
+_efl_ui_win_stack_master_id_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *id)
+{
+ if (sd->shown) return;
+ eina_stringshare_replace(&(sd->stack_master_id), id);
+#ifdef HAVE_ELEMENTARY_X
+ _elm_win_xwin_update(sd);
+#endif
+}
+
+EOLIAN static const char *
+_efl_ui_win_stack_master_id_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+{
+ return sd->stack_master_id;
+}
+
+EOLIAN static void
+_efl_ui_win_stack_pop_to_id(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd EINA_UNUSED, const char *id EINA_UNUSED)
+{
+ // if in e (x11+wl), ask e to nuke all windows in stack above this
+ // or
+ // in x11 - find all windows in the window tree with a transient
+ // for that have the SAME stack master as this one and that are
+ // stacked above this window, and delete them from bottom to top
+ //
+ // win32/osx ?
+}
+
EOLIAN static Eina_Bool
_efl_ui_win_socket_listen(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *svcname, int svcnum, Eina_Bool svcsys)
{