Tizen Native API  5.5
Dali::KeyGrab Namespace Reference

Key grab functions. More...

Functions

DALI_ADAPTOR_API bool GrabKeyTopmost (Window window, Dali::KEY daliKey)
 Grabs the key specified by key for window only when window is the topmost window.
DALI_ADAPTOR_API bool UngrabKeyTopmost (Window window, Dali::KEY daliKey)
 Ungrabs the key specified by key for window.
DALI_ADAPTOR_API bool GrabKey (Window window, Dali::KEY daliKey, KeyGrabMode grabMode)
 Grabs the key specified by key for window in grabMode.
DALI_ADAPTOR_API bool UngrabKey (Window window, Dali::KEY daliKey)
 Ungrabs the key specified by key for window.
DALI_ADAPTOR_API bool GrabKeyList (Window window, const Dali::Vector< Dali::KEY > &daliKeyVector, const Dali::Vector< KeyGrabMode > &grabModeVector, Dali::Vector< bool > &returnVector)
 Grabs the list of keys specified by Dali::Vector of keys for window in Dali::Vector of grabModes.
DALI_ADAPTOR_API bool UngrabKeyList (Window window, const Dali::Vector< Dali::KEY > &daliKeyVector, Dali::Vector< bool > &returnVector)
 Ungrabs the list of keys specified by Dali::Vector of keys for window.

Enumerations

enum  KeyGrabMode
 Enumeration for key grab mode for platform-level APIs. More...

Detailed Description

Key grab functions.

Since:
3.0, DALi version 1.0.0

Enumeration Type Documentation

Enumeration for key grab mode for platform-level APIs.

Since:
3.0, DALi version 1.0.0
Enumerator:
TOPMOST 

Grab a key only when on the top of the grabbing-window stack mode.

Since:
3.0, DALi version 1.0.0
SHARED 

Grab a key together with the other client window(s) mode.

Since:
3.0, DALi version 1.0.0
OVERRIDE_EXCLUSIVE 

Grab a key exclusively regardless of the grabbing-window's position on the window stack with the possibility of overriding the grab by the other client window mode.

Since:
3.0, DALi version 1.0.0
EXCLUSIVE 

Grab a key exclusively regardless of the grabbing-window's position on the window stack mode.

Since:
3.0, DALi version 1.0.0

Function Documentation

DALI_ADAPTOR_API bool Dali::KeyGrab::GrabKey ( Window  window,
Dali::KEY  daliKey,
KeyGrabMode  grabMode 
)

Grabs the key specified by key for window in grabMode.

Warning:
This is not for use by third-party applications.

This function can be used for following example scenarios:

  • TV - A user might want to change the volume or channel of the background TV contents while focusing on the foreground app.
  • Mobile - When a user presses Home key, the homescreen appears regardless of current foreground app.
  • Mobile - Using volume up/down as zoom up/down in camera apps.
Since:
3.0, DALi version 1.0.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
[in]windowThe window to set
[in]daliKeyThe key code to grab (defined in key.h)
[in]grabModeThe grab mode for the key
Returns:
true if the grab succeeds
DALI_ADAPTOR_API bool Dali::KeyGrab::GrabKeyList ( Window  window,
const Dali::Vector< Dali::KEY > &  daliKeyVector,
const Dali::Vector< KeyGrabMode > &  grabModeVector,
Dali::Vector< bool > &  returnVector 
)

Grabs the list of keys specified by Dali::Vector of keys for window in Dali::Vector of grabModes.

Warning:
This is not for use by third-party applications.

This function can be used for following example scenarios:

  • TV - A user might want to change the volume or channel of the background TV contents while focusing on the foreground app.
  • Mobile - When a user presses Home key, the homescreen appears regardless of current foreground app.
  • Mobile - Using volume up/down as zoom up/down in camera apps.
Since:
4.0, DALi version 1.2.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
[in]windowThe window to set
[in]daliKeyVectorThe Dali::Vector of key codes to grab (defined in key.h)
[in]grabModeVectorThe Dali::Vector of grab modes for the keys
[in]returnVectorThe Dali::Vector of return boolean values for the results of multiple grab succeeds/fails
Returns:
bool false when error occurs
DALI_ADAPTOR_API bool Dali::KeyGrab::GrabKeyTopmost ( Window  window,
Dali::KEY  daliKey 
)

Grabs the key specified by key for window only when window is the topmost window.

This function can be used for following example scenarios:

  • Mobile - Using volume up/down as zoom up/down in camera apps.
Since:
3.0, DALi version 1.0.0
Parameters:
[in]windowThe window to set
[in]daliKeyThe key code to grab (defined in key.h)
Returns:
true if the grab succeeds
DALI_ADAPTOR_API bool Dali::KeyGrab::UngrabKey ( Window  window,
Dali::KEY  daliKey 
)

Ungrabs the key specified by key for window.

Warning:
This is not for use by third-party applications.
Since:
3.0, DALi version 1.0.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
[in]windowThe window to set
[in]daliKeyThe key code to ungrab (defined in key.h)
Returns:
true if the ungrab succeeds
Note:
If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event.
DALI_ADAPTOR_API bool Dali::KeyGrab::UngrabKeyList ( Window  window,
const Dali::Vector< Dali::KEY > &  daliKeyVector,
Dali::Vector< bool > &  returnVector 
)

Ungrabs the list of keys specified by Dali::Vector of keys for window.

Warning:
This is not for use by third-party applications.
Since:
4.0, DALi version 1.2.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/keygrab
Parameters:
[in]windowThe window to set
[in]daliKeyVectorThe Dali::Vector of key codes to ungrab (defined in key.h)
[in]returnVectorThe Dali::Vector of return boolean values for the results of multiple ungrab succeeds/fails
Returns:
bool false when error occurs
Note:
If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event.
DALI_ADAPTOR_API bool Dali::KeyGrab::UngrabKeyTopmost ( Window  window,
Dali::KEY  daliKey 
)

Ungrabs the key specified by key for window.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]windowThe window to set
[in]daliKeyThe key code to ungrab (defined in key.h)
Returns:
true if the ungrab succeeds
Note:
If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event.