summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas M. Gastal <jgastal@profusion.mobi>2012-09-25 19:46:44 +0000
committerJonas M. Gastal <jgastal@profusion.mobi>2012-09-25 19:46:44 +0000
commitbed4fbee01b09d595baddaab3ac9140287ff7101 (patch)
tree7cd18814fbfc51e8e03943aa61c7900bbaacea31
parentdf12bc32b615a58a5fb4958e74bed1492e9d849c (diff)
edje: Part Text top level group created in documentation.
Author: Lucas Joia <lucasjoia@profusion.mobi> SVN revision: 77058
-rw-r--r--legacy/edje/src/lib/Edje.h180
1 files changed, 100 insertions, 80 deletions
diff --git a/legacy/edje/src/lib/Edje.h b/legacy/edje/src/lib/Edje.h
index bc0c526dab..26b9db2459 100644
--- a/legacy/edje/src/lib/Edje.h
+++ b/legacy/edje/src/lib/Edje.h
@@ -1227,43 +1227,11 @@ EAPI Eina_Bool edje_object_preload (Evas_Object *obj, Eina_Bool c
1227 */ 1227 */
1228 1228
1229/** 1229/**
1230 * @addtogroup Edje_Object_Part 1230 * @addtogroup Edje_Part_Text
1231 * 1231 *
1232 * @{ 1232 * @{
1233 */ 1233 */
1234 1234
1235typedef enum _Edje_Text_Effect
1236{
1237#define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
1238#define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
1239 do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
1240 EDJE_TEXT_EFFECT_NONE = 0,
1241 EDJE_TEXT_EFFECT_PLAIN = 1,
1242 EDJE_TEXT_EFFECT_OUTLINE = 2,
1243 EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3,
1244 EDJE_TEXT_EFFECT_SHADOW = 4,
1245 EDJE_TEXT_EFFECT_SOFT_SHADOW = 5,
1246 EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6,
1247 EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7,
1248 EDJE_TEXT_EFFECT_FAR_SHADOW = 8,
1249 EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9,
1250 EDJE_TEXT_EFFECT_GLOW = 10,
1251
1252 EDJE_TEXT_EFFECT_LAST = 11,
1253
1254#define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
1255#define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
1256 do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
1257 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4),
1258 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4),
1259 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4),
1260 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4),
1261 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4),
1262 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4),
1263 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4),
1264 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4)
1265} Edje_Text_Effect;
1266
1267typedef enum _Edje_Cursor 1235typedef enum _Edje_Cursor
1268{ 1236{
1269 EDJE_CURSOR_MAIN, 1237 EDJE_CURSOR_MAIN,
@@ -1349,7 +1317,6 @@ typedef enum _Edje_Input_Panel_Layout
1349 EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ 1317 EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */
1350} Edje_Input_Panel_Layout; 1318} Edje_Input_Panel_Layout;
1351 1319
1352typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *obj, const char *part);
1353typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *obj, const char *part, Edje_Text_Filter_Type type, char **text); 1320typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *obj, const char *part, Edje_Text_Filter_Type type, char **text);
1354typedef void (*Edje_Markup_Filter_Cb) (void *data, Evas_Object *obj, const char *part, char **text); 1321typedef void (*Edje_Markup_Filter_Cb) (void *data, Evas_Object *obj, const char *part, char **text);
1355typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *obj, const char *part, const char *item); 1322typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *obj, const char *part, const char *item);
@@ -1447,7 +1414,7 @@ EAPI double edje_object_scale_get (const Evas_Object *obj);
1447 */ 1414 */
1448 1415
1449/** 1416/**
1450 * @addtogroup Edje_Object_Part 1417 * @addtogroup Edje_Part_Text
1451 * 1418 *
1452 * @{ 1419 * @{
1453 */ 1420 */
@@ -2696,17 +2663,58 @@ EAPI Eina_Bool edje_object_part_geometry_get (const Evas_Object *obj, c
2696EAPI Eina_List *edje_object_access_part_list_get (const Evas_Object *obj); 2663EAPI Eina_List *edje_object_access_part_list_get (const Evas_Object *obj);
2697 2664
2698/** 2665/**
2699 * @brief Set the function that provides item objects for named items in an edje entry text 2666 * @}
2667 */
2668
2669/**
2670 * @defgroup Edje_Part_Text Edje Text Part
2700 * 2671 *
2701 * @param obj A valid Evas Object handle 2672 * @brief Functions that deal with parts of type text
2702 * @param func The function to call (or NULL to disable) to get item objects
2703 * @param data The data pointer to pass to the @p func callback
2704 * 2673 *
2705 * Item objects may be deleted any time by Edje, and will be deleted when the 2674 * Text is an element type for parts. It's basic functionality is to
2706 * Edje object is deleted (or file is set to a new file). 2675 * display a string on the layout, but a lot more things can be done
2676 * with texts, like string selection, setting the cursor and include
2677 * a input panel, where one can set a virtual keyboard to handle
2678 * keyboard entry easily.
2679 *
2680 * @ingroup Edje_Object_Part
2681 *
2682 * @{
2707 */ 2683 */
2708EAPI void edje_object_item_provider_set (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
2709 2684
2685typedef enum _Edje_Text_Effect
2686{
2687#define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
2688#define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
2689 do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
2690 EDJE_TEXT_EFFECT_NONE = 0,
2691 EDJE_TEXT_EFFECT_PLAIN = 1,
2692 EDJE_TEXT_EFFECT_OUTLINE = 2,
2693 EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3,
2694 EDJE_TEXT_EFFECT_SHADOW = 4,
2695 EDJE_TEXT_EFFECT_SOFT_SHADOW = 5,
2696 EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6,
2697 EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7,
2698 EDJE_TEXT_EFFECT_FAR_SHADOW = 8,
2699 EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9,
2700 EDJE_TEXT_EFFECT_GLOW = 10,
2701
2702 EDJE_TEXT_EFFECT_LAST = 11,
2703
2704#define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
2705#define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
2706 do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
2707 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4),
2708 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4),
2709 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4),
2710 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4),
2711 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4),
2712 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4),
2713 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4),
2714 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4)
2715} Edje_Text_Effect;
2716
2717typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *obj, const char *part);
2710 2718
2711/** 2719/**
2712 * @brief Set the object text callback. 2720 * @brief Set the object text callback.
@@ -2830,40 +2838,6 @@ EAPI Eina_Bool edje_object_part_text_unescaped_set (Evas_Object *obj, const c
2830EAPI char *edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part); 2838EAPI char *edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part);
2831 2839
2832/** 2840/**
2833 * @brief Return the selection text of the object part.
2834 *
2835 * @param obj A valid Evas_Object handle
2836 * @param part The part name
2837 * @return The text string
2838 *
2839 * This function returns selection text of the object part.
2840 *
2841 * @see edje_object_part_text_select_all()
2842 * @see edje_object_part_text_select_none()
2843 */
2844EAPI const char *edje_object_part_text_selection_get (const Evas_Object *obj, const char *part);
2845
2846/**
2847 * @brief Set the selection to be none.
2848 *
2849 * @param obj A valid Evas_Object handle
2850 * @param part The part name
2851 *
2852 * This function sets the selection text to be none.
2853 */
2854EAPI void edje_object_part_text_select_none (const Evas_Object *obj, const char *part);
2855
2856/**
2857 * @brief Set the selection to be everything.
2858 *
2859 * @param obj A valid Evas_Object handle
2860 * @param part The part name
2861 *
2862 * This function selects all text of the object of the part.
2863 */
2864EAPI void edje_object_part_text_select_all (const Evas_Object *obj, const char *part);
2865
2866/**
2867 * @brief Insert text for an object part. 2841 * @brief Insert text for an object part.
2868 * 2842 *
2869 * @param obj A valid Evas Object handle 2843 * @param obj A valid Evas Object handle
@@ -2952,6 +2926,16 @@ EAPI const Eina_List *edje_object_part_text_item_list_get (const Evas_
2952EAPI Eina_Bool edje_object_part_text_item_geometry_get (const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch); 2926EAPI Eina_Bool edje_object_part_text_item_geometry_get (const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
2953 2927
2954/** 2928/**
2929 * @brief Deletes the selection and emits a change event.
2930 *
2931 * @param obj A valid Evas_Object handle
2932 * @param part The part name
2933 * @param text The text string
2934 * @since 1.2.0
2935 */
2936EAPI void edje_object_part_text_user_insert (const Evas_Object *obj, const char *part, const char *text);
2937
2938/**
2955 * @brief Returns the cursor geometry of the part relative to the edje 2939 * @brief Returns the cursor geometry of the part relative to the edje
2956 * object. 2940 * object.
2957 * 2941 *
@@ -2966,14 +2950,50 @@ EAPI Eina_Bool edje_object_part_text_item_geometry_get (const Evas_
2966EAPI void edje_object_part_text_cursor_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); 2950EAPI void edje_object_part_text_cursor_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
2967 2951
2968/** 2952/**
2969 * @brief Deletes the selection and emits a change event. 2953 * @brief Set the function that provides item objects for named items in an edje entry text
2954 *
2955 * @param obj A valid Evas Object handle
2956 * @param func The function to call (or NULL to disable) to get item objects
2957 * @param data The data pointer to pass to the @p func callback
2958 *
2959 * Item objects may be deleted any time by Edje, and will be deleted when the
2960 * Edje object is deleted (or file is set to a new file).
2961 */
2962EAPI void edje_object_item_provider_set (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
2963
2964/**
2965 * @brief Return the selection text of the object part.
2970 * 2966 *
2971 * @param obj A valid Evas_Object handle 2967 * @param obj A valid Evas_Object handle
2972 * @param part The part name 2968 * @param part The part name
2973 * @param text The text string 2969 * @return The text string
2974 * @since 1.2.0 2970 *
2971 * This function returns selection text of the object part.
2972 *
2973 * @see edje_object_part_text_select_all()
2974 * @see edje_object_part_text_select_none()
2975 */ 2975 */
2976EAPI void edje_object_part_text_user_insert (const Evas_Object *obj, const char *part, const char *text); 2976EAPI const char *edje_object_part_text_selection_get (const Evas_Object *obj, const char *part);
2977
2978/**
2979 * @brief Set the selection to be none.
2980 *
2981 * @param obj A valid Evas_Object handle
2982 * @param part The part name
2983 *
2984 * This function sets the selection text to be none.
2985 */
2986EAPI void edje_object_part_text_select_none (const Evas_Object *obj, const char *part);
2987
2988/**
2989 * @brief Set the selection to be everything.
2990 *
2991 * @param obj A valid Evas_Object handle
2992 * @param part The part name
2993 *
2994 * This function selects all text of the object of the part.
2995 */
2996EAPI void edje_object_part_text_select_all (const Evas_Object *obj, const char *part);
2977 2997
2978/** 2998/**
2979 * @brief Enables selection if the entry is an EXPLICIT selection mode 2999 * @brief Enables selection if the entry is an EXPLICIT selection mode