Revert "[Tizen] Not execute the remove callback"
[platform/core/uifw/dali-core.git] / dali / internal / event / events / key-event-processor.h
index 6b434fa..1b2753d 100644 (file)
@@ -1,25 +1,27 @@
-#ifndef __DALI_INTERNAL_KEY_EVENT_PROCESSOR_H__
-#define __DALI_INTERNAL_KEY_EVENT_PROCESSOR_H__
+#ifndef DALI_INTERNAL_KEY_EVENT_PROCESSOR_H
+#define DALI_INTERNAL_KEY_EVENT_PROCESSOR_H
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <vector>
 
 namespace Dali
 {
-
 namespace Integration
 {
 struct KeyEvent;
@@ -27,24 +29,24 @@ struct KeyEvent;
 
 namespace Internal
 {
-
+class Scene;
 class Stage;
 
 /**
  *  KeyEventProcessor receives the filtered key events from the Dali Event processor.
  *
- *  When a key event is received the KeyEvent Processor queries the Stage to get the actor in focus.
+ *  When a key event is received the KeyEventProcessor queues the event in the scene events queue.
  *  Any actor can be set by the actor api to be the focus of key events.  The actor is then sent the key event.
  *  If no actor is set for focus then the key event is discarded.
  */
 class KeyEventProcessor
 {
 public:
-
   /**
    * Create a Key event processor.
+   * @param[in] scene The scene the event processor belongs to.
    */
-  KeyEventProcessor(Stage& stage);
+  KeyEventProcessor(Scene& scene);
 
   /**
    * Non-virtual destructor; KeyEventProcessor is not a base class
@@ -58,7 +60,6 @@ public:
   void ProcessKeyEvent(const Integration::KeyEvent& event);
 
 private:
-
   // Undefined
   KeyEventProcessor(const KeyEventProcessor&);
 
@@ -66,13 +67,11 @@ private:
   KeyEventProcessor& operator=(const KeyEventProcessor& rhs);
 
 private:
-
-  Stage& mStage; ///< Used to deliver touch events
-
+  Scene& mScene; ///< Used to deliver key events
 };
 
 } // namespace Internal
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_KEY_EVENT_PROCESSOR_H__
+#endif // DALI_INTERNAL_KEY_EVENT_PROCESSOR_H