Class WindowsSystem
Represents a specific UI toolkits.
Inheritance
Implements
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public abstract class WindowsSystem : IGetNativePointers
Properties
AvailablePointerKeys
Gets a list of all available keys to obtain native pointers.
Declaration
public virtual IEnumerable<string> AvailablePointerKeys { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Methods
CreateLoopThread(Action, Action)
Creates a looping thread.
Declaration
protected abstract void CreateLoopThread(Action loadAction, Action renderCallback)
Parameters
Type | Name | Description |
---|---|---|
Action | loadAction | The loading action. |
Action | renderCallback | The rendering callback action. |
CreateSurface(object)
Creates a surface.
Declaration
public abstract Surface CreateSurface(object nativeSurface)
Parameters
Type | Name | Description |
---|---|---|
object | nativeSurface | The native surface control. |
Returns
Type | Description |
---|---|
Surface | A surface instance. |
CreateSurface(uint, uint)
Creates a surface.
Declaration
public abstract Surface CreateSurface(uint width, uint height)
Parameters
Type | Name | Description |
---|---|---|
uint | width | The width of the surface. |
uint | height | The height of the surface. |
Returns
Type | Description |
---|---|
Surface | A surface instance. |
CreateWindow(string, uint, uint, bool)
Creates a window.
Declaration
public abstract Window CreateWindow(string title, uint width, uint height, bool visible = true)
Parameters
Type | Name | Description |
---|---|---|
string | title | Window title. |
uint | width | Window width. |
uint | height | Window height. |
bool | visible | Window visibility. |
Returns
Type | Description |
---|---|
Window | Window instance. |
Destroy()
Destroys all resources.
Declaration
protected virtual void Destroy()
Dispose()
Performs tasks associated with freeing, releasing, or resetting unmanaged resources as defined by the application.
Declaration
public void Dispose()
GetNativePointer(string, out nint)
Obtains a native pointer for this graphics context using the given key.
Declaration
public virtual bool GetNativePointer(string pointerKey, out nint nativePointer)
Parameters
Type | Name | Description |
---|---|---|
string | pointerKey | The pointer key. |
nint | nativePointer | The native pointer. |
Returns
Type | Description |
---|---|
bool | True if there is an available pointer with this key. |
Run(Action, Action)
Runs the UI Toolkits.
Declaration
public void Run(Action loadAction, Action renderCallback)
Parameters
Type | Name | Description |
---|---|---|
Action | loadAction | Action performed in the load thread. |
Action | renderCallback | Action to be executed every render loop. |