jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3519d8ac3134c12b6c38c6d8d89b4cc4b5bfd547

commit 3519d8ac3134c12b6c38c6d8d89b4cc4b5bfd547
Author: Ji-Youn Park <[email protected]>
Date:   Wed Jun 1 12:58:01 2016 +0830

    elm_win: move elm_win_screen_size/position get api to legacy
    
    these kind of api are not supported in wayland.
---
 src/lib/elementary/elm_win.c        | 32 +++++++++++++++++++-------------
 src/lib/elementary/elm_win.eo       | 20 --------------------
 src/lib/elementary/elm_win_legacy.h | 22 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 33 deletions(-)

diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index cf229bb..195db54 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -5057,13 +5057,6 @@ _elm_win_indicator_type_get(Eo *obj EINA_UNUSED, 
Elm_Win_Data *sd EINA_UNUSED)
    return ELM_WIN_INDICATOR_TYPE_UNKNOWN;
 }
 
-EOLIAN static void
-_elm_win_screen_position_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *x, 
int *y)
-{
-   if (x) *x = sd->screen.x;
-   if (y) *y = sd->screen.y;
-}
-
 EOLIAN static Eina_Bool
 _elm_win_focus_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
 {
@@ -5083,12 +5076,6 @@ _elm_win_screen_constrain_get(Eo *obj EINA_UNUSED, 
Elm_Win_Data *sd)
 }
 
 EOLIAN static void
-_elm_win_screen_size_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *x, int 
*y, int *w, int *h)
-{
-   ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
-}
-
-EOLIAN static void
 _elm_win_screen_dpi_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *xdpi, int 
*ydpi)
 {
    ecore_evas_screen_dpi_get(sd->ee, xdpi, ydpi);
@@ -6215,4 +6202,23 @@ elm_win_wm_rotation_preferred_rotation_set(Evas_Object 
*obj, int rotation)
    elm_win_wm_preferred_rotation_set(obj, rotation);
 }
 
+EAPI void
+elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
+{
+   ELM_WIN_CHECK(obj);
+   ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
+
+   ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
+}
+
+EAPI void
+elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y)
+{
+   ELM_WIN_CHECK(obj);
+   ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
+
+   if (x) *x = sd->screen.x;
+   if (y) *y = sd->screen.y;
+}
+
 #include "elm_win.eo.c"
diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo
index 7a8f1eb..30ec08d 100644
--- a/src/lib/elementary/elm_win.eo
+++ b/src/lib/elementary/elm_win.eo
@@ -737,32 +737,12 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
             skip: bool; [[The skip flag state ($true if it is to be skipped).]]
          }
       }
-      @property screen_position {
-         get {
-            [[Get the screen position of a window.]]
-         }
-         values {
-            x: int; [[The int to store the x coordinate to.]]
-            y: int; [[The int to store the y coordinate to.]]
-         }
-      }
       @property focus {
          get {
             [[Get whether a window has focus.]]
             return: bool;
          }
       }
-      @property screen_size {
-         get {
-            [[Get screen geometry details for the screen that a window is on.]]
-         }
-         values {
-            x: int; [[Where to return the horizontal offset value. May be 
$null.]]
-            y: int; [[Where to return the vertical offset value. May be 
$null.]]
-            w: int; [[Where to return the width value. May be $null.]]
-            h: int; [[Where to return the height value. May be $null.]]
-         }
-      }
       @property main_menu {
          get {
             [[Get the Main Menu of a window.]]
diff --git a/src/lib/elementary/elm_win_legacy.h 
b/src/lib/elementary/elm_win_legacy.h
index b7f3fc2..ac336a1 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -675,3 +675,25 @@ EAPI Eina_Bool elm_win_wm_rotation_supported_get(const 
Evas_Object *obj);
  */
 EAPI int elm_win_wm_rotation_preferred_rotation_get(const Evas_Object *obj);
 
+
+/**
+ * @brief Get the screen position of a window.
+ *
+ * @param[out] x The int to store the x coordinate to.
+ * @param[out] y The int to store the y coordinate to.
+ *
+ * @ingroup Elm_Win
+ */
+EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y);
+
+/**
+ * @brief Get screen geometry details for the screen that a window is on.
+ *
+ * @param[out] x Where to return the horizontal offset value. May be @c null.
+ * @param[out] y Where to return the vertical offset value. May be @c null.
+ * @param[out] w Where to return the width value. May be @c null.
+ * @param[out] h Where to return the height value. May be @c null.
+ *
+ * @ingroup Elm_Win
+ */
+EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int 
*w, int *h);

-- 


Reply via email to