[AT-SPI] Use WeakHandle<Actor> in Accessible objects
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller-event-handler.h
1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_EVENT_HANDLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_EVENT_HANDLER_H
3
4 /*
5  * Copyright (c) 2021 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
21 // EXTERNAL INCLUDES
22 #include <dali/devel-api/adaptor-framework/input-method-context.h>
23 #include <dali/public-api/events/gesture-enumerations.h>
24 #include <dali/public-api/events/key-event.h>
25 #include <dali/public-api/math/vector2.h>
26
27 // INTERNAL INCLUDES
28 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
29 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
30 #include <dali-toolkit/internal/text/text-controller.h>
31
32 namespace Dali
33 {
34 namespace Toolkit
35 {
36 namespace Text
37 {
38 struct Controller::EventHandler
39 {
40   static void KeyboardFocusGainEvent(Controller& controller);
41   static void KeyboardFocusLostEvent(Controller& controller);
42   static bool KeyEvent(Controller& controller, const Dali::KeyEvent& keyEvent);
43   static void TapEvent(Controller& controller, unsigned int tapCount, float x, float y);
44   static void PanEvent(Controller& controller, GestureState state, const Vector2& displacement);
45   static void LongPressEvent(Controller& controller, GestureState state, float x, float y);
46   static void SelectEvent(Controller& controller, float x, float y, SelectionType selectType);
47   static void ProcessModifyEvents(Controller& controller);
48   static void TextReplacedEvent(Controller& controller);
49   static void TextInsertedEvent(Controller& controller);
50   static void TextDeletedEvent(Controller& controller);
51   static bool DeleteEvent(Controller& controller, int keyCode);
52
53   static InputMethodContext::CallbackData OnInputMethodContextEvent(Controller&                          controller,
54                                                                     InputMethodContext&                  inputMethodContext,
55                                                                     const InputMethodContext::EventData& inputMethodContextEvent);
56
57   static void PasteClipboardItemEvent(Controller& controller);
58   static void DecorationEvent(Controller& controller, HandleType handleType, HandleState state, float x, float y);
59   static void TextPopupButtonTouched(Controller& controller, Dali::Toolkit::TextSelectionPopup::Buttons button);
60 };
61
62 } // namespace Text
63
64 } // namespace Toolkit
65
66 } // namespace Dali
67
68 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_EVENT_HANDLER_H