summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-05-10 18:33:58 +0200
committerdavemds <dave@gurumeditation.it>2014-05-10 18:33:58 +0200
commita7d635e2e58ef92605d8695741e3616691841c46 (patch)
tree9a0eca6dcb65e1c610b0f4904ed9f803d2f4b442
parent4be0d71c70bf796de734996388feb90989ae9e2d (diff)
Added new Config.accel_preference property
-rw-r--r--efl/elementary/configuration.pxd2
-rw-r--r--efl/elementary/configuration.pyx34
2 files changed, 36 insertions, 0 deletions
diff --git a/efl/elementary/configuration.pxd b/efl/elementary/configuration.pxd
index 53ffef2..8e18558 100644
--- a/efl/elementary/configuration.pxd
+++ b/efl/elementary/configuration.pxd
@@ -80,6 +80,8 @@ cdef extern from "Elementary.h":
80 void elm_config_engine_set(const char *engine) 80 void elm_config_engine_set(const char *engine)
81 const char * elm_config_preferred_engine_get() 81 const char * elm_config_preferred_engine_get()
82 void elm_config_preferred_engine_set(const char *engine) 82 void elm_config_preferred_engine_set(const char *engine)
83 const char * elm_config_accel_preference_get()
84 void elm_config_accel_preference_set(const char *pref)
83 85
84 Eina_List * elm_config_text_classes_list_get() 86 Eina_List * elm_config_text_classes_list_get()
85 void elm_config_text_classes_list_free(Eina_List *list) 87 void elm_config_text_classes_list_free(Eina_List *list)
diff --git a/efl/elementary/configuration.pyx b/efl/elementary/configuration.pyx
index f96c1ff..91c1407 100644
--- a/efl/elementary/configuration.pyx
+++ b/efl/elementary/configuration.pyx
@@ -575,6 +575,33 @@ cdef class Configuration(object):
575 elm_config_preferred_engine_set( 575 elm_config_preferred_engine_set(
576 <const char *>engine if engine is not None else NULL) 576 <const char *>engine if engine is not None else NULL)
577 577
578 property accel_preference:
579 """Elementary's acceleration preferences for new windows
580
581 Note that it will take effect only to Elementary windows created after
582 this is called. The value is a freeform string that indicates
583 what kind of acceleration is preferred. This may or may not be honored,
584 but a best attempt will be made. Known strings are as follows:
585
586 * "gl", "opengl": try use opengl.
587 * "3d": try and use a 3d acceleration unit.
588 * "hw", "hardware", "accel": try any acceleration unit (best possible)
589
590 .. note:: This takes precedence over engine preferences set with
591 :attr:`preferred_engine`
592
593 :type: string
594
595 .. versionadded:: 1.10
596
597 """
598 def __get__(self):
599 return _ctouni(elm_config_accel_preference_get())
600 def __set__(self, pref):
601 if isinstance(pref, unicode): pref = PyUnicode_AsUTF8String(pref)
602 elm_config_accel_preference_set(
603 <const char *>pref if pref is not None else NULL)
604
578 property text_classes_list: 605 property text_classes_list:
579 """Get Elementary's list of supported text classes. 606 """Get Elementary's list of supported text classes.
580 607
@@ -1006,6 +1033,13 @@ def preferred_engine_set(engine):
1006 elm_config_preferred_engine_set( 1033 elm_config_preferred_engine_set(
1007 <const char *>engine if engine is not None else NULL) 1034 <const char *>engine if engine is not None else NULL)
1008 1035
1036def accel_preference_get():
1037 return _ctouni(elm_config_accel_preference_get())
1038def _accel_preference_set(pref):
1039 if isinstance(pref, unicode): pref = PyUnicode_AsUTF8String(pref)
1040 elm_config_accel_preference_set(
1041 <const char *>pref if pref is not None else NULL)
1042
1009def engine_get(): 1043def engine_get():
1010 return _ctouni(elm_config_engine_get()) 1044 return _ctouni(elm_config_engine_get())
1011def engine_set(engine): 1045def engine_set(engine):