aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_glview.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-23 11:06:22 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-23 17:44:37 +0900
commit17c531658fa04a90e52e2dc32d42ce491988d04c (patch)
treee3f3f2f296c0b3706dd8150a5485e13facc93689 /src/bin/elementary/test_glview.c
parentexamples: elementary: remove unused variable (diff)
downloadefl-17c531658fa04a90e52e2dc32d42ce491988d04c.tar.gz
win: Add property accel_preference
It supports the same syntax as the config value, but overrides it. This provides a more convenient way to select the acceleration for a single window. Its get() value should be what was effective when the window was created. So it can depend on the config or a previous call to set(). @feature
Diffstat (limited to 'src/bin/elementary/test_glview.c')
-rw-r--r--src/bin/elementary/test_glview.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bin/elementary/test_glview.c b/src/bin/elementary/test_glview.c
index 31c76cffe3..3136770ae8 100644
--- a/src/bin/elementary/test_glview.c
+++ b/src/bin/elementary/test_glview.c
@@ -617,13 +617,14 @@ test_glview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
Evas_Object *win, *bx, *bt, *gl, *lb;
Ecore_Animator *ani;
GLData *gld = NULL;
- const char *accel;
// alloc a data struct to hold our relevant gl info in
if (!(gld = calloc(1, sizeof(GLData)))) return;
gldata_init(gld);
+#if 0
// add a Z-depth buffer to the window and try to use GL
+ Eina_Stringshare *accel;
accel = eina_stringshare_add(elm_config_accel_preference_get());
elm_config_accel_preference_set("gl:depth");
@@ -634,6 +635,12 @@ test_glview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
// restore previous accel preference
elm_config_accel_preference_set(accel);
eina_stringshare_del(accel);
+#else
+ win = eo_add(EFL_UI_WIN_STANDARD_CLASS, NULL,
+ efl_ui_win_name_set(eo_self, "glview"),
+ efl_text_set(eo_self, "GLView"),
+ efl_ui_win_accel_preference_set(eo_self, "gl:depth"));
+#endif
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);