win: Implement raise from stack (EO)
authorJean-Philippe Andre <jp.andre@samsung.com>
Thu, 31 Aug 2017 07:45:08 +0000 (16:45 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 1 Sep 2017 01:09:37 +0000 (10:09 +0900)
I think the intercept is not required anymore. All raise functions call
the ecore evas raise function.

Ref T5322

src/lib/elementary/efl_ui_win.c
src/lib/elementary/efl_ui_win.eo
src/lib/elementary/elm_win_legacy.h

index 6b0ad4d..d4bea99 100644 (file)
@@ -816,6 +816,7 @@ _elm_win_associate_get(const Ecore_Evas *ee)
 static void
 _elm_win_obj_intercept_raise(void *data, Evas_Object *obj EINA_UNUSED)
 {
+   // Note: This is probably not necessary anymore (Win implements raise)
    ELM_WIN_DATA_GET(data, sd);
    TRAP(sd, raise);
 }
@@ -5544,9 +5545,15 @@ _efl_ui_win_activate(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
 }
 
 EOLIAN static void
-_efl_ui_win_raise(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+_efl_ui_win_efl_gfx_stack_raise(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd)
 {
-   TRAP(sd, raise);
+   TRAP(pd, raise);
+}
+
+EAPI void
+elm_win_raise(Eo *obj)
+{
+   efl_gfx_stack_raise(obj);
 }
 
 EOLIAN static void
index f7f1d05..cc05d53 100644 (file)
@@ -736,13 +736,6 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
            window will be the active one after it.
          ]]
       }
-      raise {
-         [[Raise a window object.
-
-           Places the window pointed by $obj at the top of the stack, so
-           that it's not covered by any other window.
-         ]]
-      }
       center {
          [[Center a window on its screen
 
@@ -847,6 +840,8 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
       Efl.Gfx.visible { set; }
       Efl.Gfx.position { set; }
       Efl.Gfx.size { set; }
+      Efl.Gfx.Stack.raise; [[Places the window at the top of the stack, so
+                             that it's not covered by any other window.]]
       Elm.Widget.focus_direction;
       Elm.Widget.focus_next_manager_is;
       Elm.Widget.focus_direction_manager_is;
index 061beaf..b306f6f 100644 (file)
@@ -1220,3 +1220,13 @@ EAPI void elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate);
  * @ingroup Efl_Ui_Win
  */
 EAPI Eina_Bool elm_win_focus_highlight_animate_get(const Elm_Win *obj);
+
+/**
+ * @brief Raise a window object.
+ *
+ * Places the window pointed by @c obj at the top of the stack, so that it's
+ * not covered by any other window.
+ *
+ * @ingroup Efl_Ui_Win
+ */
+EAPI void elm_win_raise(Elm_Win *obj);