The Application Object: 1.5 GenApplication Basics: ApplicationStates

Up: GEOS SDK TechDocs | Up | Prev: 1.4 Attach and Launch Flags | Next: 1.6 Application Features and Levels
GAI_states, MSG_GEN_APPLICATION_GET_STATE, MSG_GEN_APPLICATION_SET_STATE, MSG_GEN_APPLICATION_SET_NOT_USER_INTERACTABLE, MSG_GEN_APPLICATION_SET_USER_INTERACTABLE, MSG_GEN_APPLICATION_SET_NOT_QUITTING, MSG_GEN_APPLICATION_SET_ATTACHED_TO_STATE_FILE, MSG_GEN_APPLICATION_SET_NOT_ATTACHED_TO_STATE_FILE

GAI_ states stores the ApplicationStates of the application. By default, a GenApplication is both AS_FOCUSABLE and AS_MODELABLE, therefore enabling those hierarchies for this application. Only under extremely rare conditions will you alter this behavior. The flags of ApplicationStates are listed below:

AS_HAS_FULL_SCREEN_EXCL
This bit is set if the application is currently the top screen object at its level. This bit may only be set if the application is between receiving a MSG_META_GAINED_FULL_SCREEN_EXCL and a MSG_META_LOST_FULL_SCREEN_EXCL .
AS_SINGLE_INSTANCE
This bit is set if the application is not capable of being launched multiple times. You should not need to set this.
AS_QUIT_DETACHING
If this bit is set, the detach sequence has been initiated as the result of a QUIT. This bit will only be set if AS_QUITTING is also set; the bit is set in the UI thread at the same time MSG_META_DETACH is sent to the process. Therefore, this bit represents an intermediate step between AS_QUITTING and AS_DETACHING.
AS_AVOID_TRANSPARENT_DETACH
This bit is set if the application should not be transparently detached. If the application is running within UILM_TRANSPARENT mode, then the application will not detach when another application is launched.
AS_TRANSPARENT_DETACHING
This bit is set if the application is being transparently detached. An application can be transparently detached if another application is started in this application's field and that field is marked UILM_TRANSPARENT.
AS_REAL_DETACHING
This bit is set if MSG_GEN_PROCESS_REAL_DETACH has been sent to the process, signalling the irreversible demise of the application. This bit is only set if the UI has finished detaching and the GS_USABLE bit on the application has been cleared.
AS_QUITTING
The application is currently quitting.
AS_DETACHING
The application object has received MSG_META_DETACH and is detaching.
AS_FOCUSABLE
The application may receive the focus exclusive from its field parent. When launched, if this flag is set, the application automatically grabs the focus. This flag is set by default.
AS_MODELABLE
The application may receive the model exclusive from its field parent. When launched, if this flag is set, the application will automatically grab the model exclusive. This flag is set by default.
AS_NOT_USER_INTERACTABLE
The application should not be interactable with the user. This prevents the user from navigating to non-visible applications or otherwise selecting the application.
AS_RECEIVED_APP_OBJECT_DETACH
The application has received a detach message.
AS_ATTACHED_TO_STATE_FILE
The application is currently attached to a state file.
AS_ATTACHING
The application is currently attaching (processing MSG_META_ATTACH ).

MSG_GEN_APPLICATION_GET_STATE

ApplicationStates MSG_GEN_APPLICATION_GET_STATE();

This message retrieves the current application state, stored in GAI_states .

Source: Rarely used.

Destination: Any GenApplication object.

Parameters: None.

Return: The ApplicationStates record stored in GAI_states .

Interception: Do not intercept.

MSG_GEN_APPLICATION_SET_STATE

void	MSG_GEN_APPLICATION_SET_STATE(
        ApplicationStates			set,
        ApplicationStates			clear);

This message alters a GenApplication's GAI_ states flags. This message should only be used to set flags that aren't set internally by the UI. Flags that can be altered are the AS_FOCUSABLE, AS_MODELABLE, AS_NOT_USER_INTERACTABLE and AS_AVOID_TRANSPARENT_DETACH state bits.

This message does not reject attempts to set internal bits; therefore, be careful in using this message and only use it to set the external bits mentioned above.

Source: Unrestricted. This message is also used internally.

Destination: Any GenApplication object.

Parameters: set ApplicationStates to set.

clear
ApplicationStates to clear.

Return: Nothing.

Warnings: Do not attempt to set any internal ApplicationStates bits with this message.

Interception: May intercept, but must pass to superclass at some point.

MSG_GEN_APPLICATION_SET_NOT_QUITTING

void	MSG_GEN_APPLICATION_SET_NOT_QUITTING();

This message clears the AS_QUITTING bit in the application's GAI_ states bitfield.

Source: Sent by the UI or the kernel.

Destination: A GenApplication object.

Interception: Do not intercept.

MSG_GEN_APPLICATION_SET_NOT_USER_INTERACTABLE

void	MSG_GEN_APPLICATION_SET_NOT_USER_INTERACTABLE();

This message sets the AS_NOT_USER_INTERACTABLE flag in the application's GAI_states field.

Source: Infrequently used.

Destination: The GenApplication to be made not interactable.

Interception: Do not intercept.

MSG_GEN_APPLICATION_SET_USER_INTERACTABLE

void	MSG_GEN_APPLICATION_SET_USER_INTERACTABLE();

This message clears the AS_NOT_USER_INTERACTABLE flag in the application's GAI_states field.

Source: Infrequently used.

Destination: The GenApplication to be made interactable.

Interception: Do not intercept.

MSG_GEN_APPLICATION_SET_ATTACHED_TO_STATE_FILE

void	MSG_GEN_APPLICATION_SET_ATTACHED_TO_STATE_FILE();

This message sets the AS_ATTACHED_TO_STATE_FILE in the GenApplication's GAI_states field.

Source: Sent by the UI or the kernel.

Destination: The GenApplication object that has been attached to a state file.

Interception: Do not intercept.

MSG_GEN_APPLICATION_SET_NOT_ATTACHED_TO_STATE_FILE

void	MSG_GEN_APPLICATION_SET_NOT_ATTACHED_TO_STATE_FILE();

This message clears the AS_ATTACHED_TO_STATE_FILE in the GenApplication's GAI_states field.

Source: Sent by the UI or the kernel.

Destination: The GenApplication object that has been detached to a state file.

Interception: Do not intercept.


Up: GEOS SDK TechDocs | Up | Prev: 1.4 Attach and Launch Flags | Next: 1.6 Application Features and Levels