Class GLWindow

Definition

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

The GLWindow class is to draw with native GLES.
This class is the special window. It is for native GLES application.
So, some special functions and type are supported.
In addition, basic window's functions are supported, too.

C#
Copy
public class GLWindow : BaseHandle, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable
Inheritance
Implements

Constructors

View Source

GLWindow()

Creates an initialized handle to a new GLWindow.
This creates an GLWindow with default options.!--

Declaration
C#
Copy
public GLWindow()
View Source

GLWindow(String, Rectangle, Boolean)

Creates an initialized handle to a new GLWindow.
This API can create GLWindow with specific option.

Declaration
C#
Copy
public GLWindow(string name, Rectangle windowPosition = null, bool isTranslucent = false)
Parameters
Type Name Description
String name

The name for GL window.

Rectangle windowPosition

The position and size of the Window.

Boolean isTranslucent

Whether Window is translucent.

Properties

View Source

RenderingMode

Gets or sets a Rendeirng Mode of GLWindow.

Declaration
C#
Copy
public GLRenderingMode RenderingMode { get; set; }
Property Value
Type Description
GLRenderingMode
View Source

WindowPositionSize

Sets position and size of the window. This API guarantees that both moving and resizing of window will appear on the screen at once.

Declaration
C#
Copy
public Rectangle WindowPositionSize { get; set; }
Property Value
Type Description
Rectangle
View Source

WindowSize

Gets or sets a size of the window.

Declaration
C#
Copy
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
C#
Copy
public void Activate()
View Source

AddAuxiliaryHint(String, String)

Creates an auxiliary hint of the GLWindow.

Declaration
C#
Copy
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
UInt32

The ID of created auxiliary hint, or 0 on failure.

View Source

Destroy()

Destroy the window immediately.

Declaration
C#
Copy
public void Destroy()
View Source

Dispose(DisposeTypes)

Dispose for Window

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type
Overrides
View Source

GetAuxiliaryHintId(String)

Gets an ID of the auxiliary hint string.

Declaration
C#
Copy
public uint GetAuxiliaryHintId(string hint)
Parameters
Type Name Description
String hint

The auxiliary hint string.

Returns
Type Description
UInt32

The ID of auxiliary hint string, or 0 on failure.

View Source

GetAuxiliaryHintValue(UInt32)

Gets a value of the auxiliary hint.

Declaration
C#
Copy
public string GetAuxiliaryHintValue(uint id)
Parameters
Type Name Description
UInt32 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

GetCurrentOrientation()

Gets current orientation of the window.

Declaration
C#
Copy
public GLWindow.GLWindowOrientation GetCurrentOrientation()
Returns
Type Description
GLWindow.GLWindowOrientation

The current window orientation if previously set, or none.

View Source

GetSupportedAuxiliaryHint(UInt32)

Gets the supported auxiliary hint string of the GLWindow.

Declaration
C#
Copy
public string GetSupportedAuxiliaryHint(uint index)
Parameters
Type Name Description
UInt32 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 GLWindow.

Declaration
C#
Copy
public uint GetSupportedAuxiliaryHintCount()
Returns
Type Description
UInt32

The number of supported auxiliary hints.

View Source

Hide()

Hides the GLWindow if it is showing.

Declaration
C#
Copy
public void Hide()
View Source

IsOpaqueState()

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

Declaration
C#
Copy
public bool IsOpaqueState()
Returns
Type Description
Boolean

True if the window's visual state is opaque, false otherwise.

Remarks

The return value has no meaning on an opaque window.

View Source

Lower()

Lowers the window to the bottom of the window stack.

Declaration
C#
Copy
public void Lower()
View Source

Raise()

Raises the window to the top of the window stack.

Declaration
C#
Copy
public void Raise()
View Source

RegisterGLCallbacks(GLWindow.GLInitializeCallbackType, GLWindow.GLRenderFrameCallbackType, GLWindow.GLTerminateCallbackType)

Registers GL callback functions for application.

Declaration
C#
Copy
public void RegisterGLCallbacks(GLWindow.GLInitializeCallbackType glInit, GLWindow.GLRenderFrameCallbackType glRenderFrame, GLWindow.GLTerminateCallbackType glTerminate)
Parameters
Type Name Description
GLWindow.GLInitializeCallbackType glInit

The callback function for application initialize

GLWindow.GLRenderFrameCallbackType glRenderFrame

The callback function to render to the frame

