summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-12-19 15:39:36 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-12-20 10:57:55 +0900
commit39af0d88aa7c84bd5a8f6cc9b5b94c5b045f93dd (patch)
treeccd162b28ec569c1b98ceeeca4878ffd25f2a2ea
parent85b5064b675b7ba875e39bf9814f2fd9714d7de6 (diff)
efl stack wins - add base property/boolean to indicate win is a base
part of adding stacks...
-rw-r--r--src/bin/elementary/test_win_stack.c1
-rw-r--r--src/lib/ecore_x/Ecore_X.h3
-rw-r--r--src/lib/elementary/efl_ui_win.c19
-rw-r--r--src/lib/elementary/efl_ui_win.eo20
4 files changed, 41 insertions, 2 deletions
diff --git a/src/bin/elementary/test_win_stack.c b/src/bin/elementary/test_win_stack.c
index 2273c7a024..72d8680153 100644
--- a/src/bin/elementary/test_win_stack.c
+++ b/src/bin/elementary/test_win_stack.c
@@ -67,6 +67,7 @@ test_win_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
67 Evas_Object *bg, *bx, *bt, *lb, *win; 67 Evas_Object *bg, *bx, *bt, *lb, *win;
68 68
69 win = elm_win_add(NULL, "window-stack", ELM_WIN_BASIC); 69 win = elm_win_add(NULL, "window-stack", ELM_WIN_BASIC);
70 elm_win_stack_base_set(win, EINA_TRUE);
70 elm_win_title_set(win, "Window Stack"); 71 elm_win_title_set(win, "Window Stack");
71 elm_win_autodel_set(win, EINA_TRUE); 72 elm_win_autodel_set(win, EINA_TRUE);
72 73
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index 6654d78b4b..f08d020254 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -1382,7 +1382,8 @@ typedef enum _Ecore_X_Illume_Window_State
1382typedef enum _Ecore_X_Stack_Type 1382typedef enum _Ecore_X_Stack_Type
1383{ 1383{
1384 ECORE_X_STACK_NONE = 0, 1384 ECORE_X_STACK_NONE = 0,
1385 ECORE_X_STACK_STANDARD = 1, 1385 ECORE_X_STACK_BASE = 1,
1386 ECORE_X_STACK_STANDARD,
1386 ECORE_X_STACK_LAST 1387 ECORE_X_STACK_LAST
1387} Ecore_X_Stack_Type; 1388} Ecore_X_Stack_Type;
1388 1389
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 436501727b..7ae8bf6b39 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -258,6 +258,7 @@ struct _Efl_Ui_Win_Data
258 Eina_Bool tmp_updating_hints : 1; 258 Eina_Bool tmp_updating_hints : 1;
259 Eina_Bool single_edje_content: 1; /* hack for E */ 259 Eina_Bool single_edje_content: 1; /* hack for E */
260 Eina_Bool shown : 1; 260 Eina_Bool shown : 1;
261 Eina_Bool stack_base : 1;
261}; 262};
262 263
263struct _Input_Pointer_Iterator 264struct _Input_Pointer_Iterator
@@ -3151,7 +3152,10 @@ _elm_win_xwin_update(Efl_Ui_Win_Data *sd)
3151 if (win) 3152 if (win)
3152 { 3153 {
3153 ecore_x_icccm_transient_for_set(sd->x.xwin, win); 3154 ecore_x_icccm_transient_for_set(sd->x.xwin, win);
3154 ecore_x_e_stack_type_set(sd->x.xwin, ECORE_X_STACK_STANDARD); 3155 if (sd->stack_base)
3156 ecore_x_e_stack_type_set(sd->x.xwin, ECORE_X_STACK_BASE);
3157 else
3158 ecore_x_e_stack_type_set(sd->x.xwin, ECORE_X_STACK_STANDARD);
3155 } 3159 }
3156 } 3160 }
3157 else 3161 else
@@ -6157,6 +6161,19 @@ _efl_ui_win_stack_master_id_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6157} 6161}
6158 6162
6159EOLIAN static void 6163EOLIAN static void
6164_efl_ui_win_stack_base_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Bool base)
6165{
6166 if (sd->shown) return;
6167 sd->stack_base = !!base;
6168}
6169
6170EOLIAN static Eina_Bool
6171_efl_ui_win_stack_base_get(Eo *obj, Efl_Ui_Win_Data *sd)
6172{
6173 return sd->stack_base;
6174}
6175
6176EOLIAN static void
6160_efl_ui_win_stack_pop_to_id(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd EINA_UNUSED, const char *id EINA_UNUSED) 6177_efl_ui_win_stack_pop_to_id(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd EINA_UNUSED, const char *id EINA_UNUSED)
6161{ 6178{
6162 // if in e (x11+wl), ask e to nuke all windows in stack above this 6179 // if in e (x11+wl), ask e to nuke all windows in stack above this
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index 4a73d96b3c..886b14d892 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -772,6 +772,26 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
772 display.]] 772 display.]]
773 } 773 }
774 } 774 }
775 @property stack_base {
776 set {
777 [[Set the stack base state of this window
778
779 This is a boolean flag that determines if this window will
780 become the base of a stack at all. You must enable this
781 on a base (bottom of a window stack for things to work
782 correctly.
783
784 This state should be set before a window is shown for the
785 first time and never changed again after that.
786
787 @since 1.19]]
788 }
789 get {}
790 values {
791 base: bool; [[True if this is a stack base window, false
792 false otherwise.]]
793 }
794 }
775 stack_pop_to_id { 795 stack_pop_to_id {
776 [[Pop (delete) all windows in the stack above this window. 796 [[Pop (delete) all windows in the stack above this window.
777 797