Class Window
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
- API Level:
- preview
The Window is a container that contains the graphical user interface of a program.
C#Copypublic class Window : Widget, IAccessibleObject
- Inheritance
- Derived
- Implements
Constructors
Declaration
C#Copyprotected Window()
API Level: preview
Declaration
C#Copypublic Window(Window parent, string name)
Parameters
Type | Name | Description |
---|---|---|
Window | parent | Parent widget which this window is created on. |
String | name | Window name. |
Remarks
Window constructor.show window indicator, set callback when closing the window in any way outside the program control, and set callback when window rotation is changed.
API Level: preview
Window(Window, String, WindowType)
Creates and initializes a new instance of the Window class.
Declaration
C#Copypublic Window(Window parent, string name, WindowType type)
Parameters
Type | Name | Description |
---|---|---|
Window | parent | Parent widget which this window is created on. |
String | name | Window name. |
WindowType | type | Window type. |
Remarks
Window constructor.show window indicator, set callback when closing the window in any way outside the program control, and set callback when window rotation is changed.
API Level: preview
Declaration
C#Copypublic Window(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Window name. |
API Level: preview
Properties
Declaration
C#Copypublic DisplayRotation AavailableRotations { get; set; }
Property Value
Type | Description |
---|---|
DisplayRotation |
API Level: preview
Declaration
C#Copypublic bool Alpha { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
true if the window alpha channel is enabled, false otherwise. If alpha is true, the alpha channel of the canvas will be enabled possibly making parts of the window completely or partially transparent.
API Level: preview
Declaration
C#Copypublic double Aspect { get; set; }
Property Value
Type | Description |
---|---|
Double |
API Level: preview
Declaration
C#Copypublic bool AutoDeletion { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
If you enable auto deletion, the window is automatically destroyed after the signal is emitted. If auto deletion is disabled, the window is not destroyed and the program has to handle it.
API Level: preview
Declaration
C#Copypublic bool AutoHide { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Declaration
C#Copypublic DisplayRotation AvailableRotations { get; set; }
Property Value
Type | Description |
---|---|
DisplayRotation |
API Level: preview
Declaration
C#Copypublic Size BaseSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
API Level: preview
Borderless
Gets the borderless state of the window. This function requests the Window Manager to not draw any decoration around the window.
Declaration
C#Copypublic bool Borderless { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Brightness
Gets or sets the user's preferred brightness of the specified window. This is useful when the application need to change the brightness of the screen when it is appeared on the screen. If the application sets the brightness 0 to 100 to its window and the application window is shown wholly or partially, the window manager requests the display system to change the brightness of the screen using user's preferred brightness. If the window is no longer shown, then the window manger request the display system to go back to default brightness. If the brightness is less than 0, this means to use the default screen brightness.
Declaration
C#Copypublic int Brightness { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
This needs the privilege. If the application which is not get the privilege use this API, the window manager generates the permission deny error.
API Level: preview
Privilege Level: public
Privilege: http://tizen.org/privilege/display
Declaration
C#Copypublic bool DemandAttention { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Declaration
C#Copypublic bool FloatingMode { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
FocusHighlightAnimation
Gets or sets the animate status for the focus highlight for this window. This function will enable or disable the animation of focus highlight only for the given window, regardless of the global setting for it.
Declaration
C#Copypublic bool FocusHighlightAnimation { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
FocusHighlightEnabled
Gets or sets the enabled status for the focus highlight in the window. This function will enable or disable the focus highlight only for the given window, regardless of the global setting for it.
Declaration
C#Copypublic bool FocusHighlightEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
FocusHighlightStyle
Gets or sets the style for the focus highlight on this window. Sets the style to use for theming the highlight of focused objects on the given window. If style is NULL, the default will be used.
Declaration
C#Copypublic string FocusHighlightStyle { get; set; }
Property Value
Type | Description |
---|---|
String |
API Level: preview
Declaration
C#Copypublic bool Iconified { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Declaration
C#Copypublic IndicatorMode IndicatorMode { get; set; }
Property Value
Type | Description |
---|---|
IndicatorMode | The indicator mode. |
API Level: preview
Declaration
C#Copypublic bool IsRotationSupported { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Declaration
C#Copypublic KeyboardMode KeyboardMode { get; set; }
Property Value
Type | Description |
---|---|
KeyboardMode |
API Level: preview
Layer
Gets or sets the layer of the window. What this means exactly will depend on the underlying engine used. In the case of X11 backed engines, the value in layer has the following meanings: less than 3 means that the window will be placed below all others, more than 5 means that the window will be placed above all others, and anything else means that the window will be placed in the default layer.
Declaration
C#Copypublic override int Layer { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
API Level: preview
Declaration
C#Copypublic bool Modal { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Declaration
C#Copypublic string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
API Level: preview
NoBlank
Gets or sets the noblank property of the window. This is a way to request the display on which the window is shown is not blank, screensave, or otherwise hidden or obscure. It is intended for use such as media playback on a television where a user may not want to be interrupted by an idle screen. The noblank property may have no effect if the window is iconified/minimized or hidden.
Declaration
C#Copypublic bool NoBlank { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
NotificationLevel
Gets or sets the priority level for the specified notification window.
Declaration
C#Copypublic NotificationLevel NotificationLevel { get; set; }
Property Value
Type | Description |
---|---|
NotificationLevel |
Remarks
This can be used for a notification type window only.
API Level: preview
Privilege Level: public
Privilege: http://tizen.org/privilege/window.priority.set
Declaration
C#Copypublic string Profile { get; set; }
Property Value
Type | Description |
---|---|
String |
API Level: preview
Declaration
C#Copypublic string Role { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The Role will be invalid if a new role is set or if the window is destroyed.
API Level: preview
Rotation
Gets the rotation of the window. The rotation of the window in degrees (0-360).
Declaration
C#Copypublic int Rotation { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: preview
ScreenConstrain
Gets the constraints on the maximum width and height of the window relative to the width and height of its screen. When this function returns true, object will never resize larger than the screen.
Declaration
C#Copypublic bool ScreenConstrain { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Declaration
C#Copypublic Point ScreenDpi { get; }
Property Value
Type | Description |
---|---|
Point |
API Level: preview
ScreenMode
Gets or sets the window's screen mode. This API is useful when the application need to keep the display turned on. If the application set the mode to ScreenMode.AlwaysOn to its window and the window is shown wholly or partially, 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 manger request the display system to go back to normal operation. Default screen mode of window is ScreenMode.Default.
Declaration
C#Copypublic ScreenMode ScreenMode { get; set; }
Property Value
Type | Description |
---|---|
ScreenMode |
Remarks
This needs the privilege. If the application which is not get the privilege use this API, the window manager generates the permission deny error.
API Level: preview
Privilege Level: public
Privilege: http://tizen.org/privilege/display
Declaration
C#Copypublic int ScreenPositionX { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: preview
Declaration
C#Copypublic int ScreenPositionY { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: preview
Declaration
C#Copypublic Size ScreenSize { get; }
Property Value
Type | Description |
---|---|
Size |
API Level: preview
Declaration
C#Copypublic StatusBarMode StatusBarMode { get; set; }
Property Value
Type | Description |
---|---|
StatusBarMode |
API Level: preview
Declaration
C#Copypublic Size StepSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
API Level: preview
Declaration
C#Copypublic string Title { get; set; }
Property Value
Type | Description |
---|---|
String |
API Level: preview
Declaration
C#Copypublic WindowType Type { get; }
Property Value
Type | Description |
---|---|
WindowType |
API Level: preview
Declaration
C#Copypublic bool Urgent { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Declaration
C#Copypublic bool Withdrawn { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: preview
Methods
Active()
This function sends a request to the Windows Manager to activate the window. If honored by the Windows Manager, the window receives the keyboard focus.
Declaration
C#Copypublic void Active()
Remarks
This is just a request that the Windows Manager may ignore, so calling this function does not ensure in any way that the window is going to be the active one after it.
API Level: preview
Declaration
C#Copypublic int AddAuxiliaryHint(string hint, string value)
Parameters
Type | Name | Description |
---|---|---|
String | hint | The auxiliary hint string |
String | value | The value string |
Returns
Type | Description |
---|---|
Int32 | The ID of the created auxiliary hint, otherwise -1 on failure |
Remarks
Support for this depends on the underlying windowing system.
API Level: preview
Declaration
C#Copypublic void AddResizeObject(EvasObject obj)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | obj | Resize object. |
Remarks
Setting an object as a resize object of the window means that the object child's size and position is controlled by the window directly. That is, the object is resized to match the window size and should never be moved or resized manually by the developer. In addition, resize objects of the window control the minimum size of it as well as whether it can or cannot be resized by the user.
API Level: preview
BringDown()
Brings down the window object. Places the window pointed by object at the bottom of the stack, so that no other window is covered by it.
Declaration
C#Copypublic void BringDown()
API Level: preview
Declaration
C#Copyprotected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
IntPtr | Handle IntPtr. |
Overrides
API Level: preview
CreateServiceSocket(String, Int32, Boolean)
Creates a socket to provide the service for the Plug widget.
Declaration
C#Copypublic bool CreateServiceSocket(string name, int number, bool systemWide)
Parameters
Type | Name | Description |
---|---|---|
String | name | A service name. |
Int32 | number | A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name. |
Boolean | systemWide | A boolean that if true, specifies to create a system-wide service all users can connect to, otherwise the service is private to the user ID that created the service. |
Returns
Type | Description |
---|---|
Boolean | If true creates successful, otherwise false. |
API Level: preview
Declaration
C#Copypublic bool DeleteAuxiliaryHint(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | The ID of the auxiliary hint |
Returns
Type | Description |
---|---|
Boolean | If true deletes successful, otherwise false. |
Remarks
Support for this depends on the underlying windowing system.
API Level: preview
DeleteResizeObject(EvasObject)
Deletes the subobj as a resize object of the window object. This function removes the object subobj from the resize objects of the window object. It will not delete the object itself, which will be left unmanaged and should be deleted by the developer, manually handled, or set as child of some other container.
Declaration
C#Copypublic void DeleteResizeObject(EvasObject obj)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | obj | Resize object. |
API Level: preview
FocusSkip(Boolean)
Sets the window to be skipped by focus. This sets the window to be skipped by normal input. This means the Windows Manager will be asked to not focus this window as well as omit it from things like the taskbar, pager etc. Call this and enable it on the window BEFORE you show it for the first time, otherwise it may have no effect. Use this for windows that have only output information or might only be interacted with by the mouse or fingers, and never for typing input. Be careful that this may have side-effects like making the window non-accessible in some cases unless the window is specially handled. Use this with care.
Declaration
C#Copypublic void FocusSkip(bool skip)
Parameters
Type | Name | Description |
---|---|---|
Boolean | skip |
API Level: preview
Declaration
C#Copypublic int GetAuxiliaryHintId(string hint)
Parameters
Type | Name | Description |
---|---|---|
String | hint | The auxiliary hint string |
Returns
Type | Description |
---|---|
Int32 | The ID of the auxiliary hint, otherwise -1 on failure |
Remarks
Support for this depends on the underlying windowing system.
API Level: preview
Declaration
C#Copypublic string GetAuxiliaryHintValue(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | The auxiliary hint ID |
Returns
Type | Description |
---|---|
String | The string value of the auxiliary hint ID |
Remarks
Support for this depends on the underlying windowing system.
API Level: preview
Declaration
C#Copypublic void KeyGrabEx(string keyname)
Parameters
Type | Name | Description |
---|---|---|
String | keyname | The keyname string to set keygrab. |
API Level: preview
Declaration
C#Copypublic void KeyUngrabEx(string keyname)
Parameters
Type | Name | Description |
---|---|---|
String | keyname | The keyname string to unset keygrab. |
API Level: preview
PullUp()
Pulls up the window object. Places the window pointed by object at the top of the stack, so that it's not covered by any other window.
Declaration
C#Copypublic void PullUp()
API Level: preview
Declaration
C#Copypublic bool SetAuxiliaryHintValue(int id, string value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | The auxiliary hint ID |
String | value | The value string to be set |
Returns
Type | Description |
---|---|
Boolean | If true changes successful, otherwise false. |
Remarks
Support for this depends on the underlying windowing system.
API Level: preview
SetOpaqueState()
Sets the alpha window's visual state to opaque state. This sets the alpha window's visual state to opaque state. If the alpha window sets the visual state to the opaque, then the window manager could handle it as the opaque window while calculating visibility. This will have no effect when used by a non-alpha window.
Declaration
C#Copypublic void SetOpaqueState()
API Level: preview
Declaration
C#Copypublic void SetRotation(int degree, bool resize)
Parameters
Type | Name | Description |
---|---|---|
Int32 | degree | The rotation of the window, in degrees (0-360), counter-clockwise. |
Boolean | resize | Resizes the window's contents so that they fit inside the current window geometry. |
API Level: preview
Declaration
C#Copypublic void UnsetOpaqueState()
API Level: preview
WinKeyGrab(String, KeyGrabMode)
Sets the keygrab value of the window. This function grabs the key of the window using grab_mode.
Declaration
C#Copypublic void WinKeyGrab(string keyname, KeyGrabMode mode)
Parameters
Type | Name | Description |
---|---|---|
String | keyname | The keyname to grab. |
KeyGrabMode | mode | According to the grabmode, it can grab key differently. |
API Level: preview
WinKeyUngrab(String)
Unsets the keygrab value of the window. This function unsets keygrab value. Ungrab key of the window.
Declaration
C#Copypublic void WinKeyUngrab(string keyname)
Parameters
Type | Name | Description |
---|---|---|
String | keyname | The keyname to grab. |
API Level: preview
Events
Declaration
C#Copypublic event EventHandler CloseRequested
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
Declaration
C#Copypublic event EventHandler RotationChanged
Event Type
Type | Description |
---|---|
EventHandler |