summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-03-11 22:52:23 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-03-17 16:50:32 +0830
commit1f5331c99e6bf9b9c13666be873f91fc7d3445cc (patch)
tree512825a53851ba0cc6ad5df15ae31a18822470a1
parentec86e5fdcc9e74fd1969747b70122872299c524d (diff)
downloadelementary-1f5331c99e6bf9b9c13666be873f91fc7d3445cc.tar.gz
Elm_glview: remove elm_glview_size_set.
move elm_glview_size_set to legacy wrapper
-rw-r--r--src/lib/elm_glview.c33
-rw-r--r--src/lib/elm_glview.eo22
2 files changed, 26 insertions, 29 deletions
diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c
index f3f7c12ee..87571d46e 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 4250dfed2..7548a824d 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 {
}