Class GLWindow
Definition
- 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.
public class GLWindow : BaseHandle, IDynamicResourceHandler, INameScope, System.IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceGLWindow()
Creates an initialized handle to a new GLWindow.
This creates an GLWindow with default options.!--
Declaration
public GLWindow()
GLWindow(string, Rectangle, bool)
Creates an initialized handle to a new GLWindow.
This API can create GLWindow with specific option.
Declaration
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. |
bool | isTranslucent | Whether Window is translucent. |
Properties
View SourceRenderingMode
Gets or sets a Rendeirng Mode of GLWindow.
Declaration
public GLRenderingMode RenderingMode { get; set; }
Property Value
Type | Description |
---|---|
GLRenderingMode |
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
public Rectangle WindowPositionSize { get; set; }
Property Value
Type | Description |
---|---|
Rectangle |
WindowSize
Gets or sets a size of the window.
Declaration
public Size2D WindowSize { get; set; }
Property Value
Type | Description |
---|---|
Size2D |
Methods
View SourceActivate()
Activates the window to the top of the window stack even it is iconified.
Declaration
public void Activate()
AddAuxiliaryHint(string, string)
Creates an auxiliary hint of the GLWindow.
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. |
Destroy()
Destroy the window immediately.
Declaration
public void Destroy()
Dispose(DisposeTypes)
Dispose for Window
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type |
Overrides
View SourceGetAuxiliaryHintId(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. |
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. |
GetCurrentOrientation()
Gets current orientation of the window.
Declaration
public GLWindow.GLWindowOrientation GetCurrentOrientation()
Returns
Type | Description |
---|---|
GLWindow.GLWindowOrientation | The current window orientation if previously set, or none. |
GetSupportedAuxiliaryHint(uint)
Gets the supported auxiliary hint string of the GLWindow.
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. |
GetSupportedAuxiliaryHintCount()
Gets the count of supported auxiliary hints of the GLWindow.
Declaration
public uint GetSupportedAuxiliaryHintCount()
Returns
Type | Description |
---|---|
uint | The number of supported auxiliary hints. |
Hide()
Hides the GLWindow if it is showing.
Declaration
public void Hide()
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.
Lower()
Lowers the window to the bottom of the window stack.
Declaration
public void Lower()
Raise()
Raises the window to the top of the window stack.
Declaration
public void Raise()
RegisterGLCallbacks(GLInitializeCallbackType, GLRenderFrameCallbackType, GLTerminateCallbackType)
Registers GL callback functions for application.
Declaration
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 |
ReleaseSwigCPtr(HandleRef)
Declaration
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type | Name | Description |
---|---|---|
Tizen.System.Runtime.InteropServices.HandleRef | swigCPtr |
Overrides
View SourceRemoveAuxiliaryHint(uint)
Removes an auxiliary hint of the GLWindow.
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. |
RenderOnce()
Allows at least one more render, even when paused. The window should be shown, not minimised.
Declaration
public void RenderOnce()
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. |
SetAvailableOrientations(List<GLWindowOrientation>)
Sets available orientations of the window. This API is for setting several orientations one time.
Declaration
public void SetAvailableOrientations(List<GLWindow.GLWindowOrientation> orientations)
Parameters
Type | Name | Description |
---|---|---|
List<><GLWindowOrientation> | orientations | The list of orientations. |
SetGraphicsConfig(bool, bool, int, GLESVersion)
Sets graphics configuration for GLWindow
Declaration
public void SetGraphicsConfig(bool depth, bool stencil, int msaa, GLESVersion version)
Parameters
Type | Name | Description |
---|---|---|
bool | depth | The flag of depth buffer. If true is set, 24bit depth buffer is enabled. |
bool | stencil | The flag of stencil. it true is set, 8bit stencil buffer is enabled. |
int | msaa | The bit of msaa. |
GLESVersion | version | The GLES version. |
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. |
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.
SetPreferredOrientation(GLWindowOrientation)
Sets a preferred orientation.
Declaration
public void SetPreferredOrientation(GLWindow.GLWindowOrientation orientation)
Parameters
Type | Name | Description |
---|---|---|
GLWindow.GLWindowOrientation | orientation | The preferred orientation. |
Show()
Shows the GLWindow if it is hidden.
Declaration
public void Show()
VisibiltyChangedSignalEmit(bool)
VisibiltyChangedSignalEmit
Declaration
public void VisibiltyChangedSignalEmit(bool visibility)
Parameters
Type | Name | Description |
---|---|---|
bool | visibility |
Events
View SourceFocusChanged
FocusChanged event.
Declaration
public event EventHandler<GLWindow.FocusChangedEventArgs> FocusChanged
Event Type
Type | Description |
---|---|
EventHandler<><FocusChangedEventArgs> |
KeyEvent
Emits the event when the key event is received.
Declaration
public event EventHandler<GLWindow.KeyEventArgs> KeyEvent
Event Type
Type | Description |
---|---|
EventHandler<><KeyEventArgs> |
Resized
Emits the event when the window resized.
Declaration
public event EventHandler<GLWindow.ResizedEventArgs> Resized
Event Type
Type | Description |
---|---|
EventHandler<><ResizedEventArgs> |
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
public event EventHandler<GLWindow.TouchEventArgs> TouchEvent
Event Type
Type | Description |
---|---|
EventHandler<><TouchEventArgs> |
VisibilityChanged
EffectStart
Declaration
public event EventHandler<GLWindow.VisibilityChangedEventArgs> VisibilityChanged
Event Type
Type | Description |
---|---|
EventHandler<><VisibilityChangedEventArgs> |