Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / internal / event / events / key-event-processor.h
1 #ifndef __DALI_INTERNAL_KEY_EVENT_PROCESSOR_H__
2 #define __DALI_INTERNAL_KEY_EVENT_PROCESSOR_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 namespace Dali
21 {
22
23 namespace Integration
24 {
25 struct KeyEvent;
26 }
27
28 namespace Internal
29 {
30
31 class Stage;
32
33 /**
34  *  KeyEventProcessor receives the filtered key events from the Dali Event processor.
35  *
36  *  When a key event is received the KeyEvent Processor queries the Stage to get the actor in focus.
37  *  Any actor can be set by the actor api to be the focus of key events.  The actor is then sent the key event.
38  *  If no actor is set for focus then the key event is discarded.
39  */
40 class KeyEventProcessor
41 {
42 public:
43
44   /**
45    * Create a Key event processor.
46    */
47   KeyEventProcessor(Stage& stage);
48
49   /**
50    * Non-virtual destructor; KeyEventProcessor is not a base class
51    */
52   ~KeyEventProcessor();
53
54   /**
55    * This function is called by the event processor whenever a key event occurs.
56    * @param[in] event The key event that has occurred.
57    */
58   void ProcessKeyEvent(const Integration::KeyEvent& event);
59
60 private:
61
62   // Undefined
63   KeyEventProcessor(const KeyEventProcessor&);
64
65   // Undefined
66   KeyEventProcessor& operator=(const KeyEventProcessor& rhs);
67
68 private:
69
70   Stage& mStage; ///< Used to deliver touch events
71
72 };
73
74 } // namespace Internal
75
76 } // namespace Dali
77
78 #endif // __DALI_INTERNAL_KEY_EVENT_PROCESSOR_H__