Fix can't call GetInputMethodContext api issue
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-editor-devel.h
1 #ifndef DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
2 #define DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 // EXTERNAL INCLUDES
21 #include <dali/devel-api/adaptor-framework/input-method-context.h>
22
23 // INTERNAL INCLUDES
24 #include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 namespace DevelTextEditor
33 {
34
35 namespace Property
36 {
37   enum Type
38   {
39       RENDERING_BACKEND = Dali::Toolkit::TextEditor::Property::RENDERING_BACKEND,
40       TEXT = Dali::Toolkit::TextEditor::Property::TEXT,
41       TEXT_COLOR = Dali::Toolkit::TextEditor::Property::TEXT_COLOR,
42       FONT_FAMILY = Dali::Toolkit::TextEditor::Property::FONT_FAMILY,
43       FONT_STYLE = Dali::Toolkit::TextEditor::Property::FONT_STYLE,
44       POINT_SIZE = Dali::Toolkit::TextEditor::Property::POINT_SIZE,
45       HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextEditor::Property::HORIZONTAL_ALIGNMENT,
46       SCROLL_THRESHOLD = Dali::Toolkit::TextEditor::Property::SCROLL_THRESHOLD,
47       SCROLL_SPEED = Dali::Toolkit::TextEditor::Property::SCROLL_SPEED,
48       PRIMARY_CURSOR_COLOR = Dali::Toolkit::TextEditor::Property::PRIMARY_CURSOR_COLOR,
49       SECONDARY_CURSOR_COLOR = Dali::Toolkit::TextEditor::Property::SECONDARY_CURSOR_COLOR,
50       ENABLE_CURSOR_BLINK = Dali::Toolkit::TextEditor::Property::ENABLE_CURSOR_BLINK,
51       CURSOR_BLINK_INTERVAL = Dali::Toolkit::TextEditor::Property::CURSOR_BLINK_INTERVAL,
52       CURSOR_BLINK_DURATION = Dali::Toolkit::TextEditor::Property::CURSOR_BLINK_DURATION,
53       CURSOR_WIDTH = Dali::Toolkit::TextEditor::Property::CURSOR_WIDTH,
54       GRAB_HANDLE_IMAGE = Dali::Toolkit::TextEditor::Property::GRAB_HANDLE_IMAGE,
55       GRAB_HANDLE_PRESSED_IMAGE = Dali::Toolkit::TextEditor::Property::GRAB_HANDLE_PRESSED_IMAGE,
56       SELECTION_HANDLE_IMAGE_LEFT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_IMAGE_LEFT,
57       SELECTION_HANDLE_IMAGE_RIGHT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_IMAGE_RIGHT,
58       SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT,
59       SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT,
60       SELECTION_HANDLE_MARKER_IMAGE_LEFT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT,
61       SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT,
62       SELECTION_HIGHLIGHT_COLOR = Dali::Toolkit::TextEditor::Property::SELECTION_HIGHLIGHT_COLOR,
63       DECORATION_BOUNDING_BOX = Dali::Toolkit::TextEditor::Property::DECORATION_BOUNDING_BOX,
64       ENABLE_MARKUP = Dali::Toolkit::TextEditor::Property::ENABLE_MARKUP,
65       INPUT_COLOR = Dali::Toolkit::TextEditor::Property::INPUT_COLOR,
66       INPUT_FONT_FAMILY = Dali::Toolkit::TextEditor::Property::INPUT_FONT_FAMILY,
67       INPUT_FONT_STYLE = Dali::Toolkit::TextEditor::Property::INPUT_FONT_STYLE,
68       INPUT_POINT_SIZE = Dali::Toolkit::TextEditor::Property::INPUT_POINT_SIZE,
69       LINE_SPACING = Dali::Toolkit::TextEditor::Property::LINE_SPACING,
70       INPUT_LINE_SPACING = Dali::Toolkit::TextEditor::Property::INPUT_LINE_SPACING,
71       UNDERLINE = Dali::Toolkit::TextEditor::Property::UNDERLINE,
72       INPUT_UNDERLINE = Dali::Toolkit::TextEditor::Property::INPUT_UNDERLINE,
73       SHADOW = Dali::Toolkit::TextEditor::Property::SHADOW,
74       INPUT_SHADOW = Dali::Toolkit::TextEditor::Property::INPUT_SHADOW,
75       EMBOSS = Dali::Toolkit::TextEditor::Property::EMBOSS,
76       INPUT_EMBOSS = Dali::Toolkit::TextEditor::Property::INPUT_EMBOSS,
77       OUTLINE = Dali::Toolkit::TextEditor::Property::OUTLINE,
78       INPUT_OUTLINE = Dali::Toolkit::TextEditor::Property::INPUT_OUTLINE,
79       SMOOTH_SCROLL = Dali::Toolkit::TextEditor::Property::SMOOTH_SCROLL,
80       SMOOTH_SCROLL_DURATION = Dali::Toolkit::TextEditor::Property::SMOOTH_SCROLL_DURATION,
81       ENABLE_SCROLL_BAR = Dali::Toolkit::TextEditor::Property::ENABLE_SCROLL_BAR,
82       SCROLL_BAR_SHOW_DURATION = Dali::Toolkit::TextEditor::Property::SCROLL_BAR_SHOW_DURATION,
83       SCROLL_BAR_FADE_DURATION = Dali::Toolkit::TextEditor::Property::SCROLL_BAR_FADE_DURATION,
84       PIXEL_SIZE = Dali::Toolkit::TextEditor::Property::PIXEL_SIZE,
85       LINE_COUNT = Dali::Toolkit::TextEditor::Property::LINE_COUNT,
86       ENABLE_SELECTION = Dali::Toolkit::TextEditor::Property::ENABLE_SELECTION,
87       PLACEHOLDER = Dali::Toolkit::TextEditor::Property::PLACEHOLDER,
88       LINE_WRAP_MODE = Dali::Toolkit::TextEditor::Property::LINE_WRAP_MODE,
89
90       /**
91        * @brief The text to display when the TextEditor is empty and inactive.
92        * @details Name "placeholderText", type Property::STRING.
93        */
94       PLACEHOLDER_TEXT,
95
96       /**
97        * @brief The placeholder-text color.
98        * @details Name "placeholderTextColor", type Property::VECTOR4.
99        */
100       PLACEHOLDER_TEXT_COLOR,
101
102       /**
103        * @brief Enables Text selection using Shift key.
104        * @details Name "enableShiftSelection", type Property::BOOLEAN.
105        */
106       ENABLE_SHIFT_SELECTION,
107
108       /**
109        * @brief Enables the grab handles for text selection.
110        * @details Name "enableGrabHandle", type Property::BOOLEAN.
111        * @note The default value is true, which means the grab handles are enabled by default.
112        */
113       ENABLE_GRAB_HANDLE
114   };
115
116 } // namespace Property
117
118 /**
119  * @brief Return the input method context of TextEditor.
120  *
121  * @param[in] textEditor The instance of TextEditor.
122  * @return InputMethodContext instance.
123  */
124 DALI_IMPORT_API InputMethodContext GetInputMethodContext( TextEditor textEditor );
125
126 } // namespace DevelTextEditor
127
128 } // namespace Toolkit
129
130 } // namespace Dali
131
132 #endif // DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H