2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef PLATFORMINPUTMANAGER_H
18 #define PLATFORMINPUTMANAGER_H
20 #include <boost/signals2/signal.hpp>
21 #include <boost/thread/thread.hpp>
24 #include <Elementary.h>
26 #include "AbstractService.h"
27 #include "ServiceFactory.h"
28 #include "service_macros.h"
30 namespace tizen_browser
35 class BROWSER_EXPORT PlatformInputManager : public tizen_browser::core::AbstractService
39 * @brief Default constructor with variable initialization.
41 PlatformInputManager();
44 * @brief Initialization of the object, adding event filter, setting cursor to be always visible.
46 void init(Evas_Object *mainWindow);
49 * Signals emitted after certain button on keyboard/remote controller press.
51 boost::signals2::signal<void ()> menuPressed;
52 boost::signals2::signal<void ()> returnPressed;
53 boost::signals2::signal<void ()> enterPressed;
54 boost::signals2::signal<void ()> leftPressed;
55 boost::signals2::signal<void ()> rightPressed;
56 boost::signals2::signal<void ()> backPressed;
57 boost::signals2::signal<void ()> mouseClicked;
60 * @brief Returns current service's name.
62 virtual std::string getName();
66 * @brief Struct holding parameters of mouse movement.
67 * It is used in pointer mode to simulate mouse move after pressing arrows.
69 struct MouseMovementParams {
70 bool moveMousePointer;
76 * @brief It process every input event and handles it if necessary.
78 static Eina_Bool __filter(void */*data*/, void */*loop_data*/, int /*type*/, void */*event*/);
84 #endif // PLATFORMINPUTMANAGER_H