1 #ifndef __DALI_KEY_GRAB_H__
2 #define __DALI_KEY_GRAB_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/common/dali-common.h>
33 * @brief Key grab mode.
37 TOP_POSITION = 0, ///< Grab a key only when on the top of the grabbing-window stack mode.
38 SHARED ///< Grab a key together with the other client window(s) mode.
42 * @brief Grabs the key specfied by @a key for @a window in @a grabMode.
44 * The key grab feature is designed for following example scenarios:
45 * TV - A user might want to change the volume or channel of the background TV contents while focusing on the foregrund app.
46 * Mobile - When a user presses Home key, the homescreen appears regardless of current foreground app.
48 * @note This function is only specified by Tizen.
49 * @param[in] window The window to set
50 * @param[in] dailKey The key code to grab (defined in key.h)
51 * @param[in] grabMode The grab mode for the key
52 * @return true if the grab succeed.
54 DALI_IMPORT_API bool GrabKey( Window window, Dali::KEY daliKey, KeyGrabMode grabMode );
57 * @brief Ungrabs the key specfied by @a key for @a window.
58 * @note This function is only specified by Tizen.
59 * @param[in] window The window to set
60 * @param[in] dailKey The key code to ungrab (defined in key.h)
61 * @return true if the ungrab succeed.
63 DALI_IMPORT_API bool UngrabKey( Window window, Dali::KEY daliKey );
65 } // namespace KeyGrab
69 #endif // __DALI_KEY_GRAB_H__