diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 22dac7f187..631ee2fb31 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -7,12 +7,15 @@ BUILT_SOURCES += \ lib/evas/canvas/evas_polygon.eo.c \ lib/evas/canvas/evas_polygon.eo.h \ lib/evas/canvas/evas_rectangle.eo.c \ - lib/evas/canvas/evas_rectangle.eo.h + lib/evas/canvas/evas_rectangle.eo.h \ + lib/evas/canvas/evas_text.eo.c \ + lib/evas/canvas/evas_text.eo.h EXTRA_DIST += \ lib/evas/canvas/evas_line.eo \ lib/evas/canvas/evas_polygon.eo \ - lib/evas/canvas/evas_rectangle.eo + lib/evas/canvas/evas_rectangle.eo \ + lib/evas/canvas/evas_text.eo lib_LTLIBRARIES += lib/evas/libevas.la noinst_LTLIBRARIES = @@ -30,7 +33,8 @@ installed_evascanvasheadersdir = $(includedir)/evas-@VMAJ@/canvas nodist_installed_evascanvasheaders_DATA = \ lib/evas/canvas/evas_line.eo.h \ lib/evas/canvas/evas_polygon.eo.h \ - lib/evas/canvas/evas_rectangle.eo.h + lib/evas/canvas/evas_rectangle.eo.h \ + lib/evas/canvas/evas_text.eo.h noinst_HEADERS = \ lib/evas/include/evas_inline.x \ diff --git a/src/lib/eo/eo_abstract_class.eo b/src/lib/eo/eo_abstract_class.eo new file mode 100644 index 0000000000..82ab90574f --- /dev/null +++ b/src/lib/eo/eo_abstract_class.eo @@ -0,0 +1,3 @@ +abstract Eo_Abstract_Class () +{ +} diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo new file mode 100644 index 0000000000..f2ce4bffb6 --- /dev/null +++ b/src/lib/eo/eo_base.eo @@ -0,0 +1,170 @@ +abstract Eo_Base () +{ + constructors { + constructor { + /*@ Call the object's constructor. +Should not be used with #eo_do. Only use it with #eo_do_super. */ + } + } + properties { + parent { + set { + /*@ Set the parent of an object +Parents keep references to their children so in order to delete objects that have parents you need to set parent to NULL or use eo_del() that does that for you (and also unrefs the object). */ + } + get { + /*@ Get the parent of an object */ + } + values { + Eo* parent; /*@ the new parent */ + } + } + event_global_freeze { + get { + /*@ return freeze events of object. +Return event freeze count. */ + } + values { + int fcount; /*@ The event freeze count of the object */ + } + } + event_freeze { + get { + /*@ return freeze events of object. +Return event freeze count. */ + } + values { + int fcount; /*@ The event freeze count of the object */ + } + } + } + methods { + event_callback_forwarder_del { + /*@ Remove an event callback forwarder for an event and an object. */ + params { + @in const Eo_Event_Description* desc; /*@ The description of the event to listen to */ + @in Eo* new_obj; /*@ The object to emit events from */ + } + } + event_thaw { + /*@ thaw events of object. +Lets event callbacks be called for the object. */ + } + event_freeze { + /*@ freeze events of object. +Prevents event callbacks from being called for the object. */ + } + event_global_freeze { + /*@ freeze events of object. +Prevents event callbacks from being called for the object. */ + } + event_callback_array_del { + /*@ Del a callback array with a specific data associated to it for an event. */ + params { + @in const Eo_Callback_Array_Item* array; /*@ an #Eo_Callback_Array_Item of events to listen to */ + @in const void* user_data; /*@ The data to compare */ + } + } + wref_del { + /*@ Delete the weak reference passed. */ + params { + @inout Eo** wref; + } + } + destructor { + /*@ Call the object's destructor. +Should not be used with #eo_do. Only use it with #eo_do_super. */ + } + data_set { + /*@ Set generic data to object. */ + params { + @in const char* key; /*@ the key associated with the data */ + @in const void* data; /*@ the data to set */ + @in eo_base_data_free_func free_func; /*@ the func to free data with (NULL means */ + } + } + data_get { + /*@ Get generic data from object. */ + params { + @in const char* key; /*@ the key associated with the data */ + @out void* data; /*@ the data for the key */ + } + } + event_callback_del { + /*@ Del a callback with a specific data associated to it for an event. */ + params { + @in const Eo_Event_Description* desc; /*@ The description of the event to listen to */ + @in Eo_Event_Cb func; /*@ the callback to delete */ + @in const void* user_data; /*@ The data to compare */ + } + } + event_global_thaw { + /*@ thaw events of object. +Lets event callbacks be called for the object. */ + } + data_del { + /*@ Del generic data from object. */ + params { + @in const char* key; /*@ the key associated with the data */ + } + } + event_callback_array_priority_add { + /*@ Add a callback array for an event with a specific priority. +callbacks of the same priority are called in reverse order of creation. */ + params { + @in const Eo_Callback_Array_Item* array; /*@ an #Eo_Callback_Array_Item of events to listen to */ + @in Eo_Callback_Priority priority; /*@ The priority of the callback */ + @in const void* data; /*@ additional data to pass to the callback */ + } + } + wref_add { + /*@ Add a new weak reference to obj. +This function registers the object handle pointed by wref to obj so when obj is deleted it'll be updated to NULL. This functions should be used when you want to keep track of an object in a safe way, but you don't want to prevent it from being freed. */ + params { + @inout Eo** wref; + } + } + dbg_info_get { + /*@ Get dbg information from the object. */ + params { + @in Eo_Dbg_Info* root_node; /*@ node of the tree */ + } + } + event_callback_forwarder_add { + /*@ Add an event callback forwarder for an event and an object. */ + params { + @in const Eo_Event_Description* desc; /*@ The description of the event to listen to */ + @in Eo* new_obj; /*@ The object to emit events from */ + } + } + event_callback_call { + /*@ Call the callbacks for an event of an object. */ + params { + @in const Eo_Event_Description* desc; /*@ The description of the event to call */ + @in const void* event_info; /*@ Extra event info to pass to the callbacks */ + @out Eina_Bool aborted; /*@ @c EINA_TRUE if one of the callbacks aborted the call, @c EINA_FALSE otherwise */ + } + } + event_callback_priority_add { + /*@ Add a callback for an event with a specific priority. +callbacks of the same priority are called in reverse order of creation. */ + params { + @in const Eo_Event_Description* desc; /*@ The description of the event to listen to */ + @in Eo_Callback_Priority priority; /*@ The priority of the callback */ + @in Eo_Event_Cb cb; /*@ the callback to call */ + @in const void* data; /*@ additional data to pass to the callback */ + } + } + children_iterator_new { + /*@ Get an iterator on all childrens */ + params { + @inout Eina_Iterator** it; + } + } + } + events { + callback,add; /*@ A callback was added. */ + callback,del; /*@ A callback was deleted. */ + del; /*@ Obj is being deleted. */ + } +} diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index b94c0fb9e8..0e9ff8ea45 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -1809,6 +1809,9 @@ enum * * @{ */ +#include "canvas/evas_text.eo.h" + +#if 0 #define EVAS_OBJ_TEXT_CLASS evas_object_text_class_get() @@ -2311,6 +2314,7 @@ enum */ #define evas_obj_text_filter_source_set(name, obj) EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_FILTER_SOURCE_SET), EO_TYPECHECK(const char *, name), EO_TYPECHECK(Eo *, obj) +#endif /** * @} */ diff --git a/src/lib/evas/canvas/evas_object.eo b/src/lib/evas/canvas/evas_object.eo new file mode 100644 index 0000000000..386610f8d3 --- /dev/null +++ b/src/lib/evas/canvas/evas_object.eo @@ -0,0 +1,1471 @@ +abstract Evas_Object (Eo_Base, Evas_Common_Interface) +{ + properties { + size_hint_max { + set { + /*@ + Sets the hints for an object's maximum size. + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + Values @c -1 will be treated as unset hint components, when queried + by managers. + + Example: + @dontinclude evas-hints.c + @skip evas_object_size_hint_max_set + @until return + + In this example the maximum size hints change the behavior of an + Evas box when layouting its children. See the full @ref + Example_Evas_Size_Hints "example". + + @see evas_object_size_hint_max_get() */ + } + get { + /*@ + Retrieves the hints for an object's maximum size. + + These are hints on the maximum sizes @p obj should have. This is + not a size enforcement in any way, it's just a hint that should be + used whenever appropriate. + + @note Use @c NULL pointers on the hint components you're not + interested in: they'll be ignored by the function. + + @see evas_object_size_hint_max_set() */ + } + values { + Evas_Coord w; /*@ Integer to use as the maximum width hint. */ + Evas_Coord h; /*@ Integer to use as the maximum height hint. */ + } + } + size_hint_request { + set { + /*@ + Sets the hints for an object's optimum size. + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + Values @c 0 will be treated as unset hint components, when queried + by managers. + + @see evas_object_size_hint_request_get() */ + } + get { + /*@ + Retrieves the hints for an object's optimum size. + + These are hints on the optimum sizes @p obj should have. This is + not a size enforcement in any way, it's just a hint that should be + used whenever appropriate. + + @note Use @c NULL pointers on the hint components you're not + interested in: they'll be ignored by the function. + + @see evas_object_size_hint_request_set() */ + } + values { + Evas_Coord w; /*@ Integer to use as the preferred width hint. */ + Evas_Coord h; /*@ Integer to use as the preferred height hint. */ + } + } + visibility { + set { + /*@ Makes the given Evas object visible or invisible. */ + } + get { + /*@ Retrieves whether or not the given Evas object is visible. */ + } + values { + Eina_Bool v; /*@ @c EINA_TRUE if to make the object visible, @c EINA_FALSE otherwise */ + } + } + type { + set { + /*@ Sets the type of the given Evas object. */ + } + get { + /*@ + Retrieves the type of the given Evas object. + + @return The type of the object. + + For Evas' builtin types, the return strings will be one of: + - "rectangle", + - "line", + - "polygon", + - "text", + - "textblock" and + - "image". + + For Evas smart objects (see @ref Evas_Smart_Group), the name of the + smart class itself is returned on this call. For the built-in smart + objects, these names are: + - "EvasObjectSmartClipped", for the clipped smart object + - "Evas_Object_Box", for the box object and + - "Evas_Object_Table", for the table object. + + Example: + @dontinclude evas-object-manipulation.c + @skip d.img = evas_object_image_filled_add(d.canvas); + @until border on the + + See the full @ref Example_Evas_Object_Manipulation "example". */ + } + values { + const char* type; /*@ in */ + } + } + size_hint_min { + set { + /*@ + Sets the hints for an object's minimum size. + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + Values @c 0 will be treated as unset hint components, when queried + by managers. + + Example: + @dontinclude evas-hints.c + @skip evas_object_size_hint_min_set + @until return + + In this example the minimum size hints change the behavior of an + Evas box when layouting its children. See the full @ref + Example_Evas_Size_Hints "example". + + @see evas_object_size_hint_min_get() */ + } + get { + /*@ + Retrieves the hints for an object's minimum size. + + These are hints on the minimum sizes @p obj should have. This is + not a size enforcement in any way, it's just a hint that should be + used whenever appropriate. + + @note Use @c NULL pointers on the hint components you're not + interested in: they'll be ignored by the function. + + @see evas_object_size_hint_min_set() for an example */ + } + values { + Evas_Coord w; /*@ Integer to use as the minimum width hint. */ + Evas_Coord h; /*@ Integer to use as the minimum height hint. */ + } + } + pointer_mode { + set { + /*@ + Set pointer behavior. + + This function has direct effect on event callbacks related to + mouse. + + If @p setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse + is down at this object, events will be restricted to it as source, + mouse moves, for example, will be emitted even if outside this + object area. + + If @p setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will + be emitted just when inside this object area. + + The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB. + + @ingroup Evas_Object_Group_Extras */ + } + get { + /*@ + Determine how pointer will behave. + @return pointer behavior. + @ingroup Evas_Object_Group_Extras */ + } + values { + Evas_Object_Pointer_Mode pointer_mode; /*@ desired behavior. */ + } + } + render_op { + set { + /*@ + Sets the render_op to be used for rendering the Evas object. + @ingroup Evas_Object_Group_Extras */ + } + get { + /*@ + Retrieves the current value of the operation used for rendering the Evas object. + @return one of the enumerated values in Evas_Render_Op. + @ingroup Evas_Object_Group_Extras */ + } + values { + Evas_Render_Op render_op; /*@ one of the Evas_Render_Op values. */ + } + } + freeze_events { + set { + /*@ + Set whether an Evas object is to freeze (discard) events. + + If @p freeze is @c EINA_TRUE, it will make events on @p obj to be @b + discarded. Unlike evas_object_pass_events_set(), events will not be + passed to @b next lower object. This API can be used for blocking + events while @p obj is on transiting. + + If @p freeze is @c EINA_FALSE, events will be processed on that + object as normal. + + @see evas_object_freeze_events_get() + @see evas_object_pass_events_set() + @see evas_object_repeat_events_set() + @see evas_object_propagate_events_set() + @since 1.1 */ + } + get { + /*@ + Determine whether an object is set to freeze (discard) events. + + @return freeze whether @p obj is set to freeze events (@c EINA_TRUE) or + not (@c EINA_FALSE) + + @see evas_object_freeze_events_set() + @see evas_object_pass_events_get() + @see evas_object_repeat_events_get() + @see evas_object_propagate_events_get() + @since 1.1 */ + } + values { + Eina_Bool freeze; /*@ pass whether @p obj is to freeze events (@c EINA_TRUE) or not + (@c EINA_FALSE) */ + } + } + map { + set { + /*@ + Set current object transformation map. + + This sets the map on a given object. It is copied from the @p map pointer, + so there is no need to keep the @p map object if you don't need it anymore. + + A map is a set of 4 points which have canvas x, y coordinates per point, + with an optional z point value as a hint for perspective correction, if it + is available. As well each point has u and v coordinates. These are like + "texture coordinates" in OpenGL in that they define a point in the source + image that is mapped to that map vertex/point. The u corresponds to the x + coordinate of this mapped point and v, the y coordinate. Note that these + coordinates describe a bounding region to sample. If you have a 200x100 + source image and want to display it at 200x100 with proper pixel + precision, then do: + + @code + Evas_Map *m = evas_map_new(4); + evas_map_point_coord_set(m, 0, 0, 0, 0); + evas_map_point_coord_set(m, 1, 200, 0, 0); + evas_map_point_coord_set(m, 2, 200, 100, 0); + evas_map_point_coord_set(m, 3, 0, 100, 0); + evas_map_point_image_uv_set(m, 0, 0, 0); + evas_map_point_image_uv_set(m, 1, 200, 0); + evas_map_point_image_uv_set(m, 2, 200, 100); + evas_map_point_image_uv_set(m, 3, 0, 100); + evas_object_map_set(obj, m); + evas_map_free(m); + @endcode + + Note that the map points a uv coordinates match the image geometry. If + the @p map parameter is NULL, the stored map will be freed and geometry + prior to enabling/setting a map will be restored. + + @see evas_map_new() */ + } + get { + /*@ + Get current object transformation map. + + This returns the current internal map set on the indicated object. It is + intended for read-only access and is only valid as long as the object is + not deleted or the map on the object is not changed. If you wish to modify + the map and set it back do the following: + + @code + const Evas_Map *m = evas_object_map_get(obj); + Evas_Map *m2 = evas_map_dup(m); + evas_map_util_rotate(m2, 30.0, 0, 0); + evas_object_map_set(obj, m2); + evas_map_free(m2); + @endcode + + @return map reference to map in use. This is an internal data structure, so + do not modify it. + + @see evas_object_map_set() */ + } + values { + const Evas_Map* map; /*@ new map to use */ + } + } + size_hint_aspect { + set { + /*@ + Sets the hints for an object's aspect ratio. + + This is not a size enforcement in any way, it's just a hint that should + be used whenever appropriate. + + If any of the given aspect ratio terms are @c 0, + the object's container will ignore the aspect and scale @p obj to + occupy the whole available area, for any given policy. + + @see evas_object_size_hint_aspect_get() for more information. */ + } + get { + /*@ + Retrieves the hints for an object's aspect ratio. + + The different aspect ratio policies are documented in the + #Evas_Aspect_Control type. A container respecting these size hints + would @b resize its children accordingly to those policies. + + For any policy, if any of the given aspect ratio terms are @c 0, + the object's container should ignore the aspect and scale @p obj to + occupy the whole available area. If they are both positive + integers, that proportion will be respected, under each scaling + policy. + + These images illustrate some of the #Evas_Aspect_Control policies: + + @image html any-policy.png + @image rtf any-policy.png + @image latex any-policy.eps + + @image html aspect-control-none-neither.png + @image rtf aspect-control-none-neither.png + @image latex aspect-control-none-neither.eps + + @image html aspect-control-both.png + @image rtf aspect-control-both.png + @image latex aspect-control-both.eps + + @image html aspect-control-horizontal.png + @image rtf aspect-control-horizontal.png + @image latex aspect-control-horizontal.eps + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + @note Use @c NULL pointers on the hint components you're not + interested in: they'll be ignored by the function. + + Example: + @dontinclude evas-aspect-hints.c + @skip if (strcmp(ev->key, "c") == 0) + @until } + + See the full @ref Example_Evas_Aspect_Hints "example". + + @see evas_object_size_hint_aspect_set() */ + } + values { + Evas_Aspect_Control aspect; /*@ The policy/type of aspect ratio to apply to @p obj. */ + Evas_Coord w; /*@ Integer to use as aspect width ratio term. */ + Evas_Coord h; /*@ Integer to use as aspect height ratio term. */ + } + } + layer { + set { + /*@ + Sets the layer of its canvas that the given object will be part of. + + If you don't use this function, you'll be dealing with an @b unique + layer of objects, the default one. Additional layers are handy when + you don't want a set of objects to interfere with another set with + regard to @b stacking. Two layers are completely disjoint in that + matter. + + This is a low-level function, which you'd be using when something + should be always on top, for example. + + @warning Be careful, it doesn't make sense to change the layer of + smart objects' children. Smart objects have a layer of their own, + which should contain all their children objects. + + @see evas_object_layer_get() */ + } + get { + /*@ + Retrieves the layer of its canvas that the given object is part of. + + @return Number of its layer + + @see evas_object_layer_set() */ + } + values { + short l; /*@ The number of the layer to place the object on. + Must be between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX. */ + } + } + clip { + set { + /*@ + Clip one object to another. + + This function will clip the object @p obj to the area occupied by + the object @p clip. This means the object @p obj will only be + visible within the area occupied by the clipping object (@p clip). + + The color of the object being clipped will be multiplied by the + color of the clipping one, so the resulting color for the former + will be RESULT = (OBJ * CLIP) / (255 * 255), per color + element (red, green, blue and alpha). + + Clipping is recursive, so clipping objects may be clipped by + others, and their color will in term be multiplied. You may @b not + set up circular clipping lists (i.e. object 1 clips object 2, which + clips object 1): the behavior of Evas is undefined in this case. + + Objects which do not clip others are visible in the canvas as + normal; those that clip one or more objects become invisible + themselves, only affecting what they clip. If an object ceases + to have other objects being clipped by it, it will become visible + again. + + The visibility of an object affects the objects that are clipped by + it, so if the object clipping others is not shown (as in + evas_object_show()), the objects clipped by it will not be shown + either. + + If @p obj was being clipped by another object when this function is + called, it gets implicitly removed from the old clipper's domain + and is made now to be clipped by its new clipper. + + The following figure illustrates some clipping in Evas: + + @image html clipping.png + @image rtf clipping.png + @image latex clipping.eps + + @note At the moment the only objects that can validly be used to + clip other objects are rectangle objects. All other object + types are invalid and the result of using them is undefined. The + clip object @p clip must be a valid object, but can also be @c + NULL, in which case the effect of this function is the same as + calling evas_object_clip_unset() on the @p obj object. + + Example: + @dontinclude evas-object-manipulation.c + @skip solid white clipper (note that it's the default color for a + @until evas_object_show(d.clipper); + + See the full @ref Example_Evas_Object_Manipulation "example". */ + } + get { + /*@ + Get the object clipping @p obj (if any). + + This function returns the object clipping @p obj. If @p obj is + not being clipped at all, @c NULL is returned. The object @p obj + must be a valid ::Evas_Object. + + See also evas_object_clip_set(), evas_object_clip_unset() and + evas_object_clipees_get(). + + Example: + @dontinclude evas-object-manipulation.c + @skip if (evas_object_clip_get(d.img) == d.clipper) + @until return + + See the full @ref Example_Evas_Object_Manipulation "example". */ + } + values { + Evas_Object* clip; /*@ The object to clip @p obj by */ + } + } + size_hint_padding { + set { + /*@ + Sets the hints for an object's padding space. + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + @see evas_object_size_hint_padding_get() for more information */ + } + get { + /*@ + Retrieves the hints for an object's padding space. + + Padding is extra space an object takes on each of its delimiting + rectangle sides, in canvas units. This space will be rendered + transparent, naturally, as in the following figure: + + @image html padding-hints.png + @image rtf padding-hints.png + @image latex padding-hints.eps + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + @note Use @c NULL pointers on the hint components you're not + interested in: they'll be ignored by the function. + + Example: + @dontinclude evas-hints.c + @skip evas_object_size_hint_padding_set + @until return + + In this example the padding hints change the behavior of an Evas box + when layouting its children. See the full @ref + Example_Evas_Size_Hints "example". + + @see evas_object_size_hint_padding_set() */ + } + values { + Evas_Coord l; /*@ Integer to specify left padding. */ + Evas_Coord r; /*@ Integer to specify right padding. */ + Evas_Coord t; /*@ Integer to specify top padding. */ + Evas_Coord b; /*@ Integer to specify bottom padding. */ + } + } + repeat_events { + set { + /*@ + Set whether an Evas object is to repeat events. + + If @p repeat is @c EINA_TRUE, it will make events on @p obj to also + be repeated for the @b next lower object in the objects' stack (see + see evas_object_below_get()). + + If @p repeat is @c EINA_FALSE, events occurring on @p obj will be + processed only on it. + + Example: + @dontinclude evas-stacking.c + @skip if (strcmp(ev->key, "r") == 0) + @until } + + See the full @ref Example_Evas_Stacking "example". + + @see evas_object_repeat_events_get() + @see evas_object_pass_events_set() + @see evas_object_propagate_events_set() + @see evas_object_freeze_events_set() */ + } + get { + /*@ + Determine whether an object is set to repeat events. + + @return whether @p obj is set to repeat events (@c EINA_TRUE) + or not (@c EINA_FALSE) + + @see evas_object_repeat_events_set() for an example + @see evas_object_pass_events_get() + @see evas_object_propagate_events_get() + @see evas_object_freeze_events_get() */ + } + values { + Eina_Bool repeat; /*@ whether @p obj is to repeat events (@c EINA_TRUE) or not + (@c EINA_FALSE) */ + } + } + size_hint_weight { + set { + /*@ + Sets the hints for an object's weight. + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + This is a hint on how a container object should @b resize a given + child within its area. Containers may adhere to the simpler logic + of just expanding the child object's dimensions to fit its own (see + the #EVAS_HINT_EXPAND helper weight macro) or the complete one of + taking each child's weight hint as real @b weights to how much of + its size to allocate for them in each axis. A container is supposed + to, after @b normalizing the weights of its children (with weight + hints), distribute the space it has to layout them by those factors + -- most weighted children get larger in this process than the least + ones. + + Example: + @dontinclude evas-hints.c + @skip evas_object_size_hint_weight_set + @until return + + In this example the weight hints change the behavior of an Evas box + when layouting its children. See the full @ref + Example_Evas_Size_Hints "example". + + @note Default weight hint values are 0.0, for both axis. + + @see evas_object_size_hint_weight_get() for more information */ + } + get { + /*@ + Retrieves the hints for an object's weight. + + Accepted values are zero or positive values. Some users might use + this hint as a boolean, but some might consider it as a @b + proportion, see documentation of possible users, which in Evas are + the @ref Evas_Object_Box "box" and @ref Evas_Object_Table "table" + smart objects. + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + @note Use @c NULL pointers on the hint components you're not + interested in: they'll be ignored by the function. + @note If @c obj is invalid, then the hint components will be set with 0.0 + + @see evas_object_size_hint_weight_set() for an example */ + } + values { + double x; /*@ Nonnegative double value to use as horizontal weight hint. */ + double y; /*@ Nonnegative double value to use as vertical weight hint. */ + } + } + name { + set { + /*@ + Sets the name of the given Evas object to the given name. + + There might be occasions where one would like to name his/her + objects. + + Example: + @dontinclude evas-events.c + @skip d.bg = evas_object_rectangle_add(d.canvas); + @until evas_object_name_set(d.bg, "our dear rectangle"); + + See the full @ref Example_Evas_Events "example". */ + } + get { + /*@ + Retrieves the name of the given Evas object. + + @return The name of the object or @c NULL, if no name has been given + to it. + + Example: + @dontinclude evas-events.c + @skip fprintf(stdout, "An object got focused: %s\n", + @until evas_focus_get + + See the full @ref Example_Evas_Events "example". */ + } + values { + const char* name; /*@ The given name. */ + } + } + scale { + set { + /*@ + Sets the scaling factor for an Evas object. Does not affect all + objects. + + This will multiply the object's dimension by the given factor, thus + altering its geometry (width and height). Useful when you want + scalable UI elements, possibly at run time. + + @note Only text and textblock objects have scaling change + handlers. Other objects won't change visually on this call. + + @see evas_object_scale_get() + + @ingroup Evas_Object_Group_Extras */ + } + get { + /*@ + Retrieves the scaling factor for the given Evas object. + + @return The scaling factor. + + @ingroup Evas_Object_Group_Extras + + @see evas_object_scale_set() */ + } + values { + double scale; /*@ The scaling factor. 1.0 means no scaling, + default size. */ + } + } + static_clip { + set { + /*@ + Set a hint flag on the given Evas object that it's used as a "static + clipper". + + This is a hint to Evas that this object is used as a big static + clipper and shouldn't be moved with children and otherwise + considered specially. The default value for new objects is + @c EINA_FALSE. + + @see evas_object_static_clip_get() + + @ingroup Evas_Object_Group_Extras */ + } + get { + /*@ + Get the "static clipper" hint flag for a given Evas object. + + @return @c EINA_TRUE if it's set as a static clipper, + @c EINA_FALSE otherwise. + + @see evas_object_static_clip_set() for more details + + @ingroup Evas_Object_Group_Extras */ + } + values { + Eina_Bool is_static_clip; /*@ @c EINA_TRUE if it's to be used as a static + clipper, @c EINA_FALSE otherwise. */ + } + } + size { + set { + /*@ Changes the size of the given Evas object. */ + } + get { + /*@ Retrieves the (rectangular) size of the given Evas object. */ + } + values { + Evas_Coord w; /*@ in */ + Evas_Coord h; /*@ in */ + } + } + focus { + set { + /*@ + Sets or unsets a given object as the currently focused one on its + canvas. + + Changing focus only affects where (key) input events go. There can + be only one object focused at any time. If @p focus is @c EINA_TRUE, + @p obj will be set as the currently focused object and it will + receive all keyboard events that are not exclusive key grabs on + other objects. + + Example: + @dontinclude evas-events.c + @skip evas_object_focus_set + @until evas_object_focus_set + + See the full example @ref Example_Evas_Events "here". + + @see evas_object_focus_get + @see evas_focus_get + @see evas_object_key_grab + @see evas_object_key_ungrab */ + } + get { + /*@ + Retrieve whether an object has the focus. + + @return @c EINA_TRUE if the object has the focus, @c EINA_FALSE otherwise. + + If the passed object is the currently focused one, @c EINA_TRUE is + returned. @c EINA_FALSE is returned, otherwise. + + Example: + @dontinclude evas-events.c + @skip And again + @until something is bad + + See the full example @ref Example_Evas_Events "here". + + @see evas_object_focus_set + @see evas_focus_get + @see evas_object_key_grab + @see evas_object_key_ungrab */ + } + values { + Eina_Bool focus; /*@ @c EINA_TRUE, to set it as focused or @c EINA_FALSE, + to take away the focus from it. */ + } + } + is_frame_object { + set { + } + get { + } + values { + Eina_Bool is_frame; /*@ in */ + } + } + map_enable { + set { + /*@ + Enable or disable the map that is set. + + Enable or disable the use of map for the object @p obj. + On enable, the object geometry will be saved, and the new geometry will + change (position and size) to reflect the map geometry set. + + If the object doesn't have a map set (with evas_object_map_set()), the + initial geometry will be undefined. It is advised to always set a map + to the object first, and then call this function to enable its use. */ + } + get { + /*@ + Get the map enabled state + + This returns the currently enabled state of the map on the object indicated. + The default map enable state is off. You can enable and disable it with + evas_object_map_enable_set(). + + @return the map enabled state */ + } + values { + Eina_Bool enabled; /*@ enabled state */ + } + } + precise_is_inside { + set { + /*@ + Set whether to use precise (usually expensive) point collision + detection for a given Evas object. + + Use this function to make Evas treat objects' transparent areas as + @b not belonging to it with regard to mouse pointer events. By + default, all of the object's boundary rectangle will be taken in + account for them. + + @warning By using precise point collision detection you'll be + making Evas more resource intensive. + + Example code follows. + @dontinclude evas-events.c + @skip if (strcmp(ev->key, "p") == 0) + @until } + + See the full example @ref Example_Evas_Events "here". + + @see evas_object_precise_is_inside_get() + @ingroup Evas_Object_Group_Extras */ + } + get { + /*@ + Determine whether an object is set to use precise point collision + detection. + + @return whether @p obj is set to use precise point collision + detection or not The default value is false. + + @see evas_object_precise_is_inside_set() for an example + + @ingroup Evas_Object_Group_Extras */ + } + values { + Eina_Bool precise; /*@ Whether to use precise point collision detection or + not. The default value is false. */ + } + } + size_hint_align { + set { + /*@ + Sets the hints for an object's alignment. + + These are hints on how to align an object inside the boundaries + of a container/manager. Accepted values are in the @c 0.0 to @c + 1.0 range, with the special value #EVAS_HINT_FILL used to specify + "justify" or "fill" by some users. In this case, maximum size hints + should be enforced with higher priority, if they are set. Also, any + padding hint set on objects should add up to the alignment space on + the final scene composition. + + See documentation of possible users: in Evas, they are the @ref + Evas_Object_Box "box" and @ref Evas_Object_Table "table" smart + objects. + + For the horizontal component, @c 0.0 means to the left, @c 1.0 + means to the right. Analogously, for the vertical component, @c 0.0 + to the top, @c 1.0 means to the bottom. + + See the following figure: + + @image html alignment-hints.png + @image rtf alignment-hints.png + @image latex alignment-hints.eps + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + @note Default alignment hint values are 0.5, for both axis. + + Example: + @dontinclude evas-hints.c + @skip evas_object_size_hint_align_set + @until return + + In this example the alignment hints change the behavior of an Evas + box when layouting its children. See the full @ref + Example_Evas_Size_Hints "example". + + @see evas_object_size_hint_align_get() + @see evas_object_size_hint_max_set() + @see evas_object_size_hint_padding_set() */ + } + get { + /*@ + Retrieves the hints for on object's alignment. + + This is not a size enforcement in any way, it's just a hint that + should be used whenever appropriate. + + @note Use @c NULL pointers on the hint components you're not + interested in: they'll be ignored by the function. + @note If @c obj is invalid, then the hint components will be set with 0.5 + + @see evas_object_size_hint_align_set() for more information */ + } + values { + double x; /*@ Double, ranging from @c 0.0 to @c 1.0 or with the + special value #EVAS_HINT_FILL, to use as horizontal alignment hint. */ + double y; /*@ Double, ranging from @c 0.0 to @c 1.0 or with the + special value #EVAS_HINT_FILL, to use as vertical alignment hint. */ + } + } + propagate_events { + set { + /*@ + Set whether events on a smart object's member should get propagated + up to its parent. + + This function has @b no effect if @p obj is not a member of a smart + object. + + If @p prop is @c EINA_TRUE, events occurring on this object will be + propagated on to the smart object of which @p obj is a member. If + @p prop is @c EINA_FALSE, events occurring on this object will @b + not be propagated on to the smart object of which @p obj is a + member. The default value is @c EINA_TRUE. + + @see evas_object_propagate_events_get() + @see evas_object_repeat_events_set() + @see evas_object_pass_events_set() + @see evas_object_freeze_events_set() */ + } + get { + /*@ + Retrieve whether an Evas object is set to propagate events. + + @return whether @p obj is set to propagate events (@c EINA_TRUE) + or not (@c EINA_FALSE) + + @see evas_object_propagate_events_set() + @see evas_object_repeat_events_get() + @see evas_object_pass_events_get() + @see evas_object_freeze_events_get() */ + } + values { + Eina_Bool propagate; /*@ whether to propagate events (@c EINA_TRUE) or not + (@c EINA_FALSE) */ + } + } + pass_events { + set { + /*@ + Set whether an Evas object is to pass (ignore) events. + + If @p pass is @c EINA_TRUE, it will make events on @p obj to be @b + ignored. They will be triggered on the @b next lower object (that + is not set to pass events), instead (see evas_object_below_get()). + + If @p pass is @c EINA_FALSE, events will be processed on that + object as normal. + + @see evas_object_pass_events_get() for an example + @see evas_object_repeat_events_set() + @see evas_object_propagate_events_set() + @see evas_object_freeze_events_set() */ + } + get { + /*@ + Determine whether an object is set to pass (ignore) events. + + @return pass whether @p obj is set to pass events (@c EINA_TRUE) or not + (@c EINA_FALSE) + + Example: + @dontinclude evas-stacking.c + @skip if (strcmp(ev->key, "p") == 0) + @until } + + See the full @ref Example_Evas_Stacking "example". + + @see evas_object_pass_events_set() + @see evas_object_repeat_events_get() + @see evas_object_propagate_events_get() + @see evas_object_freeze_events_get() */ + } + values { + Eina_Bool pass; /*@ whether @p obj is to pass events (@c EINA_TRUE) or not + (@c EINA_FALSE) */ + } + } + position { + set { + /*@ Move the given Evas object to the given location inside its canvas' viewport. */ + } + get { + /*@ Retrieves the position of the given Evas object. */ + } + values { + Evas_Coord x; /*@ in */ + Evas_Coord y; /*@ in */ + } + } + anti_alias { + set { + /*@ + Sets whether or not the given Evas object is to be drawn anti-aliased. + + @ingroup Evas_Object_Group_Extras */ + } + get { + /*@ + Retrieves whether or not the given Evas object is to be drawn anti_aliased. + @return @c 1 if the object is to be anti_aliased. @c 0 otherwise. + @ingroup Evas_Object_Group_Extras */ + } + values { + Eina_Bool anti_alias; /*@ 1 if the object is to be anti_aliased, 0 otherwise. */ + } + } + color { + set { + /*@ + Sets the general/main color of the given Evas object to the given + one. + + @see evas_object_color_get() (for an example) + @note These color values are expected to be premultiplied by @p a. + + @ingroup Evas_Object_Group_Basic */ + } + get { + /*@ + Retrieves the general/main color of the given Evas object. + + Retrieves the “main” color's RGB component (and alpha channel) + values, which range from 0 to 255. For the alpha channel, + which defines the object's transparency level, 0 means totally + transparent, while 255 means opaque. These color values are + premultiplied by the alpha value. + + Usually you’ll use this attribute for text and rectangle objects, + where the “main” color is their unique one. If set for objects + which themselves have colors, like the images one, those colors get + modulated by this one. + + @note All newly created Evas rectangles get the default color + values of 255 255 255 255 (opaque white). + + @note Use @c NULL pointers on the components you're not interested + in: they'll be ignored by the function. + + Example: + @dontinclude evas-object-manipulation.c + @skip int alpha, r, g, b; + @until return + + See the full @ref Example_Evas_Object_Manipulation "example". + + @ingroup Evas_Object_Group_Basic */ + } + values { + int r; /*@ The red component of the given color. */ + int g; /*@ The green component of the given color. */ + int b; /*@ The blue component of the given color. */ + int a; /*@ The alpha component of the given color. */ + } + } + smart_data { + get { + /*@ + Retrieve user data stored on a given smart object. + + @return A pointer to data stored using + evas_object_smart_data_set(), or @c NULL, if none has been + set. + + @see evas_object_smart_data_set() + + @ingroup Evas_Smart_Object_Group */ + return void*; + } + } + smart_clipped_clipper { + get { + /*@ + Get the clipper object for the given clipped smart object. + + @return the clipper object. + + Use this function if you want to change any of this clipper's + properties, like colors. + + @see evas_object_smart_clipped_smart_add() */ + return Evas_Object*; + } + } + below { + get { + /*@ + Get the Evas object stacked right below @p obj + + @return the #Evas_Object directly below @p obj, if any, or @c NULL, + if none + + This function will traverse layers in its search, if there are + objects on layers below the one @p obj is placed at. + + @see evas_object_layer_get() + @see evas_object_layer_set() + @see evas_object_below_get() */ + return Evas_Object*; + } + } + clipees { + get { + /*@ + Return a list of objects currently clipped by @p obj. + + @return a list of objects being clipped by @p obj + + This returns the internal list handle that contains all objects + clipped by the object @p obj. If none are clipped by it, the call + returns @c NULL. This list is only valid until the clip list is + changed and should be fetched again with another call to + evas_object_clipees_get() if any objects being clipped by this + object are unclipped, clipped by a new object, deleted or get the + clipper deleted. These operations will invalidate the list + returned, so it should not be used anymore after that point. Any + use of the list after this may have undefined results, possibly + leading to crashes. The object @p obj must be a valid + ::Evas_Object. + + See also evas_object_clip_set(), evas_object_clip_unset() and + evas_object_clip_get(). + + Example: + @code + extern Evas_Object *obj; + Evas_Object *clipper; + + clipper = evas_object_clip_get(obj); + if (clipper) + { + Eina_List *clippees, *l; + Evas_Object *obj_tmp; + + clippees = evas_object_clipees_get(clipper); + printf("Clipper clips %i objects\n", eina_list_count(clippees)); + EINA_LIST_FOREACH(clippees, l, obj_tmp) + evas_object_show(obj_tmp); + } + @endcode */ + return const Eina_List*; + } + } + smart_parent { + get { + /*@ + Gets the parent smart object of a given Evas object, if it has one. + + @return Returns the parent smart object of @a obj or @c NULL, if @a + obj is not a smart member of any + + @ingroup Evas_Smart_Object_Group */ + return Evas_Object*; + } + } + above { + get { + /*@ + Get the Evas object stacked right above @p obj + + @return the #Evas_Object directly above @p obj, if any, or @c NULL, + if none + + This function will traverse layers in its search, if there are + objects on layers above the one @p obj is placed at. + + @see evas_object_layer_get() + @see evas_object_layer_set() + @see evas_object_below_get() */ + return Evas_Object*; + } + } + } + methods { + clipees_has { + /*@ + Test if any object is clipped by @p obj. + + @return EINA_TRUE if @p obj clip any object. + @since 1.8 */ + const; + return Eina_Bool; + } + key_grab { + /*@ + Requests @p keyname key events be directed to @p obj. + + @return @c EINA_TRUE, if the call succeeded, @c EINA_FALSE otherwise. + + Key grabs allow one or more objects to receive key events for + specific key strokes even if other objects have focus. Whenever a + key is grabbed, only the objects grabbing it will get the events + for the given keys. + + @p keyname is a platform dependent symbolic name for the key + pressed (see @ref Evas_Keys for more information). + + @p modifiers and @p not_modifiers are bit masks of all the + modifiers that must and mustn't, respectively, be pressed along + with @p keyname key in order to trigger this new key + grab. Modifiers can be things such as Shift and Ctrl as well as + user defined types via evas_key_modifier_add(). Retrieve them with + evas_key_modifier_mask_get() or use @c 0 for empty masks. + + @p exclusive will make the given object the only one permitted to + grab the given key. If given @c EINA_TRUE, subsequent calls on this + function with different @p obj arguments will fail, unless the key + is ungrabbed again. + + Example code follows. + @dontinclude evas-events.c + @skip if (d.focus) + @until else + + See the full example @ref Example_Evas_Events "here". + + @warning Providing impossible modifier sets creates undefined behavior + + @see evas_object_key_ungrab + @see evas_object_focus_set + @see evas_object_focus_get + @see evas_focus_get + @see evas_key_modifier_add */ + return Eina_Bool; + params { + @in const char* keyname; /*@ the key to request events for. */ + @in Evas_Modifier_Mask modifiers; /*@ a mask of modifiers that must be present to + trigger the event. */ + @in Evas_Modifier_Mask not_modifiers; /*@ a mask of modifiers that must @b not be present + to trigger the event. */ + @in Eina_Bool exclusive; /*@ request that the @p obj is the only object + receiving the @p keyname events. */ + } + } + stack_below { + /*@ + Stack @p obj immediately below @p below + + Objects, in a given canvas, are stacked in the order they get added + to it. This means that, if they overlap, the highest ones will + cover the lowest ones, in that order. This function is a way to + change the stacking order for the objects. + + This function is intended to be used with objects belonging to + the same layer in a given canvas, otherwise it will fail (and + accomplish nothing). + + If you have smart objects on your canvas and @p obj is a member of + one of them, then @p below must also be a member of the same + smart object. + + Similarly, if @p obj is not a member of a smart object, @p below + must not be either. + + @see evas_object_layer_get() + @see evas_object_layer_set() + @see evas_object_stack_below() */ + params { + @in Evas_Object* below; /*@ the object below which to stack */ + } + } + raise { + /*@ + Raise @p obj to the top of its layer. + + @p obj will, then, be the highest one in the layer it belongs + to. Object on other layers won't get touched. + + @see evas_object_stack_above() + @see evas_object_stack_below() + @see evas_object_lower() */ + } + stack_above { + /*@ + Stack @p obj immediately above @p above + + Objects, in a given canvas, are stacked in the order they get added + to it. This means that, if they overlap, the highest ones will + cover the lowest ones, in that order. This function is a way to + change the stacking order for the objects. + + This function is intended to be used with objects belonging to + the same layer in a given canvas, otherwise it will fail (and + accomplish nothing). + + If you have smart objects on your canvas and @p obj is a member of + one of them, then @p above must also be a member of the same + smart object. + + Similarly, if @p obj is not a member of a smart object, @p above + must not be either. + + @see evas_object_layer_get() + @see evas_object_layer_set() + @see evas_object_stack_below() */ + params { + @in Evas_Object* above; /*@ the object above which to stack */ + } + } + smart_type_check { + /*@ + Checks whether a given smart object or any of its smart object + parents is of a given smart class. + + @return @c EINA_TRUE, if @a obj or any of its parents is of type @a + type, @c EINA_FALSE otherwise + + If @p obj is not a smart object, this call will fail + immediately. + + This function supports Eo and legacy inheritance mechanisms. However, + it is recommended to use eo_isa instead if your object is using Eo from + top to bottom. + + The checks use smart classes names and string + comparison. There is a version of this same check using + pointer comparison, since a smart class' name is a single + string in Evas. + + @see evas_object_smart_type_check_ptr() + @see eo_isa + + @ingroup Evas_Smart_Object_Group */ + const; + return Eina_Bool; + params { + @in const char* type; /*@ The @b name (type) of the smart class to check for */ + } + } + name_child_find { + /*@ + Retrieves the object from children of the given object with the given name. + @return If successful, the Evas object with the given name. Otherwise, + @c NULL. + + This looks for the evas object given a name by evas_object_name_set(), but + it ONLY looks at the children of the object *p obj, and will only recurse + into those children if @p recurse is greater than 0. If the name is not + unique within immediate children (or the whole child tree) then it is not + defined which child object will be returned. If @p recurse is set to -1 then + it will recurse without limit. + + @since 1.2 + + @ingroup Evas_Object_Group_Find */ + const; + return Evas_Object*; + params { + @in const char* name; /*@ The given name. */ + @in int recurse; /*@ Set to the number of child levels to recurse (0 == don't recurse, 1 == only look at the children of @p obj or their immediate children, but no further etc.). */ + } + } + key_ungrab { + /*@ + Removes the grab on @p keyname key events by @p obj. + + Removes a key grab on @p obj if @p keyname, @p modifiers, and @p + not_modifiers match. + + Example code follows. + @dontinclude evas-events.c + @skip got here by key grabs + @until } + + See the full example @ref Example_Evas_Events "here". + + @see evas_object_key_grab + @see evas_object_focus_set + @see evas_object_focus_get + @see evas_focus_get */ + params { + @in const char* keyname; /*@ the key the grab is set for. */ + @in Evas_Modifier_Mask modifiers; /*@ a mask of modifiers that must be present to + trigger the event. */ + @in Evas_Modifier_Mask not_modifiers; /*@ a mask of modifiers that must not not be + present to trigger the event. */ + } + } + lower { + /*@ + Lower @p obj to the bottom of its layer. + + @p obj will, then, be the lowest one in the layer it belongs + to. Objects on other layers won't get touched. + + @see evas_object_stack_above() + @see evas_object_stack_below() + @see evas_object_raise() */ + } + clip_unset { + /*@ + Disable/cease clipping on a clipped @p obj object. + + This function disables clipping for the object @p obj, if it was + already clipped, i.e., its visibility and color get detached from + the previous clipper. If it wasn't, this has no effect. The object + @p obj must be a valid ::Evas_Object. + + See also evas_object_clip_set() (for an example), + evas_object_clipees_get() and evas_object_clip_get(). */ + } + smart_move_children_relative { + /*@ + Moves all children objects of a given smart object relative to a + given offset. + + This will make each of @p obj object's children to move, from where + they before, with those delta values (offsets) on both directions. + + @note This is most useful on custom smart @c move() functions. + + @note Clipped smart objects already make use of this function on + their @c move() smart function definition. */ + params { + @in Evas_Coord dx; /*@ horizontal offset (delta). */ + @in Evas_Coord dy; /*@ vertical offset (delta). */ + } + } + smart_type_check_ptr { + /*@ + Checks whether a given smart object or any of its smart object + parents is of a given smart class, using pointer comparison. + + @return @c EINA_TRUE, if @a obj or any of its parents is of type @a + type, @c EINA_FALSE otherwise + + @see evas_object_smart_type_check() for more details + @see eo_isa + + @ingroup Evas_Smart_Object_Group */ + const; + return Eina_Bool; + params { + @in const char* type; /*@ The type (name string) to check for. Must be the name */ + } + } + } + implements { + Eo_Base::constructor; + Eo_Base::destructor; + Eo_Base::dbg_info_get; + Evas_Common_Interface::evas::get; + } +} diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index e1cfb214dc..e9e1345d22 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -4,8 +4,6 @@ #include "Eo.h" -EAPI Eo_Op EVAS_OBJ_TEXT_BASE_ID = EO_NOOP; - #define MY_CLASS EVAS_OBJ_TEXT_CLASS #define MY_CLASS_NAME "Evas_Text" @@ -22,10 +20,10 @@ EAPI Eo_Op EVAS_OBJ_TEXT_BASE_ID = EO_NOOP; static const char o_type[] = "text"; /* private struct for text object internal data */ -typedef struct _Evas_Object_Text Evas_Object_Text; +typedef struct _Evas_Text_Data Evas_Text_Data; typedef struct _Evas_Object_Text_Item Evas_Object_Text_Item; -struct _Evas_Object_Text +struct _Evas_Text_Data { DATA32 magic; @@ -150,7 +148,7 @@ static const Evas_Object_Func object_func = static int _evas_object_text_char_coords_get(const Evas_Object *eo_obj, - const Evas_Object_Text *o, + const Evas_Text_Data *o, size_t pos, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); @@ -178,7 +176,7 @@ _evas_object_text_item_clean(Evas_Object_Text_Item *it) } static void -_evas_object_text_item_del(Evas_Object_Text *o, Evas_Object_Text_Item *it) +_evas_object_text_item_del(Evas_Text_Data *o, Evas_Object_Text_Item *it) { if (o->last_computed.ellipsis_start == it) o->last_computed.ellipsis_start = NULL; @@ -195,7 +193,7 @@ _evas_object_text_item_del(Evas_Object_Text *o, Evas_Object_Text_Item *it) } static void -_evas_object_text_items_clean(Evas_Object_Protected_Data *obj, Evas_Object_Text *o) +_evas_object_text_items_clean(Evas_Object_Protected_Data *obj, Evas_Text_Data *o) { /* FIXME: also preserve item */ if ((o->cur.font == o->prev.font) && @@ -235,7 +233,7 @@ _evas_object_text_items_clean(Evas_Object_Protected_Data *obj, Evas_Object_Text } static void -_evas_object_text_items_clear(Evas_Object_Text *o) +_evas_object_text_items_clear(Evas_Text_Data *o) { if ((o->last_computed.ellipsis_start) && (o->last_computed.ellipsis_start != o->items)) @@ -272,7 +270,7 @@ _evas_object_text_it_compare_logical(const void *_it1, const void *_it2) static int _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj, - const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy) + const Evas_Text_Data *o, Evas_Coord cx, Evas_Coord cy) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Text_Item *it; @@ -326,7 +324,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj, static int _evas_object_text_char_at_coords(const Evas_Object *eo_obj, - const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy, + const Evas_Text_Data *o, Evas_Coord cx, Evas_Coord cy, Evas_Coord *rx, Evas_Coord *ry, Evas_Coord *rw, Evas_Coord *rh) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); @@ -349,14 +347,14 @@ _evas_object_text_char_at_coords(const Evas_Object *eo_obj, } static Evas_Coord -_evas_object_text_horiz_advance_get(const Evas_Object_Text *o) +_evas_object_text_horiz_advance_get(const Evas_Text_Data *o) { return o->last_computed.advance; } static Evas_Coord _evas_object_text_vert_advance_get(const Evas_Object *obj EINA_UNUSED, - const Evas_Object_Text *o) + const Evas_Text_Data *o) { return o->max_ascent + o->max_descent; } @@ -372,8 +370,8 @@ evas_object_text_add(Evas *e) return eo_obj; } -static void -_constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_text_constructor(Eo *eo_obj, Evas_Text_Data *class_data EINA_UNUSED) { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); evas_object_text_init(eo_obj); @@ -384,21 +382,9 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); } -EAPI void -evas_object_text_font_source_set(Evas_Object *eo_obj, const char *font_source) +EOLIAN static void +_evas_text_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *font_source) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_font_source_set(font_source)); -} - -static void -_text_font_source_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Object_Text *o = _pd; - - const char *font_source = va_arg(*list, const char *); if ((o->cur.source) && (font_source) && (!strcmp(o->cur.source, font_source))) return; @@ -410,46 +396,21 @@ _text_font_source_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) eina_stringshare_replace(&o->cur.source, font_source); } -EAPI const char * -evas_object_text_font_source_get(const Evas_Object *eo_obj) +EOLIAN static const char* +_evas_text_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - const char *font_source = NULL; - eo_do((Eo *)eo_obj, evas_obj_text_font_source_get(&font_source)); - return font_source; + + return o->cur.source; } -static void -_text_font_source_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_evas_text_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_Size size) { - const Evas_Object_Text *o = _pd; - - const char ** font_source = va_arg(*list, const char **); - *font_source = o->cur.source; -} - -EAPI void -evas_object_text_font_set(Evas_Object *eo_obj, const char *font, Evas_Font_Size size) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_font_set(font, size)); -} - -static void -_text_font_set(Eo *eo_obj, void *_pd, va_list *list) -{ - Evas_Object_Text *o = _pd; Eina_Bool is, was = EINA_FALSE; Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE; Eina_Bool source_invisible = EINA_FALSE; Evas_Font_Description *fdesc; - const char *font = va_arg(*list, const char*); - Evas_Font_Size size = va_arg(*list, Evas_Font_Size); if ((!font) || (size <= 0)) return; @@ -462,7 +423,7 @@ _text_font_set(Eo *eo_obj, void *_pd, va_list *list) { fdesc = evas_font_desc_ref(o->cur.fdesc); } - + if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) && (size == o->cur.size)) { @@ -530,30 +491,15 @@ _text_font_set(Eo *eo_obj, void *_pd, va_list *list) evas_object_inform_call_resize(eo_obj); } -EAPI void -evas_object_text_font_get(const Evas_Object *eo_obj, const char **font, Evas_Font_Size *size) +EOLIAN static void +_evas_text_font_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char **font, Evas_Font_Size *size) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - if (font) *font = ""; - if (size) *size = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_obj, evas_obj_text_font_get(font, size)); -} - -static void -_text_font_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - const Evas_Object_Text *o = _pd; - const char **font = va_arg(*list, const char **); - Evas_Font_Size *size = va_arg(*list, Evas_Font_Size *); - if (font) *font = o->cur.font; if (size) *size = o->cur.size; } static void -_evas_object_text_item_update_sizes(Evas_Object_Protected_Data *obj, Evas_Object_Text *o, Evas_Object_Text_Item *it) +_evas_object_text_item_update_sizes(Evas_Object_Protected_Data *obj, Evas_Text_Data *o, Evas_Object_Text_Item *it) { ENFN->font_string_size_get(ENDT, o->font, @@ -573,7 +519,7 @@ _evas_object_text_item_update_sizes(Evas_Object_Protected_Data *obj, Evas_Object */ static Evas_Object_Text_Item * _evas_object_text_item_new(Evas_Object_Protected_Data *obj, - Evas_Object_Text *o, + Evas_Text_Data *o, Evas_Font_Instance *fi, const Eina_Unicode *str, Evas_Script_Type script, size_t pos, size_t visual_pos, size_t len) @@ -607,7 +553,7 @@ _evas_object_text_item_new(Evas_Object_Protected_Data *obj, * @param o the text object */ static void -_evas_object_text_item_order(Evas_Object *eo_obj, Evas_Object_Text *o) +_evas_object_text_item_order(Evas_Object *eo_obj, Evas_Text_Data *o) { (void) eo_obj; #ifdef BIDI_SUPPORT @@ -659,7 +605,7 @@ static const Eina_Unicode _ellip_str[2] = { 0x2026, '\0' }; /* FIXME: We currently leak ellipsis items. */ static Evas_Object_Text_Item * -_layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Object_Text *o) +_layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Text_Data *o) { Evas_Object_Text_Item *ellip_ti = NULL; Evas_Script_Type script; @@ -682,7 +628,7 @@ _layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Object_Text *o) /* EINA_TRUE if this item is ok and should be included, false if should be * discarded. */ static Eina_Bool -_layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Object_Text *o, Evas_Object_Text_Item *ti, int idx, Eina_Bool want_start) +_layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Text_Data *o, Evas_Object_Text_Item *ti, int idx, Eina_Bool want_start) { Evas_Text_Props new_text_props; if (idx >= (int) ti->text_props.len) @@ -717,7 +663,7 @@ _layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Object_Text *o, Eva * @param text the text to layout */ static void -_evas_object_text_layout(Evas_Object *eo_obj, Evas_Object_Text *o, Eina_Unicode *text) +_evas_object_text_layout(Evas_Object *eo_obj, Evas_Text_Data *o, Eina_Unicode *text) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); EvasBiDiStrIndex *v_to_l = NULL; @@ -877,7 +823,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Object_Text *o, Eina_Unicode 0); if (cut > 0) { - + start_ellip_it->text_pos = itr->text_pos; start_ellip_it->visual_pos = itr->visual_pos; if (!_layout_text_item_trim(obj, o, itr, cut, EINA_FALSE)) @@ -960,23 +906,10 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Object_Text *o, Eina_Unicode if (v_to_l) free(v_to_l); } -EAPI void -evas_object_text_ellipsis_set(Evas_Object *obj, double ellipsis) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(obj, evas_obj_text_ellipsis_set(ellipsis)); -} - -static void -_size_set(Eo *eo_obj, void *_pd, va_list *list) +EOLIAN static void +_evas_text_evas_object_size_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Coord w, Evas_Coord h) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Text *o = _pd; - - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) { @@ -988,12 +921,10 @@ _size_set(Eo *eo_obj, void *_pd, va_list *list) _evas_object_text_recalc(eo_obj, o->cur.text); } -static void -_text_ellipsis_set(Eo *eo_obj, void *_pd, va_list *list) +EOLIAN static void +_evas_text_ellipsis_set(Eo *eo_obj, Evas_Text_Data *o, double ellipsis) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Text *o = _pd; - double ellipsis = va_arg(*list, double); if (o->cur.ellipsis == ellipsis) return; @@ -1004,32 +935,15 @@ _text_ellipsis_set(Eo *eo_obj, void *_pd, va_list *list) evas_object_clip_dirty(eo_obj, obj); } -EAPI double -evas_object_text_ellipsis_get(const Evas_Object *obj) +EOLIAN static double +_evas_text_ellipsis_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - double r = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - - eo_do((Eo*) obj, evas_obj_text_ellipsis_get(&r)); - return r; + return o->cur.ellipsis; } -static void -_text_ellipsis_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_evas_text_eo_base_dbg_info_get(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED, Eo_Dbg_Info *root) { - const Evas_Object_Text *o = _pd; - double *r = va_arg(*list, double *); - - *r = o->cur.ellipsis; -} - -static void -_dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) -{ - Eo_Dbg_Info *root = (Eo_Dbg_Info *) va_arg(*list, Eo_Dbg_Info *); eo_do_super(eo_obj, MY_CLASS, eo_dbg_info_get(root)); Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME); @@ -1046,24 +960,12 @@ _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) EO_DBG_INFO_APPEND(group, "Text", EINA_VALUE_TYPE_STRING, text); } -EAPI void -evas_object_text_text_set(Evas_Object *eo_obj, const char *_text) +EOLIAN static void +_evas_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_text_set(_text)); -} - -static void -_text_text_set(Eo *eo_obj, void *_pd, va_list *list) -{ - Evas_Object_Text *o = _pd; int is, was, len; Eina_Unicode *text; - const char *_text = va_arg(*list, const char *); - if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text))) return; text = eina_unicode_utf8_to_unicode(_text, &len); @@ -1101,257 +1003,104 @@ _text_text_set(Eo *eo_obj, void *_pd, va_list *list) evas_object_inform_call_resize(eo_obj); } -EAPI void -evas_object_text_bidi_delimiters_set(Evas_Object *eo_obj, const char *delim) +EOLIAN static void +_evas_text_bidi_delimiters_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *delim) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_bidi_delimiters_set(delim)); -} - -static void -_text_bidi_delimiters_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Object_Text *o = _pd; - - const char *delim = va_arg(*list, const char *); - eina_stringshare_replace(&o->bidi_delimiters, delim); } -EAPI const char * -evas_object_text_bidi_delimiters_get(const Evas_Object *eo_obj) +EOLIAN static const char* +_evas_text_bidi_delimiters_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - const char *delim = NULL; - eo_do((Eo *)eo_obj, evas_obj_text_bidi_delimiters_get(&delim)); - return delim; + return o->bidi_delimiters; } -static void -_text_bidi_delimiters_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static const char* +_evas_text_text_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - const Evas_Object_Text *o = _pd; - const char **delim = va_arg(*list, const char **); - *delim = o->bidi_delimiters; + return o->cur.utf8_text; } -EAPI const char * -evas_object_text_text_get(const Evas_Object *eo_obj) +EOLIAN static Evas_BiDi_Direction +_evas_text_direction_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - const char *text = NULL; - eo_do((Eo *)eo_obj, evas_obj_text_text_get(&text)); - return text; + return o->bidi_dir; } -static void -_text_text_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Evas_Coord +_evas_text_ascent_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - const char **text = va_arg(*list, const char **); - const Evas_Object_Text *o = _pd; - *text = o->cur.utf8_text; + return o->ascent; } -EAPI Evas_BiDi_Direction -evas_object_text_direction_get(const Evas_Object *eo_obj) +EOLIAN static Evas_Coord +_evas_text_descent_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return EVAS_BIDI_DIRECTION_NEUTRAL; - MAGIC_CHECK_END(); - Evas_BiDi_Direction bidi_dir = EVAS_BIDI_DIRECTION_NEUTRAL; - eo_do((Eo *)eo_obj, evas_obj_text_direction_get(&bidi_dir)); - return bidi_dir; + return o->descent; } -static void -_text_direction_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Evas_Coord +_evas_text_max_ascent_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - Evas_BiDi_Direction *bidi_dir = va_arg(*list, Evas_BiDi_Direction *); - const Evas_Object_Text *o = _pd; - *bidi_dir = o->bidi_dir; + return o->max_ascent; } -EAPI Evas_Coord -evas_object_text_ascent_get(const Evas_Object *eo_obj) +EOLIAN static Evas_Coord +_evas_text_max_descent_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - Evas_Coord ascent = 0; - eo_do((Eo *)eo_obj, evas_obj_text_ascent_get(&ascent)); - return ascent; + return o->max_descent; } -static void -_text_ascent_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Evas_Coord +_evas_text_inset_get(Eo *eo_obj, Evas_Text_Data *o) { - Evas_Coord *ascent = va_arg(*list, Evas_Coord *); - const Evas_Object_Text *o = _pd; - *ascent = o->ascent; -} - -EAPI Evas_Coord -evas_object_text_descent_get(const Evas_Object *eo_obj) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - Evas_Coord descent = 0; - eo_do((Eo *)eo_obj, evas_obj_text_descent_get(&descent)); - return descent; -} - -static void -_text_descent_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord *descent = va_arg(*list, Evas_Coord *); - const Evas_Object_Text *o = _pd; - *descent = o->descent; -} - -EAPI Evas_Coord -evas_object_text_max_ascent_get(const Evas_Object *eo_obj) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - Evas_Coord max_ascent = 0; - eo_do((Eo *)eo_obj, evas_obj_text_max_ascent_get(&max_ascent)); - return max_ascent; -} - -static void -_text_max_ascent_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord *max_ascent = va_arg(*list, Evas_Coord *); - const Evas_Object_Text *o = _pd; - *max_ascent = o->max_ascent; -} - -EAPI Evas_Coord -evas_object_text_max_descent_get(const Evas_Object *eo_obj) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - Evas_Coord max_descent = 0; - eo_do((Eo *)eo_obj, evas_obj_text_max_descent_get(&max_descent)); - return max_descent; -} - -static void -_text_max_descent_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - Evas_Coord *max_descent = va_arg(*list, Evas_Coord *); - const Evas_Object_Text *o = _pd; - *max_descent = o->max_descent; -} - -EAPI Evas_Coord -evas_object_text_inset_get(const Evas_Object *eo_obj) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Coord inset = 0; - eo_do((Eo *)eo_obj, evas_obj_text_inset_get(&inset)); + if (!o->font) return inset; + if (!o->items) return inset; + inset = ENFN->font_inset_get(ENDT, o->font, &o->items->text_props); + return inset; } -static void -_text_inset_get(Eo *eo_obj, void *_pd, va_list *list) +EOLIAN static Evas_Coord +_evas_text_horiz_advance_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Coord *inset = va_arg(*list, Evas_Coord *); - *inset = 0; - const Evas_Object_Text *o = _pd; - if (!o->font) return; - if (!o->items) return; - *inset = ENFN->font_inset_get(ENDT, o->font, &o->items->text_props); -} - -EAPI Evas_Coord -evas_object_text_horiz_advance_get(const Evas_Object *eo_obj) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); Evas_Coord horiz = 0; - eo_do((Eo *)eo_obj, evas_obj_text_horiz_advance_get(&horiz)); + if (!o->font) return horiz; + if (!o->items) return horiz; + horiz = _evas_object_text_horiz_advance_get(o); + return horiz; } -static void -_text_horiz_advance_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static Evas_Coord +_evas_text_vert_advance_get(Eo *eo_obj, Evas_Text_Data *o) { - Evas_Coord *horiz = va_arg(*list, Evas_Coord *); - *horiz = 0; - const Evas_Object_Text *o = _pd; - if (!o->font) return; - if (!o->items) return; - *horiz = _evas_object_text_horiz_advance_get(o); -} + Evas_Coord vert; + vert = 0; + if (!o->font) return vert; + if (!o->items) + { + vert = o->ascent + o->descent; + return vert; + } + vert = _evas_object_text_vert_advance_get(eo_obj, o); -EAPI Evas_Coord -evas_object_text_vert_advance_get(const Evas_Object *eo_obj) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - Evas_Coord vert = 0; - eo_do((Eo *)eo_obj, evas_obj_text_vert_advance_get(&vert)); return vert; } -static void -_text_vert_advance_get(Eo *eo_obj, void *_pd, va_list *list) +EOLIAN static Eina_Bool +_evas_text_char_pos_get(Eo *eo_obj, Evas_Text_Data *o, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) { - Evas_Coord *vert = va_arg(*list, Evas_Coord *); - *vert = 0; - const Evas_Object_Text *o = _pd; - if (!o->font) return; - if (!o->items) - { - *vert = o->ascent + o->descent; - return; - } - *vert = _evas_object_text_vert_advance_get(eo_obj, o); -} + Eina_Bool ret; + ret = EINA_FALSE; -EAPI Eina_Bool -evas_object_text_char_pos_get(const Evas_Object *eo_obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - Eina_Bool ret = EINA_FALSE; - eo_do((Eo *)eo_obj, evas_obj_text_char_pos_get(pos, cx, cy, cw, ch, &ret)); - return ret; -} - -static void -_text_char_pos_get(Eo *eo_obj, void *_pd, va_list *list) -{ - int pos = va_arg(*list, int); - Evas_Coord *cx = va_arg(*list, Evas_Coord *); - Evas_Coord *cy = va_arg(*list, Evas_Coord *); - Evas_Coord *cw = va_arg(*list, Evas_Coord *); - Evas_Coord *ch = va_arg(*list, Evas_Coord *); - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - if (ret) *ret = EINA_FALSE; - - const Evas_Object_Text *o = _pd; int l = 0, r = 0, t = 0, b = 0; int x = 0, y = 0, w = 0, h = 0; - if (!o->font) return; - if (!o->items || (pos < 0)) return; + if (!o->font) return ret; + if (!o->items || (pos < 0)) return ret; Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); @@ -1381,66 +1130,36 @@ _text_char_pos_get(Eo *eo_obj, void *_pd, va_list *list) if (cy) *cy = y; if (cw) *cw = w + l + r; if (ch) *ch = h + t + b; - if (ret) *ret = int_ret; + ret = int_ret; + + return ret; } - -EAPI int -evas_object_text_last_up_to_pos(const Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y) +EOLIAN static int +_evas_text_last_up_to_pos(Eo *eo_obj, Evas_Text_Data *o, Evas_Coord x, Evas_Coord y) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return -1; - MAGIC_CHECK_END(); - int res = -1; - eo_do((Eo *)eo_obj, evas_obj_text_last_up_to_pos(x, y, &res)); - return res; -} + int ret; + ret = -1; -static void -_text_last_up_to_pos(Eo *eo_obj, void *_pd, va_list *list) -{ - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - int *ret = va_arg(*list, int *); - *ret = -1; - - const Evas_Object_Text *o = _pd; - - if (!o->font) return; - if (!o->items) return; + if (!o->font) return ret; + if (!o->items) return ret; int int_ret = _evas_object_text_last_up_to_pos(eo_obj, o, x, y - o->max_ascent); - if (ret) *ret = int_ret; + ret = int_ret; + + return ret; } -EAPI int -evas_object_text_char_coords_get(const Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +EOLIAN static int +_evas_text_char_coords_get(Eo *eo_obj, Evas_Text_Data *o, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return -1; - MAGIC_CHECK_END(); - int res = -1; - eo_do((Eo *)eo_obj, evas_obj_text_char_coords_get(x, y, cx, cy, cw, ch, &res)); - return res; -} + int ret; + ret = -1; -static void -_text_char_coords_get(Eo *eo_obj, void *_pd, va_list *list) -{ - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord *cx = va_arg(*list, Evas_Coord *); - Evas_Coord *cy = va_arg(*list, Evas_Coord *); - Evas_Coord *cw = va_arg(*list, Evas_Coord *); - Evas_Coord *ch = va_arg(*list, Evas_Coord *); - int *ret = va_arg(*list, int *); - if (ret) *ret = -1; - - const Evas_Object_Text *o = _pd; int l = 0, r = 0, t = 0, b = 0; int rx = 0, ry = 0, rw = 0, rh = 0; - if (!o->font) return; - if (!o->items) return; + if (!o->font) return ret; + if (!o->items) return ret; int int_ret = _evas_object_text_char_at_coords(eo_obj, o, x, y - o->max_ascent, &rx, &ry, &rw, &rh); @@ -1469,23 +1188,14 @@ _text_char_coords_get(Eo *eo_obj, void *_pd, va_list *list) if (cy) *cy = ry; if (cw) *cw = rw + l + r; if (ch) *ch = rh + t + b; - if (ret) *ret = int_ret; + ret = int_ret; + + return ret; } -EAPI void -evas_object_text_style_set(Evas_Object *eo_obj, Evas_Text_Style_Type style) +EOLIAN static void +_evas_text_style_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Text_Style_Type style) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_style_set(style)); -} - -static void -_text_style_set(Eo *eo_obj, void *_pd, va_list *list) -{ - Evas_Text_Style_Type style = va_arg(*list, Evas_Text_Style_Type); - Evas_Object_Text *o = _pd; int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0; int w = 0, h = 0; @@ -1503,43 +1213,15 @@ _text_style_set(Eo *eo_obj, void *_pd, va_list *list) evas_obj_size_set(w, h)); } -EAPI Evas_Text_Style_Type -evas_object_text_style_get(const Evas_Object *eo_obj) +EOLIAN static Evas_Text_Style_Type +_evas_text_style_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return EVAS_TEXT_STYLE_PLAIN; - MAGIC_CHECK_END(); - Evas_Text_Style_Type style = EVAS_TEXT_STYLE_PLAIN; - eo_do((Eo *)eo_obj, evas_obj_text_style_get(&style)); - return style; + return o->cur.style; } -static void -_text_style_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void +_evas_text_shadow_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a) { - Evas_Text_Style_Type *style = va_arg(*list, Evas_Text_Style_Type *); - const Evas_Object_Text *o = _pd; - *style = o->cur.style; -} - -EAPI void -evas_object_text_shadow_color_set(Evas_Object *eo_obj, int r, int g, int b, int a) -{ - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_shadow_color_set(r, g, b, a)); -} - -static void -_text_shadow_color_set(Eo *eo_obj, void *_pd, va_list *list) -{ - int r = va_arg(*list, int); - int g = va_arg(*list, int); - int b = va_arg(*list, int); - int a = va_arg(*list, int); - Evas_Object_Text *o = _pd; - if ((o->cur.shadow.r == r) && (o->cur.shadow.g == g) && (o->cur.shadow.b == b) && (o->cur.shadow.a == a)) return; @@ -1552,48 +1234,18 @@ _text_shadow_color_set(Eo *eo_obj, void *_pd, va_list *list) evas_object_change(eo_obj, obj); } -EAPI void -evas_object_text_shadow_color_get(const Evas_Object *eo_obj, int *r, int *g, int *b, int *a) +EOLIAN static void +_evas_text_shadow_color_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *r, int *g, int *b, int *a) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_obj, evas_obj_text_shadow_color_get(r, g, b, a)); -} - -static void -_text_shadow_color_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - int *r = va_arg(*list, int *); - int *g = va_arg(*list, int *); - int *b = va_arg(*list, int *); - int *a = va_arg(*list, int *); - const Evas_Object_Text *o = _pd; - if (r) *r = o->cur.shadow.r; if (g) *g = o->cur.shadow.g; if (b) *b = o->cur.shadow.b; if (a) *a = o->cur.shadow.a; } -EAPI void -evas_object_text_glow_color_set(Evas_Object *eo_obj, int r, int g, int b, int a) +EOLIAN static void +_evas_text_glow_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_glow_color_set(r, g, b, a)); -} - -static void -_text_glow_color_set(Eo *eo_obj, void *_pd, va_list *list) -{ - int r = va_arg(*list, int); - int g = va_arg(*list, int); - int b = va_arg(*list, int); - int a = va_arg(*list, int); - Evas_Object_Text *o = _pd; - if ((o->cur.glow.r == r) && (o->cur.glow.g == g) && (o->cur.glow.b == b) && (o->cur.glow.a == a)) return; @@ -1606,51 +1258,18 @@ _text_glow_color_set(Eo *eo_obj, void *_pd, va_list *list) evas_object_change(eo_obj, obj); } -EAPI void -evas_object_text_glow_color_get(const Evas_Object *eo_obj, int *r, int *g, int *b, int *a) +EOLIAN static void +_evas_text_glow_color_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *r, int *g, int *b, int *a) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_obj, evas_obj_text_glow_color_get(r, g, b, a)); -} - -static void -_text_glow_color_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - int *r = va_arg(*list, int *); - int *g = va_arg(*list, int *); - int *b = va_arg(*list, int *); - int *a = va_arg(*list, int *); - const Evas_Object_Text *o = _pd; if (r) *r = o->cur.glow.r; if (g) *g = o->cur.glow.g; if (b) *b = o->cur.glow.b; if (a) *a = o->cur.glow.a; } -EAPI void -evas_object_text_glow2_color_set(Evas_Object *eo_obj, int r, int g, int b, int a) +EOLIAN static void +_evas_text_glow2_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_glow2_color_set(r, g, b, a)); -} - -static void -_text_glow2_color_set(Eo *eo_obj, void *_pd, va_list *list) -{ - int r = va_arg(*list, int); - int g = va_arg(*list, int); - int b = va_arg(*list, int); - int a = va_arg(*list, int); - Evas_Object_Text *o = _pd; - if ((o->cur.glow2.r == r) && (o->cur.glow2.g == g) && (o->cur.glow2.b == b) && (o->cur.glow2.a == a)) return; @@ -1663,50 +1282,18 @@ _text_glow2_color_set(Eo *eo_obj, void *_pd, va_list *list) evas_object_change(eo_obj, obj); } -EAPI void -evas_object_text_glow2_color_get(const Evas_Object *eo_obj, int *r, int *g, int *b, int *a) +EOLIAN static void +_evas_text_glow2_color_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *r, int *g, int *b, int *a) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_obj, evas_obj_text_glow2_color_get(r, g, b, a)); -} - -static void -_text_glow2_color_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - int *r = va_arg(*list, int *); - int *g = va_arg(*list, int *); - int *b = va_arg(*list, int *); - int *a = va_arg(*list, int *); - const Evas_Object_Text *o = _pd; if (r) *r = o->cur.glow2.r; if (g) *g = o->cur.glow2.g; if (b) *b = o->cur.glow2.b; if (a) *a = o->cur.glow2.a; } -EAPI void -evas_object_text_outline_color_set(Evas_Object *eo_obj, int r, int g, int b, int a) +EOLIAN static void +_evas_text_outline_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - eo_do(eo_obj, evas_obj_text_outline_color_set(r, g, b, a)); -} - -static void -_text_outline_color_set(Eo *eo_obj, void *_pd, va_list *list) -{ - int r = va_arg(*list, int); - int g = va_arg(*list, int); - int b = va_arg(*list, int); - int a = va_arg(*list, int); - Evas_Object_Text *o = _pd; if ((o->cur.outline.r == r) && (o->cur.outline.g == g) && (o->cur.outline.b == b) && (o->cur.outline.a == a)) return; @@ -1719,55 +1306,19 @@ _text_outline_color_set(Eo *eo_obj, void *_pd, va_list *list) evas_object_change(eo_obj, obj); } -EAPI void -evas_object_text_outline_color_get(const Evas_Object *eo_obj, int *r, int *g, int *b, int *a) +EOLIAN static void +_evas_text_outline_color_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *r, int *g, int *b, int *a) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ) - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_obj, evas_obj_text_outline_color_get(r, g, b, a)); -} - -static void -_text_outline_color_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - int *r = va_arg(*list, int *); - int *g = va_arg(*list, int *); - int *b = va_arg(*list, int *); - int *a = va_arg(*list, int *); - const Evas_Object_Text *o = _pd; if (r) *r = o->cur.outline.r; if (g) *g = o->cur.outline.g; if (b) *b = o->cur.outline.b; if (a) *a = o->cur.outline.a; } -EAPI void -evas_object_text_style_pad_get(const Evas_Object *eo_obj, int *l, int *r, int *t, int *b) +EOLIAN static void +_evas_text_style_pad_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, int *l, int *r, int *t, int *b) { - MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); - if (l) *l = 0; - if (r) *r = 0; - if (t) *t = 0; - if (b) *b = 0; - return; - MAGIC_CHECK_END(); - eo_do((Eo *)eo_obj, evas_obj_text_style_pad_get(l, r, t, b)); -} - -static void -_text_style_pad_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) -{ - int *l = va_arg(*list, int *); - int *r = va_arg(*list, int *); - int *t = va_arg(*list, int *); - int *b = va_arg(*list, int *); int sl = 0, sr = 0, st = 0, sb = 0; - const Evas_Object_Text *o = _pd; /* use temps to be certain we have initialized values */ if (!o->cur.filter.chain) evas_text_style_pad_get(o->cur.style, &sl, &sr, &st, &sb); @@ -1779,9 +1330,6 @@ _text_style_pad_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) if (b) *b = sb; } - - - EAPI int evas_string_char_next_get(const char *str, int pos, int *decoded) { @@ -1955,7 +1503,7 @@ evas_object_text_init(Evas_Object *eo_obj) obj->private_data = eo_data_ref(eo_obj, MY_CLASS); obj->type = o_type; - Evas_Object_Text *o = obj->private_data; + Evas_Text_Data *o = obj->private_data; /* alloc obj private data */ o->cur.ellipsis = -1.0; o->prev = o->cur; @@ -1964,8 +1512,8 @@ evas_object_text_init(Evas_Object *eo_obj) #endif } -static void -_destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_text_destructor(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_text_free(eo_obj, obj); @@ -1975,7 +1523,7 @@ _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) static void evas_object_text_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); + Evas_Text_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); /* free filter output */ if (o->cur.filter.output) @@ -2035,7 +1583,7 @@ _filter_cb(Evas_Filter_Context *ctx, void *data, Eina_Bool success) if (!success) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Text *o = (Evas_Object_Text *) obj->private_data; + Evas_Text_Data *o = (Evas_Text_Data *) obj->private_data; ERR("Filter failed at runtime!"); o->cur.filter.invalid = EINA_TRUE; @@ -2059,7 +1607,7 @@ evas_object_text_render(Evas_Object *eo_obj, int x, int y, Eina_Bool do_async) { int i, j; - Evas_Object_Text *o = type_private_data; + Evas_Text_Data *o = type_private_data; Evas_Object_Text_Item *it; const char vals[5][5] = { @@ -2450,15 +1998,15 @@ evas_object_text_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data) { - Evas_Object_Text *o = type_private_data; + Evas_Text_Data *o = type_private_data; int is_v = 0, was_v = 0; /* dont pre-render the obj twice! */ if (obj->pre_render_done) return; obj->pre_render_done = EINA_TRUE; /* pre-render phase. this does anything an object needs to do just before - rendering. This could mean loading the image data, retrieving it from + rendering. This could mean loading the image data, retrieving it from elsewhere, decoding video etc. - Then when this is done the object needs to figure if it changed and + Then when this is done the object needs to figure if it changed and if so what and where and add the appropriate redraw rectangles */ /* if someone is clipping this obj - go calculate the clipper */ if (obj->cur->clipper) @@ -2487,13 +2035,13 @@ evas_object_text_render_pre(Evas_Object *eo_obj, was_v = evas_object_was_visible(eo_obj, obj); if (is_v != was_v) { - evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, + evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v); goto done; } if (obj->changed_map || obj->changed_src_visible) { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); goto done; } @@ -2504,7 +2052,7 @@ evas_object_text_render_pre(Evas_Object *eo_obj, /* if we restacked (layer or just within a layer) and dont clip anyone */ if (obj->restack) { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); goto done; } @@ -2514,7 +2062,7 @@ evas_object_text_render_pre(Evas_Object *eo_obj, (obj->cur->color.b != obj->prev->color.b) || (obj->cur->color.a != obj->prev->color.a)) { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); goto done; } @@ -2526,24 +2074,24 @@ evas_object_text_render_pre(Evas_Object *eo_obj, (obj->cur->geometry.w != obj->prev->geometry.w) || (obj->cur->geometry.h != obj->prev->geometry.h)) { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); goto done; } if (obj->cur->render_op != obj->prev->render_op) { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); goto done; } if (o->changed) { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); goto done; } done: - evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, + evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v); } @@ -2561,18 +2109,18 @@ evas_object_text_render_post(Evas_Object *eo_obj, evas_object_cur_prev(eo_obj); } -static unsigned int +static unsigned int evas_object_text_id_get(Evas_Object *eo_obj) { - Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); + Evas_Text_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_TEXT; } -static unsigned int +static unsigned int evas_object_text_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); + Evas_Text_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_SHAPE; } @@ -2580,7 +2128,7 @@ evas_object_text_visual_id_get(Evas_Object *eo_obj) static void * evas_object_text_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); + Evas_Text_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return NULL; return o->font; } @@ -2590,7 +2138,7 @@ evas_object_text_is_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, void *type_private_data EINA_UNUSED) { - /* this returns 1 if the internal object data implies that the object is + /* this returns 1 if the internal object data implies that the object is currently fully opaque over the entire gradient it occupies */ return 0; } @@ -2610,7 +2158,7 @@ evas_object_text_scale_update(Evas_Object *eo_obj, Evas_Object_Protected_Data *pd EINA_UNUSED, void *type_private_data) { - Evas_Object_Text *o = type_private_data; + Evas_Text_Data *o = type_private_data; int size; const char *font; @@ -2628,7 +2176,7 @@ void _evas_object_text_rehint(Evas_Object *eo_obj) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); + Evas_Text_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); int is, was; if (!o->font) return; @@ -2660,7 +2208,7 @@ static void _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); + Evas_Text_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); @@ -2745,11 +2293,9 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text) /* EXPERIMENTAL CODE BEGIN */ -static void -_filter_program_set(Eo *eo_obj, void *_pd, va_list *list) +EOLIAN static void +_evas_text_filter_program_set(Eo *eo_obj, Evas_Text_Data *o, const char *arg) { - Evas_Object_Text *o = _pd; - const char *arg = va_arg(*list, const char *); Evas_Object_Protected_Data *obj; Evas_Filter_Program *pgm = NULL; @@ -2791,7 +2337,7 @@ _filter_source_hash_free_cb(void *data) { Evas_Filter_Proxy_Binding *pb = data; Evas_Object_Protected_Data *proxy, *source; - Evas_Object_Text *o; + Evas_Text_Data *o; proxy = eo_data_scope_get(pb->eo_proxy, EVAS_OBJ_CLASS); source = eo_data_scope_get(pb->eo_source, EVAS_OBJ_CLASS); @@ -2822,14 +2368,11 @@ _filter_source_hash_free_cb(void *data) free(pb); } -static void -_filter_source_set(Eo *eo_obj, void *_pd, va_list *list) +EOLIAN static void +_evas_text_filter_source_set(Eo *eo_obj, Evas_Text_Data *o, const char *name, Evas_Object *eo_source) { - Evas_Object_Text *o = _pd; Evas_Object_Protected_Data *obj; Evas_Filter_Program *pgm = o->cur.filter.chain; - const char *name = va_arg(*list, const char *); - Evas_Object *eo_source = va_arg(*list, Evas_Object *); Evas_Filter_Proxy_Binding *pb, *pb_old = NULL; Evas_Object_Protected_Data *source = NULL; @@ -2903,99 +2446,4 @@ update: /* EXPERIMENTAL CODE END */ -static void -_class_constructor(Eo_Class *klass) -{ - const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), - EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor), - EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DBG_INFO_GET), _dbg_info_get), - EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SIZE_SET), _size_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_FONT_SOURCE_SET), _text_font_source_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_FONT_SOURCE_GET), _text_font_source_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_FONT_SET), _text_font_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_FONT_GET), _text_font_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_TEXT_SET), _text_text_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_BIDI_DELIMITERS_SET), _text_bidi_delimiters_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_BIDI_DELIMITERS_GET), _text_bidi_delimiters_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_TEXT_GET), _text_text_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_DIRECTION_GET), _text_direction_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_ASCENT_GET), _text_ascent_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_DESCENT_GET), _text_descent_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_MAX_ASCENT_GET), _text_max_ascent_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_MAX_DESCENT_GET), _text_max_descent_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_INSET_GET), _text_inset_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_HORIZ_ADVANCE_GET), _text_horiz_advance_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_VERT_ADVANCE_GET), _text_vert_advance_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_CHAR_POS_GET), _text_char_pos_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_LAST_UP_TO_POS), _text_last_up_to_pos), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_CHAR_COORDS_GET), _text_char_coords_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_STYLE_SET), _text_style_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_STYLE_GET), _text_style_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_SHADOW_COLOR_SET), _text_shadow_color_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_SHADOW_COLOR_GET), _text_shadow_color_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_GLOW_COLOR_SET), _text_glow_color_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_GLOW_COLOR_GET), _text_glow_color_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_GLOW2_COLOR_SET), _text_glow2_color_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_GLOW2_COLOR_GET), _text_glow2_color_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_SET), _text_outline_color_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_GET), _text_outline_color_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_STYLE_PAD_GET), _text_style_pad_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_SET), _text_ellipsis_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_GET), _text_ellipsis_get), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_FILTER_PROGRAM_SET), _filter_program_set), - EO_OP_FUNC(EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_FILTER_SOURCE_SET), _filter_source_set), - EO_OP_FUNC_SENTINEL - }; - eo_class_funcs_set(klass, func_desc); -} -static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_FONT_SOURCE_SET, "Set the font (source) file to be used on a given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_FONT_SOURCE_GET, "Get the font file's path which is being used on a given text"), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_FONT_SET, "Set the font family and size on a given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_FONT_GET, "Retrieve the font family and size in use on a given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_TEXT_SET, "Sets the text string to be displayed by the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_BIDI_DELIMITERS_SET, "Sets the BiDi delimiters used in the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_BIDI_DELIMITERS_GET, "Gets the BiDi delimiters used in the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_TEXT_GET, "Retrieves the text string currently being displayed by the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_DIRECTION_GET, "Retrieves the direction of the text currently being displayed in the text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_ASCENT_GET, "Get the ascent of the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_DESCENT_GET, "Get the descent of the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_MAX_ASCENT_GET, "Get the max ascent of the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_MAX_DESCENT_GET, "Get the max descent of the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_INSET_GET, "Get the inset of the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_HORIZ_ADVANCE_GET, "Get the horizontal advance of the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_VERT_ADVANCE_GET, "Get the vertical advance of the text."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_CHAR_POS_GET, "Retrieve position and dimension information of a character within a text Evas_Object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_LAST_UP_TO_POS, "Retrieves the logical position of the last char in the text up to the pos given."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_CHAR_COORDS_GET, "? evas_object_text_char_coords_get"), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_STYLE_SET, "Sets the style to apply on the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_STYLE_GET, "Retrieves the style on use on the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_SHADOW_COLOR_SET, "Sets the shadow color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_SHADOW_COLOR_GET, "Retrieves the shadow color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_GLOW_COLOR_SET, "Sets the glow color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_GLOW_COLOR_GET, "Retrieves the glow color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_GLOW2_COLOR_SET, "Sets the 'glow 2' color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_GLOW2_COLOR_GET, "Retrieves the 'glow 2' color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_SET, "Sets the outline color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_GET, "Retrieves the outline color for the given text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_STYLE_PAD_GET, "Gets the text style pad of a text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_SET, "Gets the ellipsis of a text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_GET, "Sets the ellipsis of a text object."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_FILTER_PROGRAM_SET, "Text special effects: Set the style program (string)."), - EO_OP_DESCRIPTION(EVAS_OBJ_TEXT_SUB_ID_FILTER_SOURCE_SET, "Text special effects: Bind an Evas_Object to a name for proxy rendering."), - EO_OP_DESCRIPTION_SENTINEL -}; -static const Eo_Class_Description class_desc = { - EO_VERSION, - MY_CLASS_NAME, - EO_CLASS_TYPE_REGULAR, - EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_TEXT_BASE_ID, op_desc, EVAS_OBJ_TEXT_SUB_ID_LAST), - NULL, - sizeof(Evas_Object_Text), - _class_constructor, - NULL -}; - -EO_DEFINE_CLASS(evas_object_text_class_get, &class_desc, EVAS_OBJ_CLASS, NULL); - +#include "canvas/evas_text.eo.c" diff --git a/src/lib/evas/canvas/evas_text.eo b/src/lib/evas/canvas/evas_text.eo new file mode 100644 index 0000000000..1560a6e75d --- /dev/null +++ b/src/lib/evas/canvas/evas_text.eo @@ -0,0 +1,422 @@ +class Evas_Text (Evas_Object) +{ + legacy_prefix: evas_object_text; + properties { + font_source { + set { + /*@ + Set the font (source) file to be used on a given text object. + + This function allows the font file to be explicitly set for a given + text object, overriding system lookup, which will first occur in + the given file's contents. + + @see evas_object_text_font_get() */ + } + get { + /*@ + Get the font file's path which is being used on a given text + object. + + @return The font file's path. + + @see evas_object_text_font_get() for more details */ + } + values { + const char* font_source; /*@ The font file's path. */ + } + } + shadow_color { + set { + /*@ + Sets the shadow color for the given text object. + + Shadow effects, which are fading colors decorating the text + underneath it, will just be shown if the object is set to one of + the following styles: + + - #EVAS_TEXT_STYLE_SHADOW + - #EVAS_TEXT_STYLE_OUTLINE_SHADOW + - #EVAS_TEXT_STYLE_FAR_SHADOW + - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW + - #EVAS_TEXT_STYLE_SOFT_SHADOW + - #EVAS_TEXT_STYLE_FAR_SOFT_SHADOW + + One can also change the direction where the shadow grows to, with + evas_object_text_style_set(). + + @see evas_object_text_shadow_color_get() */ + } + get { + /*@ + Retrieves the shadow color for the given text object. + + @note Use @c NULL pointers on the color components you're not + interested in: they'll be ignored by the function. + + @see evas_object_text_shadow_color_set() for more details. */ + } + values { + int r; /*@ The red component of the given color. */ + int g; /*@ The green component of the given color. */ + int b; /*@ The blue component of the given color. */ + int a; /*@ The alpha component of the given color. */ + } + } + ellipsis { + set { + /*@ + @brief Sets the ellipsis that should be used for the text object. + + This is a value between 0.0 and 1.0 indicating the position of the text + to be shown. 0.0 means the start will be shown and the end trimmed, 1.0 + means the beginning will be trimmed and the end will be shown, and any value + in between will cause ellipsis to be added in both end of the text and the + requested part to be shown. + -1.0 means ellipsis is turned off. + + @since 1.8 */ + } + get { + /*@ + @brief Gets the ellipsis currently set on the text object. + + @return The ellipsis set on the text object. + @see evas_object_text_ellipsis_set. + @since 1.8 */ + } + values { + double ellipsis; /*@ the ellipsis. */ + } + } + bidi_delimiters { + set { + /*@ + @brief Sets the BiDi delimiters used in the textblock. + + BiDi delimiters are use for in-paragraph separation of bidi segments. This + is useful for example in recipients fields of e-mail clients where bidi + oddities can occur when mixing RTL and LTR. + + @since 1.1 */ + } + get { + /*@ + @brief Gets the BiDi delimiters used in the textblock. + + BiDi delimiters are use for in-paragraph separation of bidi segments. This + is useful for example in recipients fields of e-mail clients where bidi + oddities can occur when mixing RTL and LTR. + + @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL. + @since 1.1 */ + } + values { + const char* delim; /*@ A null terminated string of delimiters, e.g ",|". */ + } + } + outline_color { + set { + /*@ + Sets the outline color for the given text object. + + Outline effects (colored lines around text glyphs) will just be + shown if the object is set to one of the following styles: + - #EVAS_TEXT_STYLE_OUTLINE + - #EVAS_TEXT_STYLE_SOFT_OUTLINE + - #EVAS_TEXT_STYLE_OUTLINE_SHADOW + - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW + + @see evas_object_text_outline_color_get() */ + } + get { + /*@ + Retrieves the outline color for the given text object. + + @note Use @c NULL pointers on the color components you're not + interested in: they'll be ignored by the function. + + @see evas_object_text_outline_color_set() for more details. */ + } + values { + int r; /*@ The red component of the given color. */ + int g; /*@ The green component of the given color. */ + int b; /*@ The blue component of the given color. */ + int a; /*@ The alpha component of the given color. */ + } + } + text { + set { + /*@ + Sets the text string to be displayed by the given text object. + + @see evas_object_text_text_get() */ + } + get { + /*@ + Retrieves the text string currently being displayed by the given + text object. + + @return The text string currently being displayed on it. + + @note Do not free() the return value. + + @see evas_object_text_text_set() */ + } + values { + const char* text; /*@ Text string to display on it. */ + } + } + glow2_color { + set { + /*@ + Sets the 'glow 2' color for the given text object. + + 'Glow 2' effects, which are glowing colors decorating the text's + (immediate) surroundings, will just be shown if the object is set + to the #EVAS_TEXT_STYLE_GLOW style. See also + evas_object_text_glow_color_set(). + + @see evas_object_text_glow2_color_get() */ + } + get { + /*@ + Retrieves the 'glow 2' color for the given text object. + + @note Use @c NULL pointers on the color components you're not + interested in: they'll be ignored by the function. + + @see evas_object_text_glow2_color_set() for more details. */ + } + values { + int r; /*@ The red component of the given color. */ + int g; /*@ The green component of the given color. */ + int b; /*@ The blue component of the given color. */ + int a; /*@ The alpha component of the given color. */ + } + } + font { + set { + /*@ + Set the font family or filename, and size on a given text object. + + This function allows the font name and size of a text object to be + set. The @p font string has to follow fontconfig's convention on + naming fonts, as it's the underlying library used to query system + fonts by Evas (see the @c fc-list command's output, on your system, + to get an idea). Alternatively, one can use a full path to a font file. + + @see evas_object_text_font_get() + @see evas_object_text_font_source_set() */ + } + get { + /*@ + Retrieve the font family and size in use on a given text object. + + This function allows the font name and size of a text object to be + queried. Be aware that the font name string is still owned by Evas + and should @b not have free() called on it by the caller of the + function. + + @see evas_object_text_font_set() */ + } + values { + const char* font; /*@ The font family name or filename. */ + Evas_Font_Size size; /*@ The font size, in points. */ + } + } + style { + set { + /*@ + Sets the style to apply on the given text object. + + Text object styles are one of the values in + #Evas_Text_Style_Type. Some of those values are combinations of + more than one style, and some account for the direction of the + rendering of shadow effects. + + @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and + #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value. + + The following figure illustrates the text styles: + + @image html text-styles.png + @image rtf text-styles.png + @image latex text-styles.eps + + @see evas_object_text_style_get() + @see evas_object_text_shadow_color_set() + @see evas_object_text_outline_color_set() + @see evas_object_text_glow_color_set() + @see evas_object_text_glow2_color_set() */ + } + get { + /*@ + Retrieves the style on use on the given text object. + + @return the style type in use. + + @see evas_object_text_style_set() for more details. */ + } + values { + Evas_Text_Style_Type style; /*@ a style type. */ + } + } + glow_color { + set { + /*@ + Sets the glow color for the given text object. + + Glow effects, which are glowing colors decorating the text's + surroundings, will just be shown if the object is set to the + #EVAS_TEXT_STYLE_GLOW style. + + @note Glow effects are placed from a short distance of the text + itself, but no touching it. For glowing effects right on the + borders of the glyphs, see 'glow 2' effects + (evas_object_text_glow2_color_set()). + + @see evas_object_text_glow_color_get() */ + } + get { + /*@ + Retrieves the glow color for the given text object. + + @note Use @c NULL pointers on the color components you're not + interested in: they'll be ignored by the function. + + @see evas_object_text_glow_color_set() for more details. */ + } + values { + int r; /*@ The red component of the given color. */ + int g; /*@ The green component of the given color. */ + int b; /*@ The blue component of the given color. */ + int a; /*@ The alpha component of the given color. */ + } + } + filter_program { + set { + /*@ Set an Evas filter program on this Text Object. If the program fails to compile (syntax error, invalid buffer name, etc...), the standard text effects will be applied instead (SHADOW, etc...). switch back to the standard text effects. */ + } + values { + const char* program; /*@ The program code, as defined by the @ref evasfiltersref */ + } + } + filter_source { + set { + /*@ Bind an object to use as a mask or texture with Evas Filters. This will create automatically a new RGBA buffer containing the source object's pixels (as it is rendered). */ + } + values { + const char* name; /*@ Object name as used in the program code */ + Eo* eobj; /*@ Eo object to use through proxy rendering */ + } + } + max_descent { + get { + return Evas_Coord; + } + } + style_pad { + get { + /*@ + Gets the text style pad of a text object. */ + } + values { + int l; /*@ The left pad (or @c NULL). */ + int r; /*@ The right pad (or @c NULL). */ + int t; /*@ The top pad (or @c NULL). */ + int b; /*@ The bottom pad (or @c NULL). */ + } + } + direction { + get { + /*@ + Retrieves the direction of the text currently being displayed in the + text object. + @return the direction of the text */ + return Evas_BiDi_Direction; + } + } + ascent { + get { + return Evas_Coord; + } + } + horiz_advance { + get { + return Evas_Coord; + } + } + inset { + get { + return Evas_Coord; + } + } + max_ascent { + get { + return Evas_Coord; + } + } + vert_advance { + get { + return Evas_Coord; + } + } + descent { + get { + return Evas_Coord; + } + } + } + methods { + last_up_to_pos { + /*@ Returns the logical position of the last char in the text up to the pos given. this is NOT the position of the last char because of the possibility of RTL in the text. */ + const; + return int; + params { + @in Evas_Coord x; /*@ in */ + @in Evas_Coord y; /*@ in */ + } + } + char_coords_get { + const; + return int; + params { + @in Evas_Coord x; /*@ in */ + @in Evas_Coord y; /*@ in */ + @out Evas_Coord cx; /*@ out */ + @out Evas_Coord cy; /*@ out */ + @out Evas_Coord cw; /*@ out */ + @out Evas_Coord ch; /*@ out */ + } + } + char_pos_get { + /*@ + Retrieve position and dimension information of a character within a text @c Evas_Object. + + This function is used to obtain the X, Y, width and height of the character + located at @p pos within the @c Evas_Object @p obj. @p obj must be a text object + as created with evas_object_text_add(). Any of the @c Evas_Coord parameters (@p cx, + @p cy, @p cw, @p ch) may be @c NULL in which case no value will be assigned to that + parameter. + + @return @c EINA_FALSE on success, @c EINA_TRUE on error. */ + + const; + return Eina_Bool; + params { + @in int pos; /*@ The character position to request co-ordinates for. */ + @out Evas_Coord cx; /*@ A pointer to an @c Evas_Coord to store the X value in (can be NULL). */ + @out Evas_Coord cy; /*@ A pointer to an @c Evas_Coord to store the Y value in (can be NULL). */ + @out Evas_Coord cw; /*@ A pointer to an @c Evas_Coord to store the Width value in (can be NULL). */ + @out Evas_Coord ch; /*@ A pointer to an @c Evas_Coord to store the Height value in (can be NULL). */ + } + } + } + implements { + Eo_Base::constructor; + Eo_Base::destructor; + Eo_Base::dbg_info_get; + Evas_Object::size::set; + } +}