[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Entry.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18 using System.Collections.Generic;
19 using System.Runtime.InteropServices;
20
21 namespace ElmSharp
22 {
23     /// <summary>
24     /// Enumeration for describing the InputPanel layout types.
25     /// </summary>
26     /// <since_tizen> preview </since_tizen>
27     [Obsolete("This has been deprecated in API12")]
28     public enum InputPanelLayout
29     {
30         /// <summary>
31         /// The InputPanel layout type default.
32         /// </summary>
33         Normal,
34
35         /// <summary>
36         /// The InputPanel layout type number.
37         /// </summary>
38         Number,
39
40         /// <summary>
41         /// The InputPanel layout type email.
42         /// </summary>
43         Email,
44
45         /// <summary>
46         /// The InputPanel layout type URL.
47         /// </summary>
48         Url,
49
50         /// <summary>
51         /// The InputPanel layout type phone.
52         /// </summary>
53         PhoneNumber,
54
55         /// <summary>
56         /// The InputPanel layout type IP.
57         /// </summary>
58         Ip,
59
60         /// <summary>
61         /// The InputPanel layout type month.
62         /// </summary>
63         Month,
64
65         /// <summary>
66         /// The InputPanel layout type number.
67         /// </summary>
68         NumberOnly,
69
70         /// <summary>
71         /// The InputPanel layout type error type. Do not use it directly!
72         /// </summary>
73         Invalid,
74
75         /// <summary>
76         /// The InputPanel layout type hexadecimal.
77         /// </summary>
78         Hex,
79
80         /// <summary>
81         /// The InputPanel layout type terminal type: Esc, Alt, Ctrl, etc.
82         /// </summary>
83         Terminal,
84
85         /// <summary>
86         /// The InputPanel layout type password.
87         /// </summary>
88         Password,
89
90         /// <summary>
91         /// The keyboard layout type date and time.
92         /// </summary>
93         DateTime,
94
95         /// <summary>
96         /// The InputPanel layout type emoticons.
97         /// </summary>
98         Emoticon
99     }
100
101     /// <summary>
102     /// Enumeration for defining the "Return" key types on the input panel (virtual keyboard).
103     /// </summary>
104     /// <since_tizen> preview </since_tizen>
105     [Obsolete("This has been deprecated in API12")]
106     public enum InputPanelReturnKeyType
107     {
108         /// <summary>
109         /// The Default key type.
110         /// </summary>
111         Default,
112
113         /// <summary>
114         /// The Done key type.
115         /// </summary>
116         Done,
117
118         /// <summary>
119         /// The Go key type.
120         /// </summary>
121         Go,
122
123         /// <summary>
124         /// The Join key type.
125         /// </summary>
126         Join,
127
128         /// <summary>
129         /// The Login key type.
130         /// </summary>
131         Login,
132
133         /// <summary>
134         /// The Next key type.
135         /// </summary>
136         Next,
137
138         /// <summary>
139         /// The Search string or magnifier icon key type.
140         /// </summary>
141         Search,
142
143         /// <summary>
144         /// The Send key type.
145         /// </summary>
146         Send,
147
148         /// <summary>
149         /// The Sign-in key type.
150         /// </summary>
151         Signin
152     }
153
154     /// <summary>
155     /// Enumeration for defining the autocapitalization types.
156     /// </summary>
157     /// <since_tizen> preview </since_tizen>
158     [Obsolete("This has been deprecated in API12")]
159     public enum AutoCapital
160     {
161         /// <summary>
162         /// No autocapitalization when typing.
163         /// </summary>
164         None,
165
166         /// <summary>
167         /// Autocapitalize each of the typed word.
168         /// </summary>
169         Word,
170
171         /// <summary>
172         /// Autocapitalize the start of each sentence.
173         /// </summary>
174         Sentence,
175
176         /// <summary>
177         /// Autocapitalize all the letters.
178         /// </summary>
179         All
180     }
181
182     /// <summary>
183     /// Enumeration for defining the entry's copy and paste policy.
184     /// </summary>
185     /// <since_tizen> preview </since_tizen>
186     [Obsolete("This has been deprecated in API12")]
187     public enum CopyAndPasteMode
188     {
189         /// <summary>
190         /// Copy and paste text with a markup tag.
191         /// </summary>
192         Markup,
193
194         /// <summary>
195         /// Copy and paste text without an item (image) tag.
196         /// </summary>
197         NoImage,
198
199         /// <summary>
200         /// Copy and paste text without a markup tag.
201         /// </summary>
202         PlainText
203     }
204
205     /// <summary>
206     /// Enumeration for the text format types.
207     /// </summary>
208     /// <since_tizen> preview </since_tizen>
209     [Obsolete("This has been deprecated in API12")]
210     public enum TextFormat
211     {
212         /// <summary>
213         /// Plain type.
214         /// </summary>
215         Plain,
216
217         /// <summary>
218         /// Markup type.
219         /// </summary>
220         Markup
221     }
222
223     /// <summary>
224     /// Enumeration that defines the types of Input Hints.
225     /// </summary>
226     /// <since_tizen> preview </since_tizen>
227     [Obsolete("This has been deprecated in API12")]
228     public enum InputHints
229     {
230         /// <summary>
231         /// No active hints.
232         /// </summary>
233         None,
234
235         /// <summary>
236         /// Suggest word auto-completion.
237         /// </summary>
238         AutoComplete,
239
240         /// <summary>
241         /// The typed text should not be stored.
242         /// </summary>
243         SensitiveData,
244     }
245
246     /// <summary>
247     /// Enumeration for defining the input panel (virtual keyboard) language modes.
248     /// </summary>
249     /// <since_tizen> preview </since_tizen>
250     [Obsolete("This has been deprecated in API12")]
251     public enum InputPanelLanguage
252     {
253         /// <summary>
254         /// Automatic language mode.
255         /// </summary>
256         Automatic,
257
258         /// <summary>
259         /// Alphabet language mode.
260         /// </summary>
261         Alphabet,
262     }
263
264     /// <summary>
265     /// The Entry is a convenience widget that shows a box in which the user can enter text.
266     /// </summary>
267     /// <since_tizen> preview </since_tizen>
268     [Obsolete("This has been deprecated in API12")]
269     public class Entry : Layout
270     {
271         SmartEvent _clicked;
272         SmartEvent _changedByUser;
273         SmartEvent _cursorChanged;
274         SmartEvent _activated;
275
276         Dictionary<Func<string, EvasObject>, Interop.Elementary.Elm_Entry_Item_Provider_Cb> _itemsProvider = new Dictionary<Func<string, EvasObject>, Interop.Elementary.Elm_Entry_Item_Provider_Cb>();
277         Dictionary<Func<Entry, string, string>, Interop.Elementary.Elm_Entry_Filter_Cb> _textFilters = new Dictionary<Func<Entry, string, string>, Interop.Elementary.Elm_Entry_Filter_Cb>();
278
279         /// <summary>
280         /// Creates and initializes a new instance of the Entry class.
281         /// </summary>
282         /// <param name="parent">The EvasObject to which the new Entry will be attached as a child.</param>
283         /// <since_tizen> preview </since_tizen>
284         [Obsolete("This has been deprecated in API12")]
285         public Entry(EvasObject parent) : base(parent)
286         {
287             _clicked = new SmartEvent(this, this.RealHandle, "clicked");
288             _clicked.On += (s, e) => Clicked?.Invoke(this, EventArgs.Empty);
289
290             _changedByUser = new SmartEvent(this, this.RealHandle, "changed,user");
291             _changedByUser.On += (s, e) => ChangedByUser?.Invoke(this, EventArgs.Empty);
292
293             _cursorChanged = new SmartEvent(this, this.RealHandle, "cursor,changed");
294             _cursorChanged.On += (s, e) => CursorChanged?.Invoke(this, EventArgs.Empty);
295
296             _activated = new SmartEvent(this, this.RealHandle, "activated");
297             _activated.On += (s, e) => Activated?.Invoke(this, EventArgs.Empty);
298         }
299
300         /// <summary>
301         /// Activated will be triggered when the entry is activated.
302         /// </summary>
303         /// <since_tizen> preview </since_tizen>
304         [Obsolete("This has been deprecated in API12")]
305         public event EventHandler Activated;
306
307         /// <summary>
308         /// Clicked will be triggered when the entry is clicked.
309         /// </summary>
310         /// <since_tizen> preview </since_tizen>
311         [Obsolete("This has been deprecated in API12")]
312         public event EventHandler Clicked;
313
314         /// <summary>
315         /// ChangedByUser will be triggered when the entry is changed by user.
316         /// </summary>
317         /// <since_tizen> preview </since_tizen>
318         [Obsolete("This has been deprecated in API12")]
319         public event EventHandler ChangedByUser;
320
321         /// <summary>
322         /// CursorChanged will be triggered when the cursor in the entry is changed.
323         /// </summary>
324         /// <since_tizen> preview </since_tizen>
325         [Obsolete("This has been deprecated in API12")]
326         public event EventHandler CursorChanged;
327
328         /// <summary>
329         /// Sets or gets the entry to the single line mode.
330         /// </summary>
331         /// <since_tizen> preview </since_tizen>
332         [Obsolete("This has been deprecated in API12")]
333         public bool IsSingleLine
334         {
335             get
336             {
337                 return Interop.Elementary.elm_entry_single_line_get(RealHandle);
338             }
339             set
340             {
341                 Interop.Elementary.elm_entry_single_line_set(RealHandle, value);
342             }
343         }
344
345         /// <summary>
346         /// Sets or gets the entry to the password mode.
347         /// </summary>
348         /// <since_tizen> preview </since_tizen>
349         [Obsolete("This has been deprecated in API12")]
350         public bool IsPassword
351         {
352             get
353             {
354                 return Interop.Elementary.elm_entry_password_get(RealHandle);
355             }
356             set
357             {
358                 Interop.Elementary.elm_entry_password_set(RealHandle, value);
359             }
360         }
361
362         /// <summary>
363         /// Sets or gets whether the entry is editable.
364         /// </summary>
365         /// <since_tizen> preview </since_tizen>
366         [Obsolete("This has been deprecated in API12")]
367         public bool IsEditable
368         {
369             get
370             {
371                 return Interop.Elementary.elm_entry_editable_get(RealHandle);
372             }
373             set
374             {
375                 Interop.Elementary.elm_entry_editable_set(RealHandle, value);
376             }
377         }
378
379         /// <summary>
380         /// Sets or gets whether the entry is empty.
381         /// </summary>
382         /// <since_tizen> preview </since_tizen>
383         [Obsolete("This has been deprecated in API12")]
384         public bool IsEmpty
385         {
386             get
387             {
388                 return Interop.Elementary.elm_entry_is_empty(RealHandle);
389             }
390         }
391
392         /// <summary>
393         /// Sets or gets the text currently shown in the object entry.
394         /// </summary>
395         /// <since_tizen> preview </since_tizen>
396         [Obsolete("This has been deprecated in API12")]
397         public override string Text
398         {
399             get
400             {
401                 return Interop.Elementary.elm_entry_entry_get(RealHandle);
402             }
403             set
404             {
405                 Interop.Elementary.elm_entry_entry_set(RealHandle, value);
406             }
407         }
408
409         /// <summary>
410         /// Sets or gets the style on top of the user style stack.
411         /// </summary>
412         /// <remarks>If there are styles in the user style stack, the properties in the top style of the user style stack will replace the properties in current theme. The input style is specified in the format, tag='property=value' (i.e., DEFAULT='font=Sans font_size=60'hilight=' + font_weight=Bold').</remarks>
413         /// <since_tizen> preview </since_tizen>
414         [Obsolete("This has been deprecated in API12")]
415         public string TextStyle
416         {
417             get
418             {
419                 return Interop.Elementary.elm_entry_text_style_user_peek(RealHandle);
420             }
421             set
422             {
423                 Interop.Elementary.elm_entry_text_style_user_push(RealHandle, value);
424             }
425         }
426
427         /// <summary>
428         /// Sets or gets the current position of the cursor in the entry.
429         /// </summary>
430         /// <since_tizen> preview </since_tizen>
431         [Obsolete("This has been deprecated in API12")]
432         public int CursorPosition
433         {
434             get
435             {
436                 return Interop.Elementary.elm_entry_cursor_pos_get(RealHandle);
437             }
438             set
439             {
440                 Interop.Elementary.elm_entry_cursor_pos_set(RealHandle, value);
441             }
442         }
443
444         /// <summary>
445         /// Sets or gets the scrollable state of the entry.
446         /// </summary>
447         /// <since_tizen> preview </since_tizen>
448         [Obsolete("This has been deprecated in API12")]
449         public bool Scrollable
450         {
451             get
452             {
453                 return Interop.Elementary.elm_entry_scrollable_get(RealHandle);
454             }
455             set
456             {
457                 // HACK: Enabling the scrollable property of an entry causes its internal
458                 //       hierarchy to change, making the internal edje object inaccessible.
459                 //       Access it before the property is set, to cache the edje object's handle.
460                 if (value)
461                 {
462                     var dummy = EdjeObject;
463                 }
464                 Interop.Elementary.elm_entry_scrollable_set(RealHandle, value);
465             }
466         }
467
468         /// <summary>
469         /// Sets or gets the autocapitalization type on the immodule.
470         /// </summary>
471         /// <since_tizen> preview </since_tizen>
472         [Obsolete("This has been deprecated in API12")]
473         public AutoCapital AutoCapital
474         {
475             get
476             {
477                 return (AutoCapital)Interop.Elementary.elm_entry_autocapital_type_get(RealHandle);
478             }
479             set
480             {
481                 Interop.Elementary.elm_entry_autocapital_type_set(RealHandle, (Interop.Elementary.AutocapitalType)value);
482             }
483         }
484
485         /// <summary>
486         /// Sets or gets the entry object's 'autosave' status.
487         /// </summary>
488         /// <since_tizen> preview </since_tizen>
489         [Obsolete("This has been deprecated in API12")]
490         public bool IsAutoSave
491         {
492             get
493             {
494                 return Interop.Elementary.elm_entry_autosave_get(RealHandle);
495             }
496             set
497             {
498                 Interop.Elementary.elm_entry_autosave_set(RealHandle, value);
499             }
500         }
501
502         /// <summary>
503         /// Sets or gets the entry text paste/drop mode.
504         /// </summary>
505         /// <since_tizen> preview </since_tizen>
506         [Obsolete("This has been deprecated in API12")]
507         public CopyAndPasteMode CopyAndPasteMode
508         {
509             get
510             {
511                 return (CopyAndPasteMode)Interop.Elementary.elm_entry_cnp_mode_get(RealHandle);
512             }
513             set
514             {
515                 Interop.Elementary.elm_entry_cnp_mode_set(RealHandle, (Interop.Elementary.CopyAndPasteMode)value);
516             }
517         }
518
519         /// <summary>
520         /// Gets the geometry of the cursor.
521         /// </summary>
522         /// <since_tizen> preview </since_tizen>
523         [Obsolete("This has been deprecated in API12")]
524         public Rect CursorGeometry
525         {
526             get
527             {
528                 int x, y, w, h;
529                 Interop.Elementary.elm_entry_cursor_geometry_get(RealHandle, out x, out y, out w, out h);
530                 return new Rect(x, y, w, h);
531             }
532         }
533
534         /// <summary>
535         /// Gets whether a format node exists at the current cursor position.
536         /// </summary>
537         /// <since_tizen> preview </since_tizen>
538         [Obsolete("This has been deprecated in API12")]
539         public bool IsCursorFormat
540         {
541             get
542             {
543                 return Interop.Elementary.elm_entry_cursor_is_format_get(RealHandle);
544             }
545         }
546
547         /// <summary>
548         /// Gets if the current cursor position holds a visible format node.
549         /// </summary>
550         /// <since_tizen> preview </since_tizen>
551         [Obsolete("This has been deprecated in API12")]
552         public bool IsCursorVisibelFormat
553         {
554             get
555             {
556                 return Interop.Elementary.elm_entry_cursor_is_visible_format_get(RealHandle);
557             }
558         }
559
560         /// <summary>
561         /// Sets or gets the value of the input hint.
562         /// </summary>
563         /// <since_tizen> preview </since_tizen>
564         [Obsolete("This has been deprecated in API12")]
565         public InputHints InputHint
566         {
567             get
568             {
569                 return (InputHints)Interop.Elementary.elm_entry_input_hint_get(RealHandle);
570             }
571             set
572             {
573                 Interop.Elementary.elm_entry_input_hint_set(RealHandle, (Interop.Elementary.InputHints)value);
574             }
575         }
576
577         /// <summary>
578         ///  Sets or gets the language mode of the input panel.
579         /// </summary>
580         /// <since_tizen> preview </since_tizen>
581         [Obsolete("This has been deprecated in API12")]
582         public InputPanelLanguage InputPanelLanguage
583         {
584             get
585             {
586                 return (InputPanelLanguage)Interop.Elementary.elm_entry_input_panel_language_get(RealHandle);
587             }
588             set
589             {
590                 Interop.Elementary.elm_entry_input_panel_language_set(RealHandle, (Interop.Elementary.InputPanelLanguage)value);
591             }
592         }
593
594         /// <summary>
595         /// Sets or gets the input panel layout variation of the entry.
596         /// </summary>
597         /// <since_tizen> preview </since_tizen>
598         [Obsolete("This has been deprecated in API12")]
599         public int InputPanelVariation
600         {
601             get
602             {
603                 return Interop.Elementary.elm_entry_input_panel_layout_variation_get(RealHandle);
604             }
605             set
606             {
607                 Interop.Elementary.elm_entry_input_panel_layout_variation_set(RealHandle, value);
608             }
609         }
610
611         /// <summary>
612         /// Sets or gets the line wrap type to use on multiline entries.
613         /// </summary>
614         /// <since_tizen> preview </since_tizen>
615         [Obsolete("This has been deprecated in API12")]
616         public WrapType LineWrapType
617         {
618             get
619             {
620                 return (WrapType)Interop.Elementary.elm_entry_line_wrap_get(RealHandle);
621             }
622             set
623             {
624                 Interop.Elementary.elm_entry_line_wrap_set(RealHandle, (Interop.Elementary.WrapType)value);
625             }
626         }
627
628         /// <summary>
629         /// Sets or gets whether the entry should allow to use the text prediction.
630         /// </summary>
631         /// <since_tizen> preview </since_tizen>
632         [Obsolete("This has been deprecated in API12")]
633         public bool PredictionAllowed
634         {
635             get
636             {
637                 return Interop.Elementary.elm_entry_prediction_allow_get(RealHandle);
638             }
639             set
640             {
641                 Interop.Elementary.elm_entry_prediction_allow_set(RealHandle, value);
642             }
643         }
644
645         /// <summary>
646         /// Sets or gets whether the return key on the input panel should be disabled or not.
647         /// </summary>
648         /// <since_tizen> preview </since_tizen>
649         [Obsolete("This has been deprecated in API12")]
650         public bool InputPanelReturnKeyDisabled
651         {
652             get
653             {
654                 return Interop.Elementary.elm_entry_input_panel_return_key_disabled_get(RealHandle);
655             }
656             set
657             {
658                 Interop.Elementary.elm_entry_input_panel_return_key_disabled_set(RealHandle, value);
659             }
660         }
661
662         /// <summary>
663         /// Sets or gets the attribute to show the input panel, in case of only an user's explicit Mouse Up event.
664         /// It doesn't request to show the input panel even though it has focus.
665         /// If true, the input panel will be shown only in case of the Mouse up event (Focus event will be ignored).
666         /// </summary>
667         /// <since_tizen> preview </since_tizen>
668         [Obsolete("This has been deprecated in API12")]
669         public bool InputPanelShowByOnDemand
670         {
671             get
672             {
673                 return Interop.Elementary.elm_entry_input_panel_show_on_demand_get(RealHandle);
674             }
675             set
676             {
677                 Interop.Elementary.elm_entry_input_panel_show_on_demand_set(RealHandle, value);
678             }
679         }
680
681         /// <summary>
682         /// Sets the file (and implicitly loads it) for the text to display and then edit.
683         /// </summary>
684         /// <param name="file">The path to the file to load and save.</param>
685         /// <param name="textFormat">The file format.</param>
686         /// <since_tizen> preview </since_tizen>
687         [Obsolete("This has been deprecated in API12")]
688         public void SetFile(string file, TextFormat textFormat)
689         {
690             Interop.Elementary.elm_entry_file_set(RealHandle, file, (Interop.Elementary.TextFormat)textFormat);
691         }
692
693         /// <summary>
694         /// Converts a markup (HTML-like) string into UTF-8.
695         /// </summary>
696         /// <param name="markup">The string (in markup) to be converted.</param>
697         /// <returns>The converted string (in UTF-8).</returns>
698         /// <since_tizen> preview </since_tizen>
699         [Obsolete("This has been deprecated in API12")]
700         public static string ConvertMarkupToUtf8(string markup)
701         {
702             return Interop.Elementary.elm_entry_markup_to_utf8(markup);
703         }
704
705         /// <summary>
706         /// Moves the cursor by one position to the right within the entry.
707         /// </summary>
708         /// <returns></returns>
709         /// <since_tizen> preview </since_tizen>
710         [Obsolete("This has been deprecated in API12")]
711         public bool MoveCursorNext()
712         {
713             return Interop.Elementary.elm_entry_cursor_next(RealHandle);
714         }
715
716         /// <summary>
717         /// Moves the cursor one place to the left within the entry.
718         /// </summary>
719         /// <returns>TRUE on success, otherwise FALSE on failure.</returns>
720         /// <since_tizen> preview </since_tizen>
721         [Obsolete("This has been deprecated in API12")]
722         public bool MoveCursorPrev()
723         {
724             return Interop.Elementary.elm_entry_cursor_prev(RealHandle);
725         }
726
727         /// <summary>
728         /// Moves the cursor one line up within the entry.
729         /// </summary>
730         /// <returns>TRUE on success, otherwise FALSE on failure.</returns>
731         /// <since_tizen> preview </since_tizen>
732         [Obsolete("This has been deprecated in API12")]
733         public bool MoveCursorUp()
734         {
735             return Interop.Elementary.elm_entry_cursor_up(RealHandle);
736         }
737
738         /// <summary>
739         /// Moves the cursor one line down within the entry.
740         /// </summary>
741         /// <returns>TRUE on success, otherwise FALSE on failure.</returns>
742         /// <since_tizen> preview </since_tizen>
743         [Obsolete("This has been deprecated in API12")]
744         public bool MoveCursorDown()
745         {
746             return Interop.Elementary.elm_entry_cursor_down(RealHandle);
747         }
748
749         /// <summary>
750         /// Moves the cursor to the beginning of the entry.
751         /// </summary>
752         /// <since_tizen> preview </since_tizen>
753         [Obsolete("This has been deprecated in API12")]
754         public void MoveCursorBegin()
755         {
756             Interop.Elementary.elm_entry_cursor_begin_set(RealHandle);
757         }
758
759         /// <summary>
760         /// Moves the cursor to the end of the entry.
761         /// </summary>
762         /// <since_tizen> preview </since_tizen>
763         [Obsolete("This has been deprecated in API12")]
764         public void MoveCursorEnd()
765         {
766             Interop.Elementary.elm_entry_cursor_end_set(RealHandle);
767         }
768
769         /// <summary>
770         /// Moves the cursor to the beginning of the current line.
771         /// </summary>
772         /// <since_tizen> preview </since_tizen>
773         [Obsolete("This has been deprecated in API12")]
774         public void MoveCursorLineBegin()
775         {
776             Interop.Elementary.elm_entry_cursor_line_begin_set(RealHandle);
777         }
778
779         /// <summary>
780         /// Moves the cursor to the end of the current line.
781         /// </summary>
782         /// <since_tizen> preview </since_tizen>
783         [Obsolete("This has been deprecated in API12")]
784         public void MoveCursorLineEnd()
785         {
786             Interop.Elementary.elm_entry_cursor_line_end_set(RealHandle);
787         }
788
789         /// <summary>
790         /// Sets the input panel layout of the entry.
791         /// </summary>
792         /// <param name="layout">The layout type.</param>
793         /// <since_tizen> preview </since_tizen>
794         [Obsolete("This has been deprecated in API12")]
795         public void SetInputPanelLayout(InputPanelLayout layout)
796         {
797             Interop.Elementary.elm_entry_input_panel_layout_set(RealHandle, (Interop.Elementary.InputPanelLayout)layout);
798         }
799
800         /// <summary>
801         /// Sets the attribute to show the input panel automatically.
802         /// </summary>
803         /// <param name="enabled">If true, the input panel appears when the entry is clicked or has focus, otherwise false.</param>
804         /// <since_tizen> preview </since_tizen>
805         [Obsolete("This has been deprecated in API12")]
806         public void SetInputPanelEnabled(bool enabled)
807         {
808             Interop.Elementary.elm_entry_input_panel_enabled_set(RealHandle, enabled);
809         }
810
811         /// <summary>
812         /// Sets the "return" key type. This type is used to set the string or icon on the "return" key of the input panel.
813         /// </summary>
814         /// <param name="keyType">The type of "return" key on the input panel.</param>
815         /// <since_tizen> preview </since_tizen>
816         [Obsolete("This has been deprecated in API12")]
817         public void SetInputPanelReturnKeyType(InputPanelReturnKeyType keyType)
818         {
819             Interop.Elementary.elm_entry_input_panel_return_key_type_set(RealHandle, (Interop.Elementary.ReturnKeyType)keyType);
820         }
821
822         /// <summary>
823         /// Hides the input panel (virtual keyboard).
824         /// </summary>
825         /// <remarks>
826         /// Note that the input panel is shown or hidden automatically according to the focus state of the entry widget.
827         /// This API can be used in case of manually controlling by using SetInputPanelEnabled(false).
828         /// </remarks>
829         /// <since_tizen> preview </since_tizen>
830         [Obsolete("This has been deprecated in API12")]
831         public void HideInputPanel()
832         {
833             Interop.Elementary.elm_entry_input_panel_hide(RealHandle);
834         }
835
836         /// <summary>
837         /// Selects all the text within the entry.
838         /// </summary>
839         /// <since_tizen> preview </since_tizen>
840         [Obsolete("This has been deprecated in API12")]
841         public void SelectAll()
842         {
843             Interop.Elementary.elm_entry_select_all(RealHandle);
844         }
845
846         /// <summary>
847         /// Drops any existing text selection within the entry.
848         /// </summary>
849         /// <since_tizen> preview </since_tizen>
850         [Obsolete("This has been deprecated in API12")]
851         public void SelectNone()
852         {
853             Interop.Elementary.elm_entry_select_none(RealHandle);
854         }
855
856         /// <summary>
857         /// Forces calculation of the entry size and text layout.
858         /// </summary>
859         /// <since_tizen> preview </since_tizen>
860         [Obsolete("This has been deprecated in API12")]
861         public void ForceCalculation()
862         {
863             Interop.Elementary.elm_entry_calc_force(RealHandle);
864         }
865
866         /// <summary>
867         /// Gets the string by the cursor at its current position.
868         /// </summary>
869         /// <returns></returns>
870         /// <since_tizen> preview </since_tizen>
871         [Obsolete("This has been deprecated in API12")]
872         public string GetCursorContent()
873         {
874             return Interop.Elementary.elm_entry_cursor_content_get(RealHandle);
875         }
876
877         /// <summary>
878         /// Begins a selection within the entry, as though the user was holding down the mouse button to make a selection.
879         /// </summary>
880         /// <since_tizen> preview </since_tizen>
881         [Obsolete("This has been deprecated in API12")]
882         public void BeginCursorSelection()
883         {
884             Interop.Elementary.elm_entry_cursor_selection_begin(RealHandle);
885         }
886
887         /// <summary>
888         /// Appends the text of the entry.
889         /// </summary>
890         /// <param name="text">The text to be displayed.</param>
891         /// <since_tizen> preview </since_tizen>
892         [Obsolete("This has been deprecated in API12")]
893         public void AppendText(string text)
894         {
895             Interop.Elementary.elm_entry_entry_append(RealHandle, text);
896         }
897
898         /// <summary>
899         /// Sets or gets the value of the HorizontalScrollBarVisiblePolicy.
900         /// </summary>
901         /// <remarks>
902         /// ScrollBarVisiblePolicy.Auto means that the horizontal scrollbar is made visible if it is needed, or otherwise kept hidden.
903         /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
904         /// </remarks>
905         /// <since_tizen> preview </since_tizen>
906         [Obsolete("This has been deprecated in API12")]
907         public virtual ScrollBarVisiblePolicy HorizontalScrollBarVisiblePolicy
908         {
909             get
910             {
911                 int policy;
912                 Interop.Elementary.elm_scroller_policy_get(RealHandle, out policy, IntPtr.Zero);
913                 return (ScrollBarVisiblePolicy)policy;
914             }
915             set
916             {
917                 ScrollBarVisiblePolicy v = VerticalScrollBarVisiblePolicy;
918                 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)value, (int)v);
919             }
920         }
921
922         /// <summary>
923         /// Sets or gets the value of VerticalScrollBarVisiblePolicy.
924         /// </summary>
925         /// <remarks>
926         /// ScrollBarVisiblePolicy.Auto means that the vertical scrollbar is made visible if it is needed, or otherwise kept hidden.
927         /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
928         /// </remarks>
929         /// <since_tizen> preview </since_tizen>
930         [Obsolete("This has been deprecated in API12")]
931         public virtual ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy
932         {
933             get
934             {
935                 int policy;
936                 Interop.Elementary.elm_scroller_policy_get(RealHandle, IntPtr.Zero, out policy);
937                 return (ScrollBarVisiblePolicy)policy;
938             }
939             set
940             {
941                 ScrollBarVisiblePolicy h = HorizontalScrollBarVisiblePolicy;
942                 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)h, (int)value);
943             }
944         }
945
946         /// <summary>
947         /// Sets or gets the vertical bounce behavior.
948         /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
949         /// This is a visual way to indicate that the end has reached.
950         /// This is enabled by default for both the axis.
951         /// This API will be set if it is enabled for the given axis with boolean parameters for each axis.
952         /// </summary>
953         /// <since_tizen> preview </since_tizen>
954         [Obsolete("This has been deprecated in API12")]
955         public bool VerticalBounce
956         {
957             get
958             {
959                 bool v, h;
960                 Interop.Elementary.elm_scroller_bounce_get(RealHandle, out h, out v);
961                 return v;
962             }
963             set
964             {
965                 bool h = HorizontalBounce;
966                 Interop.Elementary.elm_scroller_bounce_set(RealHandle, h, value);
967             }
968         }
969
970         /// <summary>
971         /// Sets or gets the horizontal bounce behavior.
972         /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
973         /// This is a visual way to indicate that the end has reached.
974         /// This is enabled by default for both the axis.
975         /// This API will be set if it is enabled for the given axis with boolean parameters for each axis.
976         /// </summary>
977         /// <since_tizen> preview </since_tizen>
978         [Obsolete("This has been deprecated in API12")]
979         public bool HorizontalBounce
980         {
981             get
982             {
983                 bool v, h;
984                 Interop.Elementary.elm_scroller_bounce_get(RealHandle, out h, out v);
985                 return h;
986             }
987             set
988             {
989                 bool v = VerticalBounce;
990                 Interop.Elementary.elm_scroller_bounce_set(RealHandle, value, v);
991             }
992         }
993
994         /// <summary>
995         /// Inserts the given text into the entry at the current cursor position.
996         /// </summary>
997         /// <param name="text">The text to be inserted.</param>
998         /// <since_tizen> preview </since_tizen>
999         [Obsolete("This has been deprecated in API12")]
1000         public void InsertTextToCursor(string text)
1001         {
1002             Interop.Elementary.elm_entry_entry_insert(RealHandle, text);
1003         }
1004
1005         /// <summary>
1006         /// Ends a selection within the entry as though the user had just released the mouse button while making a selection.
1007         /// </summary>
1008         /// <since_tizen> preview </since_tizen>
1009         [Obsolete("This has been deprecated in API12")]
1010         public void EndCursorSelection()
1011         {
1012             Interop.Elementary.elm_entry_cursor_selection_end(RealHandle);
1013         }
1014
1015         /// <summary>
1016         /// Writes any changes made to the file that is set by a file.
1017         /// </summary>
1018         /// <since_tizen> preview </since_tizen>
1019         [Obsolete("This has been deprecated in API12")]
1020         public void SaveFile()
1021         {
1022             Interop.Elementary.elm_entry_file_save(RealHandle);
1023         }
1024
1025         /// <summary>
1026         /// Show the input panel (virtual keyboard) based on the input panel property of the entry such as layout, autocapital types, and so on.
1027         /// </summary>
1028         /// <remarks>
1029         /// Note that the input panel is shown or hidden automatically according to the focus state of the entry widget.
1030         /// This API can be used in the case of manual control by using the SetInputPanelEnabled(false).
1031         /// </remarks>
1032         /// <since_tizen> preview </since_tizen>
1033         [Obsolete("This has been deprecated in API12")]
1034         public void ShowInputPanel()
1035         {
1036             Interop.Elementary.elm_entry_input_panel_show(RealHandle);
1037         }
1038
1039         /// <summary>
1040         /// This appends a custom item provider to the list for that entry.
1041         /// </summary>
1042         /// <param name="func">This function is used to provide items.</param>
1043         /// <since_tizen> preview </since_tizen>
1044         [Obsolete("This has been deprecated in API12")]
1045         public void AppendItemProvider(Func<string, EvasObject> func)
1046         {
1047             if (func != null)
1048             {
1049                 if (!_itemsProvider.ContainsKey(func))
1050                 {
1051                     Interop.Elementary.Elm_Entry_Item_Provider_Cb itemProviderCallback;
1052
1053                     itemProviderCallback = (d, o, t) =>
1054                     {
1055                         return func?.Invoke(t);
1056                     };
1057                     Interop.Elementary.elm_entry_item_provider_append(RealHandle, itemProviderCallback, IntPtr.Zero);
1058                     _itemsProvider.Add(func, itemProviderCallback);
1059                 }
1060             }
1061         }
1062
1063         /// <summary>
1064         /// This prepends a custom item provider to the list for that entry.
1065         /// </summary>
1066         /// <param name="func">This function is used to provide items.</param>
1067         /// <since_tizen> preview </since_tizen>
1068         [Obsolete("This has been deprecated in API12")]
1069         public void PrependItemProvider(Func<string, EvasObject> func)
1070         {
1071             if (!_itemsProvider.ContainsKey(func))
1072             {
1073                 Interop.Elementary.Elm_Entry_Item_Provider_Cb itemProviderCallback;
1074
1075                 itemProviderCallback = (d, o, t) =>
1076                 {
1077                     return func?.Invoke(t);
1078                 };
1079                 Interop.Elementary.elm_entry_item_provider_prepend(RealHandle, itemProviderCallback, IntPtr.Zero);
1080                 _itemsProvider.Add(func, itemProviderCallback);
1081             }
1082         }
1083
1084         /// <summary>
1085         /// This removes a custom item provider to the list for that entry.
1086         /// </summary>
1087         /// <param name="func">This function is used to provide items.</param>
1088         /// <since_tizen> preview </since_tizen>
1089         [Obsolete("This has been deprecated in API12")]
1090         public void RemoveItemProvider(Func<string, EvasObject> func)
1091         {
1092             if (_itemsProvider.ContainsKey(func))
1093             {
1094                 Interop.Elementary.Elm_Entry_Item_Provider_Cb itemProviderCallback;
1095                 _itemsProvider.TryGetValue(func, out itemProviderCallback);
1096
1097                 Interop.Elementary.elm_entry_item_provider_remove(RealHandle, itemProviderCallback, IntPtr.Zero);
1098                 _itemsProvider.Remove(func);
1099             }
1100         }
1101
1102         /// <summary>
1103         /// Appends a markup filter function for text inserted in the entry.
1104         /// </summary>
1105         /// <param name="filter">This function type is used by entry filters to modify text.</param>
1106         /// <since_tizen> preview </since_tizen>
1107         [Obsolete("This has been deprecated in API12")]
1108         public void AppendMarkUpFilter(Func<Entry, string, string> filter)
1109         {
1110             if (!_textFilters.ContainsKey(filter))
1111             {
1112                 Interop.Elementary.Elm_Entry_Filter_Cb textFilterCallback = (IntPtr d, IntPtr e, ref IntPtr t) =>
1113                 {
1114                     var text = Marshal.PtrToStringAnsi(t);
1115
1116                     var updateText = filter(this, text);
1117
1118                     if (updateText != text)
1119                     {
1120                         Interop.Libc.Free(t);
1121                         t = Marshal.StringToHGlobalAnsi(updateText);
1122                     }
1123                 };
1124                 Interop.Elementary.elm_entry_markup_filter_append(RealHandle, textFilterCallback, IntPtr.Zero);
1125                 _textFilters.Add(filter, textFilterCallback);
1126             }
1127         }
1128
1129         /// <summary>
1130         /// Prepends a markup filter function for text inserted in the entry.
1131         /// </summary>
1132         /// <param name="filter">This function type is used by entry filters to modify text.</param>
1133         /// <since_tizen> preview </since_tizen>
1134         [Obsolete("This has been deprecated in API12")]
1135         public void PrependMarkUpFilter(Func<Entry, string, string> filter)
1136         {
1137             if (!_textFilters.ContainsKey(filter))
1138             {
1139                 Interop.Elementary.Elm_Entry_Filter_Cb textFilterCallback = (IntPtr d, IntPtr e, ref IntPtr t) =>
1140                 {
1141                     var text = Marshal.PtrToStringAnsi(t);
1142
1143                     var updateText = filter(this, text);
1144
1145                     if (updateText != text)
1146                     {
1147                         Interop.Libc.Free(t);
1148                         t = Marshal.StringToHGlobalAnsi(updateText);
1149                     }
1150                 };
1151                 Interop.Elementary.elm_entry_markup_filter_prepend(RealHandle, textFilterCallback, IntPtr.Zero);
1152                 _textFilters.Add(filter, textFilterCallback);
1153             }
1154         }
1155
1156         /// <summary>
1157         /// Removes a markup filter.
1158         /// </summary>
1159         /// <param name="filter">This function type is used by entry filters to modify text.</param>
1160         /// <since_tizen> preview </since_tizen>
1161         [Obsolete("This has been deprecated in API12")]
1162         public void RemoveMarkUpFilter(Func<Entry, string, string> filter)
1163         {
1164             if (_textFilters.ContainsKey(filter))
1165             {
1166                 Interop.Elementary.Elm_Entry_Filter_Cb textFilterCallback;
1167                 _textFilters.TryGetValue(filter, out textFilterCallback);
1168
1169                 Interop.Elementary.elm_entry_markup_filter_remove(RealHandle, textFilterCallback, IntPtr.Zero);
1170                 _textFilters.Remove(filter);
1171             }
1172         }
1173
1174         /// <summary>
1175         /// This executes a "copy" action on the selected text in the entry.
1176         /// </summary>
1177         /// <since_tizen> preview </since_tizen>
1178         [Obsolete("This has been deprecated in API12")]
1179         public void CopySelection()
1180         {
1181             Interop.Elementary.elm_entry_selection_copy(RealHandle);
1182         }
1183
1184         /// <summary>
1185         /// This executes a "cut" action on the selected text in the entry.
1186         /// </summary>
1187         /// <since_tizen> preview </since_tizen>
1188         [Obsolete("This has been deprecated in API12")]
1189         public void CutSelection()
1190         {
1191             Interop.Elementary.elm_entry_selection_cut(RealHandle);
1192         }
1193
1194         /// <summary>
1195         /// This executes a "paste" action in the entry.
1196         /// </summary>
1197         /// <since_tizen> preview </since_tizen>
1198         [Obsolete("This has been deprecated in API12")]
1199         public void PasteSelection()
1200         {
1201             Interop.Elementary.elm_entry_selection_paste(RealHandle);
1202         }
1203
1204         /// <summary>
1205         /// This disables the entry's selection handlers.
1206         /// This works properly on the profile that provides selection handlers.
1207         /// </summary>
1208         /// <param name="disable">If true, the selection handlers are disabled.</param>
1209         /// <since_tizen> preview </since_tizen>
1210         [Obsolete("This has been deprecated in API12")]
1211         public void DisableSelection(bool disable)
1212         {
1213             Interop.Elementary.elm_entry_selection_handler_disabled_set(RealHandle, disable);
1214         }
1215
1216         /// <summary>
1217         /// Gets any selected text within the entry.
1218         /// </summary>
1219         /// <returns>Selection's value.</returns>
1220         /// <since_tizen> preview </since_tizen>
1221         [Obsolete("This has been deprecated in API12")]
1222         public string GetSelection()
1223         {
1224             return Interop.Elementary.elm_entry_selection_get(RealHandle);
1225         }
1226
1227         /// <summary>
1228         /// This selects a region of text within the entry.
1229         /// </summary>
1230         /// <param name="start">The start position.</param>
1231         /// <param name="end">The end position.</param>
1232         /// <since_tizen> preview </since_tizen>
1233         [Obsolete("This has been deprecated in API12")]
1234         public void SetSelectionRegion(int start, int end)
1235         {
1236             Interop.Elementary.elm_entry_select_region_set(RealHandle, start, end);
1237         }
1238
1239         /// <summary>
1240         /// Sets the visibility of the left-side widget of the entry.
1241         /// </summary>
1242         /// <param name="isDisplay">true if the object should be displayed, otherwise false.</param>
1243         /// <since_tizen> preview </since_tizen>
1244         [Obsolete("This has been deprecated in API12")]
1245         public void SetIconVisible(bool isDisplay)
1246         {
1247             Interop.Elementary.elm_entry_icon_visible_set(RealHandle, isDisplay);
1248         }
1249
1250         /// <summary>
1251         /// Sets whether the return key on the input panel is disabled automatically, when the entry has no text.
1252         /// </summary>
1253         /// <param name="enable">If enabled is true, the return key is automatically disabled when the entry has no text.</param>
1254         /// <since_tizen> preview </since_tizen>
1255         [Obsolete("This has been deprecated in API12")]
1256         public void SetInputPanelReturnKeyAutoEnable(bool enable)
1257         {
1258             Interop.Elementary.elm_entry_input_panel_return_key_autoenabled_set(RealHandle, enable);
1259         }
1260
1261         /// <summary>
1262         /// Creates a widget handle.
1263         /// </summary>
1264         /// <param name="parent">Parent EvasObject.</param>
1265         /// <returns>Handle IntPtr.</returns>
1266         /// <since_tizen> preview </since_tizen>
1267         [Obsolete("This has been deprecated in API12")]
1268         protected override IntPtr CreateHandle(EvasObject parent)
1269         {
1270             return Interop.Elementary.elm_entry_add(parent.Handle);
1271         }
1272     }
1273 }