MetaClass: 2.4 Utility Messages: User Interface Utility Meta Messages

Up: GEOS SDK TechDocs | Up | Prev: 2.3 Object Management Messages | Next: 2.5 Event Messages

These messages are used primarily by the User Interface. You will have very little need to subclass or send them.

MSG_META_SET_FLAGS

void 	MSG_META_SET_FLAGS(
        ChunkHandle 	objChunk,
        ObjChunkFlags 	bitsToSet,
        ObjChunkFlags 	bitsToClear);

This message sets the chunk flags for an object. The chunk flags determine how the object is handled with regard to state saving, dirty state, etc.

Source: Unrestricted.

Destination: Any object.

Interception: Unnecessary, as MetaClass does the right thing.

Parameters: objChunk chunk to set flags for.

bitsToSet
bits to set.
bitsToClear
bits to clear.

Return: Nothing.

MSG_META_GET_FLAGS

word 	MSG_META_GET_FLAGS( /* low byte = ObjChunkFlags */
        ChunkHandle 	ch);

This message returns the chunk flags for the object. This works just like the ObjGetFlags() routine, but can be used when the object queried is being run by a different thread.

Source: Unrestricted.

Destination: Any object.

Interception: Unnecessary, as MetaClass does the right thing.

Parameters: objChunk chunk to get flags for.

Return: Word with ObjChunkFlags in low byte, zero in high byte.

MSG_META_QUIT

void 	MSG_META_QUIT();

This message, when sent to a GenApplication object, initiates the shutdown sequence for the application. All affected objects are notified.

GenApplication does some error checking for multiple quits or detaches and then starts this sequence by passing MSG_META_QUIT (QL_BEFORE_UI) to the process. The default process handler for MSG_META_QUIT varies depending on the QuitLevel , which is passed in, but only when sent to the process (see MSG_META_QUIT_PROCESS alias, below).

The method handler for each level of quit should then send MSG_META_QUIT_ACK with the same QuitLevel when it is done. The default behavior for a process' MSG_META_QUIT responses are:

QL_BEFORE_UI
Sends MSG_META_QUIT_ACK to self via queue.
QL_UI
Sends MSG_GEN_APPLICATION_INITIATE_UI_QUIT (0) to the GenApplication.
QL_AFTER_UI
Sends MSG_META_QUIT_ACK to self via queue.
QL_DETACH
Sends MSG_META_DETACH to self via queue.
QL_AFTER_DETACH
Sends MSG_META_QUIT_ACK to self via queue.

The generic UI objects are first asked to quit via MSG_GEN_APPLICATION_INITIATE_UI_QUIT when sent to a GenApplication (active list). It will cause MSG_META_QUIT to be sent to all objects on the active list that are marked as desiring them. These objects on the active list can handle the MSG_META_QUIT any way they please. The process will be notified by a MSG_META_QUIT_ACK with the QuitLevel set to QL_UI.

If you need to send MSG_META_QUIT from within a handler for MSG_GEN_PROCESS_OPEN_APPLICATION, make sure to send it after calling the superclass in your OPEN_APPLICATION handler. If this is undesirable, you may encapsulate MSG_META_QUIT and send it via MSG_META_FLUSH_INPUT_QUEUE. (This is needed to avoid the system thinking that a valid IACP connection is open, aborting the quit.)

Source: Unrestricted. If you need to send MSG_META_QUIT within your MSG_GEN_PROCESS_OPEN_APPLICATION handler, please follow the guidelines illustrated above.

Destination: GenApplication object (note that this message has aliases so that it may be sent to a Process object, or any object).

Parameters: None.

Return: Nothing.

Interception: Unlikely.

MSG_META_QUIT_PROCESS

@alias (MSG_META_QUIT)
 void 	MSG_META_QUIT_PROCESS(
        word		quitLevel,
        ChunkHandle 		ackODChunk);

For information about the quit mechanism, see MSG_META_QUIT , above.

The process's MSG_META_QUIT_ACK handler is what causes this walking down the QuitList ; It provides the following behavior for each QuitLevel :

QL_BEFORE_UI
Sends MSG_META_QUIT (QL_UI) to self.
QL_UI
Sends MSG_META_QUIT (QL_AFTER_UI) to self.
QL_AFTER_UI
Sends MSG_META_QUIT (QL_DETACH) to self.
QL_DETACH
Sends MSG_META_QUIT (QL_AFTER_DETACH) to self.
QL_AFTER_DETACH
Sends MSG_GEN_PROCESS_FINISH_DETACH to self.

Source: Unrestricted.

Destination: Process object.

Parameters: quitLevel What stage of quitting we are in.

ackODChunk
Acknowledgment OD to be passed on to MSG_META_QUIT_ACK .

Return: Nothing.

Interception: Unlikely.

Warnings: You cannot abort the quit at the QL_DETACH stage or later.

MSG_META_QUIT_OBJECT

@alias (MSG_META_QUIT)
 void 	MSG_META_QUIT_OBJECT(
        optr 	obj);

For information about the quit mechanism, see MSG_META_QUIT , above.

Source: Unrestricted.

Destination: Process object.

Parameters: obj Object to send MSG_META_QUIT_ACK to.

Return: Nothing.

Interception: Unlikely.

MSG_META_QUIT_ACK

void 	MSG_META_QUIT_ACK(
        word 		quitLevel,
        word 		abortFlag);

This message is sent to a Process object in response to a MSG_META_QUIT . The Process object handles this message by continuing the quit sequence.

Source: Any object having received MSG_META_QUIT

Destination: OD passed in MSG_META_QUIT .

Parameters: quitLevel QuitLevel acknowledging (if responding to a process).

abortFlag
(non-zero if you want to abort the quit).

Return: Nothing.

Warnings: For processes that subclass MSG_META_QUIT , you cannot abort the quit at the QL_DETACH stage or later.

MSG_META_FINISH_QUIT

void 	MSG_META_FINISH_QUIT(
        Boolean		abortFlag);

This message is sent to the object that initiated MSG_META_QUIT and has received MSG_META_QUIT_ACK from each party notified. This message informs the object that it has finished sending out all MSG_META_QUIT messages and can go on with quitting (or aborting the quit if that is the case).

Source: Object that initiated MSG_META_QUIT.

Destination: Any object.

Parameters: abortFlag (non-zero if you want to abort the quit).


Up: GEOS SDK TechDocs | Up | Prev: 2.3 Object Management Messages | Next: 2.5 Event Messages