2 * @defgroup Entry Entry
5 * @image html img/widget/entry/preview-00.png
6 * @image latex img/widget/entry/preview-00.eps width=\textwidth
7 * @image html img/widget/entry/preview-01.png
8 * @image latex img/widget/entry/preview-01.eps width=\textwidth
9 * @image html img/widget/entry/preview-02.png
10 * @image latex img/widget/entry/preview-02.eps width=\textwidth
11 * @image html img/widget/entry/preview-03.png
12 * @image latex img/widget/entry/preview-03.eps width=\textwidth
14 * An entry is a convenience widget which shows a box that the user can
15 * enter text into. Entries by default don't scroll, so they grow to
16 * accommodate the entire text, resizing the parent window as needed. This
17 * can be changed with the elm_entry_scrollable_set() function.
19 * They can also be single line or multi line (the default) and when set
20 * to multi line mode they support text wrapping in any of the modes
21 * indicated by #Elm_Wrap_Type.
23 * Other features include password mode, filtering of inserted text with
24 * elm_entry_markup_filter_append() and related functions, inline "items" and
25 * formatted markup text.
27 * @section entry-markup Formatted text
29 * The markup tags supported by the Entry are defined by the theme, but
30 * even when writing new themes or extensions it's a good idea to stick to
31 * a sane default, to maintain coherency and avoid application breakages.
32 * Currently defined by the default theme are the following tags:
33 * @li \<br\>: Inserts a line break.
34 * @li \<ps\>: Inserts a paragraph separator. This is preferred over line
36 * @li \<tab\>: Inserts a tab.
37 * @li \<em\>...\</em\>: Emphasis. Sets the @em oblique style for the
39 * @li \<b\>...\</b\>: Sets the @b bold style for the enclosed text.
40 * @li \<link\>...\</link\>: Underlines the enclosed text.
41 * @li \<hilight\>...\</hilight\>: Highlights the enclosed text.
43 * @section entry-special Special markups
45 * Besides those used to format text, entries support two special markup
46 * tags used to insert click-able portions of text or items inlined within
49 * @subsection entry-anchors Anchors
51 * Anchors are similar to HTML anchors. Text can be surrounded by \<a\> and
52 * \</a\> tags and an event will be generated when this text is clicked,
56 * This text is outside <a href=anc-01>but this one is an anchor</a>
59 * The @c href attribute in the opening tag gives the name that will be
60 * used to identify the anchor and it can be any valid utf8 string.
62 * When an anchor is clicked, an @c "anchor,clicked" signal is emitted with
63 * an #Elm_Entry_Anchor_Info in the @c event_info parameter for the
64 * callback function. The same applies for "anchor,in" (mouse in), "anchor,out"
65 * (mouse out), "anchor,down" (mouse down), and "anchor,up" (mouse up) events on
68 * @subsection entry-items Items
70 * Inlined in the text, any other @c Evas_Object can be inserted by using
71 * \<item\> tags this way:
74 * <item size=16x16 vsize=full href=emoticon/haha></item>
77 * Just like with anchors, the @c href identifies each item, but these need,
78 * in addition, to indicate their size, which is done using any one of
79 * @c size, @c absize or @c relsize attributes. These attributes take their
80 * value in the WxH format, where W is the width and H the height of the
83 * @li absize: Absolute pixel size for the item. Whatever value is set will
84 * be the item's size regardless of any scale value the object may have
85 * been set to. The final line height will be adjusted to fit larger items.
86 * @li size: Similar to @c absize, but it's adjusted to the scale value set
88 * @li relsize: Size is adjusted for the item to fit within the current
91 * Besides their size, items are specified a @c vsize value that affects
92 * how their final size and position are calculated. The possible values
94 * @li ascent: Item will be placed within the line's baseline and its
95 * ascent. That is, the height between the line where all characters are
96 * positioned and the highest point in the line. For @c size and @c absize
97 * items, the descent value will be added to the total line height to make
98 * them fit. @c relsize items will be adjusted to fit within this space.
99 * @li full: Items will be placed between the descent and ascent, or the
100 * lowest point in the line and its highest.
102 * The next image shows different configurations of items and how
103 * the previously mentioned options affect their sizes. In all cases,
104 * the green line indicates the ascent, blue for the baseline and red for
107 * @image html entry_item.png
108 * @image latex entry_item.eps width=\textwidth
110 * And another one to show how size differs from absize. In the first one,
111 * the scale value is set to 1.0, while the second one is using one of 2.0.
113 * @image html entry_item_scale.png
114 * @image latex entry_item_scale.eps width=\textwidth
116 * After the size for an item is calculated, the entry will request an
117 * object to place in its space. For this, the functions set with
118 * elm_entry_item_provider_append() and related functions will be called
119 * in order until one of them returns a @c non-NULL value. If no providers
120 * are available, or all of them return @c NULL, then the entry falls back
121 * to one of the internal defaults, provided the name matches with one of
124 * All of the following are currently supported:
127 * - emoticon/angry-shout
128 * - emoticon/crazy-laugh
129 * - emoticon/evil-laugh
131 * - emoticon/goggle-smile
133 * - emoticon/grumpy-smile
135 * - emoticon/guilty-smile
137 * - emoticon/half-smile
138 * - emoticon/happy-panting
140 * - emoticon/indifferent
142 * - emoticon/knowing-grin
144 * - emoticon/little-bit-sorry
145 * - emoticon/love-lots
147 * - emoticon/minimal-smile
148 * - emoticon/not-happy
149 * - emoticon/not-impressed
151 * - emoticon/opensmile
154 * - emoticon/squint-laugh
155 * - emoticon/surprised
156 * - emoticon/suspicious
157 * - emoticon/tongue-dangling
158 * - emoticon/tongue-poke
161 * - emoticon/very-sorry
167 * Alternatively, an item may reference an image by its path, using
168 * the URI form @c file:///path/to/an/image.png and the entry will then
169 * use that image for the item.
171 * @section entry-files Loading and saving files
173 * Entries have convenience functions to load text from a file and save
174 * changes back to it after a short delay. The automatic saving is enabled
175 * by default, but can be disabled with elm_entry_autosave_set() and files
176 * can be loaded directly as plain text or have any markup in them
177 * recognized. See elm_entry_file_set() for more details.
179 * @section entry-signals Emitted signals
181 * This widget emits the following signals:
183 * @li "changed": The text within the entry was changed.
184 * @li "changed,user": The text within the entry was changed because of user interaction.
185 * @li "activated": The enter key was pressed on a single line entry.
186 * @li "press": A mouse button has been pressed on the entry.
187 * @li "longpressed": A mouse button has been pressed and held for a couple
189 * @li "clicked": The entry has been clicked (mouse press and release).
190 * @li "clicked,double": The entry has been double clicked.
191 * @li "clicked,triple": The entry has been triple clicked.
192 * @li "focused": The entry has received focus.
193 * @li "unfocused": The entry has lost focus.
194 * @li "selection,paste": A paste of the clipboard contents was requested.
195 * @li "selection,copy": A copy of the selected text into the clipboard was
197 * @li "selection,cut": A cut of the selected text into the clipboard was
199 * @li "selection,start": A selection has begun and no previous selection
201 * @li "selection,changed": The current selection has changed.
202 * @li "selection,cleared": The current selection has been cleared.
203 * @li "cursor,changed": The cursor has changed position.
204 * @li "anchor,clicked": An anchor has been clicked. The event_info
205 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
206 * @li "anchor,in": Mouse cursor has moved into an anchor. The event_info
207 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
208 * @li "anchor,out": Mouse cursor has moved out of an anchor. The event_info
209 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
210 * @li "anchor,up": Mouse button has been unpressed on an anchor. The event_info
211 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
212 * @li "anchor,down": Mouse button has been pressed on an anchor. The event_info
213 * parameter for the callback will be an #Elm_Entry_Anchor_Info.
214 * @li "preedit,changed": The preedit string has changed.
215 * @li "language,changed": Program language changed.
217 * Default content parts of the entry items that you can use for are:
218 * @li "icon" - An icon in the entry
219 * @li "end" - A content in the end of the entry
221 * Default text parts of the entry that you can use for are:
222 * @li "default" - text of the entry
224 * Supported elm_object common APIs.
225 * @li elm_object_signal_emit
226 * @li elm_object_part_text_set
227 * @li elm_object_part_text_get
228 * @li elm_object_part_content_set
229 * @li elm_object_part_content_get
230 * @li elm_object_part_content_unset
231 * @li elm_object_signal_callback_add
232 * @li elm_object_signal_callback_del
233 * @li elm_object_disabled_set
234 * @li elm_object_disabled_get
236 * @section entry-examples
238 * An overview of the Entry API can be seen in @ref entry_example
244 * @typedef Elm_Text_Format
248 * @see elm_entry_file_set()
252 ELM_TEXT_FORMAT_PLAIN_UTF8, /**< Plain UTF8 type */
253 ELM_TEXT_FORMAT_MARKUP_UTF8 /**< Markup UTF8 type */
257 * @typedef Elm_Wrap_Type
259 * Line wrapping types.
261 * @see elm_entry_line_wrap_set()
265 ELM_WRAP_NONE = 0, /**< No wrap - value is zero */
266 ELM_WRAP_CHAR, /**< Char wrap - wrap between characters */
267 ELM_WRAP_WORD, /**< Word wrap - wrap in allowed wrapping points (as defined in the unicode standard) */
268 ELM_WRAP_MIXED, /**< Mixed wrap - Word wrap, and if that fails, char wrap. */
270 } Elm_Wrap_Type; /**< Type of word or character wrapping to use */
273 * @typedef Elm_Input_Panel_Layout
275 * Input panel (virtual keyboard) layout types.
277 * @see elm_entry_input_panel_layout_set()
281 ELM_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
282 ELM_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
283 ELM_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
284 ELM_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
285 ELM_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
286 ELM_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
287 ELM_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
288 ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
289 ELM_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
290 ELM_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout */
291 ELM_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout */
292 ELM_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. */
293 } Elm_Input_Panel_Layout; /**< Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired. */
296 * @typedef Elm_Input_Panel_Lang
298 * Input panel (virtual keyboard) language modes.
300 * @see elm_entry_input_panel_language_set()
304 ELM_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */
305 ELM_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
306 } Elm_Input_Panel_Lang;
309 * @typedef Elm_Autocapital_Type
311 * Autocapitalization Types.
313 * @see elm_entry_autocapital_type_set()
317 ELM_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
318 ELM_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
319 ELM_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
320 ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
321 } Elm_Autocapital_Type; /**< Choose method of auto-capitalization */
324 * @typedef Elm_Input_Panel_Return_Key_Type
326 * "Return" Key types on the input panel (virtual keyboard).
328 * @see elm_entry_input_panel_return_key_type_set()
332 ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default */
333 ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done */
334 ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go */
335 ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join */
336 ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login */
337 ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next */
338 ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search string or magnifier icon */
339 ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND /**< Send */
340 } Elm_Input_Panel_Return_Key_Type;
343 * @typedef Elm_Entry_Anchor_Info
345 * The info sent in the callback for the "anchor,clicked" signals emitted
348 typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info;
351 * @struct _Elm_Entry_Anchor_Info
353 * The info sent in the callback for the "anchor,clicked" signals emitted
356 struct _Elm_Entry_Anchor_Info
358 const char *name; /**< The name of the anchor, as stated in its href */
359 int button; /**< The mouse button used to click on it */
360 Evas_Coord x, /**< Anchor geometry, relative to canvas */
361 y, /**< Anchor geometry, relative to canvas */
362 w, /**< Anchor geometry, relative to canvas */
363 h; /**< Anchor geometry, relative to canvas */
367 * @typedef Elm_Entry_Anchor_Hover_Info
369 * The info sent in the callback for "anchor,clicked" signals emitted by
370 * the Anchor_Hover widget.
372 typedef struct _Elm_Entry_Anchor_Hover_Info Elm_Entry_Anchor_Hover_Info;
375 * @struct _Elm_Entry_Anchor_Hover_Info
377 * The info sent in the callback for "anchor,clicked" signals emitted by
378 * the Anchor_Hover widget.
380 struct _Elm_Entry_Anchor_Hover_Info
382 const Elm_Entry_Anchor_Info *anchor_info; /**< The actual anchor info. */
383 Evas_Object *hover; /**< The hover object to use for the popup */
386 Evas_Coord x, y, w, h;
387 } hover_parent; /**< Geometry of the object used as parent by the
389 Eina_Bool hover_left : 1; /**< Hint indicating if there's space
390 for content on the left side of
391 the hover. Before calling the
392 callback, the widget will make the
393 necessary calculations to check
394 which sides are fit to be set with
395 content, based on the position the
396 hover is activated and its distance
397 to the edges of its parent object
399 Eina_Bool hover_right : 1; /**< Hint indicating content fits on
400 the right side of the hover.
401 See @ref hover_left */
402 Eina_Bool hover_top : 1; /**< Hint indicating content fits on top
403 of the hover. See @ref hover_left */
404 Eina_Bool hover_bottom : 1; /**< Hint indicating content fits
405 below the hover. See @ref
410 * @typedef Elm_Entry_Item_Provider_Cb
411 * This callback type is used to provide items.
412 * If it returns an object handle other than NULL (it should create an
413 * object to do this), then this object is used to replace the current item.
414 * If not the next provider is called until one provides an item object, or the
415 * default provider in entry does.
416 * @param data The data specified as the last param when adding the provider
417 * @param entry The entry object
418 * @param text A pointer to the item href string in the text
419 * @return The object to be placed in the entry like an icon, or other element
420 * @see elm_entry_item_provider_append
421 * @see elm_entry_item_provider_prepend
422 * @see elm_entry_item_provider_remove
424 typedef Evas_Object * (*Elm_Entry_Item_Provider_Cb)(void *data, Evas_Object * entry, const char *item);
427 * @typedef Elm_Entry_Filter_Cb
428 * This callback type is used by entry filters to modify text.
429 * @param data The data specified as the last param when adding the filter
430 * @param entry The entry object
431 * @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.
432 * @see elm_entry_markup_filter_append
433 * @see elm_entry_markup_filter_prepend
434 * @see elm_entry_markup_filter_remove
436 typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text);
439 * @typedef Elm_Entry_Change_Info
440 * This corresponds to Edje_Entry_Change_Info. Includes information about
441 * a change in the entry.
443 typedef Edje_Entry_Change_Info Elm_Entry_Change_Info;
446 * This adds an entry to @p parent object.
448 * By default, entries are:
452 * @li autosave is enabled
454 * @param parent The parent object
455 * @return The new object or NULL if it cannot be created
459 EAPI Evas_Object *elm_entry_add(Evas_Object *parent);
462 * Sets the entry to single line mode.
464 * In single line mode, entries don't ever wrap when the text reaches the
465 * edge, and instead they keep growing horizontally. Pressing the @c Enter
466 * key will generate an @c "activate" event instead of adding a new line.
468 * When @p single_line is @c EINA_FALSE, line wrapping takes effect again
469 * and pressing enter will break the text into a different line
470 * without generating any events.
472 * @param obj The entry object
473 * @param single_line If true, the text in the entry
474 * will be on a single line.
478 EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
481 * Gets whether the entry is set to be single line.
483 * @param obj The entry object
484 * @return single_line If true, the text in the entry is set to display
487 * @see elm_entry_single_line_set()
491 EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj);
494 * Sets the entry to password mode.
496 * In password mode, entries are implicitly single line and the display of
497 * any text in them is replaced with asterisks (*).
499 * @param obj The entry object
500 * @param password If true, password mode is enabled.
504 EAPI void elm_entry_password_set(Evas_Object *obj, Eina_Bool password);
507 * Gets whether the entry is set to password mode.
509 * @param obj The entry object
510 * @return If true, the entry is set to display all characters
513 * @see elm_entry_password_set()
517 EAPI Eina_Bool elm_entry_password_get(const Evas_Object *obj);
520 * This sets the text displayed within the entry to @p entry.
522 * @param obj The entry object
523 * @param entry The text to be displayed
525 * @note Using this function bypasses text filters
529 EAPI void elm_entry_entry_set(Evas_Object *obj, const char *entry);
532 * This returns the text currently shown in object @p entry.
533 * See also elm_entry_entry_set().
535 * @param obj The entry object
536 * @return The currently displayed text or NULL on failure
540 EAPI const char *elm_entry_entry_get(const Evas_Object *obj);
543 * Appends @p entry to the text of the entry.
545 * Adds the text in @p entry to the end of any text already present in the
548 * The appended text is subject to any filters set for the widget.
550 * @param obj The entry object
551 * @param entry The text to be displayed
553 * @see elm_entry_markup_filter_append()
557 EAPI void elm_entry_entry_append(Evas_Object *obj, const char *entry);
560 * Gets whether the entry is empty.
562 * Empty means no text at all. If there are any markup tags, like an item
563 * tag for which no provider finds anything, and no text is displayed, this
564 * function still returns EINA_FALSE.
566 * @param obj The entry object
567 * @return EINA_TRUE if the entry is empty, EINA_FALSE otherwise.
571 EAPI Eina_Bool elm_entry_is_empty(const Evas_Object *obj);
574 * Gets any selected text within the entry.
576 * If there's any selected text in the entry, this function returns it as
577 * a string in markup format. NULL is returned if no selection exists or
578 * if an error occurred.
580 * The returned value points to an internal string and should not be freed
581 * or modified in any way. If the @p entry object is deleted or its
582 * contents are changed, the returned pointer should be considered invalid.
584 * @param obj The entry object
585 * @return The selected text within the entry or NULL on failure
589 EAPI const char *elm_entry_selection_get(const Evas_Object *obj);
592 * Returns the actual textblock object of the entry.
594 * This function exposes the internal textblock object that actually
595 * contains and draws the text. This should be used for low-level
596 * manipulations that are otherwise not possible.
598 * Changing the textblock directly from here will not notify edje/elm to
599 * recalculate the textblock size automatically, so any modifications
600 * done to the textblock returned by this function should be followed by
601 * a call to elm_entry_calc_force().
603 * The return value is marked as const as an additional warning.
604 * One should not use the returned object with any of the generic evas
605 * functions (geometry_get/resize/move and etc), but only with the textblock
606 * functions; The former will either not work at all, or break the correct
609 * IMPORTANT: Many functions may change (i.e delete and create a new one)
610 * the internal textblock object. Do NOT cache the returned object, and try
611 * not to mix calls on this object with regular elm_entry calls (which may
612 * change the internal textblock object). This applies to all cursors
613 * returned from textblock calls, and all the other derivative values.
615 * @param obj The entry object
616 * @return The textblock object.
620 EAPI Evas_Object * elm_entry_textblock_get(Evas_Object *obj);
623 * Forces calculation of the entry size and text layouting.
625 * This should be used after modifying the textblock object directly. See
626 * elm_entry_textblock_get() for more information.
628 * @param obj The entry object
630 * @see elm_entry_textblock_get()
634 EAPI void elm_entry_calc_force(Evas_Object *obj);
637 * Inserts the given text into the entry at the current cursor position.
639 * This inserts text at the cursor position as if it was typed
640 * by the user (note that this also allows markup which a user
641 * can't just "type" as it would be converted to escaped text, so this
642 * call can be used to insert things like emoticon items or bold push/pop
643 * tags, other font and color change tags etc.)
645 * If any selection exists, it will be replaced by the inserted text.
647 * The inserted text is subject to any filters set for the widget.
649 * @param obj The entry object
650 * @param entry The text to insert
652 * @see elm_entry_markup_filter_append()
656 EAPI void elm_entry_entry_insert(Evas_Object *obj, const char *entry);
659 * Set the line wrap type to use on multi-line entries.
661 * Sets the wrap type used by the entry to any of the specified in
662 * Elm_Wrap_Type. This tells how the text will be implicitly cut into a new
663 * line (without inserting a line break or paragraph separator) when it
664 * reaches the far edge of the widget.
666 * Note that this only makes sense for multi-line entries. A widget set
667 * to be single line will never wrap.
669 * @param obj The entry object
670 * @param wrap The wrap mode to use. See Elm_Wrap_Type for details on them
672 EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap);
675 * Gets the wrap mode the entry was set to use.
677 * @param obj The entry object
680 * @see also elm_entry_line_wrap_set()
684 EAPI Elm_Wrap_Type elm_entry_line_wrap_get(const Evas_Object *obj);
687 * Sets if the entry is to be editable or not.
689 * By default, entries are editable and when focused, any text input by the
690 * user will be inserted at the current cursor position. But calling this
691 * function with @p editable as EINA_FALSE will prevent the user from
692 * inputting text into the entry.
694 * The only way to change the text of a non-editable entry is to use
695 * elm_object_text_set(), elm_entry_entry_insert() and other related
698 * @param obj The entry object
699 * @param editable If EINA_TRUE, user input will be inserted in the entry,
700 * if not, the entry is read-only and no user input is allowed.
704 EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable);
707 * Gets whether the entry is editable or not.
709 * @param obj The entry object
710 * @return If true, the entry is editable by the user.
711 * If false, it is not editable by the user
713 * @see elm_entry_editable_set()
717 EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj);
720 * This drops any existing text selection within the entry.
722 * @param obj The entry object
726 EAPI void elm_entry_select_none(Evas_Object *obj);
729 * This selects all text within the entry.
731 * @param obj The entry object
735 EAPI void elm_entry_select_all(Evas_Object *obj);
738 * This moves the cursor one place to the right within the entry.
740 * @param obj The entry object
741 * @return EINA_TRUE upon success, EINA_FALSE upon failure
745 EAPI Eina_Bool elm_entry_cursor_next(Evas_Object *obj);
748 * This moves the cursor one place to the left within the entry.
750 * @param obj The entry object
751 * @return EINA_TRUE upon success, EINA_FALSE upon failure
755 EAPI Eina_Bool elm_entry_cursor_prev(Evas_Object *obj);
758 * This moves the cursor one line up within the entry.
760 * @param obj The entry object
761 * @return EINA_TRUE upon success, EINA_FALSE upon failure
765 EAPI Eina_Bool elm_entry_cursor_up(Evas_Object *obj);
768 * This moves the cursor one line down within the entry.
770 * @param obj The entry object
771 * @return EINA_TRUE upon success, EINA_FALSE upon failure
775 EAPI Eina_Bool elm_entry_cursor_down(Evas_Object *obj);
778 * This moves the cursor to the beginning of the entry.
780 * @param obj The entry object
784 EAPI void elm_entry_cursor_begin_set(Evas_Object *obj);
787 * This moves the cursor to the end of the entry.
789 * @param obj The entry object
793 EAPI void elm_entry_cursor_end_set(Evas_Object *obj);
796 * This moves the cursor to the beginning of the current line.
798 * @param obj The entry object
802 EAPI void elm_entry_cursor_line_begin_set(Evas_Object *obj);
805 * This moves the cursor to the end of the current line.
807 * @param obj The entry object
811 EAPI void elm_entry_cursor_line_end_set(Evas_Object *obj);
814 * This begins a selection within the entry as though
815 * the user were holding down the mouse button to make a selection.
817 * @param obj The entry object
821 EAPI void elm_entry_cursor_selection_begin(Evas_Object *obj);
824 * This ends a selection within the entry as though
825 * the user had just released the mouse button while making a selection.
827 * @param obj The entry object
831 EAPI void elm_entry_cursor_selection_end(Evas_Object *obj);
834 * Gets whether a format node exists at the current cursor position.
836 * A format node is anything that defines how the text is rendered. It can
837 * be a visible format node, such as a line break or a paragraph separator,
838 * or an invisible one, such as bold begin or end tag.
839 * This function returns whether any format node exists at the current
842 * @param obj The entry object
843 * @return EINA_TRUE if the current cursor position contains a format node,
844 * EINA_FALSE otherwise.
846 * @see elm_entry_cursor_is_visible_format_get()
850 EAPI Eina_Bool elm_entry_cursor_is_format_get(const Evas_Object *obj);
853 * Gets if the current cursor position holds a visible format node.
855 * @param obj The entry object
856 * @return EINA_TRUE if the current cursor is a visible format, EINA_FALSE
857 * if it's an invisible one or no format exists.
859 * @see elm_entry_cursor_is_format_get()
863 EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Evas_Object *obj);
866 * Gets the character pointed by the cursor at its current position.
868 * This function returns a string with the utf8 character stored at the
869 * current cursor position.
870 * Only the text is returned, any format that may exist will not be part
871 * of the return value. You must free the string when done with free().
873 * @param obj The entry object
874 * @return The text pointed by the cursors.
878 EAPI char *elm_entry_cursor_content_get(const Evas_Object *obj);
881 * This function returns the geometry of the cursor.
883 * It's useful if you want to draw something on the cursor (or where it is),
884 * or for example in the case of scrolled entry where you want to show the
887 * @param obj The entry object
888 * @param x returned geometry
889 * @param y returned geometry
890 * @param w returned geometry
891 * @param h returned geometry
892 * @return EINA_TRUE upon success, EINA_FALSE upon failure
896 EAPI Eina_Bool elm_entry_cursor_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
899 * Sets the cursor position in the entry to the given value
901 * The value in @p pos is the index of the character position within the
902 * contents of the string as returned by elm_entry_cursor_pos_get().
904 * @param obj The entry object
905 * @param pos The position of the cursor
909 EAPI void elm_entry_cursor_pos_set(Evas_Object *obj, int pos);
912 * Retrieves the current position of the cursor in the entry
914 * @param obj The entry object
915 * @return The cursor position
919 EAPI int elm_entry_cursor_pos_get(const Evas_Object *obj);
922 * This executes a "cut" action on the selected text in the entry.
924 * @param obj The entry object
928 EAPI void elm_entry_selection_cut(Evas_Object *obj);
931 * This executes a "copy" action on the selected text in the entry.
933 * @param obj The entry object
937 EAPI void elm_entry_selection_copy(Evas_Object *obj);
940 * This executes a "paste" action in the entry.
942 * @param obj The entry object
946 EAPI void elm_entry_selection_paste(Evas_Object *obj);
949 * This clears and frees the items in a entry's contextual (longpress)
952 * @param obj The entry object
954 * @see elm_entry_context_menu_item_add()
958 EAPI void elm_entry_context_menu_clear(Evas_Object *obj);
961 * This adds an item to the entry's contextual menu.
963 * A longpress on an entry will make the contextual menu show up, if this
964 * hasn't been disabled with elm_entry_context_menu_disabled_set().
965 * By default, this menu provides a few options like enabling selection mode,
966 * which is useful on embedded devices that need to be explicit about it,
967 * and when a selection exists it also shows the copy and cut actions.
969 * With this function, developers can add other options to this menu to
970 * perform any action they deem necessary.
972 * @param obj The entry object
973 * @param label The item's text label
974 * @param icon_file The item's icon file
975 * @param icon_type The item's icon type
976 * @param func The callback to execute when the item is clicked
977 * @param data The data to associate with the item for related functions
981 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);
984 * This disables the entry's contextual (longpress) menu.
986 * @param obj The entry object
987 * @param disabled If true, the menu is disabled
991 EAPI void elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled);
994 * This returns whether the entry's contextual (longpress) menu is
997 * @param obj The entry object
998 * @return If true, the menu is disabled
1002 EAPI Eina_Bool elm_entry_context_menu_disabled_get(const Evas_Object *obj);
1005 * This appends a custom item provider to the list for that entry
1007 * This appends the given callback. The list is walked from beginning to end
1008 * with each function called given the item href string in the text. If the
1009 * function returns an object handle other than NULL (it should create an
1010 * object to do this), then this object is used to replace that item. If
1011 * not the next provider is called until one provides an item object, or the
1012 * default provider in entry does.
1014 * @param obj The entry object
1015 * @param func The function called to provide the item object
1016 * @param data The data passed to @p func
1018 * @see @ref entry-items
1022 EAPI void elm_entry_item_provider_append(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data);
1025 * This prepends a custom item provider to the list for that entry
1027 * This prepends the given callback. See elm_entry_item_provider_append() for
1030 * @param obj The entry object
1031 * @param func The function called to provide the item object
1032 * @param data The data passed to @p func
1036 EAPI void elm_entry_item_provider_prepend(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data);
1039 * This removes a custom item provider to the list for that entry
1041 * This removes the given callback. See elm_entry_item_provider_append() for
1044 * @param obj The entry object
1045 * @param func The function called to provide the item object
1046 * @param data The data passed to @p func
1050 EAPI void elm_entry_item_provider_remove(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data);
1053 * Append a markup filter function for text inserted in the entry
1055 * Append the given callback to the list. This functions will be called
1056 * whenever any text is inserted into the entry, with the text to be inserted
1057 * as a parameter. The type of given text is always markup.
1058 * The callback function is free to alter the text in any way it wants, but
1059 * it must remember to free the given pointer and update it.
1060 * If the new text is to be discarded, the function can free it and set its
1061 * text parameter to NULL. This will also prevent any following filters from
1064 * @param obj The entry object
1065 * @param func The function to use as text filter
1066 * @param data User data to pass to @p func
1070 EAPI void elm_entry_markup_filter_append(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
1073 * Prepend a markup filter function for text inserted in the entry
1075 * Prepend the given callback to the list. See elm_entry_markup_filter_append()
1076 * for more information
1078 * @param obj The entry object
1079 * @param func The function to use as text filter
1080 * @param data User data to pass to @p func
1084 EAPI void elm_entry_markup_filter_prepend(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
1087 * Remove a markup filter from the list
1089 * Removes the given callback from the filter list. See
1090 * elm_entry_markup_filter_append() for more information.
1092 * @param obj The entry object
1093 * @param func The filter function to remove
1094 * @param data The user data passed when adding the function
1098 EAPI void elm_entry_markup_filter_remove(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
1101 * This converts a markup (HTML-like) string into UTF-8.
1103 * The returned string is a malloc'ed buffer and it should be freed when
1104 * not needed anymore.
1106 * @param s The string (in markup) to be converted
1107 * @return The converted string (in UTF-8). It should be freed.
1111 EAPI char *elm_entry_markup_to_utf8(const char *s);
1114 * This converts a UTF-8 string into markup (HTML-like).
1116 * The returned string is a malloc'ed buffer and it should be freed when
1117 * not needed anymore.
1119 * @param s The string (in UTF-8) to be converted
1120 * @return The converted string (in markup). It should be freed.
1124 EAPI char *elm_entry_utf8_to_markup(const char *s);
1127 * This sets the file (and implicitly loads it) for the text to display and
1128 * then edit. All changes are written back to the file after a short delay if
1129 * the entry object is set to autosave (which is the default).
1131 * If the entry had any other file set previously, any changes made to it
1132 * will be saved if the autosave feature is enabled, otherwise, the file
1133 * will be silently discarded and any non-saved changes will be lost.
1135 * @param obj The entry object
1136 * @param file The path to the file to load and save
1137 * @param format The file format
1138 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
1142 EAPI Eina_Bool elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format);
1145 * Gets the file being edited by the entry.
1147 * This function can be used to retrieve any file set on the entry for
1148 * edition, along with the format used to load and save it.
1150 * @param obj The entry object
1151 * @param file The path to the file to load and save
1152 * @param format The file format
1156 EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format);
1159 * This function writes any changes made to the file set with
1160 * elm_entry_file_set()
1162 * @param obj The entry object
1166 EAPI void elm_entry_file_save(Evas_Object *obj);
1169 * This sets the entry object to 'autosave' the loaded text file or not.
1171 * @param obj The entry object
1172 * @param autosave Autosave the loaded file or not
1174 * @see elm_entry_file_set()
1178 EAPI void elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave);
1181 * This gets the entry object's 'autosave' status.
1183 * @param obj The entry object
1184 * @return Autosave the loaded file or not
1186 * @see elm_entry_file_set()
1190 EAPI Eina_Bool elm_entry_autosave_get(const Evas_Object *obj);
1193 * Enable or disable scrolling in entry
1195 * Normally the entry is not scrollable unless you enable it with this call.
1197 * @param obj The entry object
1198 * @param scroll EINA_TRUE if it is to be scrollable, EINA_FALSE otherwise
1202 EAPI void elm_entry_scrollable_set(Evas_Object *obj, Eina_Bool scroll);
1205 * Get the scrollable state of the entry
1207 * Normally the entry is not scrollable. This gets the scrollable state
1208 * of the entry. See elm_entry_scrollable_set() for more information.
1210 * @param obj The entry object
1211 * @return The scrollable state
1215 EAPI Eina_Bool elm_entry_scrollable_get(const Evas_Object *obj);
1218 * Sets the visibility of the left-side widget of the entry,
1219 * set by elm_object_part_content_set().
1221 * @param obj The entry object
1222 * @param setting EINA_TRUE if the object should be displayed,
1223 * EINA_FALSE if not.
1227 EAPI void elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting);
1230 * Sets the visibility of the end widget of the entry, set by
1231 * elm_object_part_content_set(ent, "end", content).
1233 * @param obj The entry object
1234 * @param setting EINA_TRUE if the object should be displayed,
1235 * EINA_FALSE if not.
1239 EAPI void elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting);
1242 * This sets the entry's scrollbar policy (i.e. enabling/disabling
1245 * Setting an entry to single-line mode with elm_entry_single_line_set()
1246 * will automatically disable the display of scrollbars when the entry
1247 * moves inside its scroller.
1249 * @param obj The entry object
1250 * @param h The horizontal scrollbar policy to apply
1251 * @param v The vertical scrollbar policy to apply
1255 EAPI void elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v);
1258 * This enables/disables bouncing within the entry.
1260 * This function sets whether the entry will bounce when scrolling reaches
1261 * the end of the contained entry.
1263 * @param obj The entry object
1264 * @param h_bounce The horizontal bounce state
1265 * @param v_bounce The vertical bounce state
1269 EAPI void elm_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
1272 * Get the bounce mode
1274 * @param obj The Entry object
1275 * @param h_bounce Allow bounce horizontally
1276 * @param v_bounce Allow bounce vertically
1280 EAPI void elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
1283 * Set the input panel layout of the entry
1285 * @param obj The entry object
1286 * @param layout layout type
1290 EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
1293 * Get the input panel layout of the entry
1295 * @param obj The entry object
1296 * @return layout type
1298 * @see elm_entry_input_panel_layout_set
1302 EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(const Evas_Object *obj);
1305 * Set the autocapitalization type on the immodule.
1307 * @param obj The entry object
1308 * @param autocapital_type The type of autocapitalization
1312 EAPI void elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type);
1315 * Retrieve the autocapitalization type on the immodule.
1317 * @param obj The entry object
1318 * @return autocapitalization type
1322 EAPI Elm_Autocapital_Type elm_entry_autocapital_type_get(const Evas_Object *obj);
1325 * Sets the attribute to show the input panel automatically.
1327 * @param obj The entry object
1328 * @param enabled If true, the input panel is appeared when entry is clicked or has a focus
1332 EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
1335 * Retrieve the attribute to show the input panel automatically.
1337 * @param obj The entry object
1338 * @return EINA_TRUE if input panel will be appeared when the entry is clicked or has a focus, EINA_FALSE otherwise
1342 EAPI Eina_Bool elm_entry_input_panel_enabled_get(const Evas_Object *obj);
1345 * Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on.
1347 * Note that input panel is shown or hidden automatically according to the focus state of entry widget.
1348 * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE).
1350 * @param obj The entry object
1354 EAPI void elm_entry_input_panel_show(Evas_Object *obj);
1357 * Hide the input panel (virtual keyboard).
1359 * Note that input panel is shown or hidden automatically according to the focus state of entry widget.
1360 * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE)
1362 * @param obj The entry object
1366 EAPI void elm_entry_input_panel_hide(Evas_Object *obj);
1369 * Set the language mode of the input panel.
1371 * This API can be used if you want to show the alphabet keyboard mode.
1373 * @param obj The entry object
1374 * @param lang language to be set to the input panel.
1378 EAPI void elm_entry_input_panel_language_set(Evas_Object *obj, Elm_Input_Panel_Lang lang);
1381 * Get the language mode of the input panel.
1383 * See @ref elm_entry_input_panel_language_set for more details.
1385 * @param obj The entry object
1386 * @return input panel language type
1390 EAPI Elm_Input_Panel_Lang elm_entry_input_panel_language_get(const Evas_Object *obj);
1393 * Set the input panel-specific data to deliver to the input panel.
1395 * This API is used by applications to deliver specific data to the input panel.
1396 * The data format MUST be negotiated by both application and the input panel.
1397 * The size and format of data are defined by the input panel.
1399 * @param obj The entry object
1400 * @param data The specific data to be set to the input panel.
1401 * @param len the length of data, in bytes, to send to the input panel
1405 EAPI void elm_entry_input_panel_imdata_set(Evas_Object *obj, const void *data, int len);
1408 * Get the specific data of the current input panel.
1410 * See @ref elm_entry_input_panel_imdata_set for more details.
1412 * @param obj The entry object
1413 * @param data The specific data to be got from the input panel
1414 * @param len The length of data
1418 EAPI void elm_entry_input_panel_imdata_get(const Evas_Object *obj, void *data, int *len);
1421 * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
1423 * An input panel displays the string or icon associated with this type
1425 * @param obj The entry object
1426 * @param return_key_type The type of "return" key on the input panel
1430 EAPI void elm_entry_input_panel_return_key_type_set(Evas_Object *obj, Elm_Input_Panel_Return_Key_Type return_key_type);
1433 * Get the "return" key type.
1435 * @see elm_entry_input_panel_return_key_type_set() for more details
1437 * @param obj The entry object
1438 * @return The type of "return" key on the input panel
1442 EAPI Elm_Input_Panel_Return_Key_Type elm_entry_input_panel_return_key_type_get(const Evas_Object *obj);
1445 * Set the return key on the input panel to be disabled.
1447 * @param obj The entry object
1448 * @param disabled The state to put in in: @c EINA_TRUE for
1449 * disabled, @c EINA_FALSE for enabled
1453 EAPI void elm_entry_input_panel_return_key_disabled_set(Evas_Object *obj, Eina_Bool disabled);
1456 * Get whether the return key on the input panel should be disabled or not.
1458 * @param obj The entry object
1459 * @return EINA_TRUE if it should be disabled
1463 EAPI Eina_Bool elm_entry_input_panel_return_key_disabled_get(const Evas_Object *obj);
1466 * Set whether the return key on the input panel is disabled automatically when entry has no text.
1468 * If @p enabled is EINA_TRUE, The return key on input panel is disabled when the entry has no text.
1469 * The return key on the input panel is automatically enabled when the entry has text.
1470 * The default value is EINA_FALSE.
1472 * @param obj The entry object
1473 * @param enabled If @p enabled is EINA_TRUE, the return key is automatically disabled when the entry has no text.
1477 EAPI void elm_entry_input_panel_return_key_autoenabled_set(Evas_Object *obj, Eina_Bool enabled);
1480 * Reset the input method context of the entry if needed.
1482 * This can be necessary in the case where modifying the buffer would confuse on-going input method behavior
1483 * @param obj The entry object
1487 EAPI void elm_entry_imf_context_reset(Evas_Object *obj);
1490 * Set whether the entry should allow to use the text prediction.
1492 * @param obj The entry object
1493 * @param prediction Whether the entry should allow to use the text prediction.
1497 EAPI void elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool prediction);
1500 * Get whether the entry should allow to use the text prediction.
1502 * @param obj The entry object
1503 * @return EINA_TRUE if it allows to use the text prediction, otherwise EINA_FALSE.
1507 EAPI Eina_Bool elm_entry_prediction_allow_get(const Evas_Object *obj);
1509 /* pre-made filters for entries */
1512 * @typedef Elm_Entry_Filter_Limit_Size
1514 * Data for the elm_entry_filter_limit_size() entry filter.
1516 typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size;
1519 * @struct _Elm_Entry_Filter_Limit_Size
1521 * Data for the elm_entry_filter_limit_size() entry filter.
1523 struct _Elm_Entry_Filter_Limit_Size
1525 int max_char_count; /**< The maximum number of characters allowed. */
1526 int max_byte_count; /**< The maximum number of bytes allowed*/
1530 * Filter inserted text based on user defined character and byte limits
1532 * Add this filter to an entry to limit the characters that it will accept
1533 * based the contents of the provided #Elm_Entry_Filter_Limit_Size.
1534 * The function works on the UTF-8 representation of the string, converting
1535 * it from the set markup, thus not accounting for any format in it.
1537 * The user must create an #Elm_Entry_Filter_Limit_Size structure and pass
1538 * it as data when setting the filter. In it, it's possible to set limits
1539 * by character count or bytes (any of them is disabled if 0), and both can
1540 * be set at the same time. In that case, it first checks for characters,
1541 * then bytes. The #Elm_Entry_Filter_Limit_Size structure must be alive and
1542 * valid for as long as the entry is alive AND the elm_entry_filter_limit_size
1545 * The function will cut the inserted text in order to allow only the first
1546 * number of characters that are still allowed. The cut is made in
1547 * characters, even when limiting by bytes, in order to always contain
1548 * valid ones and avoid half unicode characters making it in.
1550 * This filter, like any others, does not apply when setting the entry text
1551 * directly with elm_object_text_set().
1555 EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text);
1558 * @typedef Elm_Entry_Filter_Accept_Set
1560 * Data for the elm_entry_filter_accept_set() entry filter.
1562 typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set;
1565 * @struct _Elm_Entry_Filter_Accept_Set
1567 * Data for the elm_entry_filter_accept_set() entry filter.
1569 struct _Elm_Entry_Filter_Accept_Set
1571 const char *accepted; /**< Set of characters accepted in the entry. */
1572 const char *rejected; /**< Set of characters rejected from the entry. */
1576 * Filter inserted text based on accepted or rejected sets of characters
1578 * Add this filter to an entry to restrict the set of accepted characters
1579 * based on the sets in the provided #Elm_Entry_Filter_Accept_Set.
1580 * This structure contains both accepted and rejected sets, but they are
1581 * mutually exclusive. This structure must be available for as long as
1582 * the entry is alive AND the elm_entry_filter_accept_set is being used.
1584 * The @c accepted set takes preference, so if it is set, the filter will
1585 * only work based on the accepted characters, ignoring anything in the
1586 * @c rejected value. If @c accepted is @c NULL, then @c rejected is used.
1588 * In both cases, the function filters by matching utf8 characters to the
1589 * raw markup text, so it can be used to remove formatting tags.
1591 * This filter, like any others, does not apply when setting the entry text
1592 * directly with elm_object_text_set()
1596 EAPI void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text);
1599 * Returns the input method context of the entry.
1601 * This function exposes the internal input method context.
1603 * IMPORTANT: Many functions may change (i.e delete and create a new one)
1604 * the internal input method context. Do NOT cache the returned object.
1606 * @param obj The entry object
1607 * @return The input method context (Ecore_IMF_Context *) in entry.
1611 EAPI void *elm_entry_imf_context_get(Evas_Object *obj);
1614 * @typedef Elm_Cnp_Mode
1615 * Enum of entry's copy & paste policy.
1617 * @see elm_entry_cnp_mode_set()
1618 * @see elm_entry_cnp_mode_get()
1621 ELM_CNP_MODE_MARKUP, /**< copy & paste text with markup tag */
1622 ELM_CNP_MODE_NO_IMAGE, /**< copy & paste text without item(image) tag */
1623 ELM_CNP_MODE_PLAINTEXT /**< copy & paste text without markup tag */
1627 * Control pasting of text and images for the widget.
1629 * Normally the entry allows both text and images to be pasted.
1630 * By setting cnp_mode to be ELM_CNP_MODE_NO_IMAGE, this prevents images from being copy or past.
1631 * By setting cnp_mode to be ELM_CNP_MODE_PLAINTEXT, this remove all tags in text .
1633 * @note this only changes the behaviour of text.
1635 * @param obj The entry object
1636 * @param cnp_mode One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP,
1637 * #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT.
1641 EAPI void elm_entry_cnp_mode_set(Evas_Object *obj, Elm_Cnp_Mode cnp_mode);
1644 * Getting elm_entry text paste/drop mode.
1646 * Normally the entry allows both text and images to be pasted.
1647 * This gets the copy & paste mode of the entry.
1649 * @param obj The entry object
1650 * @return mode One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP,
1651 * #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT.
1655 EAPI Elm_Cnp_Mode elm_entry_cnp_mode_get(const Evas_Object *obj);
1658 * Set the parent of the hover popup
1660 * Sets the parent object to use by the hover created by the entry
1661 * when an anchor is clicked. See @ref Hover for more details on this.
1663 * @param obj The entry object
1664 * @param parent The object to use as parent for the hover
1668 EAPI void elm_entry_anchor_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
1671 * Get the parent of the hover popup
1673 * Get the object used as parent for the hover created by the entry
1674 * widget. See @ref Hover for more details on this.
1675 * If no parent is set, the same entry object will be used.
1677 * @param obj The entry object
1678 * @return The object used as parent for the hover, NULL if none is set.
1682 EAPI Evas_Object *elm_entry_anchor_hover_parent_get(const Evas_Object *obj);
1685 * Set the style that the hover should use
1687 * When creating the popup hover, entry will request that it's
1688 * themed according to @p style.
1690 * Setting style no NULL means disabling automatic hover.
1692 * @param obj The entry object
1693 * @param style The style to use for the underlying hover
1695 * @see elm_object_style_set()
1699 EAPI void elm_entry_anchor_hover_style_set(Evas_Object *obj, const char *style);
1702 * Get the style that the hover should use
1704 * Get the style, the hover created by entry will use.
1706 * @param obj The entry object
1707 * @return The style to use by the hover. NULL means the default is used.
1709 * @see elm_object_style_set()
1713 EAPI const char *elm_entry_anchor_hover_style_get(const Evas_Object *obj);
1716 * Ends the hover popup in the entry
1718 * When an anchor is clicked, the entry widget will create a hover
1719 * object to use as a popup with user provided content. This function
1720 * terminates this popup, returning the entry to its normal state.
1722 * @param obj The entry object
1726 EAPI void elm_entry_anchor_hover_end(Evas_Object *obj);