elm/entry: describe more detail on some enums
[framework/uifw/elementary.git] / src / lib / elm_entry.h
1 /**
2  * @enum _Elm_Text_Format
3  * @typedef Elm_Text_Format
4  *
5  * Text Format types.
6  * 
7  * @see elm_entry_file_set()
8  *
9  * @ingroup Entry
10  */
11 typedef enum
12 {
13    ELM_TEXT_FORMAT_PLAIN_UTF8,
14    ELM_TEXT_FORMAT_MARKUP_UTF8
15 } Elm_Text_Format;
16
17 /**
18  * @enum _Elm_Wrap_Type
19  * @typedef Elm_Wrap_Type
20  *
21  * Line wrapping types.
22  * 
23  * @see elm_entry_line_wrap_set()
24  *
25  * @ingroup Entry
26  */
27 typedef enum
28 {
29    ELM_WRAP_NONE = 0, /**< No wrap - value is zero */
30    ELM_WRAP_CHAR, /**< Char wrap - wrap between characters */
31    ELM_WRAP_WORD, /**< Word wrap - wrap in allowed wrapping points (as defined in the unicode standard) */
32    ELM_WRAP_MIXED, /**< Mixed wrap - Word wrap, and if that fails, char wrap. */
33    ELM_WRAP_LAST
34 } Elm_Wrap_Type; /**< Type of word or character wrapping to use */
35
36 /**
37  * @enum _Elm_Input_Panel_Layout
38  * @typedef Elm_Input_Panel_Layout
39  *
40  * Input panel (virtual keyboard) layout types.
41  * 
42  * @see elm_entry_input_panel_layout_set()
43  *
44  * @ingroup Entry
45  */
46 typedef enum
47 {
48    ELM_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
49    ELM_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
50    ELM_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
51    ELM_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
52    ELM_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
53    ELM_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
54    ELM_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
55    ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
56    ELM_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
57    ELM_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout */
58    ELM_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout */
59    ELM_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. */
60 } Elm_Input_Panel_Layout; /**< Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired. */
61
62 /**
63  * @enum _Elm_Input_Panel_Lang
64  * @typedef Elm_Input_Panel_Lang
65  *
66  * Input panel (virtual keyboard) language modes.
67  * 
68  * @see elm_entry_input_panel_language_set()
69  *
70  * @ingroup Entry
71  */
72 typedef enum
73 {
74    ELM_INPUT_PANEL_LANG_AUTOMATIC,    /**< Automatic */
75    ELM_INPUT_PANEL_LANG_ALPHABET      /**< Alphabet */
76 } Elm_Input_Panel_Lang;
77
78 /**
79  * @enum _Elm_Autocapital_Type
80  * @typedef Elm_Autocapital_Type
81  *
82  * Autocapitalization Types.
83  * 
84  * @see elm_entry_autocapital_type_set()
85  *
86  * @ingroup Entry
87  */
88 typedef enum
89 {
90    ELM_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
91    ELM_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
92    ELM_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
93    ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
94 } Elm_Autocapital_Type; /**< Choose method of auto-capitalization */
95
96 /**
97  * @enum _Elm_Input_Panel_Return_Key_Type
98  * @typedef Elm_Input_Panel_Return_Key_Type
99  *
100  * "Return" Key types on the input panel (virtual keyboard).
101  * 
102  * @see elm_entry_input_panel_return_key_type_set()
103  *
104  * @ingroup Entry
105  */
106 typedef enum
107 {
108    ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default */
109    ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE,    /**< Done */
110    ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO,      /**< Go */
111    ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN,    /**< Join */
112    ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN,   /**< Login */
113    ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT,    /**< Next */
114    ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH,  /**< Search string or magnifier icon */
115    ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND     /**< Send */
116 } Elm_Input_Panel_Return_Key_Type;
117
118 /**
119  * @defgroup Entry Entry
120  *
121  * @image html img/widget/entry/preview-00.png
122  * @image latex img/widget/entry/preview-00.eps width=\textwidth
123  * @image html img/widget/entry/preview-01.png
124  * @image latex img/widget/entry/preview-01.eps width=\textwidth
125  * @image html img/widget/entry/preview-02.png
126  * @image latex img/widget/entry/preview-02.eps width=\textwidth
127  * @image html img/widget/entry/preview-03.png
128  * @image latex img/widget/entry/preview-03.eps width=\textwidth
129  *
130  * An entry is a convenience widget which shows a box that the user can
131  * enter text into. Entries by default don't scroll, so they grow to
132  * accommodate the entire text, resizing the parent window as needed. This
133  * can be changed with the elm_entry_scrollable_set() function.
134  *
135  * They can also be single line or multi line (the default) and when set
136  * to multi line mode they support text wrapping in any of the modes
137  * indicated by Elm_Wrap_Type.
138  *
139  * Other features include password mode, filtering of inserted text with
140  * elm_entry_markup_filter_append() and related functions, inline "items" and
141  * formatted markup text.
142  *
143  * @section entry-markup Formatted text
144  *
145  * The markup tags supported by the Entry are defined by the theme, but
146  * even when writing new themes or extensions it's a good idea to stick to
147  * a sane default, to maintain coherency and avoid application breakages.
148  * Currently defined by the default theme are the following tags:
149  * @li \<br\>: Inserts a line break.
150  * @li \<ps\>: Inserts a paragraph separator. This is preferred over line
151  * breaks.
152  * @li \<tab\>: Inserts a tab.
153  * @li \<em\>...\</em\>: Emphasis. Sets the @em oblique style for the
154  * enclosed text.
155  * @li \<b\>...\</b\>: Sets the @b bold style for the enclosed text.
156  * @li \<link\>...\</link\>: Underlines the enclosed text.
157  * @li \<hilight\>...\</hilight\>: Highlights the enclosed text.
158  *
159  * @section entry-special Special markups
160  *
161  * Besides those used to format text, entries support two special markup
162  * tags used to insert click-able portions of text or items inlined within
163  * the text.
164  *
165  * @subsection entry-anchors Anchors
166  *
167  * Anchors are similar to HTML anchors. Text can be surrounded by \<a\> and
168  * \</a\> tags and an event will be generated when this text is clicked,
169  * like this:
170  *
171  * @code
172  * This text is outside <a href=anc-01>but this one is an anchor</a>
173  * @endcode
174  *
175  * The @c href attribute in the opening tag gives the name that will be
176  * used to identify the anchor and it can be any valid utf8 string.
177  *
178  * When an anchor is clicked, an @c "anchor,clicked" signal is emitted with
179  * an #Elm_Entry_Anchor_Info in the @c event_info parameter for the
180  * callback function. The same applies for "anchor,in" (mouse in), "anchor,out"
181  * (mouse out), "anchor,down" (mouse down), and "anchor,up" (mouse up) events on
182  * an anchor.
183  *
184  * @subsection entry-items Items
185  *
186  * Inlined in the text, any other @c Evas_Object can be inserted by using
187  * \<item\> tags this way:
188  *
189  * @code
190  * <item size=16x16 vsize=full href=emoticon/haha></item>
191  * @endcode
192  *
193  * Just like with anchors, the @c href identifies each item, but these need,
194  * in addition, to indicate their size, which is done using any one of
195  * @c size, @c absize or @c relsize attributes. These attributes take their
196  * value in the WxH format, where W is the width and H the height of the
197  * item.
198  *
199  * @li absize: Absolute pixel size for the item. Whatever value is set will
200  * be the item's size regardless of any scale value the object may have
201  * been set to. The final line height will be adjusted to fit larger items.
202  * @li size: Similar to @c absize, but it's adjusted to the scale value set
203  * for the object.
204  * @li relsize: Size is adjusted for the item to fit within the current
205  * line height.
206  *
207  * Besides their size, items are specified a @c vsize value that affects
208  * how their final size and position are calculated. The possible values
209  * are:
210  * @li ascent: Item will be placed within the line's baseline and its
211  * ascent. That is, the height between the line where all characters are
212  * positioned and the highest point in the line. For @c size and @c absize
213  * items, the descent value will be added to the total line height to make
214  * them fit. @c relsize items will be adjusted to fit within this space.
215  * @li full: Items will be placed between the descent and ascent, or the
216  * lowest point in the line and its highest.
217  *
218  * The next image shows different configurations of items and how
219  * the previously mentioned options affect their sizes. In all cases,
220  * the green line indicates the ascent, blue for the baseline and red for
221  * the descent.
222  *
223  * @image html entry_item.png
224  * @image latex entry_item.eps width=\textwidth
225  *
226  * And another one to show how size differs from absize. In the first one,
227  * the scale value is set to 1.0, while the second one is using one of 2.0.
228  *
229  * @image html entry_item_scale.png
230  * @image latex entry_item_scale.eps width=\textwidth
231  *
232  * After the size for an item is calculated, the entry will request an
233  * object to place in its space. For this, the functions set with
234  * elm_entry_item_provider_append() and related functions will be called
235  * in order until one of them returns a @c non-NULL value. If no providers
236  * are available, or all of them return @c NULL, then the entry falls back
237  * to one of the internal defaults, provided the name matches with one of
238  * them.
239  *
240  * All of the following are currently supported:
241  *
242  * - emoticon/angry
243  * - emoticon/angry-shout
244  * - emoticon/crazy-laugh
245  * - emoticon/evil-laugh
246  * - emoticon/evil
247  * - emoticon/goggle-smile
248  * - emoticon/grumpy
249  * - emoticon/grumpy-smile
250  * - emoticon/guilty
251  * - emoticon/guilty-smile
252  * - emoticon/haha
253  * - emoticon/half-smile
254  * - emoticon/happy-panting
255  * - emoticon/happy
256  * - emoticon/indifferent
257  * - emoticon/kiss
258  * - emoticon/knowing-grin
259  * - emoticon/laugh
260  * - emoticon/little-bit-sorry
261  * - emoticon/love-lots
262  * - emoticon/love
263  * - emoticon/minimal-smile
264  * - emoticon/not-happy
265  * - emoticon/not-impressed
266  * - emoticon/omg
267  * - emoticon/opensmile
268  * - emoticon/smile
269  * - emoticon/sorry
270  * - emoticon/squint-laugh
271  * - emoticon/surprised
272  * - emoticon/suspicious
273  * - emoticon/tongue-dangling
274  * - emoticon/tongue-poke
275  * - emoticon/uh
276  * - emoticon/unhappy
277  * - emoticon/very-sorry
278  * - emoticon/what
279  * - emoticon/wink
280  * - emoticon/worried
281  * - emoticon/wtf
282  *
283  * Alternatively, an item may reference an image by its path, using
284  * the URI form @c file:///path/to/an/image.png and the entry will then
285  * use that image for the item.
286  *
287  * @section entry-files Loading and saving files
288  *
289  * Entries have convenience functions to load text from a file and save
290  * changes back to it after a short delay. The automatic saving is enabled
291  * by default, but can be disabled with elm_entry_autosave_set() and files
292  * can be loaded directly as plain text or have any markup in them
293  * recognized. See elm_entry_file_set() for more details.
294  *
295  * @section entry-signals Emitted signals
296  *
297  * This widget emits the following signals:
298  *
299  * @li "changed": The text within the entry was changed.
300  * @li "changed,user": The text within the entry was changed because of user interaction.
301  * @li "activated": The enter key was pressed on a single line entry.
302  * @li "press": A mouse button has been pressed on the entry.
303  * @li "longpressed": A mouse button has been pressed and held for a couple
304  * seconds.
305  * @li "clicked": The entry has been clicked (mouse press and release).
306  * @li "clicked,double": The entry has been double clicked.
307  * @li "clicked,triple": The entry has been triple clicked.
308  * @li "focused": The entry has received focus.
309  * @li "unfocused": The entry has lost focus.
310  * @li "selection,paste": A paste of the clipboard contents was requested.
311  * @li "selection,copy": A copy of the selected text into the clipboard was
312  * requested.
313  * @li "selection,cut": A cut of the selected text into the clipboard was
314  * requested.
315  * @li "selection,start": A selection has begun and no previous selection
316  * existed.
317  * @li "selection,changed": The current selection has changed.
318  * @li "selection,cleared": The current selection has been cleared.
319  * @li "cursor,changed": The cursor has changed position.
320  * @li "anchor,clicked": An anchor has been clicked. The event_info
321  * parameter for the callback will be an #Elm_Entry_Anchor_Info.
322  * @li "anchor,in": Mouse cursor has moved into an anchor. The event_info
323  * parameter for the callback will be an #Elm_Entry_Anchor_Info.
324  * @li "anchor,out": Mouse cursor has moved out of an anchor. The event_info
325  * parameter for the callback will be an #Elm_Entry_Anchor_Info.
326  * @li "anchor,up": Mouse button has been unpressed on an anchor. The event_info
327  * parameter for the callback will be an #Elm_Entry_Anchor_Info.
328  * @li "anchor,down": Mouse button has been pressed on an anchor. The event_info
329  * parameter for the callback will be an #Elm_Entry_Anchor_Info.
330  * @li "preedit,changed": The preedit string has changed.
331  * @li "language,changed": Program language changed.
332  *
333  * Default contents parts of the entry items that you can use for are:
334  * @li "icon" - An icon in the entry
335  * @li "end" - A content in the end of the entry
336  *
337  * Default text parts of the entry that you can use for are:
338  * @li "default" - text of the entry
339  *
340  * Supported elm_object common APIs.
341  * @li elm_object_signal_emit
342  * @li elm_object_part_text_set
343  * @li elm_object_part_text_get
344  * @li elm_object_part_content_set
345  * @li elm_object_part_content_get
346  * @li elm_object_part_content_unset
347  * @li elm_object_signal_callback_add
348  * @li elm_object_signal_callback_del
349  * @li elm_object_disabled_set
350  * @li elm_object_disabled_get
351  *
352  * @section entry-examples
353  *
354  * An overview of the Entry API can be seen in @ref entry_example_01
355  *
356  * @{
357  */
358
359 /**
360  * @typedef Elm_Entry_Anchor_Info
361  *
362  * The info sent in the callback for the "anchor,clicked" signals emitted
363  * by entries.
364  */
365 typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info;
366
367 /**
368  * @struct _Elm_Entry_Anchor_Info
369  *
370  * The info sent in the callback for the "anchor,clicked" signals emitted
371  * by entries.
372  */
373 struct _Elm_Entry_Anchor_Info
374 {
375    const char *name; /**< The name of the anchor, as stated in its href */
376    int         button; /**< The mouse button used to click on it */
377    Evas_Coord  x, /**< Anchor geometry, relative to canvas */
378                y, /**< Anchor geometry, relative to canvas */
379                w, /**< Anchor geometry, relative to canvas */
380                h; /**< Anchor geometry, relative to canvas */
381 };
382
383 /**
384  * @typedef Elm_Entry_Filter_Cb
385  * This callback type is used by entry filters to modify text.
386  * @param data The data specified as the last param when adding the filter
387  * @param entry The entry object
388  * @param text A pointer to the location of the text being filtered. The type of text is always markup. This data can be modified,
389  * but any additional allocations must be managed by the user.
390  * @see elm_entry_markup_filter_append
391  * @see elm_entry_markup_filter_prepend
392  */
393 typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text);
394
395 /**
396  * @typedef Elm_Entry_Change_Info
397  * This corresponds to Edje_Entry_Change_Info. Includes information about
398  * a change in the entry.
399  */
400 typedef Edje_Entry_Change_Info Elm_Entry_Change_Info;
401
402 /**
403  * This adds an entry to @p parent object.
404  *
405  * By default, entries are:
406  * @li not scrolled
407  * @li multi-line
408  * @li word wrapped
409  * @li autosave is enabled
410  *
411  * @param parent The parent object
412  * @return The new object or NULL if it cannot be created
413  */
414 EAPI Evas_Object       *elm_entry_add(Evas_Object *parent);
415
416 /**
417  * Sets the entry to single line mode.
418  *
419  * In single line mode, entries don't ever wrap when the text reaches the
420  * edge, and instead they keep growing horizontally. Pressing the @c Enter
421  * key will generate an @c "activate" event instead of adding a new line.
422  *
423  * When @p single_line is @c EINA_FALSE, line wrapping takes effect again
424  * and pressing enter will break the text into a different line
425  * without generating any events.
426  *
427  * @param obj The entry object
428  * @param single_line If true, the text in the entry
429  * will be on a single line.
430  */
431 EAPI void               elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
432
433 /**
434  * Gets whether the entry is set to be single line.
435  *
436  * @param obj The entry object
437  * @return single_line If true, the text in the entry is set to display
438  * on a single line.
439  *
440  * @see elm_entry_single_line_set()
441  */
442 EAPI Eina_Bool          elm_entry_single_line_get(const Evas_Object *obj);
443
444 /**
445  * Sets the entry to password mode.
446  *
447  * In password mode, entries are implicitly single line and the display of
448  * any text in them is replaced with asterisks (*).
449  *
450  * @param obj The entry object
451  * @param password If true, password mode is enabled.
452  */
453 EAPI void               elm_entry_password_set(Evas_Object *obj, Eina_Bool password);
454
455 /**
456  * Gets whether the entry is set to password mode.
457  *
458  * @param obj The entry object
459  * @return If true, the entry is set to display all characters
460  * as asterisks (*).
461  *
462  * @see elm_entry_password_set()
463  */
464 EAPI Eina_Bool          elm_entry_password_get(const Evas_Object *obj);
465
466 /**
467  * This sets the text displayed within the entry to @p entry.
468  *
469  * @param obj The entry object
470  * @param entry The text to be displayed
471  *
472  * @note Using this function bypasses text filters
473  */
474 EAPI void               elm_entry_entry_set(Evas_Object *obj, const char *entry);
475
476 /**
477  * This returns the text currently shown in object @p entry.
478  * See also elm_entry_entry_set().
479  *
480  * @param obj The entry object
481  * @return The currently displayed text or NULL on failure
482  */
483 EAPI const char        *elm_entry_entry_get(const Evas_Object *obj);
484
485 /**
486  * Appends @p entry to the text of the entry.
487  *
488  * Adds the text in @p entry to the end of any text already present in the
489  * widget.
490  *
491  * The appended text is subject to any filters set for the widget.
492  *
493  * @param obj The entry object
494  * @param entry The text to be displayed
495  *
496  * @see elm_entry_markup_filter_append()
497  */
498 EAPI void               elm_entry_entry_append(Evas_Object *obj, const char *entry);
499
500 /**
501  * Gets whether the entry is empty.
502  *
503  * Empty means no text at all. If there are any markup tags, like an item
504  * tag for which no provider finds anything, and no text is displayed, this
505  * function still returns EINA_FALSE.
506  *
507  * @param obj The entry object
508  * @return EINA_TRUE if the entry is empty, EINA_FALSE otherwise.
509  */
510 EAPI Eina_Bool          elm_entry_is_empty(const Evas_Object *obj);
511
512 /**
513  * Gets any selected text within the entry.
514  *
515  * If there's any selected text in the entry, this function returns it as
516  * a string in markup format. NULL is returned if no selection exists or
517  * if an error occurred.
518  *
519  * The returned value points to an internal string and should not be freed
520  * or modified in any way. If the @p entry object is deleted or its
521  * contents are changed, the returned pointer should be considered invalid.
522  *
523  * @param obj The entry object
524  * @return The selected text within the entry or NULL on failure
525  */
526 EAPI const char        *elm_entry_selection_get(const Evas_Object *obj);
527
528 /**
529  * Returns the actual textblock object of the entry.
530  *
531  * This function exposes the internal textblock object that actually
532  * contains and draws the text. This should be used for low-level
533  * manipulations that are otherwise not possible.
534  *
535  * Changing the textblock directly from here will not notify edje/elm to
536  * recalculate the textblock size automatically, so any modifications
537  * done to the textblock returned by this function should be followed by
538  * a call to elm_entry_calc_force().
539  *
540  * The return value is marked as const as an additional warning.
541  * One should not use the returned object with any of the generic evas
542  * functions (geometry_get/resize/move and etc), but only with the textblock
543  * functions; The former will either not work at all, or break the correct
544  * functionality.
545  *
546  * IMPORTANT: Many functions may change (i.e delete and create a new one)
547  * the internal textblock object. Do NOT cache the returned object, and try
548  * not to mix calls on this object with regular elm_entry calls (which may
549  * change the internal textblock object). This applies to all cursors
550  * returned from textblock calls, and all the other derivative values.
551  *
552  * @param obj The entry object
553  * @return The textblock object.
554  */
555 EAPI Evas_Object *      elm_entry_textblock_get(Evas_Object *obj);
556
557 /**
558  * Forces calculation of the entry size and text layouting.
559  *
560  * This should be used after modifying the textblock object directly. See
561  * elm_entry_textblock_get() for more information.
562  *
563  * @param obj The entry object
564  *
565  * @see elm_entry_textblock_get()
566  */
567 EAPI void               elm_entry_calc_force(Evas_Object *obj);
568
569 /**
570  * Inserts the given text into the entry at the current cursor position.
571  *
572  * This inserts text at the cursor position as if it was typed
573  * by the user (note that this also allows markup which a user
574  * can't just "type" as it would be converted to escaped text, so this
575  * call can be used to insert things like emoticon items or bold push/pop
576  * tags, other font and color change tags etc.)
577  *
578  * If any selection exists, it will be replaced by the inserted text.
579  *
580  * The inserted text is subject to any filters set for the widget.
581  *
582  * @param obj The entry object
583  * @param entry The text to insert
584  *
585  * @see elm_entry_markup_filter_append()
586  */
587 EAPI void               elm_entry_entry_insert(Evas_Object *obj, const char *entry);
588
589 /**
590  * Set the line wrap type to use on multi-line entries.
591  *
592  * Sets the wrap type used by the entry to any of the specified in
593  * Elm_Wrap_Type. This tells how the text will be implicitly cut into a new
594  * line (without inserting a line break or paragraph separator) when it
595  * reaches the far edge of the widget.
596  *
597  * Note that this only makes sense for multi-line entries. A widget set
598  * to be single line will never wrap.
599  *
600  * @param obj The entry object
601  * @param wrap The wrap mode to use. See Elm_Wrap_Type for details on them
602  */
603 EAPI void               elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap);
604
605 /**
606  * Gets the wrap mode the entry was set to use.
607  *
608  * @param obj The entry object
609  * @return Wrap type
610  *
611  * @see also elm_entry_line_wrap_set()
612  */
613 EAPI Elm_Wrap_Type      elm_entry_line_wrap_get(const Evas_Object *obj);
614
615 /**
616  * Sets if the entry is to be editable or not.
617  *
618  * By default, entries are editable and when focused, any text input by the
619  * user will be inserted at the current cursor position. But calling this
620  * function with @p editable as EINA_FALSE will prevent the user from
621  * inputting text into the entry.
622  *
623  * The only way to change the text of a non-editable entry is to use
624  * elm_object_text_set(), elm_entry_entry_insert() and other related
625  * functions.
626  *
627  * @param obj The entry object
628  * @param editable If EINA_TRUE, user input will be inserted in the entry,
629  * if not, the entry is read-only and no user input is allowed.
630  */
631 EAPI void               elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable);
632
633 /**
634  * Gets whether the entry is editable or not.
635  *
636  * @param obj The entry object
637  * @return If true, the entry is editable by the user.
638  * If false, it is not editable by the user
639  *
640  * @see elm_entry_editable_set()
641  */
642 EAPI Eina_Bool          elm_entry_editable_get(const Evas_Object *obj);
643
644 /**
645  * This drops any existing text selection within the entry.
646  *
647  * @param obj The entry object
648  */
649 EAPI void               elm_entry_select_none(Evas_Object *obj);
650
651 /**
652  * This selects all text within the entry.
653  *
654  * @param obj The entry object
655  */
656 EAPI void               elm_entry_select_all(Evas_Object *obj);
657
658 /**
659  * This moves the cursor one place to the right within the entry.
660  *
661  * @param obj The entry object
662  * @return EINA_TRUE upon success, EINA_FALSE upon failure
663  */
664 EAPI Eina_Bool          elm_entry_cursor_next(Evas_Object *obj);
665
666 /**
667  * This moves the cursor one place to the left within the entry.
668  *
669  * @param obj The entry object
670  * @return EINA_TRUE upon success, EINA_FALSE upon failure
671  */
672 EAPI Eina_Bool          elm_entry_cursor_prev(Evas_Object *obj);
673
674 /**
675  * This moves the cursor one line up within the entry.
676  *
677  * @param obj The entry object
678  * @return EINA_TRUE upon success, EINA_FALSE upon failure
679  */
680 EAPI Eina_Bool          elm_entry_cursor_up(Evas_Object *obj);
681
682 /**
683  * This moves the cursor one line down within the entry.
684  *
685  * @param obj The entry object
686  * @return EINA_TRUE upon success, EINA_FALSE upon failure
687  */
688 EAPI Eina_Bool          elm_entry_cursor_down(Evas_Object *obj);
689
690 /**
691  * This moves the cursor to the beginning of the entry.
692  *
693  * @param obj The entry object
694  */
695 EAPI void               elm_entry_cursor_begin_set(Evas_Object *obj);
696
697 /**
698  * This moves the cursor to the end of the entry.
699  *
700  * @param obj The entry object
701  */
702 EAPI void               elm_entry_cursor_end_set(Evas_Object *obj);
703
704 /**
705  * This moves the cursor to the beginning of the current line.
706  *
707  * @param obj The entry object
708  */
709 EAPI void               elm_entry_cursor_line_begin_set(Evas_Object *obj);
710
711 /**
712  * This moves the cursor to the end of the current line.
713  *
714  * @param obj The entry object
715  */
716 EAPI void               elm_entry_cursor_line_end_set(Evas_Object *obj);
717
718 /**
719  * This begins a selection within the entry as though
720  * the user were holding down the mouse button to make a selection.
721  *
722  * @param obj The entry object
723  */
724 EAPI void               elm_entry_cursor_selection_begin(Evas_Object *obj);
725
726 /**
727  * This ends a selection within the entry as though
728  * the user had just released the mouse button while making a selection.
729  *
730  * @param obj The entry object
731  */
732 EAPI void               elm_entry_cursor_selection_end(Evas_Object *obj);
733
734 /**
735  * Gets whether a format node exists at the current cursor position.
736  *
737  * A format node is anything that defines how the text is rendered. It can
738  * be a visible format node, such as a line break or a paragraph separator,
739  * or an invisible one, such as bold begin or end tag.
740  * This function returns whether any format node exists at the current
741  * cursor position.
742  *
743  * @param obj The entry object
744  * @return EINA_TRUE if the current cursor position contains a format node,
745  * EINA_FALSE otherwise.
746  *
747  * @see elm_entry_cursor_is_visible_format_get()
748  */
749 EAPI Eina_Bool          elm_entry_cursor_is_format_get(const Evas_Object *obj);
750
751 /**
752  * Gets if the current cursor position holds a visible format node.
753  *
754  * @param obj The entry object
755  * @return EINA_TRUE if the current cursor is a visible format, EINA_FALSE
756  * if it's an invisible one or no format exists.
757  *
758  * @see elm_entry_cursor_is_format_get()
759  */
760 EAPI Eina_Bool          elm_entry_cursor_is_visible_format_get(const Evas_Object *obj);
761
762 /**
763  * Gets the character pointed by the cursor at its current position.
764  *
765  * This function returns a string with the utf8 character stored at the
766  * current cursor position.
767  * Only the text is returned, any format that may exist will not be part
768  * of the return value. You must free the string when done with free().
769  *
770  * @param obj The entry object
771  * @return The text pointed by the cursors.
772  */
773 EAPI char              *elm_entry_cursor_content_get(const Evas_Object *obj);
774
775 /**
776  * This function returns the geometry of the cursor.
777  *
778  * It's useful if you want to draw something on the cursor (or where it is),
779  * or for example in the case of scrolled entry where you want to show the
780  * cursor.
781  *
782  * @param obj The entry object
783  * @param x returned geometry
784  * @param y returned geometry
785  * @param w returned geometry
786  * @param h returned geometry
787  * @return EINA_TRUE upon success, EINA_FALSE upon failure
788  */
789 EAPI Eina_Bool          elm_entry_cursor_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
790
791 /**
792  * Sets the cursor position in the entry to the given value
793  *
794  * The value in @p pos is the index of the character position within the
795  * contents of the string as returned by elm_entry_cursor_pos_get().
796  *
797  * @param obj The entry object
798  * @param pos The position of the cursor
799  */
800 EAPI void               elm_entry_cursor_pos_set(Evas_Object *obj, int pos);
801
802 /**
803  * Retrieves the current position of the cursor in the entry
804  *
805  * @param obj The entry object
806  * @return The cursor position
807  */
808 EAPI int                elm_entry_cursor_pos_get(const Evas_Object *obj);
809
810 /**
811  * This executes a "cut" action on the selected text in the entry.
812  *
813  * @param obj The entry object
814  */
815 EAPI void               elm_entry_selection_cut(Evas_Object *obj);
816
817 /**
818  * This executes a "copy" action on the selected text in the entry.
819  *
820  * @param obj The entry object
821  */
822 EAPI void               elm_entry_selection_copy(Evas_Object *obj);
823
824 /**
825  * This executes a "paste" action in the entry.
826  *
827  * @param obj The entry object
828  */
829 EAPI void               elm_entry_selection_paste(Evas_Object *obj);
830
831 /**
832  * This clears and frees the items in a entry's contextual (longpress)
833  * menu.
834  *
835  * @param obj The entry object
836  *
837  * @see elm_entry_context_menu_item_add()
838  */
839 EAPI void               elm_entry_context_menu_clear(Evas_Object *obj);
840
841 /**
842  * This adds an item to the entry's contextual menu.
843  *
844  * A longpress on an entry will make the contextual menu show up, if this
845  * hasn't been disabled with elm_entry_context_menu_disabled_set().
846  * By default, this menu provides a few options like enabling selection mode,
847  * which is useful on embedded devices that need to be explicit about it,
848  * and when a selection exists it also shows the copy and cut actions.
849  *
850  * With this function, developers can add other options to this menu to
851  * perform any action they deem necessary.
852  *
853  * @param obj The entry object
854  * @param label The item's text label
855  * @param icon_file The item's icon file
856  * @param icon_type The item's icon type
857  * @param func The callback to execute when the item is clicked
858  * @param data The data to associate with the item for related functions
859  */
860 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);
861
862 /**
863  * This disables the entry's contextual (longpress) menu.
864  *
865  * @param obj The entry object
866  * @param disabled If true, the menu is disabled
867  */
868 EAPI void               elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled);
869
870 /**
871  * This returns whether the entry's contextual (longpress) menu is
872  * disabled.
873  *
874  * @param obj The entry object
875  * @return If true, the menu is disabled
876  */
877 EAPI Eina_Bool          elm_entry_context_menu_disabled_get(const Evas_Object *obj);
878
879 /**
880  * This appends a custom item provider to the list for that entry
881  *
882  * This appends the given callback. The list is walked from beginning to end
883  * with each function called given the item href string in the text. If the
884  * function returns an object handle other than NULL (it should create an
885  * object to do this), then this object is used to replace that item. If
886  * not the next provider is called until one provides an item object, or the
887  * default provider in entry does.
888  *
889  * @param obj The entry object
890  * @param func The function called to provide the item object
891  * @param data The data passed to @p func
892  *
893  * @see @ref entry-items
894  */
895 EAPI void               elm_entry_item_provider_append(Evas_Object *obj, Evas_Object * (*func)(void *data, Evas_Object * entry, const char *item), void *data);
896
897 /**
898  * This prepends a custom item provider to the list for that entry
899  *
900  * This prepends the given callback. See elm_entry_item_provider_append() for
901  * more information
902  *
903  * @param obj The entry object
904  * @param func The function called to provide the item object
905  * @param data The data passed to @p func
906  */
907 EAPI void               elm_entry_item_provider_prepend(Evas_Object *obj, Evas_Object * (*func)(void *data, Evas_Object * entry, const char *item), void *data);
908
909 /**
910  * This removes a custom item provider to the list for that entry
911  *
912  * This removes the given callback. See elm_entry_item_provider_append() for
913  * more information
914  *
915  * @param obj The entry object
916  * @param func The function called to provide the item object
917  * @param data The data passed to @p func
918  */
919 EAPI void               elm_entry_item_provider_remove(Evas_Object *obj, Evas_Object * (*func)(void *data, Evas_Object * entry, const char *item), void *data);
920
921 /**
922  * Append a markup filter function for text inserted in the entry
923  *
924  * Append the given callback to the list. This functions will be called
925  * whenever any text is inserted into the entry, with the text to be inserted
926  * as a parameter. The type of given text is always markup.
927  * The callback function is free to alter the text in any way it wants, but 
928  * it must remember to free the given pointer and update it.
929  * If the new text is to be discarded, the function can free it and set its
930  * text parameter to NULL. This will also prevent any following filters from
931  * being called.
932  *
933  * @param obj The entry object
934  * @param func The function to use as text filter
935  * @param data User data to pass to @p func
936  */
937 EAPI void               elm_entry_markup_filter_append(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
938
939 /**
940  * Prepend a markup filter function for text inserted in the entry
941  *
942  * Prepend the given callback to the list. See elm_entry_markup_filter_append()
943  * for more information
944  *
945  * @param obj The entry object
946  * @param func The function to use as text filter
947  * @param data User data to pass to @p func
948  */
949 EAPI void               elm_entry_markup_filter_prepend(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
950
951 /**
952  * Remove a markup filter from the list
953  *
954  * Removes the given callback from the filter list. See
955  * elm_entry_markup_filter_append() for more information.
956  *
957  * @param obj The entry object
958  * @param func The filter function to remove
959  * @param data The user data passed when adding the function
960  */
961 EAPI void               elm_entry_markup_filter_remove(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data);
962
963 /**
964  * This converts a markup (HTML-like) string into UTF-8.
965  *
966  * The returned string is a malloc'ed buffer and it should be freed when
967  * not needed anymore.
968  *
969  * @param s The string (in markup) to be converted
970  * @return The converted string (in UTF-8). It should be freed.
971  */
972 EAPI char              *elm_entry_markup_to_utf8(const char *s);
973
974 /**
975  * This converts a UTF-8 string into markup (HTML-like).
976  *
977  * The returned string is a malloc'ed buffer and it should be freed when
978  * not needed anymore.
979  *
980  * @param s The string (in UTF-8) to be converted
981  * @return The converted string (in markup). It should be freed.
982  */
983 EAPI char              *elm_entry_utf8_to_markup(const char *s);
984
985 /**
986  * This sets the file (and implicitly loads it) for the text to display and
987  * then edit. All changes are written back to the file after a short delay if
988  * the entry object is set to autosave (which is the default).
989  *
990  * If the entry had any other file set previously, any changes made to it
991  * will be saved if the autosave feature is enabled, otherwise, the file
992  * will be silently discarded and any non-saved changes will be lost.
993  *
994  * @param obj The entry object
995  * @param file The path to the file to load and save
996  * @param format The file format
997  */
998 EAPI void               elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format);
999
1000 /**
1001  * Gets the file being edited by the entry.
1002  *
1003  * This function can be used to retrieve any file set on the entry for
1004  * edition, along with the format used to load and save it.
1005  *
1006  * @param obj The entry object
1007  * @param file The path to the file to load and save
1008  * @param format The file format
1009  */
1010 EAPI void               elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format);
1011
1012 /**
1013  * This function writes any changes made to the file set with
1014  * elm_entry_file_set()
1015  *
1016  * @param obj The entry object
1017  */
1018 EAPI void               elm_entry_file_save(Evas_Object *obj);
1019
1020 /**
1021  * This sets the entry object to 'autosave' the loaded text file or not.
1022  *
1023  * @param obj The entry object
1024  * @param autosave Autosave the loaded file or not
1025  *
1026  * @see elm_entry_file_set()
1027  */
1028 EAPI void               elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave);
1029
1030 /**
1031  * This gets the entry object's 'autosave' status.
1032  *
1033  * @param obj The entry object
1034  * @return Autosave the loaded file or not
1035  *
1036  * @see elm_entry_file_set()
1037  */
1038 EAPI Eina_Bool          elm_entry_autosave_get(const Evas_Object *obj);
1039
1040 /**
1041  * Control pasting of text and images for the widget.
1042  *
1043  * Normally the entry allows both text and images to be pasted.  By setting
1044  * textonly to be true, this prevents images from being pasted.
1045  *
1046  * Note this only changes the behaviour of text.
1047  *
1048  * @param obj The entry object
1049  * @param textonly paste mode - EINA_TRUE is text only, EINA_FALSE is
1050  * text+image+other.
1051  */
1052 EAPI void               elm_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly);
1053
1054 /**
1055  * Getting elm_entry text paste/drop mode.
1056  *
1057  * In textonly mode, only text may be pasted or dropped into the widget.
1058  *
1059  * @param obj The entry object
1060  * @return If the widget only accepts text from pastes.
1061  */
1062 EAPI Eina_Bool          elm_entry_cnp_textonly_get(const Evas_Object *obj);
1063
1064 /**
1065  * Enable or disable scrolling in entry
1066  *
1067  * Normally the entry is not scrollable unless you enable it with this call.
1068  *
1069  * @param obj The entry object
1070  * @param scroll EINA_TRUE if it is to be scrollable, EINA_FALSE otherwise
1071  */
1072 EAPI void               elm_entry_scrollable_set(Evas_Object *obj, Eina_Bool scroll);
1073
1074 /**
1075  * Get the scrollable state of the entry
1076  *
1077  * Normally the entry is not scrollable. This gets the scrollable state
1078  * of the entry. See elm_entry_scrollable_set() for more information.
1079  *
1080  * @param obj The entry object
1081  * @return The scrollable state
1082  */
1083 EAPI Eina_Bool          elm_entry_scrollable_get(const Evas_Object *obj);
1084
1085 /**
1086  * Sets the visibility of the left-side widget of the scrolled entry,
1087  * set by elm_entry_icon_set().
1088  *
1089  * @param obj The scrolled entry object
1090  * @param setting EINA_TRUE if the object should be displayed,
1091  * EINA_FALSE if not.
1092  */
1093 EAPI void               elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting);
1094
1095 /**
1096  * Sets the visibility of the end widget of the scrolled entry, set by
1097  * elm_object_part_content_set(ent, "end", content).
1098  *
1099  * @param obj The scrolled entry object
1100  * @param setting EINA_TRUE if the object should be displayed,
1101  * EINA_FALSE if not.
1102  */
1103 EAPI void               elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting);
1104
1105 /**
1106  * This sets the scrolled entry's scrollbar policy (i.e. enabling/disabling
1107  * them).
1108  *
1109  * Setting an entry to single-line mode with elm_entry_single_line_set()
1110  * will automatically disable the display of scrollbars when the entry
1111  * moves inside its scroller.
1112  *
1113  * @param obj The scrolled entry object
1114  * @param h The horizontal scrollbar policy to apply
1115  * @param v The vertical scrollbar policy to apply
1116  */
1117 EAPI void               elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v);
1118
1119 /**
1120  * This enables/disables bouncing within the entry.
1121  *
1122  * This function sets whether the entry will bounce when scrolling reaches
1123  * the end of the contained entry.
1124  *
1125  * @param obj The scrolled entry object
1126  * @param h_bounce The horizontal bounce state
1127  * @param v_bounce The vertical bounce state
1128  */
1129 EAPI void               elm_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
1130
1131 /**
1132  * Get the bounce mode
1133  *
1134  * @param obj The Entry object
1135  * @param h_bounce Allow bounce horizontally
1136  * @param v_bounce Allow bounce vertically
1137  */
1138 EAPI void               elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
1139
1140 /**
1141  * Set the input panel layout of the entry
1142  *
1143  * @param obj The entry object
1144  * @param layout layout type
1145  */
1146 EAPI void                   elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
1147
1148 /**
1149  * Get the input panel layout of the entry
1150  *
1151  * @param obj The entry object
1152  * @return layout type
1153  *
1154  * @see elm_entry_input_panel_layout_set
1155  */
1156 EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(const Evas_Object *obj);
1157
1158 /**
1159  * Set the autocapitalization type on the immodule.
1160  *
1161  * @param obj The entry object
1162  * @param autocapital_type The type of autocapitalization
1163  */
1164 EAPI void                   elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type);
1165
1166 /**
1167  * Retrieve the autocapitalization type on the immodule.
1168  *
1169  * @param obj The entry object
1170  * @return autocapitalization type
1171  */
1172 EAPI Elm_Autocapital_Type   elm_entry_autocapital_type_get(const Evas_Object *obj);
1173
1174 /**
1175  * Sets the attribute to show the input panel automatically.
1176  *
1177  * @param obj The entry object
1178  * @param enabled If true, the input panel is appeared when entry is clicked or has a focus
1179  */
1180 EAPI void                   elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
1181
1182 /**
1183  * Retrieve the attribute to show the input panel automatically.
1184  *
1185  * @param obj The entry object
1186  * @return EINA_TRUE if input panel will be appeared when the entry is clicked or has a focus, EINA_FALSE otherwise
1187  */
1188 EAPI Eina_Bool              elm_entry_input_panel_enabled_get(const Evas_Object *obj);
1189
1190 /**
1191  * Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on.
1192  *
1193  * Note that input panel is shown or hidden automatically according to the focus state of entry widget.
1194  * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE).
1195  *
1196  * @param obj The entry object
1197  */
1198 EAPI void                   elm_entry_input_panel_show(Evas_Object *obj);
1199
1200 /**
1201  * Hide the input panel (virtual keyboard).
1202  *
1203  * Note that input panel is shown or hidden automatically according to the focus state of entry widget.
1204  * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE)
1205  *
1206  * @param obj The entry object
1207  */
1208 EAPI void                   elm_entry_input_panel_hide(Evas_Object *obj);
1209
1210 /**
1211  * Set the language mode of the input panel.
1212  *
1213  * This API can be used if you want to show the alphabet keyboard mode. 
1214  *
1215  * @param obj The entry object
1216  * @param lang language to be set to the input panel.
1217  */
1218 EAPI void                   elm_entry_input_panel_language_set(Evas_Object *obj, Elm_Input_Panel_Lang lang);
1219
1220 /**
1221  * Get the language mode of the input panel.
1222  *
1223  * See @ref elm_entry_input_panel_language_set for more details.
1224  *
1225  * @param obj The entry object
1226  * @return input panel language type
1227  */
1228 EAPI Elm_Input_Panel_Lang   elm_entry_input_panel_language_get(const Evas_Object *obj);
1229
1230 /**
1231  * Set the input panel-specific data to deliver to the input panel.
1232  *
1233  * This API is used by applications to deliver specific data to the input panel.
1234  * The data format MUST be negotiated by both application and the input panel.
1235  * The size and format of data are defined by the input panel.
1236  *
1237  * @param obj The entry object
1238  * @param data The specific data to be set to the input panel.
1239  * @param len the length of data, in bytes, to send to the input panel
1240  */
1241 EAPI void                   elm_entry_input_panel_imdata_set(Evas_Object *obj, const void *data, int len);
1242
1243 /**
1244  * Get the specific data of the current input panel.
1245  *
1246  * See @ref elm_entry_input_panel_imdata_set for more details. 
1247  *
1248  * @param obj The entry object
1249  * @param data The specific data to be got from the input panel
1250  * @param len The length of data
1251  */
1252 EAPI void                   elm_entry_input_panel_imdata_get(const Evas_Object *obj, void *data, int *len);
1253
1254 /**
1255  * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
1256  *
1257  * An input panel displays the string or icon associated with this type
1258  *
1259  * @param obj The entry object
1260  * @param return_key_type The type of "return" key on the input panel
1261  */
1262 EAPI void                   elm_entry_input_panel_return_key_type_set(Evas_Object *obj, Elm_Input_Panel_Return_Key_Type return_key_type);
1263
1264 /**
1265  * Get the "return" key type.
1266  *
1267  * @see elm_entry_input_panel_return_key_type_set() for more details
1268  *
1269  * @param obj The entry object
1270  * @return The type of "return" key on the input panel
1271  */
1272 EAPI Elm_Input_Panel_Return_Key_Type elm_entry_input_panel_return_key_type_get(const Evas_Object *obj);
1273
1274 /**
1275  * Set the return key on the input panel to be disabled.
1276  *
1277  * @param obj The entry object
1278  * @param disabled The state to put in in: @c EINA_TRUE for
1279  *        disabled, @c EINA_FALSE for enabled 
1280  */
1281 EAPI void                   elm_entry_input_panel_return_key_disabled_set(Evas_Object *obj, Eina_Bool disabled);
1282
1283 /**
1284  * Get whether the return key on the input panel should be disabled or not.
1285  *
1286  * @param obj The entry object
1287  * @return EINA_TRUE if it should be disabled
1288  */
1289 EAPI Eina_Bool              elm_entry_input_panel_return_key_disabled_get(const Evas_Object *obj);
1290
1291 /**
1292  * Reset the input method context of the entry if needed. 
1293  *
1294  * This can be necessary in the case where modifying the buffer would confuse on-going input method behavior
1295  * @param obj The entry object
1296  */
1297 EAPI void                   elm_entry_imf_context_reset(Evas_Object *obj);
1298
1299 /**
1300  * Set whether the entry should allow to use the text prediction.
1301  *
1302  * @param obj The entry object
1303  * @param prediction Whether the entry should allow to use the text prediction.
1304  */
1305 EAPI void                   elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool prediction);
1306
1307 /**
1308  * Get whether the entry should allow to use the text prediction.
1309  *
1310  * @param obj The entry object
1311  * @return EINA_TRUE if it allows to use the text prediction, otherwise EINA_FALSE.
1312  */
1313 EAPI Eina_Bool              elm_entry_prediction_allow_get(const Evas_Object *obj);
1314
1315 /* pre-made filters for entries */
1316
1317 /**
1318  * @typedef Elm_Entry_Filter_Limit_Size
1319  *
1320  * Data for the elm_entry_filter_limit_size() entry filter.
1321  */
1322 typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size;
1323
1324 /**
1325  * @struct _Elm_Entry_Filter_Limit_Size
1326  *
1327  * Data for the elm_entry_filter_limit_size() entry filter.
1328  */
1329 struct _Elm_Entry_Filter_Limit_Size
1330 {
1331    int max_char_count;      /**< The maximum number of characters allowed. */
1332    int max_byte_count;      /**< The maximum number of bytes allowed*/
1333 };
1334
1335 /**
1336  * Filter inserted text based on user defined character and byte limits
1337  *
1338  * Add this filter to an entry to limit the characters that it will accept
1339  * based the the contents of the provided #Elm_Entry_Filter_Limit_Size.
1340  * The function works on the UTF-8 representation of the string, converting
1341  * it from the set markup, thus not accounting for any format in it.
1342  *
1343  * The user must create an #Elm_Entry_Filter_Limit_Size structure and pass
1344  * it as data when setting the filter. In it, it's possible to set limits
1345  * by character count or bytes (any of them is disabled if 0), and both can
1346  * be set at the same time. In that case, it first checks for characters,
1347  * then bytes.
1348  *
1349  * The function will cut the inserted text in order to allow only the first
1350  * number of characters that are still allowed. The cut is made in
1351  * characters, even when limiting by bytes, in order to always contain
1352  * valid ones and avoid half unicode characters making it in.
1353  *
1354  * This filter, like any others, does not apply when setting the entry text
1355  * directly with elm_object_text_set().
1356  */
1357 EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text);
1358
1359 /**
1360  * @typedef Elm_Entry_Filter_Accept_Set
1361  *
1362  * Data for the elm_entry_filter_accept_set() entry filter.
1363  */
1364 typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set;
1365
1366 /**
1367  * @struct _Elm_Entry_Filter_Accept_Set
1368  *
1369  * Data for the elm_entry_filter_accept_set() entry filter.
1370  */
1371 struct _Elm_Entry_Filter_Accept_Set
1372 {
1373    const char *accepted;      /**< Set of characters accepted in the entry. */
1374    const char *rejected;      /**< Set of characters rejected from the entry. */
1375 };
1376
1377 /**
1378  * Filter inserted text based on accepted or rejected sets of characters
1379  *
1380  * Add this filter to an entry to restrict the set of accepted characters
1381  * based on the sets in the provided #Elm_Entry_Filter_Accept_Set.
1382  * This structure contains both accepted and rejected sets, but they are
1383  * mutually exclusive.
1384  *
1385  * The @c accepted set takes preference, so if it is set, the filter will
1386  * only work based on the accepted characters, ignoring anything in the
1387  * @c rejected value. If @c accepted is @c NULL, then @c rejected is used.
1388  *
1389  * In both cases, the function filters by matching utf8 characters to the
1390  * raw markup text, so it can be used to remove formatting tags.
1391  *
1392  * This filter, like any others, does not apply when setting the entry text
1393  * directly with elm_object_text_set()
1394  */
1395 EAPI void                   elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text);
1396
1397 /**
1398  * @}
1399  */