Enlightenment CVS committal Author : barbieri Project : e17 Module : proto/python-efl
Dir : e17/proto/python-efl/python-edje/edje Modified Files: __init__.py edje.c_edje.pyx Log Message: Export extern_*_set() functions, allow us to set min and max size from python. =================================================================== RCS file: /cvs/e/e17/proto/python-efl/python-edje/edje/__init__.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- __init__.py 1 Sep 2007 15:59:30 -0000 1.5 +++ __init__.py 6 Sep 2007 23:02:28 -0000 1.6 @@ -9,9 +9,18 @@ collection_cache_set, collection_cache_get, collection_cache_flush, \ color_class_set, color_class_del, color_class_list, \ text_class_set, text_class_del, text_class_list, \ - message_signal_process, EdjeLoadError, \ + extern_object_min_size_set, extern_object_max_size_set, \ + extern_object_aspect_set, message_signal_process, EdjeLoadError, \ Message, MessageSignal, MessageString, MessageInt, MessageFloat, \ MessageStringSet, MessageIntSet, MessageFloatSet, MessageStringInt, \ MessageStringFloat, MessageStringIntSet, MessageStringFloatSet + + +EDJE_ASPECT_CONTROL_NONE = 0 +EDJE_ASPECT_CONTROL_NEITHER = 1 +EDJE_ASPECT_CONTROL_HORIZONTAL = 2 +EDJE_ASPECT_CONTROL_VERTICAL = 3 +EDJE_ASPECT_CONTROL_BOTH = 4 + c_edje.init() =================================================================== RCS file: /cvs/e/e17/proto/python-efl/python-edje/edje/edje.c_edje.pyx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- edje.c_edje.pyx 8 May 2007 19:03:38 -0000 1.3 +++ edje.c_edje.pyx 6 Sep 2007 23:02:28 -0000 1.4 @@ -134,5 +134,45 @@ def message_signal_process(): edje_message_signal_process() + +def extern_object_min_size_set(evas.c_evas.Object obj, int w, int h): + """Set minimum size of an external object. + + If this object is already swallowed, it will trigger edje to recalculate + it's objects geometries. + """ + edje_extern_object_min_size_set(obj.obj, w, h) + + +def extern_object_max_size_set(evas.c_evas.Object obj, int w, int h): + """Set maximum size of an external object. + + If this object is already swallowed, it will trigger edje to recalculate + it's objects geometries. + """ + edje_extern_object_max_size_set(obj.obj, w, h) + + +def extern_object_aspect_set(evas.c_evas.Object obj, int aspect, int w, int h): + """Set aspect size of an external object. + + This sets the desired aspect ratio to keep an object that will be + swallowed by Edje. The width and height define a preferred size ASPECT + and the object may be scaled to be larger or smaller, but retaining the + relative scale of both aspect width and height. + + Known aspect ratios: + * EDJE_ASPECT_CONTROL_NONE = 0 + * EDJE_ASPECT_CONTROL_NEITHER = 1 + * EDJE_ASPECT_CONTROL_HORIZONTAL = 2 + * EDJE_ASPECT_CONTROL_VERTICAL = 3 + * EDJE_ASPECT_CONTROL_BOTH = 4 + + If this object is already swallowed, it will trigger edje to recalculate + it's objects geometries. + """ + edje_extern_object_aspect_set(obj.obj, <Edje_Aspect_Control>aspect, w, h) + + include "edje.c_edje_message.pxi" include "edje.c_edje_object.pxi" ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs