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
MaxDelta
public const float MaxDelta = 0.0300003
Field Value
Properties
CurrentCultureInfo
Gets or sets CultureInfo for UI
public static CultureInfo CurrentCultureInfo { get; set; }
Property Value
CurrentDeviceOrientation
Gets the current device orientation. On desktop platforms it is always DeviceOrientation.LandscapeLeft.
public static DeviceOrientation CurrentDeviceOrientation { get; }
Property Value
CurrentLanguage
Gets or sets the ISO 639-1 two-letter code for current application language
public static string CurrentLanguage { get; set; }
Property Value
CurrentThread
Gets the currently running thread.
public static Thread CurrentThread { get; }
Property Value
DesktopMousePosition
public static Vector2 DesktopMousePosition { get; set; }
Property Value
IsInputAccelerationListening
public static bool IsInputAccelerationListening { get; set; }
Property Value
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
MainMenu
public static IMenu MainMenu { get; set; }
Property Value
MainThread
Gets the main (UI) thread. All rendering is beging processed on the main thread.
public static Thread MainThread { get; }
Property Value
MainWindow
public static IWindow MainWindow { get; set; }
Property Value
Platform
Gets the current platform
public static PlatformId Platform { get; }
Property Value
RenderingBackend
public static RenderingBackend RenderingBackend { get; }
Property Value
ScreenDPI
Returns the main display's pixel density.
public static Vector2 ScreenDPI { get; }
Property Value
SoftKeyboard
Software (on-screen) keyboard for mobile devices.
public static ISoftKeyboard SoftKeyboard { get; }
Property Value
SupportedDeviceOrientations
Supported device orientations (only for mobile platforms)
public static DeviceOrientation SupportedDeviceOrientations { get; set; }
Property Value
WindowUnderMouse
public static IWindow WindowUnderMouse { get; }
Property Value
Windows
public static IEnumerable<IWindow> Windows { get; }
Property Value
Methods
AreAllWindowsInactive()
public static bool AreAllWindowsInactive()
Returns
DoExited()
public static void DoExited()
DoExiting()
public static bool DoExiting()
Returns
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
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
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
Exiting
public static event Func<bool> Exiting
Event Type
SupportedDeviceOrientationsChanged
public static event Action<DeviceOrientation> SupportedDeviceOrientationsChanged
Event Type
UnhandledExceptionOnUpdate
public static event Action<Exception> UnhandledExceptionOnUpdate