Class Window

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    The window class is used internally for drawing.
    The window has an orientation and indicator properties.

    public class Window : BaseHandle, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    Tizen.NUI.Binding.BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    Window
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Properties

    View Source

    BackgroundColor

    The background color property.

    Declaration
    public Color BackgroundColor { get; set; }
    Property Value
    Type Description
    Color
    View Source

    Dpi

    The DPI property (read-only).
    Retrieves the DPI of the display device to which the Window is connected.

    Declaration
    public Vector2 Dpi { get; }
    Property Value
    Type Description
    Vector2
    View Source

    Instance

    The stage instance property (read-only).
    Gets the current window.

    Declaration
    public static Window Instance { get; }
    Property Value
    Type Description
    Window
    View Source

    LayerCount

    The layer count property (read-only).
    Queries the number of on-Window layers.

    Declaration
    public uint LayerCount { get; }
    Property Value
    Type Description
    uint
    View Source

    RenderingBehavior

    The rendering behavior of a Window.

    Declaration
    public RenderingBehaviorType RenderingBehavior { get; set; }
    Property Value
    Type Description
    RenderingBehaviorType
    View Source

    Size

    The window size property (read-only).

    Declaration
    public Size2D Size { get; }
    Property Value
    Type Description
    Size2D
    View Source

    Title

    Gets/Sets a window title.

    Declaration
    public string Title { get; set; }
    Property Value
    Type Description
    string
    View Source

    Type

    Gets or sets a window type.

    Declaration
    public WindowType Type { get; set; }
    Property Value
    Type Description
    WindowType
    View Source

    WindowPosition

    Gets or sets a position of the window.

    Declaration
    public Position2D WindowPosition { get; set; }
    Property Value
    Type Description
    Position2D
    View Source

    WindowSize

    Gets or sets a size of the window.

    Declaration
    public Size2D WindowSize { get; set; }
    Property Value
    Type Description
    Size2D

    Methods

    View Source

    Activate()

    Activates the window to the top of the window stack even it is iconified.

    Declaration
    public void Activate()
    View Source

    Add(View)

    Add a child view to window.

    Declaration
    public void Add(View view)
    Parameters
    Type Name Description
    View view

    the child should be added to the window.

    View Source

    AddAuxiliaryHint(string, string)

    Creates an auxiliary hint of the window.

    Declaration
    public 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.

    View Source

    AddLayer(Layer)

    Adds a layer to the stage.

    Declaration
    public void AddLayer(Layer layer)
    Parameters
    Type Name Description
    Layer layer

    Layer to add.

    View Source

    FeedKey(Key)

    Feeds a key event into the window.

    Declaration
    public void FeedKey(Key keyEvent)
    Parameters
    Type Name Description
    Key keyEvent

    The key event to feed.

    View Source

    FeedKeyEvent(Key)

    Feed a key-event into the window.

    Declaration
    [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.

    View Source

    GetAuxiliaryHintId(string)

    Gets an ID of the auxiliary hint string.

    Declaration
    public 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.

    View Source

    GetAuxiliaryHintValue(uint)

    Gets a value of the auxiliary hint.

    Declaration
    public 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.

    View Source

    GetBrightness()

    Gets the preferred brightness of the window.

    Declaration
    public int GetBrightness()
    Returns
    Type Description
    int

    The preferred brightness.

    View Source

    GetDefaultLayer()

    Gets the default ( root ) layer.

    Declaration
    public Layer GetDefaultLayer()
    Returns
    Type Description
    Layer

    The root layer.

    View Source

    GetKeyboardRepeatInfo(out float, out float)

    Gets the keyboard repeat information.

    Declaration
    public bool GetKeyboardRepeatInfo(out float rate, out float delay)
    Parameters
    Type Name Description
    float rate

    The key repeat rate value in seconds.

    float delay

    The key repeat delay value in seconds.

    Returns
    Type Description
    bool

    True if setting the keyboard repeat succeeds.

    View Source

    GetLayer(uint)

    Retrieves the layer at a specified depth.

    Declaration
    public 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.

    View Source

    GetNotificationLevel()

    Gets a priority level for the specified notification window.

    Declaration
    public NotificationLevel GetNotificationLevel()
    Returns
    Type Description
    NotificationLevel

    The notification window level.

    View Source

    GetScreenOffMode()

    Gets the screen mode of the window.

    Declaration
    public ScreenOffMode GetScreenOffMode()
    Returns
    Type Description
    ScreenOffMode

    The screen off mode.

    View Source

    GetSupportedAuxiliaryHint(uint)

    Gets the supported auxiliary hint string of the window.

    Declaration
    public 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.

    View Source

    GetSupportedAuxiliaryHintCount()

    Gets the count of supported auxiliary hints of the window.

    Declaration
    public uint GetSupportedAuxiliaryHintCount()
    Returns
    Type Description
    uint

    The number of supported auxiliary hints.

    View Source

    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
    public 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.

    View Source

    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
    public bool GrabKeyTopmost(int DaliKey)
    Parameters
    Type Name Description
    int DaliKey

    The key code to grab.

    Returns
    Type Description
    bool

    True if the grab succeeds.

    View Source

    Hide()

    Hides the window if it is showing.

    Declaration
    public void Hide()
    View Source

    IsFocusAcceptable()

    Returns whether the window accepts a focus or not.

    Declaration
    public bool IsFocusAcceptable()
    Returns
    Type Description
    bool

    True if the window accepts a focus, false otherwise.

    View Source

    IsOpaqueState()

    Returns whether a transparent window's visual state is opaque or not.

    Declaration
    public 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.

    View Source

    IsVisible()

    Retrieves whether the window is visible or not.

    Declaration
    public bool IsVisible()
    Returns
    Type Description
    bool

    True if the window is visible.

    View Source

    KeepRendering(float)

    Keep rendering for at least the given amount of time.

    Declaration
    public void KeepRendering(float durationSeconds)
    Parameters
    Type Name Description
    float durationSeconds

    Time to keep rendering, 0 means render at least one more frame.

    View Source

    Lower()

    Lowers the window to the bottom of the window stack.

    Declaration
    public void Lower()
    View Source

    Raise()

    Raises the window to the top of the window stack.

    Declaration
    public void Raise()
    View Source

    Remove(View)

    Remove a child view from window.

    Declaration
    public void Remove(View view)
    Parameters
    Type Name Description
    View view

    the child to be removed.

    View Source

    RemoveAuxiliaryHint(uint)

    Removes an auxiliary hint of the window.

    Declaration
    public 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.

    View Source

    RemoveLayer(Layer)

    Removes a layer from the stage.

    Declaration
    public void RemoveLayer(Layer layer)
    Parameters
    Type Name Description
    Layer layer

    Layer to remove.

    View Source

    RenderOnce()

    Allows at least one more render, even when paused. The window should be shown, not minimised.

    Declaration
    public void RenderOnce()
    View Source

    SetAcceptFocus(bool)

    Sets whether the window accepts a focus or not.

    Declaration
    public void SetAcceptFocus(bool accept)
    Parameters
    Type Name Description
    bool accept

    If a focus is accepted or not. The default is true.

    View Source

    SetAuxiliaryHintValue(uint, string)

    Changes a value of the auxiliary hint.

    Declaration
    public 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.

    View Source

    SetBrightness(int)

    Sets preferred brightness of the window.

    Declaration
    public 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.

    View Source

    SetClass(string, string)

    Sets the window name and the class string.

    Declaration
    public void SetClass(string name, string klass)
    Parameters
    Type Name Description
    string name

    The name of the window.

    string klass

    The class of the window.

    View Source

    SetInputRegion(Rectangle)

    Sets a region to accept input events.

    Declaration
    public void SetInputRegion(Rectangle inputRegion)
    Parameters
    Type Name Description
    Rectangle inputRegion

    The region to accept input events.

    View Source

    SetKeyboardRepeatInfo(float, float)

    Sets the keyboard repeat information.

    Declaration
    public bool SetKeyboardRepeatInfo(float rate, float delay)
    Parameters
    Type Name Description
    float rate

    The key repeat rate value in seconds.

    float delay

    The key repeat delay value in seconds.

    Returns
    Type Description
    bool

    True if setting the keyboard repeat succeeds.

    View Source

    SetNotificationLevel(NotificationLevel)

    Sets a priority level for the specified notification window.

    Declaration
    public 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.

    View Source

    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
    public 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.

    View Source

    SetScreenOffMode(ScreenOffMode)

    Sets a window's screen off mode.

    Declaration
    public bool SetScreenOffMode(ScreenOffMode screenOffMode)
    Parameters
    Type Name Description
    ScreenOffMode screenOffMode

    The screen mode.

    Returns
    Type Description
    bool

    True if no error occurred, false otherwise.

    View Source

    SetTransparency(bool)

    Sets whether the window is transparent or not.

    Declaration
    public void SetTransparency(bool transparent)
    Parameters
    Type Name Description
    bool transparent

    Whether the window is transparent or not.

    View Source

    Show()

    Shows the window if it is hidden.

    Declaration
    public void Show()
    View Source

    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
    public bool UngrabKey(int DaliKey)
    Parameters
    Type Name Description
    int DaliKey

    The key code to ungrab.

    Returns
    Type Description
    bool

    True if the ungrab succeeds.

    View Source

    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
    public 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

    View Source

    FocusChanged

    FocusChanged event.

    Declaration
    public event EventHandler<Window.FocusChangedEventArgs> FocusChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><Window.FocusChangedEventArgs>
    View Source

    KeyEvent

    This event is emitted when the key event is received.

    Declaration
    public event EventHandler<Window.KeyEventArgs> KeyEvent
    Event Type
    Type Description
    System.EventHandler<TEventArgs><Window.KeyEventArgs>
    View Source

    Resized

    This event is emitted when the window resized.

    Declaration
    public event EventHandler<Window.ResizedEventArgs> Resized
    Event Type
    Type Description
    System.EventHandler<TEventArgs><Window.ResizedEventArgs>
    View Source

    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
    public event EventHandler<Window.TouchEventArgs> TouchEvent
    Event Type
    Type Description
    System.EventHandler<TEventArgs><Window.TouchEventArgs>
    View Source

    WheelEvent

    This event is emitted when the wheel event is received.

    Declaration
    public event EventHandler<Window.WheelEventArgs> WheelEvent
    Event Type
    Type Description
    System.EventHandler<TEventArgs><Window.WheelEventArgs>

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX