IApplicationWindowFactory

Description

interface Tinman.Engine.Application.IApplicationWindowFactory

Extended by

ApplicationWindowFactory abstract

Base interface for classes that create instances of IApplicationWindow and associated GL render contexts.

Public / Methods

Can​Create​Application​Window


public method CanCreateApplicationWindow → (1)

flags opt : NativeHandleFlags = NativeHandleFlags.Any

The native handle types and features of the window that are acceptable to the caller.

returns → bool

true if CreateApplicationWindow may return a non-null value,
false if it will always return null.

Checks if CreateApplicationWindow may return a non-null value for the given flags opt.

Even if this method returns true, the corresponding call to CreateApplicationWindow may still return null, because of circumstances that an implementation can only detect at call-time.

Create​Application​Window


[OwnerReturn]
public method CreateApplicationWindow → (4)

title in : string

The window title.

clientSize in : Vec2I

The initial client size (see IApplicationWindow.Resize).

onProcessSystemMessages opt : EventDelegateGeneric<IApplicationWindow> = null

Optional delegate that will be invoked when IApplicationWindow.ProcessSystemMessages is called. This is intended for special use-cases, for example when mixing a top-level application window with WinForms: then, the System.Windows.Forms.Application.DoEvents method must be called in addition to the plain WIN32 message loop of the top-level window.

flags opt : NativeHandleFlags = NativeHandleFlags.Any

The native handle types and features of the window that are acceptable to the caller. The implementation may choose any type and feature from the provided ones, which will be returned via INativeWindow.NativeHandleType.

returns → IApplicationWindow

The application window or null iff not supported or if TinmanEnginePrivileges.WindowOpen is not granted.

Creates a new top-level window.

Use ApplicationWindow.Create to create a top-level window while choosing a suitable factory automatically.

Create​Render​Context


[OwnerReturn]
public method CreateRenderContext → (3)

api in : GLApi

The acceptable render context APIs.

flags opt : RenderContextFlags = RenderContextFlags.None

The render context creation flags.

types opt : NativeHandleFlags = NativeHandleFlags.Type

The native handle types that are acceptable to the caller.

returns → RenderContext

The RenderContext object or null if not available.

Creates a new RenderContext object for the given API.

The returned RenderContext will not be active, i.e. RenderContext.IsActive will return false. The created native render context is owned by the returned object.

Current​Render​Context


[OwnerReturn]
public method CurrentRenderContext → (2)

api in : GLApi

The acceptable render context APIs.

types opt : NativeHandleFlags = NativeHandleFlags.Type

The native handle types that are acceptable to the caller.

returns → RenderContext

The RenderContext object or null if not available.

Creates a RenderContext object that wraps the current render context of the calling thread.

The returned RenderContext will be active, in the same way as if RenderContext.Begin had been called once. The calling code remains the owner of the native render context, the returned object only wraps it.

Public / Attributes

Can​Clipboard


public attribute CanClipboard → (get)

value : bool

true if Clipboard may return a non-null value,
false if it will always return null.

Checks if Clipboard may return a non-null value.

Even if this property returns true, getting Clipboard may still return null, because of circumstances that an implementation can only detect at call-time.

Clipboard


public attribute Clipboard → (get,set)

value : string

The text content or null.

Accesses the text content of the system clipboard.

If the system clipboard cannot be accessed (for any reason), setting this property will have no effect and getting it will always return null. Use ApplicationUtil.Clipboard to access the system clipboard while choosing a factory automatically.

Has​Dependencies


[Constant]
public attribute HasDependencies → (get)

value : bool

true if this factory has 3rd-party dependencies,
false if it does not.

Does this application window factory have any 3rd-party dependencies?

Dependencies on the APIs of the underlying operating system do not count.

Name


[Constant]
public attribute Name → (get)

value : string

[not-empty]
The factory name.

A human-readable description of this application window factory.