summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-05-10 18:52:09 +0200
committerdavemds <dave@gurumeditation.it>2014-05-10 18:52:09 +0200
commit209d23283632ba7616ccd73e3cb47d47b01e68fe (patch)
tree6e01c1e15019ac106c4a42d5735640a13cbef337
parenta7d635e2e58ef92605d8695741e3616691841c46 (diff)
Added evas_font_path_global_* API
-rw-r--r--efl/evas/efl.evas.pyx44
-rw-r--r--include/efl.evas.pxd5
2 files changed, 49 insertions, 0 deletions
diff --git a/efl/evas/efl.evas.pyx b/efl/evas/efl.evas.pyx
index 5bf3807..7be48df 100644
--- a/efl/evas/efl.evas.pyx
+++ b/efl/evas/efl.evas.pyx
@@ -276,6 +276,50 @@ def color_rgb_to_hsv(int r, int g, int b):
276 evas_color_rgb_to_hsv(r, g, b, &h, &s, &v) 276 evas_color_rgb_to_hsv(r, g, b, &h, &s, &v)
277 return (h, s, v) 277 return (h, s, v)
278 278
279def font_path_global_clear():
280 """Removes all font paths loaded
281
282 .. versionadded: 1.10
283
284 """
285 evas_font_path_global_clear()
286
287def font_path_global_append(path):
288 """Appends a font path to the list of font paths used by the application
289
290 .. versionadded: 1.10
291
292 """
293 if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
294 evas_font_path_global_append(
295 <const char *>path if path is not None else NULL)
296
297def font_path_global_prepend(path):
298 """Prepends a font path to the list of font paths used by the application
299
300 .. versionadded: 1.10
301
302 """
303 if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
304 evas_font_path_global_prepend(
305 <const char *>path if path is not None else NULL)
306
307def font_path_global_list():
308 """Retrieves the list of font paths used by the application
309
310 .. versionadded: 1.10
311
312 """
313 cdef Eina_List *lst = evas_font_path_global_list()
314
315 ret = []
316 while lst != NULL:
317 ret.append(<char*> lst.data)
318 lst = lst.next
319
320 return ret
321
322
279 323
280class EvasLoadError(Exception): 324class EvasLoadError(Exception):
281 def __init__(self, int code, filename, key): 325 def __init__(self, int code, filename, key):
diff --git a/include/efl.evas.pxd b/include/efl.evas.pxd
index f9db0a6..f71db5b 100644
--- a/include/efl.evas.pxd
+++ b/include/efl.evas.pxd
@@ -275,6 +275,11 @@ cdef extern from "Evas.h":
275 int evas_init() 275 int evas_init()
276 int evas_shutdown() 276 int evas_shutdown()
277 277
278 void evas_font_path_global_clear()
279 void evas_font_path_global_append(const char *path)
280 void evas_font_path_global_prepend(const char *path)
281 const Eina_List * evas_font_path_global_list()
282
278 283
279 #################################################################### 284 ####################################################################
280 # Canvas 285 # Canvas