2 * @defgroup Entry Entry
5 * @image html entry_inheritance_tree.png
6 * @image latex entry_inheritance_tree.eps
8 * @image html img/widget/entry/preview-00.png
9 * @image latex img/widget/entry/preview-00.eps width=\textwidth
10 * @image html img/widget/entry/preview-01.png
11 * @image latex img/widget/entry/preview-01.eps width=\textwidth
12 * @image html img/widget/entry/preview-02.png
13 * @image latex img/widget/entry/preview-02.eps width=\textwidth
14 * @image html img/widget/entry/preview-03.png
15 * @image latex img/widget/entry/preview-03.eps width=\textwidth
17 * An entry is a convenience widget which shows a box that the user can
18 * enter text into. Entries by default don't scroll, so they grow to
19 * accommodate the entire text, resizing the parent window as needed. This
20 * can be changed with the elm_entry_scrollable_set() function.
22 * They can also be single line or multi line (the default) and when set
23 * to multi line mode they support text wrapping in any of the modes
24 * indicated by #Elm_Wrap_Type.
26 * Other features include password mode, filtering of inserted text with
27 * elm_entry_markup_filter_append() and related functions, inline "items" and
28 * formatted markup text.
30 * This widget inherits from the @ref Layout one, so that all the
31 * functions acting on it also work for entry objects (@since 1.8).
33 * This widget implements the @b @ref elm-scrollable-interface
34 * interface, so that all (non-deprecated) functions for the base
35 * @ref Scroller widget also work for entries (@since 1.8).
37 * Some calls on the entry's API are marked as @b deprecated, as they
38 * just wrap the scrollable widgets counterpart functions. Use the
39 * ones we point you to, for each case of deprecation here, instead --
40 * eventually the deprecated ones will be discarded (next major
43 * @section entry-markup Formatted text
45 * The markup tags supported by the Entry are defined by the theme, but
46 * even when writing new themes or extensions it's a good idea to stick to
47 * a sane default, to maintain coherency and avoid application breakages.
48 * Currently defined by the default theme are the following tags:
49 * @li \<br\>: Inserts a line break.
50 * @li \<ps\>: Inserts a paragraph separator. This is preferred over line
52 * @li \<tab\>: Inserts a tab.
53 * @li \<em\>...\</em\>: Emphasis. Sets the @em oblique style for the
55 * @li \<b\>...\</b\>: Sets the @b bold style for the enclosed text.
56 * @li \<link\>...\</link\>: Underlines the enclosed text.
57 * @li \<hilight\>...\</hilight\>: Highlights the enclosed text.
59 * @section entry-special Special markups
61 * Besides those used to format text, entries support two special markup
62 * tags used to insert click-able portions of text or items inlined within
65 * @subsection entry-anchors Anchors
67 * Anchors are similar to HTML anchors. Text can be surrounded by \<a\> and
68 * \</a\> tags and an event will be generated when this text is clicked,
72 * This text is outside <a href=anc-01>but this one is an anchor</a>
75 * The @c href attribute in the opening tag gives the name that will be
76 * used to identify the anchor and it can be any valid utf8 string.
78 * When an anchor is clicked, an @c "anchor,clicked" signal is emitted with
79 * an #Elm_Entry_Anchor_Info in the @c event_info parameter for the
80 * callback function. The same applies for "anchor,in" (mouse in), "anchor,out"
81 * (mouse out), "anchor,down" (mouse down), and "anchor,up" (mouse up) events on
84 * @subsection entry-items Items
86 * Inlined in the text, any other @c Evas_Object can be inserted by using
87 * \<item\> tags this way:
90 * <item size=16x16 vsize=full href=emoticon/haha></item>
93 * Just like with anchors, the @c href identifies each item, but these need,
94 * in addition, to indicate their size, which is done using any one of
95 * @c size, @c absize or @c relsize attributes. These attributes take their
96 * value in the WxH format, where W is the width and H the height of the
99 * @li absize: Absolute pixel size for the item. Whatever value is set will
100 * be the item's size regardless of any scale value the object may have
101 * been set to. The final line height will be adjusted to fit larger items.
102 * @li size: Similar to @c absize, but it's adjusted to the scale value set
104 * @li relsize: Size is adjusted for the item to fit within the current
107 * Besides their size, items are specified a @c vsize value that affects
108 * how their final size and position are calculated. The possible values
110 * @li ascent: Item will be placed within the line's baseline and its
111 * ascent. That is, the height between the line where all characters are
112 * positioned and the highest point in the line. For @c size and @c absize
113 * items, the descent value will be added to the total line height to make
114 * them fit. @c relsize items will be adjusted to fit within this space.
115 * @li full: Items will be placed between the descent and ascent, or the
116 * lowest point in the line and its highest.
118 * The next image shows different configurations of items and how
119 * the previously mentioned options affect their sizes. In all cases,
120 * the green line indicates the ascent, blue for the baseline and red for
123 * @image html entry_item.png
124 * @image latex entry_item.eps width=\textwidth
126 * And another one to show how size differs from absize. In the first one,
127 * the scale value is set to 1.0, while the second one is using one of 2.0.
129 * @image html entry_item_scale.png
130 * @image latex entry_item_scale.eps width=\textwidth
132 * After the size for an item is calculated, the entry will request an
133 * object to place in its space. For this, the functions set with
134 * elm_entry_item_provider_append() and related functions will be called
135 * in order until one of them returns a @c non-NULL value. If no providers
136 * are available, or all of them return @c NULL, then the entry falls back
137 * to one of the internal defaults, provided the name matches with one of
140 * All of the following are currently supported:
143 * - emoticon/angry-shout
144 * - emoticon/crazy-laugh
145 * - emoticon/evil-laugh
147 * - emoticon/goggle-smile
149 * - emoticon/grumpy-smile
151 * - emoticon/guilty-smile
153 * - emoticon/half-smile
154 * - emoticon/happy-panting
156 * - emoticon/indifferent
158 * - emoticon/knowing-grin
160 * - emoticon/little-bit-sorry
161 * - emoticon/love-lots
163 * - emoticon/minimal-smile
164 * - emoticon/not-happy
165 * - emoticon/not-impressed
167 * - emoticon/opensmile
170 * - emoticon/squint-laugh
171 * - emoticon/surprised
172 * - emoticon/suspicious
173 * - emoticon/tongue-dangling
174 * - emoticon/tongue-poke
177 * - emoticon/very-sorry
183 * Alternatively, an item may reference an image by its path, using
184 * the URI form @c file:///path/to/an/image.png and the entry will then
185 * use that image for the item.
187 * @section entry-style-set Setting entry's style
189 * There are 2 major ways to change the entry's style:
190 * - Theme - set the "base" field to the desired style.
191 * - User style - Pushing overrides to the theme style to the textblock object by using evas_object_textblock_style_user_push().
193 * You should modify the theme when you would like to change the style for
194 * aesthetic reasons. While the user style should be changed when you would
195 * like to change the style to something specific defined at run-time, e.g,
196 * setting font or font size in a text editor.
198 * @section entry-files Loading and saving files
200 * Entries have convenience functions to load text from a file and save
201 * changes back to it after a short delay. The automatic saving is enabled
202 * by default, but can be disabled with elm_entry_autosave_set() and files
203 * can be loaded directly as plain text or have any markup in them
204 * recognized. See elm_entry_file_set() for more details.
206 * @section entry-signals Emitted signals
208 * This widget emits the following signals, besides the ones sent from
210 * @li "changed": The text within the entry was changed.
211 * @li "changed,user": The text within the entry was changed because of user interaction.
212 * @li "activated": The enter key was pressed on a single line entry.
213 * @li "aborted": The escape key was pressed on a single line entry. (since 1.7)
214 * @li "press": A mouse button has been pressed on the entry.
215 * @li "longpressed": A mouse button has been pressed and held for a couple
217 * @li "clicked": The entry has been clicked (mouse press and release).
218 * @li "clicked,double": The entry has been double clicked.
219 * @li "clicked,triple": The entry has been triple clicked.
220 * @li "focused": The entry has received focus.
221 * @li "unfocused": The entry has lost focus.
222 * @li "selection,paste": A paste of the clipboard contents was requested.
223 * @li "selection,copy": A copy of the selected text into the clipboard was
225 * @li "selection,cut": A cut of the selected text into the clipboard was
227 * @li "selection,start": A selection has begun and no previous selection
229 * @li "selection,changed": The current selection has changed.
230 * @li "selection,cleared": The current selection has been cleared.
231 * @li "cursor,changed": The cursor has changed position.
232 * @li "anchor,clicked": An anchor has been clicked. The event_info
233 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
234 * @li "anchor,in": Mouse cursor has moved into an anchor. The event_info
235 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
236 * @li "anchor,out": Mouse cursor has moved out of an anchor. The event_info
237 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
238 * @li "anchor,up": Mouse button has been unpressed on an anchor. The event_info
239 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
240 * @li "anchor,down": Mouse button has been pressed on an anchor. The event_info
241 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
242 * @li "preedit,changed": The preedit string has changed.
243 * @li "language,changed": Program language changed.
245 * Default content parts of the entry items that you can use for are:
246 * @li "icon" - An icon in the entry
247 * @li "end" - A content in the end of the entry
249 * Default text parts of the entry that you can use for are:
250 * @li "default" - text of the entry
252 * Supported elm_object common APIs.
253 * @li @ref elm_object_signal_emit
254 * @li @ref elm_object_part_text_set
255 * @li @ref elm_object_part_text_get
256 * @li @ref elm_object_part_content_set
257 * @li @ref elm_object_part_content_get
258 * @li @ref elm_object_part_content_unset
259 * @li @ref elm_object_signal_callback_add
260 * @li @ref elm_object_signal_callback_del
261 * @li @ref elm_object_disabled_set
262 * @li @ref elm_object_disabled_get
264 * @section entry-examples
266 * An overview of the Entry API can be seen in @ref entry_example
272 * @typedef Elm_Text_Format
276 * @see elm_entry_file_set()
280 ELM_TEXT_FORMAT_PLAIN_UTF8, /**< Plain UTF8 type */
281 ELM_TEXT_FORMAT_MARKUP_UTF8 /**< Markup UTF8 type */
285 * @typedef Elm_Wrap_Type
287 * Line wrapping types.
289 * @see elm_entry_line_wrap_set()
293 ELM_WRAP_NONE = 0, /**< No wrap - value is zero */
294 ELM_WRAP_CHAR, /**< Char wrap - wrap between characters */
295 ELM_WRAP_WORD, /**< Word wrap - wrap in allowed wrapping points (as defined in the unicode standard) */
296 ELM_WRAP_MIXED, /**< Mixed wrap - Word wrap, and if that fails, char wrap. */
298 } Elm_Wrap_Type; /**< Type of word or character wrapping to use */
301 * @typedef Elm_Input_Panel_Layout
303 * Input panel (virtual keyboard) layout types.
305 * @see elm_entry_input_panel_layout_set()
309 ELM_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
310 ELM_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
311 ELM_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
312 ELM_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
313 ELM_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
314 ELM_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
315 ELM_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
316 ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
317 ELM_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
318 ELM_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout */
319 ELM_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization) */
320 ELM_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. */
321 } Elm_Input_Panel_Layout; /**< Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired. */
324 * @typedef Elm_Input_Panel_Lang
326 * Input panel (virtual keyboard) language modes.
328 * @see elm_entry_input_panel_language_set()
332 ELM_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */
333 ELM_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
334 } Elm_Input_Panel_Lang;
337 * @typedef Elm_Autocapital_Type
339 * Autocapitalization Types.
341 * @see elm_entry_autocapital_type_set()
345 ELM_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
346 ELM_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
347 ELM_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
348 ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
349 } Elm_Autocapital_Type; /**< Choose method of auto-capitalization */
352 * @typedef Elm_Input_Panel_Return_Key_Type
354 * "Return" Key types on the input panel (virtual keyboard).
356 * @see elm_entry_input_panel_return_key_type_set()
360 ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default */
361 ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done */
362 ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go */
363 ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join */
364 ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login */
365 ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next */
366 ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search string or magnifier icon */
367 ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND, /**< Send */
368 ELM_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in @since 1.8 */
369 } Elm_Input_Panel_Return_Key_Type;
372 * @typedef Elm_Entry_Anchor_Info
374 * The info sent in the callback for the "anchor,clicked" signals emitted
377 typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info;
380 * @struct _Elm_Entry_Anchor_Info
382 * The info sent in the callback for the "anchor,clicked" signals emitted
385 struct _Elm_Entry_Anchor_Info
387 const char *name; /**< The name of the anchor, as stated in its href */
388 int button; /**< The mouse button used to click on it */
389 Evas_Coord x, /**< Anchor geometry, relative to canvas */
390 y, /**< Anchor geometry, relative to canvas */
391 w, /**< Anchor geometry, relative to canvas */
392 h; /**< Anchor geometry, relative to canvas */
396 * @typedef Elm_Entry_Anchor_Hover_Info
398 * The info sent in the callback for "anchor,clicked" signals emitted by
399 * the Anchor_Hover widget.
401 typedef struct _Elm_Entry_Anchor_Hover_Info Elm_Entry_Anchor_Hover_Info;
404 * @struct _Elm_Entry_Anchor_Hover_Info
406 * The info sent in the callback for "anchor,clicked" signals emitted by
407 * the Anchor_Hover widget.
409 struct _Elm_Entry_Anchor_Hover_Info
411 const Elm_Entry_Anchor_Info *anchor_info; /**< The actual anchor info. */
412 Evas_Object *hover; /**< The hover object to use for the popup */
415 Evas_Coord x, y, w, h;
416 } hover_parent; /**< Geometry of the object used as parent by the
418 Eina_Bool hover_left : 1; /**< Hint indicating if there's space
419 for content on the left side of
420 the hover. Before calling the
421 callback, the widget will make the
422 necessary calculations to check
423 which sides are fit to be set with
424 content, based on the position the
425 hover is activated and its distance
426 to the edges of its parent object
428 Eina_Bool hover_right : 1; /**< Hint indicating content fits on
429 the right side of the hover.
430 See @ref hover_left */
431 Eina_Bool hover_top : 1; /**< Hint indicating content fits on top
432 of the hover. See @ref hover_left */
433 Eina_Bool hover_bottom : 1; /**< Hint indicating content fits
434 below the hover. See @ref
439 * @typedef Elm_Entry_Item_Provider_Cb
440 * This callback type is used to provide items.
441 * If it returns an object handle other than NULL (it should create an
442 * object to do this), then this object is used to replace the current item.
443 * If not the next provider is called until one provides an item object, or the
444 * default provider in entry does.
445 * @param data The data specified as the last param when adding the provider
446 * @param entry The entry object
447 * @param text A pointer to the item href string in the text
448 * @return The object to be placed in the entry like an icon, or other element
449 * @see elm_entry_item_provider_append
450 * @see elm_entry_item_provider_prepend
451 * @see elm_entry_item_provider_remove
453 typedef Evas_Object * (*Elm_Entry_Item_Provider_Cb)(void *data, Evas_Object * entry, const char *item);
456 * @typedef Elm_Entry_Filter_Cb
457 * This callback type is used by entry filters to modify text.
458 * @param data The data specified as the last param when adding the filter
459 * @param entry The entry object
460 * @param text A pointer to the location of the text being filtered. The type of text is always markup. This data can be modified, but any additional allocations must be managed by the user.
461 * @see elm_entry_markup_filter_append
462 * @see elm_entry_markup_filter_prepend
463 * @see elm_entry_markup_filter_remove
465 typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text);
468 * @typedef Elm_Entry_Change_Info
469 * This corresponds to Edje_Entry_Change_Info. Includes information about
470 * a change in the entry.
472 typedef Edje_Entry_Change_Info Elm_Entry_Change_Info;
475 * This adds an entry to @p parent object.
477 * By default, entries are:
481 * @li autosave is enabled
483 * @param parent The parent object
484 * @return The new object or NULL if it cannot be created
488 EAPI Evas_Object *elm_entry_add(Evas_Object *parent);
491 * Push the style to the top of user style stack.
492 * If there is styles in the user style stack, the properties in the top style
493 * of user style stack will replace the properties in current theme.
494 * The input style is specified in format tag='property=value' (i.e. DEFAULT='font=Sans font_size=60'hilight=' + font_weight=Bold').
496 * @param obj The entry object
497 * @param style The style user to push
501 EAPI void elm_entry_text_style_user_push(Evas_Object *obj, const char *style);
504 * Remove the style in the top of user style stack.
506 * @param obj The entry object
508 * @see elm_entry_text_style_user_push()
512 EAPI void elm_entry_text_style_user_pop(Evas_Object *obj);
515 * Retrieve the style on the top of user style stack.
517 * @param obj The entry object
518 * @return style on the top of user style stack if exist, otherwise NULL.
520 * @see elm_entry_text_style_user_push()
524 EAPI const char* elm_entry_text_style_user_peek(const Evas_Object *obj);
527 * Sets the entry to single line mode.
529 * In single line mode, entries don't ever wrap when the text reaches the
530 * edge, and instead they keep growing horizontally. Pressing the @c Enter
531 * key will generate an @c "activate" event instead of adding a new line.
533 * When @p single_line is @c EINA_FALSE, line wrapping takes effect again
534 * and pressing enter will break the text into a different line
535 * without generating any events.
537 * @param obj The entry object
538 * @param single_line If true, the text in the entry
539 * will be on a single line.
543 EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
546 * Gets whether the entry is set to be single line.
548 * @param obj The entry object
549 * @return single_line If true, the text in the entry is set to display
552 * @see elm_entry_single_line_set()
556 EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj);
559 * Sets the entry to password mode.
561 * In password mode, entries are implicitly single line and the display of
562 * any text in them is replaced with asterisks (*).
564 * @param obj The entry object
565 * @param password If true, password mode is enabled.
569 EAPI void elm_entry_password_set(Evas_Object *obj, Eina_Bool password);
572 * Gets whether the entry is set to password mode.
574 * @param obj The entry object
575 * @return If true, the entry is set to display all characters
578 * @see elm_entry_password_set()
582 EAPI Eina_Bool elm_entry_password_get(const Evas_Object *obj);
585 * This sets the text displayed within the entry to @p entry.
587 * @param obj The entry object
588 * @param entry The text to be displayed
590 * @note Using this function bypasses text filters
594 EAPI void elm_entry_entry_set(Evas_Object *obj, const char *entry);
597 * This returns the text currently shown in object @p entry.
598 * See also elm_entry_entry_set().
600 * @param obj The entry object
601 * @return The currently displayed text or NULL on failure
605 EAPI const char *elm_entry_entry_get(const Evas_Object *obj);
608 * Appends @p entry to the text of the entry.
610 * Adds the text in @p entry to the end of any text already present in the
613 * The appended text is subject to any filters set for the widget.
615 * @param obj The entry object
616 * @param entry The text to be displayed
618 * @see elm_entry_markup_filter_append()
622 EAPI void elm_entry_entry_append(Evas_Object *obj, const char *entry);
625 * Gets whether the entry is empty.
627 * Empty means no text at all. If there are any markup tags, like an item
628 * tag for which no provider finds anything, and no text is displayed, this
629 * function still returns EINA_FALSE.
631 * @param obj The entry object
632 * @return EINA_TRUE if the entry is empty, EINA_FALSE otherwise.
636 EAPI Eina_Bool elm_entry_is_empty(const Evas_Object *obj);
639 * Gets any selected text within the entry.
641 * If there's any selected text in the entry, this function returns it as
642 * a string in markup format. NULL is returned if no selection exists or
643 * if an error occurred.
645 * The returned value points to an internal string and should not be freed
646 * or modified in any way. If the @p entry object is deleted or its
647 * contents are changed, the returned pointer should be considered invalid.
649 * @param obj The entry object
650 * @return The selected text within the entry or NULL on failure
654 EAPI const char *elm_entry_selection_get(const Evas_Object *obj);
657 * Returns the actual textblock object of the entry.
659 * This function exposes the internal textblock object that actually
660 * contains and draws the text. This should be used for low-level
661 * manipulations that are otherwise not possible.
663 * Changing the textblock directly from here will not notify edje/elm to
664 * recalculate the textblock size automatically, so any modifications
665 * done to the textblock returned by this function should be followed by
666 * a call to elm_entry_calc_force().
668 * The return value is marked as const as an additional warning.
669 * One should not use the returned object with any of the generic evas
670 * functions (geometry_get/resize/move and etc), but only with the textblock
671 * functions; The former will either not work at all, or break the correct
674 * IMPORTANT: Many functions may change (i.e delete and create a new one)
675 * the internal textblock object. Do NOT cache the returned object, and try
676 * not to mix calls on this object with regular elm_entry calls (which may
677 * change the internal textblock object). This applies to all cursors
678 * returned from textblock calls, and all the other derivative values.
680 * @param obj The entry object
681 * @return The textblock object.
685 EAPI Evas_Object * elm_entry_textblock_get(Evas_Object *obj);
688 * Forces calculation of the entry size and text layouting.
690 * This should be used after modifying the textblock object directly. See
691 * elm_entry_textblock_get() for more information.
693 * @param obj The entry object
695 * @see elm_entry_textblock_get()
699 EAPI void elm_entry_calc_force(Evas_Object *obj);
702 * Inserts the given text into the entry at the current cursor position.
704 * This inserts text at the cursor position as if it was typed
705 * by the user (note that this also allows markup which a user
706 * can't just "type" as it would be converted to escaped text, so this
707 * call can be used to insert things like emoticon items or bold push/pop
708 * tags, other font and color change tags etc.)
710 * If any selection exists, it will be replaced by the inserted text.
712 * The inserted text is subject to any filters set for the widget.
714 * @param obj The entry object
715 * @param entry The text to insert
717 * @see elm_entry_markup_filter_append()
721 EAPI void elm_entry_entry_insert(Evas_Object *obj, const char *entry);
724 * Set the line wrap type to use on multi-line entries.
726 * Sets the wrap type used by the entry to any of the specified in
727 * Elm_Wrap_Type. This tells how the text will be implicitly cut into a new
728 * line (without inserting a line break or paragraph separator) when it
729 * reaches the far edge of the widget.
731 * Note that this only makes sense for multi-line entries. A widget set
732 * to be single line will never wrap.
734 * @param obj The entry object
735 * @param wrap The wrap mode to use. See Elm_Wrap_Type for details on them
737 EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap);
740 * Gets the wrap mode the entry was set to use.
742 * @param obj The entry object
745 * @see also elm_entry_line_wrap_set()
749 EAPI Elm_Wrap_Type elm_entry_line_wrap_get(const Evas_Object *obj);
752 * Sets if the entry is to be editable or not.
754 * By default, entries are editable and when focused, any text input by the
755 * user will be inserted at the current cursor position. But calling this
756 * function with @p editable as EINA_FALSE will prevent the user from
757 * inputting text into the entry.
759 * The only way to change the text of a non-editable entry is to use
760 * elm_object_text_set(), elm_entry_entry_insert() and other related
763 * @param obj The entry object
764 * @param editable If EINA_TRUE, user input will be inserted in the entry,
765 * if not, the entry is read-only and no user input is allowed.
769 EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable);
772 * Gets whether the entry is editable or not.
774 * @param obj The entry object
775 * @return If true, the entry is editable by the user.
776 * If false, it is not editable by the user
778 * @see elm_entry_editable_set()
782 EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj);
785 * This drops any existing text selection within the entry.
787 * @param obj The entry object
791 EAPI void elm_entry_select_none(Evas_Object *obj);
794 * This selects all text within the entry.
796 * @param obj The entry object
800 EAPI void elm_entry_select_all(Evas_Object *obj);
803 * This moves the cursor one place to the right within the entry.
805 * @param obj The entry object
806 * @return EINA_TRUE upon success, EINA_FALSE upon failure
810 EAPI Eina_Bool elm_entry_cursor_next(Evas_Object *obj);
813 * This moves the cursor one place to the left within the entry.
815 * @param obj The entry object
816 * @return EINA_TRUE upon success, EINA_FALSE upon failure
820 EAPI Eina_Bool elm_entry_cursor_prev(Evas_Object *obj);
823 * This moves the cursor one line up within the entry.
825 * @param obj The entry object
826 * @return EINA_TRUE upon success, EINA_FALSE upon failure
830 EAPI Eina_Bool elm_entry_cursor_up(Evas_Object *obj);
833 * This moves the cursor one line down within the entry.
835 * @param obj The entry object
836 * @return EINA_TRUE upon success, EINA_FALSE upon failure
840 EAPI Eina_Bool elm_entry_cursor_down(Evas_Object *obj);
843 * This moves the cursor to the beginning of the entry.
845 * @param obj The entry object
849 EAPI void elm_entry_cursor_begin_set(Evas_Object *obj);
852 * This moves the cursor to the end of the entry.
854 * @param obj The entry object
858 EAPI void elm_entry_cursor_end_set(Evas_Object *obj);
861 * This moves the cursor to the beginning of the current line.
863 * @param obj The entry object
867 EAPI void elm_entry_cursor_line_begin_set(Evas_Object *obj);
870 * This moves the cursor to the end of the current line.
872 * @param obj The entry object
876 EAPI void elm_entry_cursor_line_end_set(Evas_Object *obj);
879 * This begins a selection within the entry as though
880 * the user were holding down the mouse button to make a selection.
882 * @param obj The entry object
886 EAPI void elm_entry_cursor_selection_begin(Evas_Object *obj);
889 * This ends a selection within the entry as though
890 * the user had just released the mouse button while making a selection.
892 * @param obj The entry object
896 EAPI void elm_entry_cursor_selection_end(Evas_Object *obj);
899 * Gets whether a format node exists at the current cursor position.
901 * A format node is anything that defines how the text is rendered. It can
902 * be a visible format node, such as a line break or a paragraph separator,
903 * or an invisible one, such as bold begin or end tag.
904 * This function returns whether any format node exists at the current
907 * @param obj The entry object
908 * @return EINA_TRUE if the current cursor position contains a format node,
909 * EINA_FALSE otherwise.
911 * @see elm_entry_cursor_is_visible_format_get()
915 EAPI Eina_Bool elm_entry_cursor_is_format_get(const Evas_Object *obj);
918 * Gets if the current cursor position holds a visible format node.
920 * @param obj The entry object
921 * @return EINA_TRUE if the current cursor is a visible format, EINA_FALSE
922 * if it's an invisible one or no format exists.
924 * @see elm_entry_cursor_is_format_get()
928 EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Evas_Object *obj);
931 * Gets the character pointed by the cursor at its current position.
933 * This function returns a string with the utf8 character stored at the
934 * current cursor position.
935 * Only the text is returned, any format that may exist will not be part
936 * of the return value. You must free the string when done with free().
938 * @param obj The entry object
939 * @return The text pointed by the cursors.
943 EAPI char *elm_entry_cursor_content_get(const Evas_Object *obj);
946 * This function returns the geometry of the cursor.
948 * It's useful if you want to draw something on the cursor (or where it is),
949 * or for example in the case of scrolled entry where you want to show the
952 * @param obj The entry object
953 * @param x returned geometry
954 * @param y returned geometry
955 * @param w returned geometry
956 * @param h returned geometry
957 * @return EINA_TRUE upon success, EINA_FALSE upon failure
961 EAPI Eina_Bool elm_entry_cursor_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
964 * Sets the cursor position in the entry to the given value
966 * The value in @p pos is the index of the character position within the
967 * contents of the string as returned by elm_entry_cursor_pos_get().
969 * @param obj The entry object
970 * @param pos The position of the cursor
974 EAPI void elm_entry_cursor_pos_set(Evas_Object *obj, int pos);
977 * Retrieves the current position of the cursor in the entry
979 * @param obj The entry object
980 * @return The cursor position
984 EAPI int elm_entry_cursor_pos_get(const Evas_Object *obj);
987 * This executes a "cut" action on the selected text in the entry.
989 * @param obj The entry object
993 EAPI void elm_entry_selection_cut(Evas_Object *obj);
996 * This executes a "copy" action on the selected text in the entry.
998 * @param obj The entry object
1002 EAPI void elm_entry_selection_copy(Evas_Object *obj);
1005 * This executes a "paste" action in the entry.
1007 * @param obj The entry object
1011 EAPI void elm_entry_selection_paste(Evas_Object *obj);
1014 * This clears and frees the items in a entry's contextual (longpress)
1017 * @param obj The entry object
1019 * @see elm_entry_context_menu_item_add()
1023 EAPI void elm_entry_context_menu_clear(Evas_Object *obj);
1026 * This adds an item to the entry's contextual menu.
1028 * A longpress on an entry will make the contextual menu show up, if this
1029 * hasn't been disabled with elm_entry_context_menu_disabled_set().
1030 * By default, this menu provides a few options like enabling selection mode,
1031 * which is useful on embedded devices that need to be explicit about it,
1032 * and when a selection exists it also shows the copy and cut actions.
1034 * With this function, developers can add other options to this menu to
1035 * perform any action they deem necessary.
1037 * @param obj The entry object
1038 * @param label The item's text label
1039 * @param icon_file The item's icon file
1040 * @param icon_type The item's icon type
1041 * @param func The callback to execute when the item is clicked
1042 * @param data The data to associate with the item for related functions
1046 EAPI void elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data);
1049 * This disables the entry's contextual (longpress) menu.
1051 * @param obj The entry object
1052 * @param disabled If true, the menu is disabled
1056 EAPI void elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled);
1059 * This returns whether the entry's contextual (longpress) menu is
1062 * @param obj The entry object
1063 * @return If true, the menu is disabled
1067 EAPI Eina_Bool elm_entry_context_menu_disabled_get(const Evas_Object *obj);
1070 * This enables selection in entry.
1072 * @param obj The entry object
1073 * @param allow If true, enable selection in entry, otherwise, disable.
1077 EAPI void elm_entry_select_allow_set(Evas_Object *obj, Eina_Bool allow);
1080 * This returns whether selection in entry is allowed or not.
1082 * @param obj The entry object
1083 * @return If true, enable selection in entry, otherwise, disable.
1087 EAPI Eina_Bool elm_entry_select_allow_get(const Evas_Object *obj);
1090 * This disables the entry's cursor handler.
1092 * @param obj The entry object
1093 * @param disabled If true, the cursor handler is disabled
1097 EAPI void elm_entry_cursor_handler_disabled_set(Evas_Object *obj, Eina_Bool disabled);
1100 * This returns whether the entry's cursor handler is disabled.
1102 * @param obj The entry object
1103 * @return If true, the cursor handlers are disabled
1107 EAPI Eina_Bool elm_entry_cursor_handler_disabled_get(const Evas_Object *obj);
1110 * This appends a custom item provider to the list for that entry
1112 * This appends the given callback. The list is walked from beginning to end
1113 * with each function called given the item href string in the text. If the
1114 * function returns an object handle other than NULL (it should create an
1115 * object to do this), then this object is used to replace that item. If
1116 * not the next provider is called until one provides an item object, or the
1117 * default provider in entry does.
1119 * @param obj The entry object
1120 * @param func The function called to provide the item object
1121 * @param data The data passed to @p func
1123 * @see @ref entry-items
1127 EAPI void elm_entry_item_provider_append(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data);
1130 * This prepends a custom item provider to the list for that entry
1132 * This prepends the given callback. See elm_entry_item_provider_append() for
1135 * @param obj The entry object
1136 * @param func The function called to provide the item object
1137 * @param data The data passed to @p func
1141 EAPI void elm_entry_item_provider_prepend(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data);
1144 * This removes a custom item provider to the list for that entry
1146 * This removes the given callback. See elm_entry_item_provider_append() for
1149 * @param obj The entry object
1150 * @param func The function called to provide the item object
1151 * @param data The data passed to @p func
1155 EAPI void elm_entry_item_provider_remove(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data);
1158 * Append a markup filter function for text inserted in the entry
1160 * Append the given callback to the list. This functions will be called
1161 * whenever any text is inserted into the entry, with the text to be inserted
1162 * as a parameter. The type of given text is always markup.
1163 * The callback function is free to alter the text in any way it wants, but
1164 * it must remember to free the given pointer and update it.
1165 * If the new text is to be discarded, the function can free it and set its
1166 * text parameter to NULL. This will also prevent any following filters from
1169 * @param obj The entry object
1170 * @param func The function to use as text filter
1171 * @param data User data to pass to @p func
1175 EAPI void elm_entry_markup_filter_append(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
1178 * Prepend a markup filter function for text inserted in the entry
1180 * Prepend the given callback to the list. See elm_entry_markup_filter_append()
1181 * for more information
1183 * @param obj The entry object
1184 * @param func The function to use as text filter
1185 * @param data User data to pass to @p func
1189 EAPI void elm_entry_markup_filter_prepend(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
1192 * Remove a markup filter from the list
1194 * Removes the given callback from the filter list. See
1195 * elm_entry_markup_filter_append() for more information.
1197 * @param obj The entry object
1198 * @param func The filter function to remove
1199 * @param data The user data passed when adding the function
1203 EAPI void elm_entry_markup_filter_remove(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
1206 * This converts a markup (HTML-like) string into UTF-8.
1208 * The returned string is a malloc'ed buffer and it should be freed when
1209 * not needed anymore.
1211 * @param s The string (in markup) to be converted
1212 * @return The converted string (in UTF-8). It should be freed.
1216 EAPI char *elm_entry_markup_to_utf8(const char *s);
1219 * This converts a UTF-8 string into markup (HTML-like).
1221 * The returned string is a malloc'ed buffer and it should be freed when
1222 * not needed anymore.
1224 * @param s The string (in UTF-8) to be converted
1225 * @return The converted string (in markup). It should be freed.
1229 EAPI char *elm_entry_utf8_to_markup(const char *s);
1232 * This sets the file (and implicitly loads it) for the text to display and
1233 * then edit. All changes are written back to the file after a short delay if
1234 * the entry object is set to autosave (which is the default).
1236 * If the entry had any other file set previously, any changes made to it
1237 * will be saved if the autosave feature is enabled, otherwise, the file
1238 * will be silently discarded and any non-saved changes will be lost.
1240 * @param obj The entry object
1241 * @param file The path to the file to load and save
1242 * @param format The file format
1243 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
1247 EAPI Eina_Bool elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format);
1250 * Gets the file being edited by the entry.
1252 * This function can be used to retrieve any file set on the entry for
1253 * edition, along with the format used to load and save it.
1255 * @param obj The entry object
1256 * @param file The path to the file to load and save
1257 * @param format The file format
1261 EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format);
1264 * This function writes any changes made to the file set with
1265 * elm_entry_file_set()
1267 * @param obj The entry object
1271 EAPI void elm_entry_file_save(Evas_Object *obj);
1274 * This sets the entry object to 'autosave' the loaded text file or not.
1276 * @param obj The entry object
1277 * @param autosave Autosave the loaded file or not
1279 * @see elm_entry_file_set()
1283 EAPI void elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave);
1286 * This gets the entry object's 'autosave' status.
1288 * @param obj The entry object
1289 * @return Autosave the loaded file or not
1291 * @see elm_entry_file_set()
1295 EAPI Eina_Bool elm_entry_autosave_get(const Evas_Object *obj);
1298 * Enable or disable scrolling in entry
1300 * Normally the entry is not scrollable unless you enable it with this call.
1302 * @param obj The entry object
1303 * @param scroll EINA_TRUE if it is to be scrollable, EINA_FALSE otherwise
1307 EAPI void elm_entry_scrollable_set(Evas_Object *obj, Eina_Bool scroll);
1310 * Get the scrollable state of the entry
1312 * Normally the entry is not scrollable. This gets the scrollable state
1313 * of the entry. See elm_entry_scrollable_set() for more information.
1315 * @param obj The entry object
1316 * @return The scrollable state
1320 EAPI Eina_Bool elm_entry_scrollable_get(const Evas_Object *obj);
1323 * Sets the visibility of the left-side widget of the entry,
1324 * set by elm_object_part_content_set().
1326 * @param obj The entry object
1327 * @param setting EINA_TRUE if the object should be displayed,
1328 * EINA_FALSE if not.
1332 EAPI void elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting);
1335 * Sets the visibility of the end widget of the entry, set by
1336 * elm_object_part_content_set(ent, "end", content).
1338 * @param obj The entry object
1339 * @param setting EINA_TRUE if the object should be displayed,
1340 * EINA_FALSE if not.
1344 EAPI void elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting);
1347 * This sets the entry's scrollbar policy (i.e. enabling/disabling
1350 * Setting an entry to single-line mode with elm_entry_single_line_set()
1351 * will automatically disable the display of scrollbars when the entry
1352 * moves inside its scroller.
1354 * @param obj The entry object
1355 * @param h The horizontal scrollbar policy to apply
1356 * @param v The vertical scrollbar policy to apply
1358 * @deprecated Use elm_scroller_policy_set() instead.
1362 EINA_DEPRECATED EAPI void elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v);
1365 * This enables/disables bouncing within the entry.
1367 * This function sets whether the entry will bounce when scrolling reaches
1368 * the end of the contained entry.
1370 * @param obj The entry object
1371 * @param h_bounce The horizontal bounce state
1372 * @param v_bounce The vertical bounce state
1374 * @deprecated Use elm_scroller_bounce_set() instead.
1378 EINA_DEPRECATED EAPI void elm_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
1381 * Get the bounce mode
1383 * @param obj The Entry object
1384 * @param h_bounce Allow bounce horizontally
1385 * @param v_bounce Allow bounce vertically
1387 * @deprecated Use elm_scroller_bounce_get() instead.
1391 EINA_DEPRECATED EAPI void elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
1394 * Set the input panel layout of the entry
1396 * @param obj The entry object
1397 * @param layout layout type
1401 EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
1404 * Get the input panel layout of the entry
1406 * @param obj The entry object
1407 * @return layout type
1409 * @see elm_entry_input_panel_layout_set
1413 EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(const Evas_Object *obj);
1416 * Set the autocapitalization type on the immodule.
1418 * @param obj The entry object
1419 * @param autocapital_type The type of autocapitalization
1423 EAPI void elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type);
1426 * Retrieve the autocapitalization type on the immodule.
1428 * @param obj The entry object
1429 * @return autocapitalization type
1433 EAPI Elm_Autocapital_Type elm_entry_autocapital_type_get(const Evas_Object *obj);
1436 * Sets the attribute to show the input panel automatically.
1438 * @param obj The entry object
1439 * @param enabled If true, the input panel is appeared when entry is clicked or has a focus
1443 EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
1446 * Retrieve the attribute to show the input panel automatically.
1448 * @param obj The entry object
1449 * @return EINA_TRUE if input panel will be appeared when the entry is clicked or has a focus, EINA_FALSE otherwise
1453 EAPI Eina_Bool elm_entry_input_panel_enabled_get(const Evas_Object *obj);
1456 * Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on.
1458 * Note that input panel is shown or hidden automatically according to the focus state of entry widget.
1459 * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE).
1461 * @param obj The entry object
1465 EAPI void elm_entry_input_panel_show(Evas_Object *obj);
1468 * Hide the input panel (virtual keyboard).
1470 * Note that input panel is shown or hidden automatically according to the focus state of entry widget.
1471 * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE)
1473 * @param obj The entry object
1477 EAPI void elm_entry_input_panel_hide(Evas_Object *obj);
1480 * Set the language mode of the input panel.
1482 * This API can be used if you want to show the alphabet keyboard mode.
1484 * @param obj The entry object
1485 * @param lang language to be set to the input panel.
1489 EAPI void elm_entry_input_panel_language_set(Evas_Object *obj, Elm_Input_Panel_Lang lang);
1492 * Get the language mode of the input panel.
1494 * See @ref elm_entry_input_panel_language_set for more details.
1496 * @param obj The entry object
1497 * @return input panel language type
1501 EAPI Elm_Input_Panel_Lang elm_entry_input_panel_language_get(const Evas_Object *obj);
1504 * Set the input panel-specific data to deliver to the input panel.
1506 * This API is used by applications to deliver specific data to the input panel.
1507 * The data format MUST be negotiated by both application and the input panel.
1508 * The size and format of data are defined by the input panel.
1510 * @param obj The entry object
1511 * @param data The specific data to be set to the input panel.
1512 * @param len the length of data, in bytes, to send to the input panel
1516 EAPI void elm_entry_input_panel_imdata_set(Evas_Object *obj, const void *data, int len);
1519 * Get the specific data of the current input panel.
1521 * See @ref elm_entry_input_panel_imdata_set for more details.
1523 * @param obj The entry object
1524 * @param data The specific data to be got from the input panel
1525 * @param len The length of data
1529 EAPI void elm_entry_input_panel_imdata_get(const Evas_Object *obj, void *data, int *len);
1532 * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
1534 * An input panel displays the string or icon associated with this type
1536 * @param obj The entry object
1537 * @param return_key_type The type of "return" key on the input panel
1541 EAPI void elm_entry_input_panel_return_key_type_set(Evas_Object *obj, Elm_Input_Panel_Return_Key_Type return_key_type);
1544 * Get the "return" key type.
1546 * @see elm_entry_input_panel_return_key_type_set() for more details
1548 * @param obj The entry object
1549 * @return The type of "return" key on the input panel
1553 EAPI Elm_Input_Panel_Return_Key_Type elm_entry_input_panel_return_key_type_get(const Evas_Object *obj);
1556 * Set the return key on the input panel to be disabled.
1558 * @param obj The entry object
1559 * @param disabled The state to put in in: @c EINA_TRUE for
1560 * disabled, @c EINA_FALSE for enabled
1564 EAPI void elm_entry_input_panel_return_key_disabled_set(Evas_Object *obj, Eina_Bool disabled);
1567 * Get whether the return key on the input panel should be disabled or not.
1569 * @param obj The entry object
1570 * @return EINA_TRUE if it should be disabled
1574 EAPI Eina_Bool elm_entry_input_panel_return_key_disabled_get(const Evas_Object *obj);
1577 * Set whether the return key on the input panel is disabled automatically when entry has no text.
1579 * If @p enabled is EINA_TRUE, The return key on input panel is disabled when the entry has no text.
1580 * The return key on the input panel is automatically enabled when the entry has text.
1581 * The default value is EINA_FALSE.
1583 * @param obj The entry object
1584 * @param enabled If @p enabled is EINA_TRUE, the return key is automatically disabled when the entry has no text.
1588 EAPI void elm_entry_input_panel_return_key_autoenabled_set(Evas_Object *obj, Eina_Bool enabled);
1591 * Reset the input method context of the entry if needed.
1593 * This can be necessary in the case where modifying the buffer would confuse on-going input method behavior.
1594 * This will typically cause the Input Method Context to clear the preedit state.
1595 * @param obj The entry object
1599 EAPI void elm_entry_imf_context_reset(Evas_Object *obj);
1602 * Set whether the entry should allow to use the text prediction.
1604 * @param obj The entry object
1605 * @param prediction Whether the entry should allow to use the text prediction.
1609 EAPI void elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool prediction);
1612 * Get whether the entry should allow to use the text prediction.
1614 * @param obj The entry object
1615 * @return EINA_TRUE if it allows to use the text prediction, otherwise EINA_FALSE.
1619 EAPI Eina_Bool elm_entry_prediction_allow_get(const Evas_Object *obj);
1621 /* pre-made filters for entries */
1624 * @typedef Elm_Entry_Filter_Limit_Size
1626 * Data for the elm_entry_filter_limit_size() entry filter.
1628 typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size;
1631 * @struct _Elm_Entry_Filter_Limit_Size
1633 * Data for the elm_entry_filter_limit_size() entry filter.
1635 struct _Elm_Entry_Filter_Limit_Size
1637 int max_char_count; /**< The maximum number of characters allowed. */
1638 int max_byte_count; /**< The maximum number of bytes allowed*/
1642 * Filter inserted text based on user defined character and byte limits
1644 * Add this filter to an entry to limit the characters that it will accept
1645 * based the contents of the provided #Elm_Entry_Filter_Limit_Size.
1646 * The function works on the UTF-8 representation of the string, converting
1647 * it from the set markup, thus not accounting for any format in it.
1649 * The user must create an #Elm_Entry_Filter_Limit_Size structure and pass
1650 * it as data when setting the filter. In it, it's possible to set limits
1651 * by character count or bytes (any of them is disabled if 0), and both can
1652 * be set at the same time. In that case, it first checks for characters,
1653 * then bytes. The #Elm_Entry_Filter_Limit_Size structure must be alive and
1654 * valid for as long as the entry is alive AND the elm_entry_filter_limit_size
1657 * The function will cut the inserted text in order to allow only the first
1658 * number of characters that are still allowed. The cut is made in
1659 * characters, even when limiting by bytes, in order to always contain
1660 * valid ones and avoid half unicode characters making it in.
1662 * This filter, like any others, does not apply when setting the entry text
1663 * directly with elm_object_text_set().
1667 EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text);
1670 * @typedef Elm_Entry_Filter_Accept_Set
1672 * Data for the elm_entry_filter_accept_set() entry filter.
1674 typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set;
1677 * @struct _Elm_Entry_Filter_Accept_Set
1679 * Data for the elm_entry_filter_accept_set() entry filter.
1681 struct _Elm_Entry_Filter_Accept_Set
1683 const char *accepted; /**< Set of characters accepted in the entry. */
1684 const char *rejected; /**< Set of characters rejected from the entry. */
1688 * Filter inserted text based on accepted or rejected sets of characters
1690 * Add this filter to an entry to restrict the set of accepted characters
1691 * based on the sets in the provided #Elm_Entry_Filter_Accept_Set.
1692 * This structure contains both accepted and rejected sets, but they are
1693 * mutually exclusive. This structure must be available for as long as
1694 * the entry is alive AND the elm_entry_filter_accept_set is being used.
1696 * The @c accepted set takes preference, so if it is set, the filter will
1697 * only work based on the accepted characters, ignoring anything in the
1698 * @c rejected value. If @c accepted is @c NULL, then @c rejected is used.
1700 * In both cases, the function filters by matching utf8 characters to the
1701 * raw markup text, so it can be used to remove formatting tags.
1703 * This filter, like any others, does not apply when setting the entry text
1704 * directly with elm_object_text_set()
1708 EAPI void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text);
1711 * Returns the input method context of the entry.
1713 * This function exposes the internal input method context.
1715 * IMPORTANT: Many functions may change (i.e delete and create a new one)
1716 * the internal input method context. Do NOT cache the returned object.
1718 * @param obj The entry object
1719 * @return The input method context (Ecore_IMF_Context *) in entry.
1723 EAPI void *elm_entry_imf_context_get(Evas_Object *obj);
1726 * @typedef Elm_Cnp_Mode
1727 * Enum of entry's copy & paste policy.
1729 * @see elm_entry_cnp_mode_set()
1730 * @see elm_entry_cnp_mode_get()
1733 ELM_CNP_MODE_MARKUP, /**< copy & paste text with markup tag */
1734 ELM_CNP_MODE_NO_IMAGE, /**< copy & paste text without item(image) tag */
1735 ELM_CNP_MODE_PLAINTEXT /**< copy & paste text without markup tag */
1739 * Control pasting of text and images for the widget.
1741 * Normally the entry allows both text and images to be pasted.
1742 * By setting cnp_mode to be #ELM_CNP_MODE_NO_IMAGE, this prevents images from being copy or past.
1743 * By setting cnp_mode to be #ELM_CNP_MODE_PLAINTEXT, this remove all tags in text .
1745 * @note this only changes the behaviour of text.
1747 * @param obj The entry object
1748 * @param cnp_mode One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP, #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT.
1752 EAPI void elm_entry_cnp_mode_set(Evas_Object *obj, Elm_Cnp_Mode cnp_mode);
1755 * Getting elm_entry text paste/drop mode.
1757 * Normally the entry allows both text and images to be pasted.
1758 * This gets the copy & paste mode of the entry.
1760 * @param obj The entry object
1761 * @return mode One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP, #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT.
1765 EAPI Elm_Cnp_Mode elm_entry_cnp_mode_get(const Evas_Object *obj);
1768 * Set the parent of the hover popup
1770 * Sets the parent object to use by the hover created by the entry
1771 * when an anchor is clicked. See @ref Hover for more details on this.
1773 * @param obj The entry object
1774 * @param parent The object to use as parent for the hover
1778 EAPI void elm_entry_anchor_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
1781 * Get the parent of the hover popup
1783 * Get the object used as parent for the hover created by the entry
1784 * widget. See @ref Hover for more details on this.
1785 * If no parent is set, the same entry object will be used.
1787 * @param obj The entry object
1788 * @return The object used as parent for the hover, NULL if none is set.
1792 EAPI Evas_Object *elm_entry_anchor_hover_parent_get(const Evas_Object *obj);
1795 * Set the style that the hover should use
1797 * When creating the popup hover, entry will request that it's
1798 * themed according to @p style.
1800 * Setting style no @c NULL means disabling automatic hover.
1802 * @param obj The entry object
1803 * @param style The style to use for the underlying hover
1805 * @see elm_object_style_set()
1809 EAPI void elm_entry_anchor_hover_style_set(Evas_Object *obj, const char *style);
1812 * Get the style that the hover should use
1814 * Get the style, the hover created by entry will use.
1816 * @param obj The entry object
1817 * @return The style to use by the hover. @c NULL means the default is used.
1819 * @see elm_object_style_set()
1823 EAPI const char *elm_entry_anchor_hover_style_get(const Evas_Object *obj);
1826 * Ends the hover popup in the entry
1828 * When an anchor is clicked, the entry widget will create a hover
1829 * object to use as a popup with user provided content. This function
1830 * terminates this popup, returning the entry to its normal state.
1832 * @param obj The entry object
1836 EAPI void elm_entry_anchor_hover_end(Evas_Object *obj);
1839 ///////////////////// TIZEN ONLY APIs
1841 * This disables the entry's magnifer feature.
1843 * @param obj The entry object
1844 * @param disabled If true, the magnifier is not displayed
1847 EAPI void elm_entry_magnifier_disabled_set(Evas_Object *obj, Eina_Bool disabled);
1849 * This returns whether the entry's magnifier feature is disabled.
1851 * @param obj The entry object
1852 * @return If true, the feature is disabled
1854 EAPI Eina_Bool elm_entry_magnifier_disabled_get(const Evas_Object *obj);
1857 * NEED DOCUMENTATION
1859 EAPI void elm_entry_magnifier_type_set(Evas_Object *obj, int type);
1860 ///////////////////////////////////////////