Show / Hide Table of Contents

# Class SimpleSDLWindow

A very basic SDL wrapper to handle creating a window and processing SDL events.

##### Inheritance

System.Object
SimpleSDLWindow
SDLWindowGL

##### Implements

System.IDisposable

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: ImGuiScene

###### Assembly: ImGuiScene.dll

##### Syntax

    public class SimpleSDLWindow : IDisposable

### Fields

| Improve this Doc View Source

#### Gl

##### Declaration

    protected static readonly GL Gl

##### Field Value

Type | Description
--- | ---
Silk.NET.OpenGL.GL |

### Properties

| Improve this Doc View Source

#### OnSDLEvent

Delegate for providing user event handler methods that want to respond to SDL_Events.

##### Declaration

    public SimpleSDLWindow.ProcessEventDelegate OnSDLEvent { get; set; }

##### Property Value

Type | Description
--- | ---
SimpleSDLWindow.ProcessEventDelegate |

| Improve this Doc View Source

#### WantsClose

Whether an event has closed this window.

##### Declaration

    public bool WantsClose { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Window

The SDL_Window pointer for this window.

##### Declaration

    public IntPtr Window { get; }

##### Property Value

Type | Description
--- | ---
System.IntPtr |

### Methods

| Improve this Doc View Source

#### CreateColorKey(Single, Single, Single)

Creates a color key for use as a mask for MakeTransparent(UInt32)

##### Declaration

    public static uint CreateColorKey(float r, float g, float b)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | r | The red component of the mask color (0-1)
System.Single | g | The green component of the mask color (0-1)
System.Single | b | The blue component of the mask color (0-1)

##### Returns

Type | Description
--- | ---
System.UInt32 |

| Improve this Doc View Source

#### Dispose()

##### Declaration

    public void Dispose()

| Improve this Doc View Source

#### Dispose(Boolean)

##### Declaration

    protected virtual void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | disposing |

| Improve this Doc View Source

#### Finalize()

##### Declaration

    protected void Finalize()

| Improve this Doc View Source

#### GetHWnd()

Gets the HWND of this window for interop with Windows methods.

##### Declaration

    public IntPtr GetHWnd()

##### Returns

Type | Description
--- | ---
System.IntPtr | This window's HWND

| Improve this Doc View Source

#### InitForRenderer(IRenderer)

##### Declaration

    protected virtual void InitForRenderer(IRenderer renderer)

##### Parameters

Type | Name | Description
--- | --- | ---
IRenderer | renderer |

| Improve this Doc View Source

#### MakeTransparent(UInt32)

Converts this to a layered window and makes any region that matches `transparentColorKey` fully transparent. Transparent regions behave as if they are not present, and can be clicked through etc.

##### Declaration

    protected void MakeTransparent(uint transparentColorKey)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | transparentColorKey |

##### See Also

CreateColorKey(Single, Single, Single)
| Improve this Doc View Source

#### ProcessEvents()

Basic SDL event loop to consume all events and handle window closure. User handlers from OnSDLEvent are invoked for every event.

##### Declaration

    public void ProcessEvents()

| Improve this Doc View Source

#### WindowCreationFlags(WindowCreateInfo)

Return the set of window flags necessary to create a window matching what is requested in `createInfo`

##### Declaration

    protected virtual SDL.SDL_WindowFlags WindowCreationFlags(WindowCreateInfo createInfo)

##### Parameters

Type | Name | Description
--- | --- | ---
WindowCreateInfo | createInfo | The requested creation parameters for the window.

##### Returns

Type | Description
--- | ---
SDL.SDL_WindowFlags | The full set of SDL_WindowFlags to use when creating this window.

### Implements

System.IDisposable