summaryrefslogtreecommitdiff
path: root/src/lib/evas/Evas.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-12-12 14:05:29 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-12-12 14:05:29 +0000
commita16f6e2330c04b77aacc372bc7a13e064bc379eb (patch)
treedbfe2996de2657b7adb11d36c71c6ae9b30b05cc /src/lib/evas/Evas.h
parent0e913e9415fa334127fd74623be9259080962599 (diff)
evas: add ellipsis support in evas.
Patch done with help from Tom Hacohen. SVN revision: 80763
Diffstat (limited to 'src/lib/evas/Evas.h')
-rw-r--r--src/lib/evas/Evas.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/lib/evas/Evas.h b/src/lib/evas/Evas.h
index 8c30a1d..03b698a 100644
--- a/src/lib/evas/Evas.h
+++ b/src/lib/evas/Evas.h
@@ -9583,6 +9583,8 @@ enum
9583 EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_SET, 9583 EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_SET,
9584 EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_GET, 9584 EVAS_OBJ_TEXT_SUB_ID_OUTLINE_COLOR_GET,
9585 EVAS_OBJ_TEXT_SUB_ID_STYLE_PAD_GET, 9585 EVAS_OBJ_TEXT_SUB_ID_STYLE_PAD_GET,
9586 EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_SET,
9587 EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_GET,
9586 EVAS_OBJ_TEXT_SUB_ID_LAST 9588 EVAS_OBJ_TEXT_SUB_ID_LAST
9587}; 9589};
9588 9590
@@ -9978,6 +9980,36 @@ enum
9978 */ 9980 */
9979#define evas_obj_text_style_pad_get(l, r, t, b) EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_STYLE_PAD_GET), EO_TYPECHECK(int *, l), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, t), EO_TYPECHECK(int *, b) 9981#define evas_obj_text_style_pad_get(l, r, t, b) EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_STYLE_PAD_GET), EO_TYPECHECK(int *, l), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, t), EO_TYPECHECK(int *, b)
9980 9982
9983
9984/**
9985 * @def evas_obj_text_ellipsis_set
9986 * @since 1.8
9987 *
9988 * Sets the ellipsis to apply on the given text object.
9989 * 0.0 -> means apply ellipsis on the right end of the text,
9990 * 1.0 -> means apply ellipsis on the start left of the text.
9991 *
9992 * @param[in] ellipsis in
9993 *
9994 * @see evas_object_text_ellipsis_get
9995 */
9996#define evas_obj_text_ellipsis_set(ellipsis) EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_SET), EO_TYPECHECK(double, ellipsis)
9997
9998/**
9999 * @def evas_obj_text_ellipsis_get
10000 * @since 1.8
10001 *
10002 * Sets the ellipsis to apply on the given text object.
10003 * 0.0 -> means apply ellipsis on the right end of the text,
10004 * 1.0 -> means apply ellipsis on the start left of the text.
10005 * value below 0, means no ellipsis.
10006 *
10007 * @param[out] ellipsis out
10008 *
10009 * @see evas_object_text_ellipsis_set
10010 */
10011#define evas_obj_text_ellipsis_get(ellipsis) EVAS_OBJ_TEXT_ID(EVAS_OBJ_TEXT_SUB_ID_ELLIPSIS_GET), EO_TYPECHECK(double *, ellipsis)
10012
9981/** 10013/**
9982 * Creates a new text object on the provided canvas. 10014 * Creates a new text object on the provided canvas.
9983 * 10015 *
@@ -10102,6 +10134,32 @@ EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj,
10102 */ 10134 */
10103EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj); 10135EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj);
10104 10136
10137/**
10138 * @brief Sets the ellipsis that should be used for the text object.
10139 *
10140 * This is a value between 0.0 and 1.0 indicating the position of the text
10141 * to be shown. 0.0 means the start will be shown and the end trimmed, 1.0
10142 * means the beginning will be trimmed and the end will be shown, and any value
10143 * in between will cause ellipsis to be added in both end of the text and the
10144 * requested part to be shown.
10145 * -1.0 means ellipsis is turned off.
10146 *
10147 * @param obj The given text object.
10148 * @param ellipsis the ellipsis.
10149 * @since 1.8
10150 */
10151EAPI void evas_object_text_ellipsis_set(Evas_Object *obj, double ellipsis);
10152
10153/**
10154 * @brief Gets the ellipsis currently set on the text object.
10155 *
10156 * @param obj The given text object.
10157 * @return The ellipsis set on the text object.
10158 * @see evas_object_text_ellipsis_set.
10159 * @since 1.8
10160 */
10161EAPI double evas_object_text_ellipsis_get(const Evas_Object *obj);
10162
10105EAPI Evas_Coord evas_object_text_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 10163EAPI Evas_Coord evas_object_text_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
10106EAPI Evas_Coord evas_object_text_descent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 10164EAPI Evas_Coord evas_object_text_descent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
10107EAPI Evas_Coord evas_object_text_max_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 10165EAPI Evas_Coord evas_object_text_max_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);