maxon.Application

Description

Application wide functions.
Implement this interface to be able to link against the kernel library.

Inheritance diagram

Inheritance

Methods Signature

GetApplicationMode()
Retrieves the current application mode.
GetCommandLineArg(idx) Returns a command line argument.
GetCommandLineArgCount() Returns the number of command line arguments delivered to the app on startup.
GetMachineInfo()
Returns information about the system and processor.
GetTempUrl(directory)
Returns a new unique maxon.Url for a temporary file.
GetUrl() Returns the requested maxon.Url.
GetWindowsSubsystem() Returns information about the subsystem of the application.
SetApplicationMode(mode)
Sets a new application mode. This mode defines the behavior after the startup is done.

Methods Definition

static Application.GetApplicationMode()
Retrieves the current application mode.
This mode defines the behavior after after the startup is done.
Returns:The current application mode.
Return type:maxon.APPLICATIONMODE
static Application.GetCommandLineArg(idx)

Returns a command line argument.

Parameters:idx (int) – The index of the argument. (0 >= idx < GetCommandLineArgCount()).
Returns:The requested argument.
Return type:str
static Application.GetCommandLineArgCount()

Returns the number of command line arguments delivered to the app on startup.

Returns:Number of arguments to request via Application.GetCommandLineArg().
Return type:int
static Application.GetMachineInfo()
Returns information about the system and processor.
Returns:System and processor information.
Return type:maxon.DataDictionary
static Application.GetTempUrl(directory)
Returns a new unique maxon.Url for a temporary file.
A typical use for this is
tempfile = maxon.Application.GetTempUrl(maxon.Application.GetUrl(maxon.APPLICATION_URLTYPE.TEMP_DIR))
Parameters:directory (maxon.Url) – Directory url where the temporary file should be created in.
Returns:maxon.Url pointing to the temporary file.
Return type:maxon.Url
static Application.GetUrl()

Returns the requested maxon.Url.

tempfile = maxon.Application.GetUrl(maxon.APPLICATION_URLTYPE.TEMP_DIR))
Parameters:urlType (maxon.APPLICATION_URLTYPE) – Type of the url.
Returns:maxon.Url containing the requested.
Return type:maxon.Url
static Application.GetWindowsSubsystem()

Returns information about the subsystem of the application.

Warning

This method is only available on Windows.

Returns:The current subsystem of the current process.
Return type:maxon.SUBSYSTEM
static Application.SetApplicationMode(mode)
Sets a new application mode. This mode defines the behavior after the startup is done.
Please note that it’s only possible to raise the mode from maxon.APPLICATIONMODE.DONTWAIT to maxon.APPLICATIONMODE.KEEPRUNNING.
Parameters:mode (maxon.APPLICATIONMODE) – The new mode to be set.
Returns:True if the function changed the mode successfully.
Return type:bool