forked from enlightenment/efl
Evas text: Added API to query text object's text direction.
SVN revision: 56534
This commit is contained in:
parent
0cdb64e00e
commit
e82371fd03
|
@ -1338,6 +1338,7 @@ typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o);
|
||||||
EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
|
EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
|
||||||
EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
|
EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
|
||||||
EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
|
EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
|
||||||
|
EAPI Evas_BiDi_Direction evas_object_text_direction_get (const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup Evas_Object_Textblock Textblock Object Functions
|
* @defgroup Evas_Object_Textblock Textblock Object Functions
|
||||||
|
|
|
@ -738,6 +738,31 @@ evas_object_text_text_get(const Evas_Object *obj)
|
||||||
return o->cur.utf8_text;
|
return o->cur.utf8_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the direction of the text currently being displayed in the
|
||||||
|
* text object.
|
||||||
|
* @param obj The given evas text object.
|
||||||
|
* @return the direction of the text
|
||||||
|
*/
|
||||||
|
EAPI Evas_BiDi_Direction
|
||||||
|
evas_object_text_direction_get(const Evas_Object *obj)
|
||||||
|
{
|
||||||
|
Evas_Object_Text *o;
|
||||||
|
|
||||||
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return EVAS_BIDI_DIRECTION_NATURAL;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
o = (Evas_Object_Text *)(obj->object_data);
|
||||||
|
MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
|
||||||
|
return EVAS_BIDI_DIRECTION_NATURAL;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
if (o->items)
|
||||||
|
{
|
||||||
|
return o->items->text_props.bidi.dir;
|
||||||
|
}
|
||||||
|
return EVAS_BIDI_DIRECTION_NATURAL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To be documented.
|
* To be documented.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue