2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiKeyEventInfo.h
20 * @brief This is the header file for the %KeyEventInfo class.
22 * This header file contains the declarations of the %KeyEventInfo class.
26 #ifndef _FUI_KEY_EVENT_INFO_H_
27 #define _FUI_KEY_EVENT_INFO_H_
29 #include <FBaseObject.h>
30 #include <FUiKeyTypes.h>
32 namespace Tizen { namespace Ui
36 class _KeyEventInfoImpl;
40 * @brief This class stores the information of each key events.
44 * The %KeyEventInfo class provides the key event information: key code and key modifiers.
45 * @see IPropagatedKeyEventListener::OnKeyPressed()
46 * @see IPropagatedKeyEventListener::OnKeyReleased()
47 * @see IPropagatedKeyEventListener::TranslateKeyEventInfo()
50 class _OSP_EXPORT_ KeyEventInfo
51 : public Tizen::Base::Object
55 * Initializes this instance of %KeyEventInfo.
59 * @param[in] keyCode The key code which represents the key of interest
60 * @param[in] keyModifier The key modifier which modifies the normal action of the key
61 * @see Tizen::Ui::KeyCode
62 * @see Tizen::Ui::KeyModifier
64 KeyEventInfo(KeyCode keyCode, int keyModifiers);
67 * This destructor overrides Tizen::Base::Object::~Object().
71 virtual ~KeyEventInfo(void);
78 * @param[in] keyCode The key code
82 void SetKeyCode(KeyCode keyCode);
89 * @return The key code
92 KeyCode GetKeyCode(void) const;
95 * Sets bitwise ored key modifiers of the keyboard such as Control, Shift, Numeric lock, and so on.
99 * @param[in] keyModifiers The key modifiers which can be combined using the bitwise OR operator
100 * @see GetKeyModifier()
101 * @see Tizen::Ui::KeyModifier
104 void SetKeyModifier(int keyModifiers);
107 * Gets the key modifiers of the keyboard such as Control, Shift, Numeric lock, and so on.
111 * @return The bitwise oring key modifiers
112 * @see SetKeyModifier()
113 * @see Tizen::Ui::KeyModifier
115 int GetKeyModifier(void) const;
119 * This is the default constructor for this class.
126 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
130 KeyEventInfo(const KeyEventInfo& rhs);
133 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
137 KeyEventInfo& operator =(const KeyEventInfo& rhs);
140 _KeyEventInfoImpl* __pKeyEventInfoImpl;
146 #endif // _FUI_KEY_EVENT_INFO_H_