summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_entry_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_entry_eo.legacy.h')
-rw-r--r--src/lib/elementary/elm_entry_eo.legacy.h1252
1 files changed, 1252 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_entry_eo.legacy.h b/src/lib/elementary/elm_entry_eo.legacy.h
new file mode 100644
index 0000000..6fe0608
--- /dev/null
+++ b/src/lib/elementary/elm_entry_eo.legacy.h
@@ -0,0 +1,1252 @@
1#ifndef _ELM_ENTRY_EO_LEGACY_H_
2#define _ELM_ENTRY_EO_LEGACY_H_
3
4#ifndef _ELM_ENTRY_EO_CLASS_TYPE
5#define _ELM_ENTRY_EO_CLASS_TYPE
6
7typedef Eo Elm_Entry;
8
9#endif
10
11#ifndef _ELM_ENTRY_EO_TYPES
12#define _ELM_ENTRY_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Enable or disable scrolling in entry
19 *
20 * Normally the entry is not scrollable unless you enable it with this call.
21 *
22 * @param[in] obj The object.
23 * @param[in] scroll @c true if it is to be scrollable, @c false otherwise.
24 *
25 * @ingroup Elm_Entry_Group
26 */
27EAPI void elm_entry_scrollable_set(Elm_Entry *obj, Eina_Bool scroll);
28
29/**
30 * @brief Get the scrollable state of the entry
31 *
32 * Normally the entry is not scrollable. This gets the scrollable state of the
33 * entry.
34 *
35 * @param[in] obj The object.
36 *
37 * @return @c true if it is to be scrollable, @c false otherwise.
38 *
39 * @ingroup Elm_Entry_Group
40 */
41EAPI Eina_Bool elm_entry_scrollable_get(const Elm_Entry *obj);
42
43/**
44 * @brief Set the attribute to show the input panel in case of only an user's
45 * explicit Mouse Up event. It doesn't request to show the input panel even
46 * though it has focus.
47 *
48 * @param[in] obj The object.
49 * @param[in] ondemand If @c true, the input panel will be shown in case of
50 * only Mouse up event. (Focus event will be ignored.)
51 *
52 * @since 1.9
53 *
54 * @ingroup Elm_Entry_Group
55 */
56EAPI void elm_entry_input_panel_show_on_demand_set(Elm_Entry *obj, Eina_Bool ondemand);
57
58/**
59 * @brief Get the attribute to show the input panel in case of only an user's
60 * explicit Mouse Up event.
61 *
62 * @param[in] obj The object.
63 *
64 * @return If @c true, the input panel will be shown in case of only Mouse up
65 * event. (Focus event will be ignored.)
66 *
67 * @since 1.9
68 *
69 * @ingroup Elm_Entry_Group
70 */
71EAPI Eina_Bool elm_entry_input_panel_show_on_demand_get(const Elm_Entry *obj);
72
73/**
74 * @brief This disables the entry's contextual (longpress) menu.
75 *
76 * @param[in] obj The object.
77 * @param[in] disabled If @c true, the menu is disabled.
78 *
79 * @ingroup Elm_Entry_Group
80 */
81EAPI void elm_entry_context_menu_disabled_set(Elm_Entry *obj, Eina_Bool disabled);
82
83/**
84 * @brief This returns whether the entry's contextual (longpress) menu is
85 * disabled.
86 *
87 * @param[in] obj The object.
88 *
89 * @return If @c true, the menu is disabled.
90 *
91 * @ingroup Elm_Entry_Group
92 */
93EAPI Eina_Bool elm_entry_context_menu_disabled_get(const Elm_Entry *obj);
94
95/**
96 * @brief Control pasting of text and images for the widget.
97 *
98 * Normally the entry allows both text and images to be pasted. By setting
99 * cnp_mode to be #ELM_CNP_MODE_NO_IMAGE, this prevents images from being copy
100 * or past. By setting cnp_mode to be #ELM_CNP_MODE_PLAINTEXT, this remove all
101 * tags in text .
102 *
103 * @note This only changes the behaviour of text.
104 *
105 * @param[in] obj The object.
106 * @param[in] cnp_mode One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP,
107 * #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT.
108 *
109 * @ingroup Elm_Entry_Group
110 */
111EAPI void elm_entry_cnp_mode_set(Elm_Entry *obj, Elm_Cnp_Mode cnp_mode);
112
113/**
114 * @brief Getting elm_entry text paste/drop mode.
115 *
116 * Normally the entry allows both text and images to be pasted. This gets the
117 * copy & paste mode of the entry.
118 *
119 * @param[in] obj The object.
120 *
121 * @return One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP, #ELM_CNP_MODE_NO_IMAGE,
122 * #ELM_CNP_MODE_PLAINTEXT.
123 *
124 * @ingroup Elm_Entry_Group
125 */
126EAPI Elm_Cnp_Mode elm_entry_cnp_mode_get(const Elm_Entry *obj);
127
128/**
129 * @brief Text format used to load and save the file, which could be plain text
130 * or markup text.
131 *
132 * Default is @c ELM_TEXT_FORMAT_PLAIN_UTF8, if you want to use
133 * @c ELM_TEXT_FORMAT_MARKUP_UTF8 then you need to set the text format before
134 * calling @ref Efl.File.load.
135 *
136 * You could also set it before a call to @ref elm_entry_file_save in order to
137 * save with the given format.
138 *
139 * Use it before calling @ref Efl.File.load or @ref elm_entry_file_save.
140 *
141 * @param[in] obj The object.
142 * @param[in] format The file format
143 *
144 * @ingroup Elm_Entry_Group
145 */
146EAPI void elm_entry_file_text_format_set(Elm_Entry *obj, Elm_Text_Format format);
147
148/**
149 * @brief Set the language mode of the input panel.
150 *
151 * This API can be used if you want to show the alphabet keyboard mode.
152 *
153 * @param[in] obj The object.
154 * @param[in] lang Language to be set to the input panel.
155 *
156 * @ingroup Elm_Entry_Group
157 */
158EAPI void elm_entry_input_panel_language_set(Elm_Entry *obj, Elm_Input_Panel_Lang lang);
159
160/**
161 * @brief Get the language mode of the input panel.
162 *
163 * @param[in] obj The object.
164 *
165 * @return Language to be set to the input panel.
166 *
167 * @ingroup Elm_Entry_Group
168 */
169EAPI Elm_Input_Panel_Lang elm_entry_input_panel_language_get(const Elm_Entry *obj);
170
171/**
172 * @brief This disabled the entry's selection handlers.
173 *
174 * @param[in] obj The object.
175 * @param[in] disabled If @c true, the selection handlers are disabled.
176 *
177 * @ingroup Elm_Entry_Group
178 */
179EAPI void elm_entry_selection_handler_disabled_set(Elm_Entry *obj, Eina_Bool disabled);
180
181
182/**
183 * @brief Set the input panel layout variation of the entry
184 *
185 * @param[in] obj The object.
186 * @param[in] variation Layout variation type.
187 *
188 * @since 1.8
189 *
190 * @ingroup Elm_Entry_Group
191 */
192EAPI void elm_entry_input_panel_layout_variation_set(Elm_Entry *obj, int variation);
193
194/**
195 * @brief Get the input panel layout variation of the entry
196 *
197 * @param[in] obj The object.
198 *
199 * @return Layout variation type.
200 *
201 * @since 1.8
202 *
203 * @ingroup Elm_Entry_Group
204 */
205EAPI int elm_entry_input_panel_layout_variation_get(const Elm_Entry *obj);
206
207/**
208 * @brief Set the autocapitalization type on the immodule.
209 *
210 * @param[in] obj The object.
211 * @param[in] autocapital_type The type of autocapitalization.
212 *
213 * @ingroup Elm_Entry_Group
214 */
215EAPI void elm_entry_autocapital_type_set(Elm_Entry *obj, Elm_Autocapital_Type autocapital_type);
216
217/**
218 * @brief Get the autocapitalization type on the immodule.
219 *
220 * @param[in] obj The object.
221 *
222 * @return The type of autocapitalization.
223 *
224 * @ingroup Elm_Entry_Group
225 */
226EAPI Elm_Autocapital_Type elm_entry_autocapital_type_get(const Elm_Entry *obj);
227
228/**
229 * @brief Sets if the entry is to be editable or not.
230 *
231 * By default, entries are editable and when focused, any text input by the
232 * user will be inserted at the current cursor position. But calling this
233 * function with @c editable as @c false will prevent the user from inputting
234 * text into the entry.
235 *
236 * The only way to change the text of a non-editable entry is to use @ref
237 * elm_object_text_set, @ref elm_entry_entry_insert and other related
238 * functions.
239 *
240 * @param[in] obj The object.
241 * @param[in] editable If @c true, user input will be inserted in the entry, if
242 * not, the entry is read-only and no user input is allowed.
243 *
244 * @ingroup Elm_Entry_Group
245 */
246EAPI void elm_entry_editable_set(Elm_Entry *obj, Eina_Bool editable);
247
248/**
249 * @brief Get whether the entry is editable or not.
250 *
251 * @param[in] obj The object.
252 *
253 * @return If @c true, user input will be inserted in the entry, if not, the
254 * entry is read-only and no user input is allowed.
255 *
256 * @ingroup Elm_Entry_Group
257 */
258EAPI Eina_Bool elm_entry_editable_get(const Elm_Entry *obj);
259
260/**
261 * @brief Set the style that the hover should use
262 *
263 * When creating the popup hover, entry will request that it's themed according
264 * to @c style.
265 *
266 * Setting style no @c null means disabling automatic hover.
267 *
268 * @param[in] obj The object.
269 * @param[in] style The style to use for the underlying hover.
270 *
271 * @ingroup Elm_Entry_Group
272 */
273EAPI void elm_entry_anchor_hover_style_set(Elm_Entry *obj, const char *style);
274
275/**
276 * @brief Get the style that the hover should use.
277 *
278 * @param[in] obj The object.
279 *
280 * @return The style to use for the underlying hover.
281 *
282 * @ingroup Elm_Entry_Group
283 */
284EAPI const char *elm_entry_anchor_hover_style_get(const Elm_Entry *obj);
285
286/**
287 * @brief Sets the entry to single line mode.
288 *
289 * In single line mode, entries don't ever wrap when the text reaches the edge,
290 * and instead they keep growing horizontally. Pressing the @c Enter key will
291 * generate an $"activate" event instead of adding a new line.
292 *
293 * When @c single_line is @c false, line wrapping takes effect again and
294 * pressing enter will break the text into a different line without generating
295 * any events.
296 *
297 * @param[in] obj The object.
298 * @param[in] single_line If @c true, the text in the entry will be on a single
299 * line.
300 *
301 * @ingroup Elm_Entry_Group
302 */
303EAPI void elm_entry_single_line_set(Elm_Entry *obj, Eina_Bool single_line);
304
305/**
306 * @brief Get whether the entry is set to be single line.
307 *
308 * @param[in] obj The object.
309 *
310 * @return If @c true, the text in the entry will be on a single line.
311 *
312 * @ingroup Elm_Entry_Group
313 */
314EAPI Eina_Bool elm_entry_single_line_get(const Elm_Entry *obj);
315
316/**
317 * @brief Sets the entry to password mode.
318 *
319 * In password mode, entries are implicitly single line and the display of any
320 * text in them is replaced with asterisks (*).
321 *
322 * @param[in] obj The object.
323 * @param[in] password If @c true, password mode is enabled.
324 *
325 * @ingroup Elm_Entry_Group
326 */
327EAPI void elm_entry_password_set(Elm_Entry *obj, Eina_Bool password);
328
329/**
330 * @brief Get whether the entry is set to password mode.
331 *
332 * @param[in] obj The object.
333 *
334 * @return If @c true, password mode is enabled.
335 *
336 * @ingroup Elm_Entry_Group
337 */
338EAPI Eina_Bool elm_entry_password_get(const Elm_Entry *obj);
339
340/**
341 * @brief Set the return key on the input panel to be disabled.
342 *
343 * @param[in] obj The object.
344 * @param[in] disabled The state to put in in: @c true for disabled, @c false
345 * for enabled.
346 *
347 * @ingroup Elm_Entry_Group
348 */
349EAPI void elm_entry_input_panel_return_key_disabled_set(Elm_Entry *obj, Eina_Bool disabled);
350
351/**
352 * @brief Get whether the return key on the input panel should be disabled or
353 * not.
354 *
355 * @param[in] obj The object.
356 *
357 * @return The state to put in in: @c true for disabled, @c false for enabled.
358 *
359 * @ingroup Elm_Entry_Group
360 */
361EAPI Eina_Bool elm_entry_input_panel_return_key_disabled_get(const Elm_Entry *obj);
362
363/**
364 * @brief This sets the entry object to 'autosave' the loaded text file or not.
365 *
366 * @param[in] obj The object.
367 * @param[in] auto_save Autosave the loaded file or not.
368 *
369 * @ingroup Elm_Entry_Group
370 */
371EAPI void elm_entry_autosave_set(Elm_Entry *obj, Eina_Bool auto_save);
372
373/**
374 * @brief This gets the entry object's 'autosave' status.
375 *
376 * @param[in] obj The object.
377 *
378 * @return Autosave the loaded file or not.
379 *
380 * @ingroup Elm_Entry_Group
381 */
382EAPI Eina_Bool elm_entry_autosave_get(const Elm_Entry *obj);
383
384/**
385 * @brief Set the parent of the hover popup
386 *
387 * Sets the parent object to use by the hover created by the entry when an
388 * anchor is clicked.
389 *
390 * @param[in] obj The object.
391 * @param[in] parent The object to use as parent for the hover.
392 *
393 * @ingroup Elm_Entry_Group
394 */
395EAPI void elm_entry_anchor_hover_parent_set(Elm_Entry *obj, Efl_Canvas_Object *parent);
396
397/**
398 * @brief Get the parent of the hover popup
399 *
400 * Get the object used as parent for the hover created by the entry widget. If
401 * no parent is set, the same entry object will be used.
402 *
403 * @param[in] obj The object.
404 *
405 * @return The object to use as parent for the hover.
406 *
407 * @ingroup Elm_Entry_Group
408 */
409EAPI Efl_Canvas_Object *elm_entry_anchor_hover_parent_get(const Elm_Entry *obj);
410
411/**
412 * @brief Set whether the entry should allow to use the text prediction.
413 *
414 * @param[in] obj The object.
415 * @param[in] prediction Whether the entry should allow to use the text
416 * prediction.
417 *
418 * @ingroup Elm_Entry_Group
419 */
420EAPI void elm_entry_prediction_allow_set(Elm_Entry *obj, Eina_Bool prediction);
421
422/**
423 * @brief Get whether the entry should allow to use the text prediction.
424 *
425 * @param[in] obj The object.
426 *
427 * @return Whether the entry should allow to use the text prediction.
428 *
429 * @ingroup Elm_Entry_Group
430 */
431EAPI Eina_Bool elm_entry_prediction_allow_get(const Elm_Entry *obj);
432
433/**
434 * @brief Sets the input hint which allows input methods to fine-tune their
435 * behavior.
436 *
437 * @param[in] obj The object.
438 * @param[in] hints Input hint.
439 *
440 * @ingroup Elm_Entry_Group
441 */
442EAPI void elm_entry_input_hint_set(Elm_Entry *obj, Elm_Input_Hints hints);
443
444/**
445 * @brief Gets the value of input hint.
446 *
447 * @param[in] obj The object.
448 *
449 * @return Input hint.
450 *
451 * @ingroup Elm_Entry_Group
452 */
453EAPI Elm_Input_Hints elm_entry_input_hint_get(const Elm_Entry *obj);
454
455/**
456 * @brief Set the input panel layout of the entry.
457 *
458 * @param[in] obj The object.
459 * @param[in] layout Layout type.
460 *
461 * @ingroup Elm_Entry_Group
462 */
463EAPI void elm_entry_input_panel_layout_set(Elm_Entry *obj, Elm_Input_Panel_Layout layout);
464
465/**
466 * @brief Get the input panel layout of the entry.
467 *
468 * @param[in] obj The object.
469 *
470 * @return Layout type.
471 *
472 * @ingroup Elm_Entry_Group
473 */
474EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(const Elm_Entry *obj);
475
476/**
477 * @brief Set the "return" key type. This type is used to set string or icon on
478 * the "return" key of the input panel.
479 *
480 * An input panel displays the string or icon associated with this type.
481 *
482 * Regardless of return key type, "activated" event will be generated when
483 * pressing return key in single line entry.
484 *
485 * @param[in] obj The object.
486 * @param[in] return_key_type The type of "return" key on the input panel.
487 *
488 * @ingroup Elm_Entry_Group
489 */
490EAPI void elm_entry_input_panel_return_key_type_set(Elm_Entry *obj, Elm_Input_Panel_Return_Key_Type return_key_type);
491
492/**
493 * @brief Get the "return" key type.
494 *
495 * @param[in] obj The object.
496 *
497 * @return The type of "return" key on the input panel.
498 *
499 * @ingroup Elm_Entry_Group
500 */
501EAPI Elm_Input_Panel_Return_Key_Type elm_entry_input_panel_return_key_type_get(const Elm_Entry *obj);
502
503/**
504 * @brief Sets the attribute to show the input panel automatically.
505 *
506 * @param[in] obj The object.
507 * @param[in] enabled If @c true, the input panel is appeared when entry is
508 * clicked or has a focus.
509 *
510 * @ingroup Elm_Entry_Group
511 */
512EAPI void elm_entry_input_panel_enabled_set(Elm_Entry *obj, Eina_Bool enabled);
513
514/**
515 * @brief Get the attribute to show the input panel automatically.
516 *
517 * @param[in] obj The object.
518 *
519 * @return If @c true, the input panel is appeared when entry is clicked or has
520 * a focus.
521 *
522 * @ingroup Elm_Entry_Group
523 */
524EAPI Eina_Bool elm_entry_input_panel_enabled_get(const Elm_Entry *obj);
525
526/**
527 * @brief Set the line wrap type to use on multi-line entries.
528 *
529 * Sets the wrap type used by the entry to any of the specified in
530 * Elm_Wrap_Type. This tells how the text will be implicitly cut into a new
531 * line (without inserting a line break or paragraph separator) when it reaches
532 * the far edge of the widget.
533 *
534 * Note that this only makes sense for multi-line entries. A widget set to be
535 * single line will never wrap.
536 *
537 * @param[in] obj The object.
538 * @param[in] wrap The wrap mode to use. See Elm_Wrap_Type for details on them.
539 *
540 * @ingroup Elm_Entry_Group
541 */
542EAPI void elm_entry_line_wrap_set(Elm_Entry *obj, Elm_Wrap_Type wrap);
543
544/**
545 * @brief Get the wrap mode the entry was set to use.
546 *
547 * @param[in] obj The object.
548 *
549 * @return The wrap mode to use. See Elm_Wrap_Type for details on them.
550 *
551 * @ingroup Elm_Entry_Group
552 */
553EAPI Elm_Wrap_Type elm_entry_line_wrap_get(const Elm_Entry *obj);
554
555/**
556 * @brief Sets the cursor position in the entry to the given value
557 *
558 * The value in @c pos is the index of the character position within the
559 * contents of the string as returned by @ref elm_entry_cursor_pos_get.
560 *
561 * @param[in] obj The object.
562 * @param[in] pos The position of the cursor.
563 *
564 * @ingroup Elm_Entry_Group
565 */
566EAPI void elm_entry_cursor_pos_set(Elm_Entry *obj, int pos);
567
568/**
569 * @brief Get the current position of the cursor in the entry.
570 *
571 * @param[in] obj The object.
572 *
573 * @return The position of the cursor.
574 *
575 * @ingroup Elm_Entry_Group
576 */
577EAPI int elm_entry_cursor_pos_get(const Elm_Entry *obj);
578
579/**
580 * @brief Sets the visibility of the left-side widget of the entry, set by @ref
581 * elm_object_part_content_set.
582 *
583 * @param[in] obj The object.
584 * @param[in] setting @c true if the object should be displayed, @c false if
585 * not.
586 *
587 * @ingroup Elm_Entry_Group
588 */
589EAPI void elm_entry_icon_visible_set(Elm_Entry *obj, Eina_Bool setting);
590
591/** This moves the cursor to the end of the current line.
592 *
593 * @ingroup Elm_Entry_Group
594 */
595EAPI void elm_entry_cursor_line_end_set(Elm_Entry *obj);
596
597/**
598 * @brief This selects a region of text within the entry.
599 *
600 * @param[in] obj The object.
601 * @param[in] start The starting position.
602 * @param[in] end The end position.
603 *
604 * @since 1.9
605 *
606 * @ingroup Elm_Entry_Group
607 */
608EAPI void elm_entry_select_region_set(Elm_Entry *obj, int start, int end);
609
610/**
611 * @brief Get the current position of the selection cursors in the entry.
612 *
613 * @param[in] obj The object.
614 * @param[out] start The starting position.
615 * @param[out] end The end position.
616 *
617 * @since 1.18
618 *
619 * @ingroup Elm_Entry_Group
620 */
621EAPI void elm_entry_select_region_get(const Elm_Entry *obj, int *start, int *end);
622
623/**
624 * @brief Set whether the return key on the input panel is disabled
625 * automatically when entry has no text.
626 *
627 * If @c enabled is @c true, The return key on input panel is disabled when the
628 * entry has no text. The return key on the input panel is automatically
629 * enabled when the entry has text. The default value is @c false.
630 *
631 * @param[in] obj The object.
632 * @param[in] enabled If @c enabled is @c true, the return key is automatically
633 * disabled when the entry has no text.
634 *
635 * @ingroup Elm_Entry_Group
636 */
637EAPI void elm_entry_input_panel_return_key_autoenabled_set(Elm_Entry *obj, Eina_Bool enabled);
638
639/**
640 * @brief Sets the visibility of the end widget of the entry, set by @ref
641 * elm_object_part_content_set(ent, "end", content).
642 *
643 * @param[in] obj The object.
644 * @param[in] setting @c true if the object should be displayed, false if not.
645 *
646 * @ingroup Elm_Entry_Group
647 */
648EAPI void elm_entry_end_visible_set(Elm_Entry *obj, Eina_Bool setting);
649
650/** This moves the cursor to the beginning of the entry.
651 *
652 * @ingroup Elm_Entry_Group
653 */
654EAPI void elm_entry_cursor_begin_set(Elm_Entry *obj);
655
656/** This moves the cursor to the beginning of the current line.
657 *
658 * @ingroup Elm_Entry_Group
659 */
660EAPI void elm_entry_cursor_line_begin_set(Elm_Entry *obj);
661
662/** This moves the cursor to the end of the entry.
663 *
664 * @ingroup Elm_Entry_Group
665 */
666EAPI void elm_entry_cursor_end_set(Elm_Entry *obj);
667
668/**
669 * @brief Returns the actual textblock object of the entry.
670 *
671 * This function exposes the internal textblock object that actually contains
672 * and draws the text. This should be used for low-level manipulations that are
673 * otherwise not possible.
674 *
675 * Changing the textblock directly from here will not notify edje/elm to
676 * recalculate the textblock size automatically, so any modifications done to
677 * the textblock returned by this function should be followed by a call to @ref
678 * elm_entry_calc_force.
679 *
680 * The return value is marked as const as an additional warning. One should not
681 * use the returned object with any of the generic evas functions
682 * (geometry_get/resize/move and etc), but only with the textblock functions;
683 * The former will either not work at all, or break the correct functionality.
684 *
685 * IMPORTANT: Many functions may change (i.e delete and create a new one) the
686 * internal textblock object. Do NOT cache the returned object, and try not to
687 * mix calls on this object with regular elm_entry calls (which may change the
688 * internal textblock object). This applies to all cursors returned from
689 * textblock calls, and all the other derivative values.
690 *
691 * @param[in] obj The object.
692 *
693 * @return Textblock object
694 *
695 * @ingroup Elm_Entry_Group
696 */
697EAPI Efl_Canvas_Object *elm_entry_textblock_get(const Elm_Entry *obj);
698
699/**
700 * @brief This function returns the geometry of the cursor.
701 *
702 * It's useful if you want to draw something on the cursor (or where it is), or
703 * for example in the case of scrolled entry where you want to show the cursor.
704 *
705 * @param[in] obj The object.
706 * @param[out] x X coordinate
707 * @param[out] y Y coordinate
708 * @param[out] w Width
709 * @param[out] h Height
710 *
711 * @return @c true on success, @c false otherwise
712 *
713 * @ingroup Elm_Entry_Group
714 */
715EAPI Eina_Bool elm_entry_cursor_geometry_get(const Elm_Entry *obj, int *x, int *y, int *w, int *h);
716
717/**
718 * @brief Returns the input method context of the entry.
719 *
720 * This function exposes the internal input method context.
721 *
722 * IMPORTANT: Many functions may change (i.e delete and create a new one) the
723 * internal input method context. Do NOT cache the returned object.
724 *
725 * @param[in] obj The object.
726 *
727 * @return Input method context
728 *
729 * @ingroup Elm_Entry_Group
730 */
731EAPI void *elm_entry_imf_context_get(const Elm_Entry *obj);
732
733/**
734 * @brief Get whether a format node exists at the current cursor position.
735 *
736 * A format node is anything that defines how the text is rendered. It can be a
737 * visible format node, such as a line break or a paragraph separator, or an
738 * invisible one, such as bold begin or end tag. This function returns whether
739 * any format node exists at the current cursor position.
740 *
741 * @param[in] obj The object.
742 *
743 * @return @c true if format node exists, @c false otherwise
744 *
745 * @ingroup Elm_Entry_Group
746 */
747EAPI Eina_Bool elm_entry_cursor_is_format_get(const Elm_Entry *obj);
748
749/**
750 * @brief Get the character pointed by the cursor at its current position.
751 *
752 * This function returns a string with the utf8 character stored at the current
753 * cursor position. Only the text is returned, any format that may exist will
754 * not be part of the return value. You must free the string when done with
755 * @ref free.
756 *
757 * @param[in] obj The object.
758 *
759 * @return Character
760 *
761 * @ingroup Elm_Entry_Group
762 */
763EAPI char *elm_entry_cursor_content_get(const Elm_Entry *obj) EINA_WARN_UNUSED_RESULT;
764
765/**
766 * @brief Get any selected text within the entry.
767 *
768 * If there's any selected text in the entry, this function returns it as a
769 * string in markup format. @c null is returned if no selection exists or if an
770 * error occurred.
771 *
772 * The returned value points to an internal string and should not be freed or
773 * modified in any way. If the @c entry object is deleted or its contents are
774 * changed, the returned pointer should be considered invalid.
775 *
776 * @param[in] obj The object.
777 *
778 * @return Selected string
779 *
780 * @ingroup Elm_Entry_Group
781 */
782EAPI const char *elm_entry_selection_get(const Elm_Entry *obj);
783
784/**
785 * @brief Get if the current cursor position holds a visible format node.
786 *
787 * @param[in] obj The object.
788 *
789 * @return @c true if position has a visible format, @c false otherwise
790 *
791 * @ingroup Elm_Entry_Group
792 */
793EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Elm_Entry *obj);
794
795/**
796 * @brief Allow selection in the entry.
797 *
798 * @param[in] obj The object.
799 * @param[in] allow If @c allow is true, the text selection is allowed.
800 *
801 * @since 1.18
802 *
803 * @ingroup Elm_Entry_Group
804 */
805EAPI void elm_entry_select_allow_set(Elm_Entry *obj, Eina_Bool allow);
806
807/**
808 * @brief Allow selection in the entry.
809 *
810 * @param[in] obj The object.
811 *
812 * @return If @c allow is true, the text selection is allowed.
813 *
814 * @since 1.18
815 *
816 * @ingroup Elm_Entry_Group
817 */
818EAPI Eina_Bool elm_entry_select_allow_get(const Elm_Entry *obj);
819
820/**
821 * @brief This moves the cursor one place to the left within the entry.
822 *
823 * @param[in] obj The object.
824 *
825 * @return @c true on success, @c false otherwise
826 *
827 * @ingroup Elm_Entry_Group
828 */
829EAPI Eina_Bool elm_entry_cursor_prev(Elm_Entry *obj);
830
831/** Remove the style in the top of user style stack.
832 *
833 * @since 1.7
834 *
835 * @ingroup Elm_Entry_Group
836 */
837EAPI void elm_entry_text_style_user_pop(Elm_Entry *obj);
838
839/**
840 * @brief This prepends a custom item provider to the list for that entry
841 *
842 * This prepends the given callback.
843 *
844 * @param[in] obj The object.
845 * @param[in] func The function called to provide the item object.
846 * @param[in] data The data passed to @c func.
847 *
848 * @ingroup Elm_Entry_Group
849 */
850EAPI void elm_entry_item_provider_prepend(Elm_Entry *obj, Elm_Entry_Item_Provider_Cb func, void *data);
851
852/**
853 * @brief Show the input panel (virtual keyboard) based on the input panel
854 * property of entry such as layout, autocapital types, and so on.
855 *
856 * Note that input panel is shown or hidden automatically according to the
857 * focus state of entry widget. This API can be used in the case of manually
858 * controlling by using @ref elm_entry_input_panel_enabled_set(en, @c false).
859 * @param[in] obj The object.
860 *
861 * @ingroup Elm_Entry_Group
862 */
863EAPI void elm_entry_input_panel_show(Elm_Entry *obj);
864
865/**
866 * @brief Reset the input method context of the entry if needed.
867 *
868 * This can be necessary in the case where modifying the buffer would confuse
869 * on-going input method behavior. This will typically cause the Input Method
870 * Context to clear the preedit state.
871 * @param[in] obj The object.
872 *
873 * @ingroup Elm_Entry_Group
874 */
875EAPI void elm_entry_imf_context_reset(Elm_Entry *obj);
876
877/**
878 * @brief Ends the hover popup in the entry
879 *
880 * When an anchor is clicked, the entry widget will create a hover object to
881 * use as a popup with user provided content. This function terminates this
882 * popup, returning the entry to its normal state.
883 * @param[in] obj The object.
884 *
885 * @ingroup Elm_Entry_Group
886 */
887EAPI void elm_entry_anchor_hover_end(Elm_Entry *obj);
888
889/** This begins a selection within the entry as though the user were holding
890 * down the mouse button to make a selection.
891 *
892 * @ingroup Elm_Entry_Group
893 */
894EAPI void elm_entry_cursor_selection_begin(Elm_Entry *obj);
895
896/**
897 * @brief This moves the cursor one line down within the entry.
898 *
899 * @param[in] obj The object.
900 *
901 * @return @c true on success, @c false otherwise
902 *
903 * @ingroup Elm_Entry_Group
904 */
905EAPI Eina_Bool elm_entry_cursor_down(Elm_Entry *obj);
906
907/** This function writes any changes made to the file set with @ref
908 * elm_entry_file_set.
909 *
910 * @ingroup Elm_Entry_Group
911 */
912EAPI void elm_entry_file_save(Elm_Entry *obj);
913
914/** This executes a "copy" action on the selected text in the entry.
915 *
916 * @ingroup Elm_Entry_Group
917 */
918EAPI void elm_entry_selection_copy(Elm_Entry *obj);
919
920/**
921 * @brief Push the style to the top of user style stack. If there is styles in
922 * the user style stack, the properties in the top style of user style stack
923 * will replace the properties in current theme. The input style is specified
924 * in format tag='property=value' (i.e. DEFAULT='font=Sans
925 * font_size=60'hilight=' + font_weight=Bold').
926 *
927 * @param[in] obj The object.
928 * @param[in] style The style user to push.
929 *
930 * @since 1.7
931 *
932 * @ingroup Elm_Entry_Group
933 */
934EAPI void elm_entry_text_style_user_push(Elm_Entry *obj, const char *style);
935
936/**
937 * @brief This removes a custom item provider to the list for that entry
938 *
939 * This removes the given callback. See @ref elm_entry_item_provider_append for
940 * more information
941 *
942 * @param[in] obj The object.
943 * @param[in] func The function called to provide the item object.
944 * @param[in] data The data passed to @c func.
945 *
946 * @ingroup Elm_Entry_Group
947 */
948EAPI void elm_entry_item_provider_remove(Elm_Entry *obj, Elm_Entry_Item_Provider_Cb func, void *data);
949
950/**
951 * @brief Get the style on the top of user style stack.
952 *
953 * See also @ref elm_entry_text_style_user_push.
954 *
955 * @param[in] obj The object.
956 *
957 * @return Style
958 *
959 * @since 1.7
960 *
961 * @ingroup Elm_Entry_Group
962 */
963EAPI const char *elm_entry_text_style_user_peek(const Elm_Entry *obj);
964
965/**
966 * @brief This clears and frees the items in a entry's contextual (longpress)
967 * menu.
968 *
969 * See also @ref elm_entry_context_menu_item_add.
970 * @param[in] obj The object.
971 *
972 * @ingroup Elm_Entry_Group
973 */
974EAPI void elm_entry_context_menu_clear(Elm_Entry *obj);
975
976/**
977 * @brief This moves the cursor one line up within the entry.
978 *
979 * @param[in] obj The object.
980 *
981 * @return @c true on success, @c false otherwise
982 *
983 * @ingroup Elm_Entry_Group
984 */
985EAPI Eina_Bool elm_entry_cursor_up(Elm_Entry *obj);
986
987/**
988 * @brief Inserts the given text into the entry at the current cursor position.
989 *
990 * This inserts text at the cursor position as if it was typed by the user
991 * (note that this also allows markup which a user can't just "type" as it
992 * would be converted to escaped text, so this call can be used to insert
993 * things like emoticon items or bold push/pop tags, other font and color
994 * change tags etc.)
995 *
996 * If any selection exists, it will be replaced by the inserted text.
997 *
998 * The inserted text is subject to any filters set for the widget.
999 *
1000 * See also @ref elm_entry_markup_filter_append.
1001 *
1002 * @param[in] obj The object.
1003 * @param[in] entry The text to insert.
1004 *
1005 * @ingroup Elm_Entry_Group
1006 */
1007EAPI void elm_entry_entry_insert(Elm_Entry *obj, const char *entry);
1008
1009/**
1010 * @brief Set the input panel-specific data to deliver to the input panel.
1011 *
1012 * This API is used by applications to deliver specific data to the input
1013 * panel. The data format MUST be negotiated by both application and the input
1014 * panel. The size and format of data are defined by the input panel.
1015 *
1016 * @param[in] obj The object.
1017 * @param[in] data The specific data to be set to the input panel.
1018 * @param[in] len The length of data, in bytes, to send to the input panel.
1019 *
1020 * @ingroup Elm_Entry_Group
1021 */
1022EAPI void elm_entry_input_panel_imdata_set(Elm_Entry *obj, const void *data, int len);
1023
1024/**
1025 * @brief Get the specific data of the current input panel.
1026 *
1027 * @param[in] obj The object.
1028 * @param[out] data The specific data to be got from the input panel.
1029 * @param[out] len The length of data.
1030 *
1031 * @ingroup Elm_Entry_Group
1032 */
1033EAPI void elm_entry_input_panel_imdata_get(const Elm_Entry *obj, void *data, int *len);
1034
1035/** This executes a "paste" action in the entry.
1036 *
1037 * @ingroup Elm_Entry_Group
1038 */
1039EAPI void elm_entry_selection_paste(Elm_Entry *obj);
1040
1041/**
1042 * @brief This moves the cursor one place to the right within the entry.
1043 *
1044 * @param[in] obj The object.
1045 *
1046 * @return @c true on success, @c false otherwise
1047 *
1048 * @ingroup Elm_Entry_Group
1049 */
1050EAPI Eina_Bool elm_entry_cursor_next(Elm_Entry *obj);
1051
1052/** This drops any existing text selection within the entry.
1053 *
1054 * @ingroup Elm_Entry_Group
1055 */
1056EAPI void elm_entry_select_none(Elm_Entry *obj);
1057
1058/**
1059 * @brief Hide the input panel (virtual keyboard).
1060 *
1061 * Note that input panel is shown or hidden automatically according to the
1062 * focus state of entry widget. This API can be used in the case of manually
1063 * controlling by using @ref elm_entry_input_panel_enabled_set(en, @c false)
1064 * @param[in] obj The object.
1065 *
1066 * @ingroup Elm_Entry_Group
1067 */
1068EAPI void elm_entry_input_panel_hide(Elm_Entry *obj);
1069
1070/** This selects all text within the entry.
1071 *
1072 * @ingroup Elm_Entry_Group
1073 */
1074EAPI void elm_entry_select_all(Elm_Entry *obj);
1075
1076/** This ends a selection within the entry as though the user had just released
1077 * the mouse button while making a selection.
1078 *
1079 * @ingroup Elm_Entry_Group
1080 */
1081EAPI void elm_entry_cursor_selection_end(Elm_Entry *obj);
1082
1083/** This executes a "cut" action on the selected text in the entry.
1084 *
1085 * @ingroup Elm_Entry_Group
1086 */
1087EAPI void elm_entry_selection_cut(Elm_Entry *obj);
1088
1089/**
1090 * @brief Get whether the entry is empty.
1091 *
1092 * Empty means no text at all. If there are any markup tags, like an item tag
1093 * for which no provider finds anything, and no text is displayed, this
1094 * function still returns @c false.
1095 *
1096 * @param[in] obj The object.
1097 *
1098 * @return @c true if empty, @c false otherwise
1099 *
1100 * @ingroup Elm_Entry_Group
1101 */
1102EAPI Eina_Bool elm_entry_is_empty(const Elm_Entry *obj);
1103
1104/**
1105 * @brief Remove a markup filter from the list
1106 *
1107 * Removes the given callback from the filter list. See
1108 * @ref elm_entry_markup_filter_append for more information.
1109 *
1110 * @param[in] obj The object.
1111 * @param[in] func The filter function to remove.
1112 * @param[in] data The user data passed when adding the function.
1113 *
1114 * @ingroup Elm_Entry_Group
1115 */
1116EAPI void elm_entry_markup_filter_remove(Elm_Entry *obj, Elm_Entry_Filter_Cb func, void *data);
1117
1118/**
1119 * @brief This appends a custom item provider to the list for that entry
1120 *
1121 * This appends the given callback. The list is walked from beginning to end
1122 * with each function called given the item href string in the text. If the
1123 * function returns an object handle other than @c null (it should create an
1124 * object to do this), then this object is used to replace that item. If not
1125 * the next provider is called until one provides an item object, or the
1126 * default provider in entry does.
1127 *
1128 * See also @ref entry-items.
1129 *
1130 * @param[in] obj The object.
1131 * @param[in] func The function called to provide the item object.
1132 * @param[in] data The data passed to @c func.
1133 *
1134 * @ingroup Elm_Entry_Group
1135 */
1136EAPI void elm_entry_item_provider_append(Elm_Entry *obj, Elm_Entry_Item_Provider_Cb func, void *data);
1137
1138/**
1139 * @brief Append a markup filter function for text inserted in the entry
1140 *
1141 * Append the given callback to the list. This functions will be called
1142 * whenever any text is inserted into the entry, with the text to be inserted
1143 * as a parameter. The type of given text is always markup. The callback
1144 * function is free to alter the text in any way it wants, but it must remember
1145 * to free the given pointer and update it. If the new text is to be discarded,
1146 * the function can free it and set its text parameter to @c null. This will
1147 * also prevent any following filters from being called.
1148 *
1149 * @param[in] obj The object.
1150 * @param[in] func The function to use as text filter.
1151 * @param[in] data User data to pass to @c func.
1152 *
1153 * @ingroup Elm_Entry_Group
1154 */
1155EAPI void elm_entry_markup_filter_append(Elm_Entry *obj, Elm_Entry_Filter_Cb func, void *data);
1156
1157/**
1158 * @brief Appends @c str to the text of the entry.
1159 *
1160 * Adds the text in @c str to the end of any text already present in the
1161 * widget.
1162 *
1163 * The appended text is subject to any filters set for the widget.
1164 *
1165 * See also @ref elm_entry_markup_filter_append.
1166 *
1167 * @param[in] obj The object.
1168 * @param[in] str The text to be appended.
1169 *
1170 * @ingroup Elm_Entry_Group
1171 */
1172EAPI void elm_entry_entry_append(Elm_Entry *obj, const char *str);
1173
1174/**
1175 * @brief This adds an item to the entry's contextual menu.
1176 *
1177 * A longpress on an entry will make the contextual menu show up, if this
1178 * hasn't been disabled with @ref elm_entry_context_menu_disabled_set. By
1179 * default, this menu provides a few options like enabling selection mode,
1180 * which is useful on embedded devices that need to be explicit about it, and
1181 * when a selection exists it also shows the copy and cut actions.
1182 *
1183 * With this function, developers can add other options to this menu to perform
1184 * any action they deem necessary.
1185 *
1186 * @param[in] obj The object.
1187 * @param[in] label The item's text label.
1188 * @param[in] icon_file The item's icon file.
1189 * @param[in] icon_type The item's icon type.
1190 * @param[in] func The callback to execute when the item is clicked.
1191 * @param[in] data The data to associate with the item for related functions.
1192 *
1193 * @ingroup Elm_Entry_Group
1194 */
1195EAPI void elm_entry_context_menu_item_add(Elm_Entry *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data);
1196
1197/**
1198 * @brief Prepend a markup filter function for text inserted in the entry
1199 *
1200 * Prepend the given callback to the list.
1201 *
1202 * @param[in] obj The object.
1203 * @param[in] func The function to use as text filter.
1204 * @param[in] data User data to pass to @c func.
1205 *
1206 * @ingroup Elm_Entry_Group
1207 */
1208EAPI void elm_entry_markup_filter_prepend(Elm_Entry *obj, Elm_Entry_Filter_Cb func, void *data);
1209
1210/**
1211 * @brief Sets the prediction hint to use an intelligent reply suggestion
1212 * service.
1213 *
1214 * @param[in] obj The object.
1215 * @param[in] prediction_hint The prediction hint text.
1216 *
1217 * @since 1.20
1218 *
1219 * @ingroup Elm_Entry_Group
1220 */
1221EAPI void elm_entry_prediction_hint_set(Elm_Entry *obj, const char *prediction_hint);
1222
1223/**
1224 * @brief Sets the prediction hint data at the specified key.
1225 *
1226 * @param[in] obj The object.
1227 * @param[in] key The key of the prediction hint.
1228 * @param[in] value The data to replace.
1229 *
1230 * @return @c true on success, @c false otherwise
1231 *
1232 * @since 1.21
1233 *
1234 * @ingroup Elm_Entry_Group
1235 */
1236EAPI Eina_Bool elm_entry_prediction_hint_hash_set(Elm_Entry *obj, const char *key, const char *value);
1237
1238/**
1239 * @brief Removes the prediction hint data identified by a key.
1240 *
1241 * @param[in] obj The object.
1242 * @param[in] key The key of the prediction hint.
1243 *
1244 * @return @c true on success, @c false otherwise
1245 *
1246 * @since 1.21
1247 *
1248 * @ingroup Elm_Entry_Group
1249 */
1250EAPI Eina_Bool elm_entry_prediction_hint_hash_del(Elm_Entry *obj, const char *key);
1251
1252#endif