Class Window
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The Window is a container that contains the graphical user interface of a program.
[Obsolete("This has been deprecated in API12")]
public class Window : Widget, IAccessibleObject
- Inheritance
- Implements
Constructors
View SourceWindow()
Creates and initializes a new instance of the Window class.
Declaration
[Obsolete("This has been deprecated in API12")]
protected Window()
Window(Window, string, WindowType)
Creates and initializes a new instance of the Window class.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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.
Window(Window, string)
Creates and initializes a new instance of the Window class.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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.
Window(string)
Creates and initializes a new instance of the Window class.
Declaration
[Obsolete("This has been deprecated in API12")]
public Window(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Window name. |
Properties
View SourceAavailableRotations
Sets or gets the available rotation degree.
Declaration
[Obsolete("Sorry, it's error typo of AvailableRotations, please use AvailableRotations")]
public DisplayRotation AavailableRotations { get; set; }
Property Value
Type | Description |
---|---|
DisplayRotation |
Alpha
Sets or gets the alpha channel state of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool Alpha { get; set; }
Property Value
Type | Description |
---|---|
bool |
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.
Aspect
Gets or sets the aspect ratio of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public double Aspect { get; set; }
Property Value
Type | Description |
---|---|
double |
AutoDeletion
Sets or gets whether the auto deletion function is enabled.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool AutoDeletion { get; set; }
Property Value
Type | Description |
---|---|
bool |
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.
AutoHide
Window's autohide state.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool AutoHide { get; set; }
Property Value
Type | Description |
---|---|
bool |
AvailableRotations
Sets or gets the available rotation degree.
Declaration
[Obsolete("This has been deprecated in API12")]
public DisplayRotation AvailableRotations { get; set; }
Property Value
Type | Description |
---|---|
DisplayRotation |
BaseSize
Gets or sets the base size of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public Size BaseSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
Borderless
Gets the borderless state of the window. This function requests the Window Manager to not draw any decoration around the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool Borderless { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[Obsolete("This has been deprecated in API12")]
public int Brightness { get; set; }
Property Value
Type | Description |
---|---|
int |
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.
DemandAttention
Gets or sets the demand attention state of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool DemandAttention { get; set; }
Property Value
Type | Description |
---|---|
bool |
FloatingMode
Gets or sets the floating mode of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool FloatingMode { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[Obsolete("This has been deprecated in API12")]
public bool FocusHighlightAnimation { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[Obsolete("This has been deprecated in API12")]
public bool FocusHighlightEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[Obsolete("This has been deprecated in API12")]
public string FocusHighlightStyle { get; set; }
Property Value
Type | Description |
---|---|
string |
IndicatorMode
Gets or sets the window's indicator mode.
Declaration
[Obsolete("This has been deprecated in API12")]
public IndicatorMode IndicatorMode { get; set; }
Property Value
Type | Description |
---|---|
IndicatorMode | The indicator mode. |
IsRotationSupported
Gets whether the window manager supports window rotation or not.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool IsRotationSupported { get; }
Property Value
Type | Description |
---|---|
bool |
KeyboardMode
Gets the keyboard mode of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public KeyboardMode KeyboardMode { get; set; }
Property Value
Type | Description |
---|---|
KeyboardMode |
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
[Obsolete("This has been deprecated in API12")]
public override int Layer { get; set; }
Property Value
Type | Description |
---|---|
int |
Overrides
View SourceModal
Gets or sets the modal state of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool Modal { get; set; }
Property Value
Type | Description |
---|---|
bool |
Name
Sets or gets the window name.
Declaration
[Obsolete("This has been deprecated in API12")]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
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
[Obsolete("This has been deprecated in API12")]
public bool NoBlank { get; set; }
Property Value
Type | Description |
---|---|
bool |
NotificationLevel
Gets or sets the priority level for the specified notification window.
Declaration
[Obsolete("This has been deprecated in API12")]
public NotificationLevel NotificationLevel { get; set; }
Property Value
Type | Description |
---|---|
NotificationLevel |
Remarks
This can be used for a notification type window only.
Profile
Gets the profile of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public string Profile { get; set; }
Property Value
Type | Description |
---|---|
string |
Role
Sets or gets the role of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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.
Rotation
Gets the rotation of the window. The rotation of the window in degrees (0-360).
Declaration
[Obsolete("This has been deprecated in API12")]
public int Rotation { get; }
Property Value
Type | Description |
---|---|
int |
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
[Obsolete("This has been deprecated in API12")]
public bool ScreenConstrain { get; set; }
Property Value
Type | Description |
---|---|
bool |
ScreenDpi
Gets the screen dpi for the screen that the window is on.
Declaration
[Obsolete("This has been deprecated in API12")]
public Point ScreenDpi { get; }
Property Value
Type | Description |
---|---|
Point |
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
[Obsolete("This has been deprecated in API12")]
public 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.
ScreenPositionX
Gets the screen position X of a window.
Declaration
[Obsolete("This has been deprecated in API12")]
public int ScreenPositionX { get; }
Property Value
Type | Description |
---|---|
int |
ScreenPositionY
Gets the screen position Y of a window.
Declaration
[Obsolete("This has been deprecated in API12")]
public int ScreenPositionY { get; }
Property Value
Type | Description |
---|---|
int |
ScreenSize
Gets the window size with Size value(w,h)
Declaration
[Obsolete("This has been deprecated in API12")]
public Size ScreenSize { get; }
Property Value
Type | Description |
---|---|
Size |
StatusBarMode
Sets or gets the mode of the status bar.
Declaration
[Obsolete("This has been deprecated in API12")]
public StatusBarMode StatusBarMode { get; set; }
Property Value
Type | Description |
---|---|
StatusBarMode |
StepSize
Gets or sets the step size of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public Size StepSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
Title
Gets or sets the title of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public string Title { get; set; }
Property Value
Type | Description |
---|---|
string |
Type
Gets the window type.
Declaration
[Obsolete("This has been deprecated in API12")]
public WindowType Type { get; }
Property Value
Type | Description |
---|---|
WindowType |
Urgent
Gets or sets the urgent state of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool Urgent { get; set; }
Property Value
Type | Description |
---|---|
bool |
Withdrawn
Gets or sets the withdrawn state of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool Withdrawn { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
View SourceActive()
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
[Obsolete("This has been deprecated in API12")]
public 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.
AddResizeObject(EvasObject)
Adds an object as a resize object of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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.
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
[Obsolete("This has been deprecated in API12")]
public void BringDown()
CreateHandle(EvasObject)
Creates a widget handle.
Declaration
[Obsolete("This has been deprecated in API12")]
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
System.IntPtr | Handle IntPtr. |
Overrides
View SourceCreateServiceSocket(string, int, bool)
Creates a socket to provide the service for the Plug widget.
Declaration
[Obsolete("This has been deprecated in API12")]
public bool CreateServiceSocket(string name, int number, bool systemWide)
Parameters
Type | Name | Description |
---|---|---|
string | name | A service name. |
int | number | A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name. |
bool | 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 |
---|---|
bool | If true creates successful, otherwise false. |
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
[Obsolete("This has been deprecated in API12")]
public void DeleteResizeObject(EvasObject obj)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | obj | Resize object. |
FocusSkip(bool)
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
[Obsolete("This has been deprecated in API12")]
public void FocusSkip(bool skip)
Parameters
Type | Name | Description |
---|---|---|
bool | skip |
KeyGrabEx(string)
Sets the keygrab of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public void KeyGrabEx(string keyname)
Parameters
Type | Name | Description |
---|---|---|
string | keyname | The keyname string to set keygrab. |
KeyUngrabEx(string)
Unsets the keygrab of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public void KeyUngrabEx(string keyname)
Parameters
Type | Name | Description |
---|---|---|
string | keyname | The keyname string to unset keygrab. |
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
[Obsolete("This has been deprecated in API12")]
public void PullUp()
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
[Obsolete("This has been deprecated in API12")]
public void SetOpaqueState()
SetRotation(int, bool)
Sets the rotation of the window.
Declaration
[Obsolete("This has been deprecated in API12")]
public void SetRotation(int degree, bool resize)
Parameters
Type | Name | Description |
---|---|---|
int | degree | The rotation of the window, in degrees (0-360), counter-clockwise. |
bool | resize | Resizes the window's contents so that they fit inside the current window geometry. |
UnsetOpaqueState()
Unsets the alpha window's visual state to opaque state.
Declaration
[Obsolete("This has been deprecated in API12")]
public void UnsetOpaqueState()
Events
View SourceCloseRequested
CloseRequested will be triggered when window is closed.
Declaration
[Obsolete("This has been deprecated in API12")]
public event EventHandler CloseRequested
Event Type
Type | Description |
---|---|
System.EventHandler |
RotationChanged
RotationChanged will be triggered when window is rotated.
Declaration
[Obsolete("This has been deprecated in API12")]
public event EventHandler RotationChanged
Event Type
Type | Description |
---|---|
System.EventHandler |