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)
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)
417 ecore_idle_enterer_before_add((Ecore_Task_Cb)_render_cb, obj); 417 ecore_idle_enterer_before_add((Ecore_Task_Cb)_render_cb, obj);
418} 418}
419 419
420EOLIAN static Evas_GL *
421_elm_glview_evas_gl_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd)
422{
423 return sd->evasgl;
424}
425
420static void 426static void
421_elm_glview_class_constructor(Eo_Class *klass) 427_elm_glview_class_constructor(Eo_Class *klass)
422{ 428{
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)
162 return: Evas_GL_API *; 162 return: Evas_GL_API *;
163 } 163 }
164 } 164 }
165 evas_gl {
166 get {
167 /*@
168 Get the internal Evas GL attached to this view.
169
170 @note The returned Evas_GL must not be destroyed as it is still owned
171 by the view. But this pointer can be used then to call all the evas_gl_
172 functions.
173
174 @since 1.12
175
176 @return The Evas_GL used by this GLView.
177
178 @ingroup GLView */
179 return: Evas_GL *;
180 }
181 }
165 } 182 }
166 implements { 183 implements {
167 class.constructor; 184 class.constructor;