Tizen Native API
4.0
|
The window class is used internally for drawing. More...
Classes | |
struct | NotificationLevel |
An enum of screen mode. More... | |
struct | ScreenOffMode |
An enum of screen mode. More... | |
Public Types | |
enum | WindowOrientation |
Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing. More... | |
enum | IndicatorBgOpacity |
Enumeration for opacity of the indicator. More... | |
enum | IndicatorVisibleMode |
Enumeration for visible mode of the indicator. More... | |
enum | Type |
An enum of Window types. More... | |
typedef Uint16Pair | WindowSize |
Window size type. | |
typedef Uint16Pair | WindowPosition |
Window position type. | |
typedef Signal< void(bool) > | IndicatorSignalType |
Indicator state signal type. | |
typedef Signal< void(bool) > | FocusSignalType |
Window focus signal type. | |
typedef Signal< void(WindowSize) > | ResizedSignalType |
Window resized signal type. | |
Public Member Functions | |
Window () | |
Creates an uninitialized handle. | |
~Window () | |
Destructor. | |
Window (const Window &handle) | |
This copy constructor is required for (smart) pointer semantics. | |
Window & | operator= (const Window &rhs) |
This assignment operator is required for (smart) pointer semantics. | |
void | ShowIndicator (IndicatorVisibleMode visibleMode) |
This sets whether the indicator bar should be shown or not. | |
void | SetIndicatorBgOpacity (IndicatorBgOpacity opacity) |
This sets the opacity mode of indicator bar. | |
void | RotateIndicator (WindowOrientation orientation) |
This sets the orientation of indicator bar. | |
void | SetClass (std::string name, std::string klass) |
Sets the window name and class string. | |
void | Raise () |
Raises window to the top of Window stack. | |
void | Lower () |
Lowers window to the bottom of Window stack. | |
void | Activate () |
Activates window to the top of Window stack even it is iconified. | |
void | AddAvailableOrientation (WindowOrientation orientation) |
Adds an orientation to the list of available orientations. | |
void | RemoveAvailableOrientation (WindowOrientation orientation) |
Removes an orientation from the list of available orientations. | |
void | SetPreferredOrientation (WindowOrientation orientation) |
Sets a preferred orientation. | |
WindowOrientation | GetPreferredOrientation () |
Gets the preferred orientation. | |
DragAndDropDetector | GetDragAndDropDetector () const |
Returns the Drag & drop detector which can be used to receive drag & drop events. | |
Any | GetNativeHandle () const |
Gets the native handle of the window. | |
void | SetAcceptFocus (bool accept) |
Sets whether window accepts focus or not. | |
bool | IsFocusAcceptable () const |
Returns whether window accepts focus or not. | |
void | Show () |
Shows the window if it is hidden. | |
void | Hide () |
Hides the window if it is showing. | |
bool | IsVisible () const |
Returns whether the window is visible or not. | |
unsigned int | GetSupportedAuxiliaryHintCount () const |
Gets the count of supported auxiliary hints of the window. | |
std::string | GetSupportedAuxiliaryHint (unsigned int index) const |
Gets the supported auxiliary hint string of the window. | |
unsigned int | AddAuxiliaryHint (const std::string &hint, const std::string &value) |
Creates an auxiliary hint of the window. | |
bool | RemoveAuxiliaryHint (unsigned int id) |
Removes an auxiliary hint of the window. | |
bool | SetAuxiliaryHintValue (unsigned int id, const std::string &value) |
Changes a value of the auxiliary hint. | |
std::string | GetAuxiliaryHintValue (unsigned int id) const |
Gets a value of the auxiliary hint. | |
unsigned int | GetAuxiliaryHintId (const std::string &hint) const |
Gets a ID of the auxiliary hint string. | |
void | SetInputRegion (const Rect< int > &inputRegion) |
Sets a region to accept input events. | |
void | SetType (Type type) |
Sets a window type. | |
Type | GetType () const |
Gets a window type. | |
bool | SetNotificationLevel (NotificationLevel::Type level) |
Sets a priority level for the specified notification window. | |
NotificationLevel::Type | GetNotificationLevel () const |
Gets a priority level for the specified notification window. | |
void | SetOpaqueState (bool opaque) |
Sets a transparent window's visual state to opaque. | |
bool | IsOpaqueState () const |
Returns whether a transparent window's visual state is opaque or not. | |
bool | SetScreenOffMode (ScreenOffMode::Type screenOffMode) |
Sets a window's screen off mode. | |
ScreenOffMode::Type | GetScreenOffMode () const |
Gets a screen off mode of the window. | |
bool | SetBrightness (int brightness) |
Sets preferred brightness of the window. | |
int | GetBrightness () const |
Gets preffered brightness of the window. | |
void | SetSize (WindowSize size) |
Sets a size of the window. | |
WindowSize | GetSize () const |
Gets a size of the window. | |
void | SetPosition (WindowPosition position) |
Sets a position of the window. | |
WindowPosition | GetPosition () const |
Gets a position of the window. | |
void | SetTransparency (bool transparent) |
Sets whether the window is transparent or not. | |
IndicatorSignalType & | IndicatorVisibilityChangedSignal () |
The user should connect to this signal to get a timing when indicator was shown / hidden. | |
FocusSignalType & | FocusChangedSignal () |
The user should connect to this signal to get a timing when window gains focus or loses focus. | |
ResizedSignalType & | ResizedSignal () |
This signal is emitted when the window is resized. | |
Static Public Member Functions | |
static Window | New (PositionSize windowPosition, const std::string &name, bool isTransparent=false) |
Creates an initialized handle to a new Window. | |
static Window | New (PositionSize windowPosition, const std::string &name, const std::string &className, bool isTransparent=false) |
Creates an initialized handle to a new Window. |
Detailed Description
The window class is used internally for drawing.
A Window has an orientation and indicator properties. You can get a valid Window handle by calling Dali::Application::GetWindow().
- Since:
- 3.0, DALi version 1.0.0
Member Typedef Documentation
typedef Signal< void (bool) > Dali::Window::FocusSignalType |
Window focus signal type.
- Since:
- 4.0, DALi version 1.2.60
typedef Signal< void (bool) > Dali::Window::IndicatorSignalType |
Indicator state signal type.
- Since:
- 3.0, DALi version 1.0.0
typedef Signal< void (WindowSize) > Dali::Window::ResizedSignalType |
Window resized signal type.
- Since:
- 4.0, DALi version 1.2.60
Window position type.
- Since:
- 4.0, DALi version 1.2.60
typedef Uint16Pair Dali::Window::WindowSize |
Window size type.
- Since:
- 4.0, DALi version 1.2.60
Member Enumeration Documentation
enum Dali::Window::Type |
An enum of Window types.
- Since:
- 4.0, DALi version 1.2.60
- Enumerator:
Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
- Since:
- 3.0, DALi version 1.0.0
- Enumerator:
Constructor & Destructor Documentation
Creates an uninitialized handle.
This can be initialized using Dali::Application::GetWindow() or Dali::Window::New().
- Since:
- 3.0, DALi version 1.0.0
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
- Since:
- 3.0, DALi version 1.0.0
Dali::Window::Window | ( | const Window & | handle | ) |
This copy constructor is required for (smart) pointer semantics.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] handle A reference to the copied handle
Member Function Documentation
void Dali::Window::Activate | ( | ) |
Activates window to the top of Window stack even it is iconified.
- Since:
- 3.0, DALi version 1.0.0
unsigned int Dali::Window::AddAuxiliaryHint | ( | const std::string & | hint, |
const std::string & | value | ||
) |
Creates an auxiliary hint of the window.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] hint The auxiliary hint string. [in] value The value string.
- Returns:
- The ID of created auxiliary hint, or
0
on failure.
void Dali::Window::AddAvailableOrientation | ( | WindowOrientation | orientation | ) |
Adds an orientation to the list of available orientations.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] orientation The available orientation to add
The user should connect to this signal to get a timing when window gains focus or loses focus.
A callback of the following type may be connected:
void YourCallbackName( bool focusIn );
The parameter is true if window gains focus, otherwise false.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The signal to connect to
unsigned int Dali::Window::GetAuxiliaryHintId | ( | const std::string & | hint | ) | const |
Gets a ID of the auxiliary hint string.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] hint The auxiliary hint string.
- Returns:
- The ID of the auxiliary hint string, or
0
if none exists.
std::string Dali::Window::GetAuxiliaryHintValue | ( | unsigned int | id | ) | const |
Gets a value of the auxiliary hint.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] id The auxiliary hint ID.
- Returns:
- The string value of the auxiliary hint ID, or an empty string if none exists.
int Dali::Window::GetBrightness | ( | ) | const |
Gets preffered brightness of the window.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The preffered brightness.
DragAndDropDetector Dali::Window::GetDragAndDropDetector | ( | ) | const |
Returns the Drag & drop detector which can be used to receive drag & drop events.
- Note:
- Not intended for application developers.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- A handle to the DragAndDropDetector
Any Dali::Window::GetNativeHandle | ( | ) | const |
Gets the native handle of the window.
When users call this function, it wraps the actual type used by the underlying window system.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- The native handle of the Window or an empty handle
Gets a priority level for the specified notification window.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The notification window level.
- Remarks:
- This can be used for a notification type window only.
WindowPosition Dali::Window::GetPosition | ( | ) | const |
Gets a position of the window.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The position of the window
Gets the preferred orientation.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- The preferred orientation if previously set, or none
Gets a screen off mode of the window.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The screen off mode.
WindowSize Dali::Window::GetSize | ( | ) | const |
Gets a size of the window.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The size of the window
std::string Dali::Window::GetSupportedAuxiliaryHint | ( | unsigned int | index | ) | const |
Gets the supported auxiliary hint string of the window.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] index The index of the supported auxiliary hint lists
- Returns:
- The auxiliary hint string of the index.
- Note:
- The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager. If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
unsigned int Dali::Window::GetSupportedAuxiliaryHintCount | ( | ) | const |
Gets the count of supported auxiliary hints of the window.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The number of supported auxiliary hints.
- Note:
- The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager. If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
Type Dali::Window::GetType | ( | ) | const |
Gets a window type.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- A window type.
void Dali::Window::Hide | ( | ) |
Hides the window if it is showing.
- Since:
- 4.0, DALi version 1.2.60
The user should connect to this signal to get a timing when indicator was shown / hidden.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- The signal to connect to
bool Dali::Window::IsFocusAcceptable | ( | ) | const |
Returns whether window accepts focus or not.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- True if the window accept focus, false otherwise
bool Dali::Window::IsOpaqueState | ( | ) | const |
Returns whether a transparent window's visual state is opaque or not.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- True if the window's visual state is opaque, false otherwise.
- Remarks:
- The return value has no meaning on an opaque window.
bool Dali::Window::IsVisible | ( | ) | const |
Returns whether the window is visible or not.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- True if the window is visible, false otherwise.
void Dali::Window::Lower | ( | ) |
Lowers window to the bottom of Window stack.
- Since:
- 3.0, DALi version 1.0.0
static Window Dali::Window::New | ( | PositionSize | windowPosition, |
const std::string & | name, | ||
bool | isTransparent = false |
||
) | [static] |
static Window Dali::Window::New | ( | PositionSize | windowPosition, |
const std::string & | name, | ||
const std::string & | className, | ||
bool | isTransparent = false |
||
) | [static] |
This assignment operator is required for (smart) pointer semantics.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] rhs A reference to the copied handle
- Returns:
- A reference to this
void Dali::Window::Raise | ( | ) |
Raises window to the top of Window stack.
- Since:
- 3.0, DALi version 1.0.0
bool Dali::Window::RemoveAuxiliaryHint | ( | unsigned int | id | ) |
Removes an auxiliary hint of the window.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] id The ID of the auxiliary hint.
- Returns:
- True if no error occurred, false otherwise.
void Dali::Window::RemoveAvailableOrientation | ( | WindowOrientation | orientation | ) |
Removes an orientation from the list of available orientations.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] orientation The available orientation to remove
This signal is emitted when the window is resized.
A callback of the following type may be connected:
void YourCallbackName( int width, int height );
The parameters are the resized width and height.
- Since:
- 4.0, DALi version 1.2.60
- Returns:
- The signal to connect to
void Dali::Window::RotateIndicator | ( | WindowOrientation | orientation | ) |
This sets the orientation of indicator bar.
It does not implicitly show the indicator if it is currently hidden.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] orientation The orientation
void Dali::Window::SetAcceptFocus | ( | bool | accept | ) |
Sets whether window accepts focus or not.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] accept If focus is accepted or not. Default is true.
bool Dali::Window::SetAuxiliaryHintValue | ( | unsigned int | id, |
const std::string & | value | ||
) |
Changes a value of the auxiliary hint.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] id The auxiliary hint ID. [in] value The value string to be set.
- Returns:
- True if no error occurred, false otherwise.
bool Dali::Window::SetBrightness | ( | int | brightness | ) |
Sets preferred brightness of the window.
This API is useful when the application needs to change the brightness of the screen when it is appeared on the screen. If the brightness has been set and the window is shown, the window manager requests the display system to change the brightness to the provided value. If the window is no longer shown, then the window manager requests the display system to go back to default brightness. A value less than 0 results in default brightness and a value greater than 100 results in maximum brightness.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] brightness The preferred brightness (0 to 100).
- Returns:
- True if no error occurred, false otherwise.
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/display
void Dali::Window::SetClass | ( | std::string | name, |
std::string | klass | ||
) |
Sets the window name and class string.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] name The name of the window [in] klass The class of the window
void Dali::Window::SetIndicatorBgOpacity | ( | IndicatorBgOpacity | opacity | ) |
This sets the opacity mode of indicator bar.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] opacity The opacity mode
void Dali::Window::SetInputRegion | ( | const Rect< int > & | inputRegion | ) |
Sets a region to accept input events.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] inputRegion The region to accept input events.
bool Dali::Window::SetNotificationLevel | ( | NotificationLevel::Type | level | ) |
Sets a priority level for the specified notification window.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] level The notification window level.
- Returns:
- True if no error occurred, false otherwise.
- Privilege Level:
- public
- Remarks:
- This can be used for a notification type window only. The default level is NotificationLevel::NONE.
void Dali::Window::SetOpaqueState | ( | bool | opaque | ) |
Sets a transparent window's visual state to opaque.
If a visual state of a transparent window is opaque, then the window manager could handle it as an opaque window when calculating visibility.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] opaque Whether the window's visual state is opaque.
- Remarks:
- This will have no effect on an opaque window. It doesn't change transparent window to opaque window but lets the window manager know the visual state of the window.
void Dali::Window::SetPosition | ( | WindowPosition | position | ) |
Sets a position of the window.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] position The new window position
void Dali::Window::SetPreferredOrientation | ( | WindowOrientation | orientation | ) |
Sets a preferred orientation.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] orientation The preferred orientation
- Precondition:
- Orientation is in the list of available orientations.
bool Dali::Window::SetScreenOffMode | ( | ScreenOffMode::Type | screenOffMode | ) |
Sets a window's screen off mode.
This API is useful when the application needs to keep the display turned on. If the application sets the screen mode to #Dali::Window::ScreenOffMode::NEVER to its window and the window is shown, the window manager requests the display system to keep the display on as long as the window is shown. If the window is no longer shown, then the window manager requests the display system to go back to normal operation.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] screenOffMode The screen mode.
- Returns:
- True if no error occurred, false otherwise.
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/display
void Dali::Window::SetSize | ( | WindowSize | size | ) |
Sets a size of the window.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] size The new window size
void Dali::Window::SetTransparency | ( | bool | transparent | ) |
Sets whether the window is transparent or not.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] transparent Whether the window is transparent
void Dali::Window::SetType | ( | Type | type | ) |
Sets a window type.
- Since:
- 4.0, DALi version 1.2.60
- Parameters:
-
[in] type The window type.
- Remarks:
- The default window type is NORMAL.
void Dali::Window::Show | ( | ) |
Shows the window if it is hidden.
- Since:
- 4.0, DALi version 1.2.60
void Dali::Window::ShowIndicator | ( | IndicatorVisibleMode | visibleMode | ) |
This sets whether the indicator bar should be shown or not.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] visibleMode Visible mode for indicator bar, VISIBLE in default