Click or drag to resize
CoronaRuntimeEnvironment Class
Provides information and services for one active Corona runtime instance.
Inheritance Hierarchy
SystemObject
  CoronaLabs.Corona.WinRTCoronaRuntimeEnvironment

Namespace: CoronaLabs.Corona.WinRT
Assembly: CoronaLabs (in CoronaLabs.dll) Version: 255.255.255.255
Syntax
public sealed class CoronaRuntimeEnvironment : __ICoronaRuntimeEnvironmentPublicNonVirtuals, 
	__ICoronaRuntimeEnvironmentProtectedNonVirtuals

The CoronaRuntimeEnvironment type exposes the following members.

Methods
  NameDescription
Public methodAddEventListener

Subscribes an event handler to be invoked when the given Corona event name gets dispatched.

It is okay to call this method before the runtime has started. Once started, the runtime will automatically subscribe the given handler to the event.

Public methodDispatchEvent

Dispatches the given Corona event to Lua to be received by a Lua function.

Lua functions can subscribe to the given event via the Lua Runtime:addEventListener() function.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRemoveEventListener

Unsubscribes the given event handler from the specified Corona event.

This method is expected to be called with the same event name and handler arguments passed into the AddEventListener(String, CoronaLuaEventHandler) method.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyCachesDirectoryPath

Gets the path that Corona's "system.CachesDirectory" property maps to in Lua.

This directory's files will be automatically deleted if the system is running low on storage space.

Public propertyCoronaControlAdapter
Gets the control that hosts the rendering surface and child controls created via Lua's native APIs.
Public propertyStatic memberDefaultCachesDirectoryPath

Gets the default path that Corona will use for the "system.CachesDirectory" property in Lua.

This directory's files will be automatically deleted if the system is running low on storage space.

Public propertyStatic memberDefaultDocumentsDirectoryPath
Gets the default path that Corona will use for the "system.DocumentsDirectory" property in Lua.
Public propertyStatic memberDefaultInternalDirectoryPath

Gets the default path that Corona will use to store files for its internal features, such as analytics.

This directory is not made available in Lua.

Public propertyStatic memberDefaultResourceDirectoryPath
Gets the default path that Corona will use for the "system.ResourceDirectory" property in Lua.
Public propertyStatic memberDefaultTemporaryDirectoryPath

Gets the default path that Corona will use for the "system.TemporaryDirectory" property in Lua.

This directory's files will be automatically deleted if the system is running low on storage space.

Public propertyDocumentsDirectoryPath
Gets the path that Corona's "system.DocumentsDirectory" property maps to in Lua.
Public propertyInternalDirectoryPath

Gets the directory path that Corona uses to store files for its internal features, such as analytics.

This directory is not made available in Lua.

Public propertyInteropServices

Provides cross-platform and cross-language access to features to the C/C++ side of Corona.

This property is not intended for public use.

Public propertyLaunchFilePath

Gets the path to the file that the Corona runtime began execution on.

Typically set to a "resource.car" "main.lua" or "resource.car" file.

Public propertyResourceDirectoryPath
Gets the path that Corona's "system.ResourceDirectory" property maps to in Lua.
Public propertyRuntimeState
Gets the current state of the Corona runtime such as Running, Suspended, Terminated, etc.
Public propertyTemporaryDirectoryPath

Gets the path that Corona's "system.TemporaryDirectory" property maps to in Lua.

This directory's files will be automatically deleted if the system is running low on storage space.

Top
Events
  NameDescription
Public eventResumed
Raised when the Corona runtime has been resumed after a suspend.
Public eventSuspended

Raised when the Corona runtime has been suspended which pauses all rendering, audio, timers and other Corona related operations.

This is typically raised when the end-user navigates to another app or when the power button has been pressed.

Public eventTerminating

Raised just before the Corona runtime environment is about to be terminated.

This typically happens when the end-user backs out of the app, the Corona XAML control has been unloaded from the page, or when the runtime's Terminate() method has been called.

Top
See Also