Table of Contents

Class Application

Namespace
Lime
Assembly
Lime.dll
public static class Application
Inheritance
Application
Inherited Members

Fields

Input

Global Input of whole application.

public static readonly Input Input

Field Value

Input

MaxDelta

public const float MaxDelta = 0.0300003

Field Value

float

Properties

CurrentCultureInfo

Gets or sets CultureInfo for UI

public static CultureInfo CurrentCultureInfo { get; set; }

Property Value

CultureInfo

CurrentDeviceOrientation

Gets the current device orientation. On desktop platforms it is always DeviceOrientation.LandscapeLeft.

public static DeviceOrientation CurrentDeviceOrientation { get; }

Property Value

DeviceOrientation

CurrentLanguage

Gets or sets the ISO 639-1 two-letter code for current application language

public static string CurrentLanguage { get; set; }

Property Value

string

CurrentThread

Gets the currently running thread.

public static Thread CurrentThread { get; }

Property Value

Thread

DesktopMousePosition

public static Vector2 DesktopMousePosition { get; set; }

Property Value

Vector2

IsInputAccelerationListening

public static bool IsInputAccelerationListening { get; set; }

Property Value

bool

IsProduction

Production flag. Set to true if application is in production. Missing textures will be rendered as transparent instead of checkered pattern. Diagnostic exceptions will not be thrown.

public static bool IsProduction { get; set; }

Property Value

bool

MainMenu

public static IMenu MainMenu { get; set; }

Property Value

IMenu

MainThread

Gets the main (UI) thread. All rendering is beging processed on the main thread.

public static Thread MainThread { get; }

Property Value

Thread

MainWindow

public static IWindow MainWindow { get; set; }

Property Value

IWindow

Platform

Gets the current platform

public static PlatformId Platform { get; }

Property Value

PlatformId

RenderingBackend

public static RenderingBackend RenderingBackend { get; }

Property Value

RenderingBackend

ScreenDPI

Returns the main display's pixel density.

public static Vector2 ScreenDPI { get; }

Property Value

Vector2

SoftKeyboard

Software (on-screen) keyboard for mobile devices.

public static ISoftKeyboard SoftKeyboard { get; }

Property Value

ISoftKeyboard

SupportedDeviceOrientations

Supported device orientations (only for mobile platforms)

public static DeviceOrientation SupportedDeviceOrientations { get; set; }

Property Value

DeviceOrientation

WindowUnderMouse

public static IWindow WindowUnderMouse { get; }

Property Value

IWindow

Windows

public static IEnumerable<IWindow> Windows { get; }

Property Value

IEnumerable<IWindow>

Methods

AreAllWindowsInactive()

public static bool AreAllWindowsInactive()

Returns

bool

DoExited()

public static void DoExited()

DoExiting()

public static bool DoExiting()

Returns

bool

EnumerateSupportedRenderingBackends()

Enumerates rendering backends supported by current device. Only implemented for WIN and MAC and throws NotImplmentedException on other platforms.

public static IEnumerable<RenderingBackend> EnumerateSupportedRenderingBackends()

Returns

IEnumerable<RenderingBackend>

Exit()

Terminates the application.

public static void Exit()

FreeScheduledActions()

Use in Orange to free references, since Orange doesn't invoke Lime.Application RunScheduledActions in main thread. This function MUST be removed as soon as new Orange will be implemented with use of OpenTK and our Widget system.

public static void FreeScheduledActions()

Initialize(ApplicationOptions)

public static void Initialize(ApplicationOptions options = null)

Parameters

options ApplicationOptions

InvalidateWindows()

public static void InvalidateWindows()

InvokeOnMainThread(Action)

Executes an action on the main thread.

public static void InvokeOnMainThread(Action action)

Parameters

action Action

InvokeOnNextUpdate(Action)

public static void InvokeOnNextUpdate(Action action)

Parameters

action Action

IsMain(Thread)

Checks whether a thread is the main thread.

public static bool IsMain(this Thread thread)

Parameters

thread Thread

Returns

bool

RegisterDataLayers(IEnumerable<(string Layer, int Version)>)

public static void RegisterDataLayers(IEnumerable<(string Layer, int Version)> layers)

Parameters

layers IEnumerable<(string Layer, int Version)>

Run()

Runs the main application loop on desktop platforms. Does nothing on iOS, Android.

public static void Run()

Events

Exited

public static event Action Exited

Event Type

Action

Exiting

public static event Func<bool> Exiting

Event Type

Func<bool>

SupportedDeviceOrientationsChanged

public static event Action<DeviceOrientation> SupportedDeviceOrientationsChanged

Event Type

Action<DeviceOrientation>

UnhandledExceptionOnUpdate

public static event Action<Exception> UnhandledExceptionOnUpdate

Event Type

Action<Exception>