Up: GEOS SDK TechDocs | Up | Prev: UserAllocObjBlock ... | Next: UtilAsciiToHex32() ...

UserRemoveAutoExec()

void	UserRemoveAutoExec(
        const char *		appName);

This routine removes an application from the list of those to be launched on start-up. It is passed one argument:

appName
This is a pointer to a null-terminated string containing the name of the application.

Include: ui.goh

UserStandardDialog()

word	UserStandardDialog(
        char *			helpContext,
        char *			customTriggers,
        char *			arg2,
        char *			arg1,
        char *			string,
        CustomDialogBoxFlags 	dialogFlags);

UserStandardDialog() creates and displays either a custom dialog box or one of several pre-defined standard dialog boxes.

Most often, you will use this routine to create a custom dialog box that conforms to a standardized dialog. In this case, pass the CustomDialogType of SDBT_CUSTOM as the routine's final argument. You must then supply other parameters to create the custom dialog box.

If instead you wish to use one of the pre-defined CustomDialogType types, you should pass that type as the final argument to this routine. Some of these standard types require you to pass string parameters. Other arguments should be passed as null.

For custom dialog boxes you must pass a CustomDialogType (CDT_WARNING, CDT_NOTIFICATION, CDT_QUESTION, or CDT_ERROR). This chooses the proper icon glyph to display within the dialog box. (For example, a CDT_WARNING dialog might contain a large exclamation-point glyph.) Make sure that you use CDBF_DIALOG_TYPE_OFFSET to pass this value. E.g.:

(GIT_AFFIRMATION << CDBF_INTERACTION_TYPE_OFFSET) | (CDT_WARNING | CDBF_DIALOG_TYPE_OFFSET)

You should also pass a valid GenInteractionType . In most cases, this will be either GIT_NOTIFICATION, GIT_AFFIRMATION, or GIT_MULTIPLE_RESPONSE. Make sure that you use CDBF_INTERACTION_TYPE_OFFSET to pass this value. E.g.:

(GIT_AFFIRMATION << CDBF_INTERACTION_TYPE_OFFSET) | (CDT_WARNING | CDBF_DIALOG_TYPE_OFFSET)

Also pass the routine a string to display to the user. This string may be either text or graphics based. The arg1 and arg2 strings may be used in conjunction with this string; if string contains any ctrl-A or ctrl-B characters (ASCII value 1 and 2, respectively), then the string pointed to by arg1 or arg2 will be inserted in that place.

If the CustomDialogType is GIT_MULTIPLE_RESPONSE, you must also set up a Response Trigger Table with several trigger parameters. The customTrigger argument should be a pointer to a structure containing these parameters. Which type of structure depends on how many triggers there are: StandardDialog1ResponseTriggerTable , StandardDialog2ResponseTriggerTable , StandardDialog3ResponseTriggerTable , StandardDialog4ResponseTriggerTable . In each case, you will need to fill in fields specifying how many triggers there are and a moniker and response value for each trigger.

The helpContext value is used by the help system; this is the "context" name of the page of the geode's help to go to when the user asks for help with this dialog. A null pointer signals that the default help context should be used.

This routine returns an InteractionCommand value. It will be IC_NULL if the interaction was terminated by the system (such as in a system shutdown).

UserStandardDialogOptr()

word	UserStandardDialogOptr(
        optr		helpContext,
        optr		customTriggers,
        optr		arg2,
        optr		arg1,
        optr		string
        CustomDialogBoxFlags		dialogFlags);

UserStandardDialogOptr() provides the same functionality as UserStandardDialog() except that optrs to strings and string parameters are passed instead of fptrs. This is useful for localized strings in resource blocks.

See Also: UserStandardDialog(), UserDoDialog().

UserStandardSound()

word	UserStandardSound(
        StandardSoundType		type,
        ...);

This routine plays a simple sequence of notes. It can be used to play a standard system sound, a single custom tone, or a sequence of tones.

The routine takes a variable number of arguments. The first argument is a member of the StandardSoundType enumerated type. This argument specifies what kind of tone or tones will be played. Depending on the StandardSoundType passed, zero, one, or two additional arguments may be needed. StandardSoundType contains the following members:

SST_ERROR
This is the sound played when an "Error" dialog comes up. No further arguments are needed.
SST_WARNING
This is a general warning sound. No further arguments are needed.
SST_NOTIFY
This is a general notification sound. No further arguments are needed.
SST_NO_INPUT
This is the sound played when a user's input is not going anywhere (e.g. when he clicks the mouse outside a modal dialog box).
SST_KEY_CLICK
This is the sound produced when the keyboard is pressed, or when the user clicks on a floating keyboard. No further arguments are required.
SST_CUSTOM_SOUND
Play a custom sampled sound. This requires one more argument, the memory handle of the sound to be played.
SST_CUSTOM_BUFFER
Play a custom buffer of instrumental sound. This requires one further argument, a pointer to the memory block containing the sound buffer. Note that the "tempo" value used to play this buffer will be one tick per thirty-second note, probably much faster than you would otherwise expect.
SST_CUSTOM_NOTE
By passing this argument, you can have a single custom note played. You must provide one further argument, the handle of the note (such as returned by SoundAllocMusicNote() ).

The function returns a word-length token value. This value is useful for stopping sounds with the UserStopStandardSound() routine.

UserStopStandardSound()

word	UserStandardSound(
        StandardSoundType		type,
        word				countID);

This routine stops a sound that was started by UserStandardSound.

The sound to stop is identified by its type and by the word-length token value returned by UserStandardSound.

This function will not stop SST_CUSTOM_... sounds.


Up: GEOS SDK TechDocs | Up | Prev: UserAllocObjBlock ... | Next: UtilAsciiToHex32() ...