jackdanielz pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c13bbe3c89999430429ecd99f2ac3f5d794a42f6
commit c13bbe3c89999430429ecd99f2ac3f5d794a42f6 Author: Yossi Kantor <[email protected]> Date: Tue Apr 1 10:10:29 2014 +0300 Eolian: Legacy Integration of Evas Text --- src/lib/evas/Evas_Legacy.h | 394 +-------------------------------------------- 1 file changed, 1 insertion(+), 393 deletions(-) diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index 09cc5b2..d09ee08 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -5198,401 +5198,9 @@ EAPI void evas_object_image_animated_frame_set(Evas_Obj */ EAPI Evas_Object *evas_object_text_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; -/** - * Set the font (source) file to be used on a given text object. - * - * @param obj The text object to set font for. - * @param font The font file's path. - * - * 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() - */ -EAPI void evas_object_text_font_source_set(Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1); - -/** - * Get the font file's path which is being used on a given text - * object. - * - * @param obj The text object to set font for. - * @return The font file's path. - * - * @see evas_object_text_font_get() for more details - */ -EAPI const char *evas_object_text_font_source_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the font family or filename, and size on a given text object. - * - * @param obj The text object to set font for. - * @param font The font family name or filename. - * @param size The font size, in points. - * - * 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() - */ -EAPI void evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1); - -/** - * Retrieve the font family and size in use on a given text object. - * - * @param obj The evas text object to query for font information. - * @param font A pointer to the location to store the font name in. - * @param size A pointer to the location to store the font size in. - * - * 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() - */ -EAPI void evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1); - -/** - * Sets the text string to be displayed by the given text object. - * - * @param obj The text object to set text string on. - * @param text Text string to display on it. - * - * @see evas_object_text_text_get() - */ -EAPI void evas_object_text_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); - -/** - * Retrieves the text string currently being displayed by the given - * text object. - * - * @param obj 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() - */ -EAPI const char *evas_object_text_text_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @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. - * - * @param obj The given text object. - * @param delim A null terminated string of delimiters, e.g ",|". - * @since 1.1 - */ -EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim); - -/** - * @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. - * - * @param obj The given text object. - * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL. - * @since 1.1 - */ -EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj); - -/** - * @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. - * - * @param obj The given text object. - * @param ellipsis the ellipsis. - * @since 1.8 - */ -EAPI void evas_object_text_ellipsis_set(Evas_Object *obj, double ellipsis); - -/** - * @brief Gets the ellipsis currently set on the text object. - * - * @param obj The given text object. - * @return The ellipsis set on the text object. - * @see evas_object_text_ellipsis_set. - * @since 1.8 - */ -EAPI double evas_object_text_ellipsis_get(const Evas_Object *obj); - -EAPI Evas_Coord evas_object_text_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Evas_Coord evas_object_text_descent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Evas_Coord evas_object_text_max_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Evas_Coord evas_object_text_max_descent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Evas_Coord evas_object_text_vert_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Evas_Coord evas_object_text_inset_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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. - * - * @param obj The text object to retrieve position information for. - * @param pos The character position to request co-ordinates for. - * @param cx A pointer to an @c Evas_Coord to store the X value in (can be NULL). - * @param cy A pointer to an @c Evas_Coord to store the Y value in (can be NULL). - * @param cw A pointer to an @c Evas_Coord to store the Width value in (can be NULL). - * @param ch A pointer to an @c Evas_Coord to store the Height value in (can be NULL). - * - * @return @c EINA_FALSE on success, @c EINA_TRUE on error. - */ -EAPI Eina_Bool evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); -EAPI int evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); - -/** - * 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. - */ -EAPI int evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); - -/** - * Retrieves the style on use on the given text object. - * - * @param obj the given text object to set style on. - * @return the style type in use. - * - * @see evas_object_text_style_set() for more details. - */ -EAPI Evas_Text_Style_Type evas_object_text_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Sets the style to apply on the given text object. - * - * @param obj the given text object to set style on. - * @param type a style type. - * - * 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() - */ -EAPI void evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1); - -/** - * Sets the shadow color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * 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() - */ -EAPI void evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); +#include "canvas/evas_text.eo.legacy.h" /** - * Retrieves the shadow color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @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. - */ -EAPI void evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); - -/** - * Sets the glow color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * 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() - */ -EAPI void evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - -/** - * Retrieves the glow color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @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. - */ -EAPI void evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); - -/** - * Sets the 'glow 2' color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * '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() - */ -EAPI void evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - -/** - * Retrieves the 'glow 2' color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @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. - */ -EAPI void evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); - -/** - * Sets the outline color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * 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() - */ -EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - -/** - * Retrieves the outline color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @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. - */ -EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); - -/** - * Gets the text style pad of a text object. - * - * @param obj The given text object. - * @param l The left pad (or @c NULL). - * @param r The right pad (or @c NULL). - * @param t The top pad (or @c NULL). - * @param b The bottom pad (or @c NULL). - * - */ -EAPI void evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); - -/** - * 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) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -/** * @} */ --
