summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas M. Gastal <jgastal@profusion.mobi>2012-09-25 19:50:03 +0000
committerJonas M. Gastal <jgastal@profusion.mobi>2012-09-25 19:50:03 +0000
commit6a6009203ea5a4d97df3c3b75131e6678d98d929 (patch)
tree0c07138b479d253863a82cd0c63dee32f13e433b
parent67da2e5199aa6abe3c2533612337e09b14ceb6a1 (diff)
edje: Text Entry Group created in documentation.
Author: Lucas Joia <lucasjoia@profusion.mobi> SVN revision: 77061
-rw-r--r--legacy/edje/src/lib/Edje.h313
1 files changed, 153 insertions, 160 deletions
diff --git a/legacy/edje/src/lib/Edje.h b/legacy/edje/src/lib/Edje.h
index dcd6ffe03d..713a70fa33 100644
--- a/legacy/edje/src/lib/Edje.h
+++ b/legacy/edje/src/lib/Edje.h
@@ -1227,93 +1227,6 @@ EAPI Eina_Bool edje_object_preload (Evas_Object *obj, Eina_Bool c
1227 */ 1227 */
1228 1228
1229/** 1229/**
1230 * @addtogroup Edje_Part_Text
1231 *
1232 * @{
1233 */
1234
1235struct _Edje_Entry_Change_Info
1236{
1237 union {
1238 struct {
1239 const char *content;
1240 size_t pos;
1241 size_t plain_length; /* Number of cursor positions represented
1242 in content. */
1243 } insert;
1244 struct {
1245 const char *content;
1246 size_t start, end;
1247 } del;
1248 } change;
1249 Eina_Bool insert : 1; /**< True if the "change" union's "insert" is valid */
1250 Eina_Bool merge : 1; /**< True if can be merged with the previous one. Used for example with insertion when something is already selected. */
1251};
1252
1253/**
1254 * @since 1.1.0
1255 */
1256typedef struct _Edje_Entry_Change_Info Edje_Entry_Change_Info;
1257
1258typedef enum _Edje_Text_Filter_Type
1259{
1260 EDJE_TEXT_FILTER_TEXT = 0,
1261 EDJE_TEXT_FILTER_FORMAT = 1,
1262 EDJE_TEXT_FILTER_MARKUP = 2
1263} Edje_Text_Filter_Type;
1264
1265typedef enum _Edje_Text_Autocapital_Type
1266{
1267 EDJE_TEXT_AUTOCAPITAL_TYPE_NONE,
1268 EDJE_TEXT_AUTOCAPITAL_TYPE_WORD,
1269 EDJE_TEXT_AUTOCAPITAL_TYPE_SENTENCE,
1270 EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER
1271} Edje_Text_Autocapital_Type;
1272
1273typedef enum _Edje_Input_Panel_Lang
1274{
1275 EDJE_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic @since 1.2 */
1276 EDJE_INPUT_PANEL_LANG_ALPHABET /**< Alphabet @since 1.2 */
1277} Edje_Input_Panel_Lang;
1278
1279typedef enum _Edje_Input_Panel_Return_Key_Type
1280{
1281 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */
1282 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done @since 1.2 */
1283 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go @since 1.2 */
1284 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join @since 1.2 */
1285 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login @since 1.2 */
1286 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next @since 1.2 */
1287 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon @since 1.2 */
1288 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND, /**< Send @since 1.2 */
1289 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in @since 1.8 */
1290} Edje_Input_Panel_Return_Key_Type;
1291
1292typedef enum _Edje_Input_Panel_Layout
1293{
1294 EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
1295 EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
1296 EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
1297 EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
1298 EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
1299 EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
1300 EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
1301 EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
1302 EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
1303 EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */
1304 EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization) @since 1.2 */
1305 EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */
1306} Edje_Input_Panel_Layout;
1307
1308typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *obj, const char *part, Edje_Text_Filter_Type type, char **text);
1309typedef void (*Edje_Markup_Filter_Cb) (void *data, Evas_Object *obj, const char *part, char **text);
1310typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *obj, const char *part, const char *item);
1311
1312/**
1313 * @}
1314 */
1315
1316/**
1317 * @defgroup Edje_Object_Scale Edje Scale 1230 * @defgroup Edje_Object_Scale Edje Scale
1318 * 1231 *
1319 * @brief Functions that deal with scaling objects 1232 * @brief Functions that deal with scaling objects
@@ -1402,65 +1315,6 @@ EAPI double edje_object_scale_get (const Evas_Object *obj);
1402 */ 1315 */
1403 1316
1404/** 1317/**
1405 * @addtogroup Edje_Part_Text
1406 *
1407 * @{
1408 */
1409
1410/**
1411 * @brief Show last character in password mode.
1412 *
1413 * @param password_show_last If TRUE enable last character show in password mode.
1414 *
1415 * This function enables last input to be visible when in password mode for few seconds
1416 * or until the next input is entered.
1417 *
1418 * The time out value is obtained by edje_password_show_last_timeout_set function.
1419 *
1420 * @see edje_password_show_last_timeout_set().
1421 */
1422EAPI void edje_password_show_last_set(Eina_Bool password_show_last);
1423
1424/**
1425 * @brief Set's the timeout value in last show password mode.
1426 *
1427 * @param password_show_last_timeout The timeout value.
1428 *
1429 * This functions sets the time out value for which the last input entered in password
1430 * mode will be visible.
1431 *
1432 * This value can be used only when last show mode is set in password mode.
1433 *
1434 * @see edje_password_show_last_set().
1435 *
1436 */
1437EAPI void edje_password_show_last_timeout_set(double password_show_last_timeout);
1438
1439/**
1440 * @brief Set the RTL orientation for this object.
1441 *
1442 * @param obj A handle to an Edje object.
1443 * @param rtl new value of flag EINA_TRUE/EINA_FALSE
1444 * @since 1.1.0
1445 */
1446EAPI void edje_object_mirrored_set (Evas_Object *obj, Eina_Bool rtl);
1447
1448/**
1449 * @brief Get the RTL orientation for this object.
1450 *
1451 * You can RTL orientation explicitly with edje_object_mirrored_set.
1452 *
1453 * @param obj A handle to an Edje object.
1454 * @return @c EINA_TRUE if the flag is set or @c EINA_FALSE if not.
1455 * @since 1.1.0
1456 */
1457EAPI Eina_Bool edje_object_mirrored_get (const Evas_Object *obj);
1458
1459/**
1460 * @}
1461 */
1462
1463/**
1464 * @defgroup Edje_Object_Color_Class Edje Class: Color 1318 * @defgroup Edje_Object_Color_Class Edje Class: Color
1465 * 1319 *
1466 * @brief Functions that deal with Color Classes 1320 * @brief Functions that deal with Color Classes
@@ -2924,18 +2778,6 @@ EAPI Eina_Bool edje_object_part_text_item_geometry_get (const Evas_
2924EAPI void edje_object_part_text_user_insert (const Evas_Object *obj, const char *part, const char *text); 2778EAPI void edje_object_part_text_user_insert (const Evas_Object *obj, const char *part, const char *text);
2925 2779
2926/** 2780/**
2927 * @brief Set the function that provides item objects for named items in an edje entry text
2928 *
2929 * @param obj A valid Evas Object handle
2930 * @param func The function to call (or NULL to disable) to get item objects
2931 * @param data The data pointer to pass to the @p func callback
2932 *
2933 * Item objects may be deleted any time by Edje, and will be deleted when the
2934 * Edje object is deleted (or file is set to a new file).
2935 */
2936EAPI void edje_object_item_provider_set (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
2937
2938/**
2939 * @} 2781 * @}
2940 */ 2782 */
2941 2783
@@ -3236,13 +3078,164 @@ EAPI void edje_object_part_text_cursor_geometry_get (const Evas_
3236/** 3078/**
3237 * @} 3079 * @}
3238 */ 3080 */
3239 3081;;
3240/** 3082/**
3241 * @addtogroup Edje_Part_Text 3083 * @defgroup Edje_Text_Entry Edje Text Entry
3084 *
3085 * @brief Functions that deal with text entries
3086 *
3087 * In Edje it's possible to use a text part as a entry so the user is
3088 * able to make inputs of text. To do so, the text part must be set
3089 * with a input panel taht will work as a virtual keyboard.
3090 *
3091 * Some of effects can be applied to the entered text and also plenty
3092 * actions can be performed after any input.
3093 *
3094 * Use the functions of this section to handle the user input of text.
3095 *
3096 * @ingroup Edje_Part_Text
3242 * 3097 *
3243 * @{ 3098 * @{
3244 */ 3099 */
3245 3100
3101struct _Edje_Entry_Change_Info
3102{
3103 union {
3104 struct {
3105 const char *content;
3106 size_t pos;
3107 size_t plain_length; /* Number of cursor positions represented
3108 in content. */
3109 } insert;
3110 struct {
3111 const char *content;
3112 size_t start, end;
3113 } del;
3114 } change;
3115 Eina_Bool insert : 1; /**< True if the "change" union's "insert" is valid */
3116 Eina_Bool merge : 1; /**< True if can be merged with the previous one. Used for example with insertion when something is already selected. */
3117};
3118
3119/**
3120 * @since 1.1.0
3121 */
3122typedef struct _Edje_Entry_Change_Info Edje_Entry_Change_Info;
3123
3124typedef enum _Edje_Text_Filter_Type
3125{
3126 EDJE_TEXT_FILTER_TEXT = 0,
3127 EDJE_TEXT_FILTER_FORMAT = 1,
3128 EDJE_TEXT_FILTER_MARKUP = 2
3129} Edje_Text_Filter_Type;
3130
3131typedef enum _Edje_Text_Autocapital_Type
3132{
3133 EDJE_TEXT_AUTOCAPITAL_TYPE_NONE,
3134 EDJE_TEXT_AUTOCAPITAL_TYPE_WORD,
3135 EDJE_TEXT_AUTOCAPITAL_TYPE_SENTENCE,
3136 EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER
3137} Edje_Text_Autocapital_Type;
3138
3139typedef enum _Edje_Input_Panel_Lang
3140{
3141 EDJE_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic @since 1.2 */
3142 EDJE_INPUT_PANEL_LANG_ALPHABET /**< Alphabet @since 1.2 */
3143} Edje_Input_Panel_Lang;
3144
3145typedef enum _Edje_Input_Panel_Return_Key_Type
3146{
3147 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */
3148 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done @since 1.2 */
3149 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go @since 1.2 */
3150 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join @since 1.2 */
3151 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login @since 1.2 */
3152 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next @since 1.2 */
3153 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon @since 1.2 */
3154 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND, /**< Send @since 1.2 */
3155 EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in @since 1.8 */
3156} Edje_Input_Panel_Return_Key_Type;
3157
3158typedef enum _Edje_Input_Panel_Layout
3159{
3160 EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
3161 EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
3162 EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
3163 EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
3164 EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
3165 EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
3166 EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
3167 EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
3168 EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
3169 EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */
3170 EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization) @since 1.2 */
3171 EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */
3172} Edje_Input_Panel_Layout;
3173
3174typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *obj, const char *part, Edje_Text_Filter_Type type, char **text);
3175typedef void (*Edje_Markup_Filter_Cb) (void *data, Evas_Object *obj, const char *part, char **text);
3176typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *obj, const char *part, const char *item);
3177
3178/**
3179 * @brief Show last character in password mode.
3180 *
3181 * @param password_show_last If TRUE enable last character show in password mode.
3182 *
3183 * This function enables last input to be visible when in password mode for few seconds
3184 * or until the next input is entered.
3185 *
3186 * The time out value is obtained by edje_password_show_last_timeout_set function.
3187 *
3188 * @see edje_password_show_last_timeout_set().
3189 */
3190EAPI void edje_password_show_last_set(Eina_Bool password_show_last);
3191
3192/**
3193 * @brief Set's the timeout value in last show password mode.
3194 *
3195 * @param password_show_last_timeout The timeout value.
3196 *
3197 * This functions sets the time out value for which the last input entered in password
3198 * mode will be visible.
3199 *
3200 * This value can be used only when last show mode is set in password mode.
3201 *
3202 * @see edje_password_show_last_set().
3203 *
3204 */
3205EAPI void edje_password_show_last_timeout_set(double password_show_last_timeout);
3206
3207/**
3208 * @brief Set the RTL orientation for this object.
3209 *
3210 * @param obj A handle to an Edje object.
3211 * @param rtl new value of flag EINA_TRUE/EINA_FALSE
3212 * @since 1.1.0
3213 */
3214EAPI void edje_object_mirrored_set (Evas_Object *obj, Eina_Bool rtl);
3215
3216/**
3217 * @brief Get the RTL orientation for this object.
3218 *
3219 * You can RTL orientation explicitly with edje_object_mirrored_set.
3220 *
3221 * @param obj A handle to an Edje object.
3222 * @return @c EINA_TRUE if the flag is set or @c EINA_FALSE if not.
3223 * @since 1.1.0
3224 */
3225EAPI Eina_Bool edje_object_mirrored_get (const Evas_Object *obj);
3226
3227/**
3228 * @brief Set the function that provides item objects for named items in an edje entry text
3229 *
3230 * @param obj A valid Evas Object handle
3231 * @param func The function to call (or NULL to disable) to get item objects
3232 * @param data The data pointer to pass to the @p func callback
3233 *
3234 * Item objects may be deleted any time by Edje, and will be deleted when the
3235 * Edje object is deleted (or file is set to a new file).
3236 */
3237EAPI void edje_object_item_provider_set (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
3238
3246/** 3239/**
3247 * @brief Reset the input method context if needed. 3240 * @brief Reset the input method context if needed.
3248 * 3241 *