Class Window
Definition
- Assembly:
- Tizen.NUI.dll
The window class is used internally for drawing.
The window has an orientation and indicator properties.
C#Copypublic class Window : BaseHandle, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Properties
Declaration
C#Copypublic Color BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Dpi
The DPI property (read-only).
Retrieves the DPI of the display device to which the Window is connected.
Declaration
C#Copypublic Vector2 Dpi { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic static Window Instance { get; }
Property Value
Type | Description |
---|---|
Window |
LayerCount
The layer count property (read-only).
Queries the number of on-Window layers.
Declaration
C#Copypublic uint LayerCount { get; }
Property Value
Type | Description |
---|---|
uint |
Declaration
C#Copypublic Size2D Size { get; }
Property Value
Type | Description |
---|---|
Size2D |
Declaration
C#Copypublic string Title { get; set; }
Property Value
Type | Description |
---|---|
string |
Declaration
C#Copypublic WindowType Type { get; set; }
Property Value
Type | Description |
---|---|
WindowType |
Declaration
C#Copypublic Position2D WindowPosition { get; set; }
Property Value
Type | Description |
---|---|
Position2D |
Declaration
C#Copypublic Size2D WindowSize { get; set; }
Property Value
Type | Description |
---|---|
Size2D |
Methods
Declaration
C#Copypublic void Activate()
Declaration
C#Copypublic void Add(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | the child should be added to the window. |
Declaration
C#Copypublic uint AddAuxiliaryHint(string hint, string value)
Parameters
Type | Name | Description |
---|---|---|
string | hint | The auxiliary hint string. |
string | value | The value string. |
Returns
Type | Description |
---|---|
uint | The ID of created auxiliary hint, or 0 on failure. |
Declaration
C#Copypublic void AddLayer(Layer layer)
Parameters
Type | Name | Description |
---|---|---|
Layer | layer | Layer to add. |
Declaration
C#Copy[Obsolete("Please do not use! This will be deprecated! Please use FeedKey(Key keyEvent) instead!")] public static void FeedKeyEvent(Key keyEvent)
Parameters
Type | Name | Description |
---|---|---|
Key | keyEvent | The key event to feed. |
Declaration
C#Copypublic uint GetAuxiliaryHintId(string hint)
Parameters
Type | Name | Description |
---|---|---|
string | hint | The auxiliary hint string. |
Returns
Type | Description |
---|---|
uint | The ID of auxiliary hint string, or 0 on failure. |
Declaration
C#Copypublic string GetAuxiliaryHintValue(uint id)
Parameters
Type | Name | Description |
---|---|---|
uint | id | The auxiliary hint ID. |
Returns
Type | Description |
---|---|
string | The string value of the auxiliary hint ID, or an empty string if none exists. |
Declaration
C#Copypublic int GetBrightness()
Returns
Type | Description |
---|---|
int | The preferred brightness. |
Declaration
C#Copypublic Layer GetDefaultLayer()
Returns
Type | Description |
---|---|
Layer | The root layer. |
Declaration
C#Copypublic Layer GetLayer(uint depth)
Parameters
Type | Name | Description |
---|---|---|
uint | depth | The layer's depth index. |
Returns
Type | Description |
---|---|
Layer | The layer found at the given depth. |
Declaration
C#Copypublic NotificationLevel GetNotificationLevel()
Returns
Type | Description |
---|---|
NotificationLevel | The notification window level. |
Declaration
C#Copypublic ScreenOffMode GetScreenOffMode()
Returns
Type | Description |
---|---|
ScreenOffMode | The screen off mode. |
Declaration
C#Copypublic string GetSupportedAuxiliaryHint(uint index)
Parameters
Type | Name | Description |
---|---|---|
uint | index | The index of the supported auxiliary hint lists. |
Returns
Type | Description |
---|---|
string | The auxiliary hint string of the index. |
GetSupportedAuxiliaryHintCount()
Gets the count of supported auxiliary hints of the window.
Declaration
C#Copypublic uint GetSupportedAuxiliaryHintCount()
Returns
Type | Description |
---|---|
uint | The number of supported auxiliary hints. |
GrabKey(int, KeyGrabMode)
Grabs the key specified by a key for a window in a GrabMode.
Details: 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 foregrund app.
- Mobile - When a user presses the Home key, the homescreen appears regardless of the current foreground app.
- Mobile - Using the volume up or down as zoom up or down in camera apps.
Declaration
C#Copypublic bool GrabKey(int DaliKey, Window.KeyGrabMode GrabMode)
Parameters
Type | Name | Description |
---|---|---|
int | DaliKey | The key code to grab. |
Window.KeyGrabMode | GrabMode | The grab mode for the key. |
Returns
Type | Description |
---|---|
bool | True if the grab succeeds. |
GrabKeyTopmost(int)
Grabs the key specified by a key for a window only when a window is the topmost window.
This function can be used for following example scenarios:
- Mobile - Using volume up or down as zoom up or down in camera apps.
Declaration
C#Copypublic bool GrabKeyTopmost(int DaliKey)
Parameters
Type | Name | Description |
---|---|---|
int | DaliKey | The key code to grab. |
Returns
Type | Description |
---|---|
bool | True if the grab succeeds. |
Declaration
C#Copypublic void Hide()
Declaration
C#Copypublic bool IsFocusAcceptable()
Returns
Type | Description |
---|---|
bool | True if the window accepts a focus, false otherwise. |
Declaration
C#Copypublic bool IsOpaqueState()
Returns
Type | Description |
---|---|
bool | True if the window's visual state is opaque, false otherwise. |
Remarks
The return value has no meaning on an opaque window.
Declaration
C#Copypublic bool IsVisible()
Returns
Type | Description |
---|---|
bool | True if the window is visible. |
Declaration
C#Copypublic void KeepRendering(float durationSeconds)
Parameters
Type | Name | Description |
---|---|---|
float | durationSeconds | Time to keep rendering, 0 means render at least one more frame. |
Declaration
C#Copypublic void Lower()
Declaration
C#Copypublic void Raise()
Declaration
C#Copypublic void Remove(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | the child to be removed. |
Declaration
C#Copypublic bool RemoveAuxiliaryHint(uint id)
Parameters
Type | Name | Description |
---|---|---|
uint | id | The ID of the auxiliary hint. |
Returns
Type | Description |
---|---|
bool | True if no error occurred, false otherwise. |
Declaration
C#Copypublic void RemoveLayer(Layer layer)
Parameters
Type | Name | Description |
---|---|---|
Layer | layer | Layer to remove. |
RenderOnce()
Allows at least one more render, even when paused. The window should be shown, not minimised.
Declaration
C#Copypublic void RenderOnce()
Declaration
C#Copypublic void SetAcceptFocus(bool accept)
Parameters
Type | Name | Description |
---|---|---|
bool | accept | If a focus is accepted or not. The default is true. |
Declaration
C#Copypublic bool SetAuxiliaryHintValue(uint id, string value)
Parameters
Type | Name | Description |
---|---|---|
uint | id | The auxiliary hint ID. |
string | value | The value string to be set. |
Returns
Type | Description |
---|---|
bool | True if no error occurred, false otherwise. |
Declaration
C#Copypublic bool SetBrightness(int brightness)
Parameters
Type | Name | Description |
---|---|---|
int | brightness | The preferred brightness (0 to 100). |
Returns
Type | Description |
---|---|
bool | True if no error occurred, false otherwise. |
Declaration
C#Copypublic void SetClass(string name, string klass)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the window. |
string | klass | The class of the window. |
Declaration
C#Copypublic void SetInputRegion(Rectangle inputRegion)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | inputRegion | The region to accept input events. |
SetNotificationLevel(NotificationLevel)
Sets a priority level for the specified notification window.
Declaration
C#Copypublic bool SetNotificationLevel(NotificationLevel level)
Parameters
Type | Name | Description |
---|---|---|
NotificationLevel | level | The notification window level. |
Returns
Type | Description |
---|---|
bool | True if no error occurred, false otherwise. |
SetOpaqueState(bool)
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.
Declaration
C#Copypublic void SetOpaqueState(bool opaque)
Parameters
Type | Name | Description |
---|---|---|
bool | 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.
Declaration
C#Copypublic bool SetScreenOffMode(ScreenOffMode screenOffMode)
Parameters
Type | Name | Description |
---|---|---|
ScreenOffMode | screenOffMode | The screen mode. |
Returns
Type | Description |
---|---|
bool | True if no error occurred, false otherwise. |
Declaration
C#Copypublic void Show()
UngrabKey(int)
Ungrabs the key specified by a key for a window.
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.
Declaration
C#Copypublic bool UngrabKey(int DaliKey)
Parameters
Type | Name | Description |
---|---|---|
int | DaliKey | The key code to ungrab. |
Returns
Type | Description |
---|---|
bool | True if the ungrab succeeds. |
UngrabKeyTopmost(int)
Ungrabs the key specified by a key for the window.
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.
Declaration
C#Copypublic bool UngrabKeyTopmost(int DaliKey)
Parameters
Type | Name | Description |
---|---|---|
int | DaliKey | The key code to ungrab. |
Returns
Type | Description |
---|---|
bool | True if the ungrab succeeds. |
Events
Declaration
C#Copypublic event EventHandler<Window.FocusChangedEventArgs> FocusChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Window.FocusChangedEventArgs> |
Declaration
C#Copypublic event EventHandler<Window.KeyEventArgs> KeyEvent
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Window.KeyEventArgs> |
Declaration
C#Copypublic event EventHandler<Window.ResizedEventArgs> Resized
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Window.ResizedEventArgs> |
TouchEvent
This event is emitted when the screen is touched and when the touch ends.
If there are multiple touch points, then this will be emitted when the first touch occurs and
then when the last finger is lifted.
An interrupted event will also be emitted (if it occurs).
Declaration
C#Copypublic event EventHandler<Window.TouchEventArgs> TouchEvent
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Window.TouchEventArgs> |
Declaration
C#Copypublic event EventHandler<Window.WheelEventArgs> WheelEvent
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><Window.WheelEventArgs> |