GLWindow.GLTerminateCallbackType glTerminate

The callback function to clean-up application GL resource

View Source

ReleaseSwigCPtr(Runtime.InteropServices.HandleRef)

Declaration
C#
Copy
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type Name Description
Tizen.System.Runtime.InteropServices.HandleRef swigCPtr
Overrides
View Source

RemoveAuxiliaryHint(UInt32)

Removes an auxiliary hint of the GLWindow.

Declaration
C#
Copy
public bool RemoveAuxiliaryHint(uint id)
Parameters
Type Name Description
UInt32 id

The ID of the auxiliary hint.

Returns
Type Description
Boolean

True if no error occurred, false otherwise.

View Source

RenderOnce()

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

Declaration
C#
Copy
public void RenderOnce()
View Source

SetAuxiliaryHintValue(UInt32, String)

Changes a value of the auxiliary hint.

Declaration
C#
Copy
public bool SetAuxiliaryHintValue(uint id, string value)
Parameters
Type Name Description
UInt32 id

The auxiliary hint ID.

String value

The value string to be set.

Returns
Type Description
Boolean

True if no error occurred, false otherwise.

View Source

SetAvailableOrientations(List<GLWindow.GLWindowOrientation>)

Sets available orientations of the window. This API is for setting several orientations one time.

Declaration
C#
Copy
public void SetAvailableOrientations(List<GLWindow.GLWindowOrientation> orientations)
Parameters
Type Name Description
List<GLWindow.GLWindowOrientation> orientations

The list of orientations.

View Source

SetGraphicsConfig(Boolean, Boolean, Int32, GLESVersion)

Sets graphics configuration for GLWindow

Declaration
C#
Copy
public void SetGraphicsConfig(bool depth, bool stencil, int msaa, GLESVersion version)
Parameters
Type Name Description
Boolean depth

The flag of depth buffer. If true is set, 24bit depth buffer is enabled.

Boolean stencil

The flag of stencil. it true is set, 8bit stencil buffer is enabled.

Int32 msaa

The bit of msaa.

GLESVersion version

The GLES version.

View Source

SetInputRegion(Rectangle)

Sets a region to accept input events.

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

The region to accept input events.

View Source

SetOpaqueState(Boolean)

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#
Copy
public void SetOpaqueState(bool opaque)
Parameters
Type Name Description
Boolean 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

SetPreferredOrientation(GLWindow.GLWindowOrientation)

Sets a preferred orientation.

Declaration
C#
Copy
public void SetPreferredOrientation(GLWindow.GLWindowOrientation orientation)
Parameters
Type Name Description
GLWindow.GLWindowOrientation orientation

The preferred orientation.

View Source

Show()

Shows the GLWindow if it is hidden.

Declaration
C#
Copy
public void Show()
View Source

VisibiltyChangedSignalEmit(Boolean)

VisibiltyChangedSignalEmit

Declaration
C#
Copy
public void VisibiltyChangedSignalEmit(bool visibility)
Parameters
Type Name Description
Boolean visibility

Events

View Source

FocusChanged

FocusChanged event.

Declaration
C#
Copy
public event EventHandler<GLWindow.FocusChangedEventArgs> FocusChanged
Event Type
Type Description
EventHandler<GLWindow.FocusChangedEventArgs>
View Source

KeyEvent

Emits the event when the key event is received.

Declaration
C#
Copy
public event EventHandler<GLWindow.KeyEventArgs> KeyEvent
Event Type
Type Description
EventHandler<GLWindow.KeyEventArgs>
View Source

Resized

Emits the event when the window resized.

Declaration
C#
Copy
public event EventHandler<GLWindow.ResizedEventArgs> Resized
Event Type
Type Description
EventHandler<GLWindow.ResizedEventArgs>
View Source

TouchEvent

Emits the event when the screen is touched and when the touch ends.
If there are multiple touch points then it is emitted when the first touch occurs and when the last finger is lifted too.
Even though incoming events are interrupted, the event occurs.

Declaration
C#
Copy
public event EventHandler<GLWindow.TouchEventArgs> TouchEvent
Event Type
Type Description
EventHandler<GLWindow.TouchEventArgs>
View Source

VisibilityChanged

EffectStart

Declaration
C#
Copy
public event EventHandler<GLWindow.VisibilityChangedEventArgs> VisibilityChanged
Event Type
Type Description
EventHandler<GLWindow.VisibilityChangedEventArgs>

Implements

Extension Methods