Up: GEOS SDK TechDocs | Up | Prev: TokenLoadTokenChunk() ... | Next: UserRemoveAutoExec() ...

UserAllocObjBlock

MemHandle 	UserAllocObjBlock(
        ThreadHandle 		threadHandle);

This routine allocates a block of memory on the heap to be used for holding UI objects. It returns the handle of the block. It is passed one argument:

threadHandle
Handle of the thread which is to manage the block. Pass zero to use the current thread.

Include: ui.goh

UserAddAutoExec()

void	UserAddAutoExec(
        const char *		appName);

This routine adds an application to the list of those, like Welcome, that are automatically started by the UI when it loads. The application name will be added to the appropriate place in the GEOS.INI file. It is passed one argument:

appName
This is a pointer to a null-terminated string containing the name of the application. The application must be in SP_APPLICATION or SP_SYS_APPLICATION.

Include: ui.goh

UserCreateDialog()

optr	UserCreateDialog(
        optr	dialogBox);

This routine duplicates a template dialog box, attaches the dialog box to an application object, and sets it fully GS_USABLE so that it may be called with UserDoDialog() . Dialog boxes created in such a manner should be removed and destroyed with UserDestroyDialog() when no longer needed.

dialogBox
Optr to template dialog box (within a template object block). The block must be sharable, read-only and the top GenInteraction called with this routine must not be linked into any generic tree. The optr returned is a created, fully-usable dialog box.

See Also: UserDestroyDialog().

UserCreateInkDestinationInfo()

MemHandle 	UserCreateInkDestinationInfo(
        optr 		dest,
        GStateHandle 		gs,
        word		brushSize,
        GestureCallback		*callback);

This routine creates an InkDestinationInfo structure to be returned with MSG_META_QUERY_IF_PRESS_IS_INK. The callback routine must be declared _pascal.

Include: ui.goh

Structures:

        typedef Boolean _pascal GestureCallback (
        	Point *arrayOfInkPoints, 
        	word numPoints, 
        	word numStrokes);

UserDestroyDialog()

void	UserDestroyDialog(
        optr	dialogBox);

This routine destroys the passed dialog box, usually created with UserCreateDialog() . This routine may only be used to destroy dialog boxes occupying a single block; the block must also hold nothing other than the dialog box to be destroyed. It is for this reason that it is wise to only use this routine to destroy dialogs created with UserCreateDialog() .

See Also: UserCreateDialog().

UserDoDialog()

InteractionCommand UserDoDialog(
        optr	dialogBox);

UserDoDialog() brings a pre-instantiated dialog box on-screen, blocking the calling thread until the user responds to the dialog. You must pass the optr of a GIV_DIALOG Interaction that is set both GIA_INITIATED_VIA_USER_DO_DIALOG and GIA_MODAL.

This routine returns the InteractionCommand of the particular response trigger selected by the user. This InteractionCommand may be either a predefined type (such as IC_YES) or a custom one defined using IC_CUSTOM_START.

The pre-defined InteractionCommand s are:

IC_NULL
IC_DISMISS
IC_APPLY
IC_RESET
IC_OK
IC_YES
IC_NO
IC_STOP
IC_EXIT
IC_HELP
IC_INTERACTION_COMPLETE

This routine may return IC_NULL for those cases in which a system shutdown causes the dialog to be dismissed before the user has entered a response.

Warnings: This routine blocks the calling thread until the dialog box receives a MSG_GEN_GUP_INTERACTION_COMMAND. Since the application thread is blocked, it cannot be responsible for sending this message or for handling messages from the response triggers.

See Also: UserStandardDialog(), UserStandardDialogOptr().

UserGetInterfaceLevel()

UIInterfaceLevel UserGetInterfaceLevel(void)

This routine returns the current UIInterfaceLevel . This is a word-sized enumerated type. It has the following values:

UIIL_NOVICE
UIIL_BEGINNING_INTERMEDIATE
UIIL_ADVANCED_INTERMEDIATE
UIIL_ADVANCED
UIIL_GURU

Include: ui.goh

UserLoadApplication()

extern GeodeHandle UserLoadApplication(
        AppLaunchFlags 		alf,
        Message 		attachMethod,
        MemHandle 		appLaunchBlock,
        char 		*filename,
        StandardPath 		sPath,
        GeodeLoadError 		*err);

Loads an application. Changes to standard application directory before attempting GeodeLoad on filename passed. Stores the filename being launched into the AppLaunchBlock , so that information needed to restore this application instance will be around later if needed.


Up: GEOS SDK TechDocs | Up | Prev: TokenLoadTokenChunk() ... | Next: UserRemoveAutoExec() ...