BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kset_choosehandler - set the choose handling routine used by kchoose()
LIBRARY CALL
knotify kset_choosehandler(
knotify new_handler)
INPUT
- new_handler - the choose handler to be called. Specify
xvu_choose() for the Khoros pop-up choice dialog
(xvroutines & hybrid routines only), NULL for
the Khoros default choice handler which prints
to the tty, or your own choice handler.
OUTPUT
none
RETURN VALUE
the previously installed choose handler, or NULL
if the default choose handler was installed.
DESCRIPTION
Sets the choose handler routine to be used by the kchoose()
facility. When set to NULL (the default) the standard Khoros
choose handler will obtain the user's choice via
interaction through kstderr and kstdin.
If a different choose handler is set, the choose handler must
be declared as follows:
choose_handler(
char **list_of_options,
int num_options,
int default_index,
int *return_index,
char **return_string,
char *message)
list_of_options - an array of strings containing the items to
select from.
num_options - The number of items in the list_of_options
default_index - The index number to the default item.
return_index - This is the index of the item selected.
return_string - string that holds the selected item. If it is
NULL, it kmallocs the space necessary, and
returns the string.
message - grammatically correct, clear explanation of
the error that occurred. This can be formatted
like a (void) printf statement.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/notify.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.