summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-09-01 15:49:10 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-10-20 12:16:41 +0900
commit7db93de9b853e1027b747944e41ded3922b62ff6 (patch)
treeb36880e048d4ca2da6d7ba00d071f124587d54fd
parent823c7b87be84b623a3c81dbcf0537bd192d43713 (diff)
downloadelementary-7db93de9b853e1027b747944e41ded3922b62ff6.tar.gz
GLView: Add API to get the Evas_GL
Before screaming "don't expose this", here's the reasoning: There will be a few new APIs in evas-gl (support pbuffer, ...) that require a pointer to the Evas_GL to be called. So, instead of exposing each and every one of these evas gl functions in a dummy wrapper in elm_glview, we just give access to the real pointer. GLView will always be a wrapper around evas_gl, because that's what it is by definition.
-rw-r--r--src/lib/elm_glview.c6
-rw-r--r--src/lib/elm_glview.eo17
2 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c
index 26c11a83c..0e10f2511 100644
--- a/src/lib/elm_glview.c
+++ b/src/lib/elm_glview.c
@@ -417,6 +417,12 @@ _elm_glview_changed_set(Eo *obj, Elm_Glview_Data *sd)
ecore_idle_enterer_before_add((Ecore_Task_Cb)_render_cb, obj);
}
+EOLIAN static Evas_GL *
+_elm_glview_evas_gl_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd)
+{
+ return sd->evasgl;
+}
+
static void
_elm_glview_class_constructor(Eo_Class *klass)
{
diff --git a/src/lib/elm_glview.eo b/src/lib/elm_glview.eo
index 5dd2e2fc1..cbd065379 100644
--- a/src/lib/elm_glview.eo
+++ b/src/lib/elm_glview.eo
@@ -162,6 +162,23 @@ class Elm_Glview (Elm_Widget)
return: Evas_GL_API *;
}
}
+ evas_gl {
+ get {
+ /*@
+ Get the internal Evas GL attached to this view.
+
+ @note The returned Evas_GL must not be destroyed as it is still owned
+ by the view. But this pointer can be used then to call all the evas_gl_
+ functions.
+
+ @since 1.12
+
+ @return The Evas_GL used by this GLView.
+
+ @ingroup GLView */
+ return: Evas_GL *;
+ }
+ }
}
implements {
class.constructor;