jypark pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=1f5331c99e6bf9b9c13666be873f91fc7d3445cc

commit 1f5331c99e6bf9b9c13666be873f91fc7d3445cc
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Fri Mar 11 22:52:23 2016 +0830

    Elm_glview: remove elm_glview_size_set.
    
    move elm_glview_size_set to legacy wrapper
---
 src/lib/elm_glview.c  | 33 +++++++++++++++++++++++----------
 src/lib/elm_glview.eo | 22 +++-------------------
 2 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c
index f3f7c12..87571d4 100644
--- a/src/lib/elm_glview.c
+++ b/src/lib/elm_glview.c
@@ -308,14 +308,6 @@ elm_glview_version_add(Evas_Object *parent, 
Evas_GL_Context_Version version)
    return obj;
 }
 
-EAPI void
-elm_glview_changed_set(Evas_Object *obj)
-{
-   ELM_GLVIEW_CHECK(obj);
-
-   elm_glview_draw_request(obj);
-}
-
 EOLIAN static void
 _elm_glview_version_constructor(Eo *obj, Elm_Glview_Data *sd,
                                 Evas_GL_Context_Version version)
@@ -470,7 +462,7 @@ _elm_glview_render_policy_set(Eo *obj, Elm_Glview_Data *sd, 
Elm_GLView_Render_Po
 }
 
 EOLIAN static void
-_elm_glview_size_set(Eo *obj, Elm_Glview_Data *sd, int w, int h)
+_elm_glview_efl_gfx_view_view_size_set(Eo *obj, Elm_Glview_Data *sd, int w, 
int h)
 {
    if ((w == sd->w) && (h == sd->h)) return;
 
@@ -482,7 +474,7 @@ _elm_glview_size_set(Eo *obj, Elm_Glview_Data *sd, int w, 
int h)
 }
 
 EOLIAN static void
-_elm_glview_size_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd, int *w, int *h)
+_elm_glview_efl_gfx_view_view_size_get(Eo *obj EINA_UNUSED, Elm_Glview_Data 
*sd, int *w, int *h)
 {
    if (w) *w = sd->w;
    if (h) *h = sd->h;
@@ -545,4 +537,25 @@ _elm_glview_class_constructor(Eo_Class *klass)
    evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
 }
 
+/* Legacy wrappers */
+
+EAPI void
+elm_glview_changed_set(Evas_Object *obj)
+{
+   ELM_GLVIEW_CHECK(obj);
+
+   elm_glview_draw_request(obj);
+}
+
+EAPI void
+elm_glview_size_get(const Elm_Glview *obj, int *w, int *h)
+{
+   efl_gfx_view_size_get(obj, w, h);
+}
+
+EAPI void
+elm_glview_size_set(Elm_Glview *obj, int w, int h)
+{
+   efl_gfx_view_size_set(obj, w, h);
+}
 #include "elm_glview.eo.c"
diff --git a/src/lib/elm_glview.eo b/src/lib/elm_glview.eo
index 4250dfe..7548a82 100644
--- a/src/lib/elm_glview.eo
+++ b/src/lib/elm_glview.eo
@@ -76,7 +76,7 @@ enum Elm.GLView.Render.Policy
    always    = 2  [[Render always even when it is not visible]]
 }
 
-class Elm.Glview (Elm.Widget)
+class Elm.Glview (Elm.Widget, Efl.Gfx.View)
 {
    eo_prefix: elm_obj_glview;
    methods {
@@ -87,24 +87,6 @@ class Elm.Glview (Elm.Widget)
             @in version: Evas_GL_Context_Version;
          }
       }
-      @property size {
-         set {
-            [[Sets the size of the glview.]]
-         }
-         get {
-            [[Get the size of the glview.
-
-              Note: This function returns the actual image size of the
-              glview. This means that when the scale policy is set to
-              #ELM_GLVIEW_RESIZE_POLICY_SCALE, it'll return the non-scaled
-              size.
-            ]]
-         }
-         values {
-            w: int; [[Width of the glview object.]]
-            h: int; [[Height of the glview object.]]
-         }
-      }
       @property resize_policy {
          set {
             [[Set the resize policy for the glview object.
@@ -255,6 +237,8 @@ class Elm.Glview (Elm.Widget)
       Evas.Object_Smart.del;
       Evas.Object_Smart.resize;
       Elm.Widget.on_focus;
+      Efl.Gfx.View.view_size.get;
+      Efl.Gfx.View.view_size.set;
    }
    events {
    }

-- 


Reply via email to