GEOS SDK TechDocs
|
|
1 GenApplication Basics
|
1.2 Application GCN Lists
GenApplicationClass
provides several instance data fields, most of which you will not use. All the instance fields of GenApplication are listed in GenApplication Instance Fields
for reference, however.
Code Display 3-2 GenApplication Instance Fields
/* These fields will not be used directly. They can be accessed dynamically, * however, with the various messages that set and retrieve the instance data. */
@instance AppInstanceReference GAI_appRef = {"","",NullHandle,{0}};
@instance word GAI_appMode = 0;
@instance AppLaunchFlags GAI_launchFlags = 0;
@instance byte GAI_optFlags = 0;
@instance word GAI_appFeatures = 0;
@instance Handle GAI_specificUI = 0;
@instance ApplicationStates GAI_states = AS_FOCUSABLE | AS_MODELABLE;
@instance AppAttachFlags GAI_attachFlags = 0;
@instance UIInterfaceLevel GAI_appLevel = UIIL_ADVANCED;
@instance ChunkHandle GAI_iacpConnects = 0;
/* ApplicationStates */
typedef WordFlags ApplicationStates; #define AS_HAS_FULL_SCREEN_EXCL 0x2000 #define AS_SINGLE_INSTANCE 0x1000 #define AS_QUIT_DETACHING 0x0800 #define AS_AVOID_TRANSPARENT_DETACH 0x0400 #define AS_TRANSPARENT_DETACHING 0x0200 #define AS_REAL_DETACHING 0x0100 #define AS_QUITTING 0x0080 #define AS_DETACHING 0x0040 #define AS_FOCUSABLE 0x0020 #define AS_MODELABLE 0x0010 #define AS_NOT_USER_INTERACTABLE 0x0008 #define AS_RECEIVED_APP_OBJECT_DETACH 0x0004 #define AS_ATTACHED_TO_STATE_FILE 0x0002 #define AS_ATTACHING 0x0001
/* Optimization Flags */
typedef ByteFlags AppOptFlags; #define AOF_MULTIPLE_INIT_FILE_CATEGORIES 0x80
/* GenApplicationClass also modifies two GenClass instance fields. */
@default GI_states = @default & ~GS_USABLE; @default GI_attrs = @default | GA_TARGETABLE;
GAI_
appRef
is internal. It stores information needed to reload this application. If the application is detached, this instance field contains information necessary to reload this application to its state at detachment.
GAI_
appMode
stores the message that should be sent to the application's Process object to bring the application back from a saved state. This is initially null and is set by the
GenProcessClass
object as soon as it is determined.
GAI_
launchFlags
stores the
AppLaunchFlags
that govern how the application should be run. These flags are used internally and are set when the application is first launched.
GAI_
optFlags
stores miscellaneous optimization flags.
GAI_appFeatures
stores a word representing the application's features as determined by the user's level of expertise. This field is used primarily by hints in GenControl objects and is rarely used directly otherwise.
GAI_
specificUI
stores the handle of the specific UI under which this application is running. This is determined and set by the system when the application is launched.
GAI_
states
stores the
ApplicationStates
of the GenApplication. See ApplicationStates
for full information on application states.
GAI_
attachFlags
stores the
AppAttachFlags
relating to restoring the application from a state file when attached.
GAI_
appLevel
stores an application's user interface level. This level controls the degree of complexity allowed in the application.
GAI_
iacpConnects
stores the chunk handle to an array of active IACP connections.
Code Display 3-3 GenApplication Vardata Fields
@vardata void HINT_APP_IS_ENTERTAINING; @vardata void HINT_APP_IS_EDUCATIONAL; @vardata void HINT_APP_IS_PRODUCTIVITY_ORIENTED;
@vardata void HINT_APPLICATION_NO_INBOX_QUERY_WHEN_FOREGROUND_APP;
@vardata void HINT_APPLICATION_QUIT_ON_IACP_ALLOW_FILE_ACCESS;
@vardata optr ATTR_GEN_APPLICATION_PRINT_CONTROL; @reloc ATTR_GEN_APPLICATION_PRINT_CONTROL, 0, optr; @vardata optr ATTR_GEN_APPLICATION_KBD_OBJ; @vardata optr ATTR_GEN_APPLICATION_SAVE_OPTIONS_TRIGGER; @reloc ATTR_GEN_APPLICATION_SAVE_OPTIONS_TRIGGER, 0, optr;
@vardata GeodeToken ATTR_GEN_APPLICATION_ADDITIONAL_TOKENS;
/* GenApplication adds a TravelOption to communicate with the Print Control. */
typedef enum {
TO_PRINT_CONTROL=_FIRST_GenApplicationClass
} GenApplicationTravelOption;
GenApplication also provides several hints that indicate the type of application. HINT_APP_IS_ENTERTAINING, HINT_APP_IS_EDUCATIONAL and HINT_APP_IS_PRODUCTIVITY_ORIENTED are provided for this purpose.
HINT_APPLICATION_NO_INBOX_QUERY_WHEN_FOREGROUND_APP
is only applicable for devices that contain a system inbox for the receipt of messages. If this is the case and the application is set up to receive these messages, this hint indicates that the system should deliver the message to the application without prompting the user. (By default, the system initiates a dialog box asking the user whether to accept any newly received messages.)
HINT_APPLICATION_QUIT_ON_IACP_ALLOW_FILE_ACCESS
indicates that the application should quit (send itself a
MSG_META_QUIT
) if it receives a
MSG_META_IACP_CLOSE_FILE
. This message indicates that a client application is requesting access to a file that the current application is accessing.
ATTR_GEN_APPLICATION_PRINT_CONTROL stores the optr of the object to act as the destination for any messages sent to the
GenApplicationTravelOption
TO_PRINT_CONTROL. Specifically, this attribute is designed to allow remote printing capabilities.
ATTR_GEN_APPLICATION_KBD_OBJ stores the optr of the object to act as the application's floating keyboard. This object must be a subclass of
GenInteractionClass
and must be in the generic tree below the application object. MSG_GEN_APPLICATION_DISPLAY_FLOATING_KEYBOARD will display this keyboard.
ATTR_GEN_APPLICATION_SAVE_OPTIONS_TRIGGER contains the optr of the Save Options trigger within the options menu. If you have a custom Save Options trigger, you should add the optr of this object in this field.
ATTR_GEN_APPLICATION_ADDITIONAL_TOKENS
GEOS SDK TechDocs
|
|
1 GenApplication Basics
|
1.2 Application GCN Lists