EXECUTELIST(3A) EXECUTELIST(3A)
NAME
ExecuteAttachFunctions, ExecuteInit, ExecuteList, ExecuteV,
ExecuteString - execute a command in a window
SYNOPSIS
ExecuteAttachFunctions ()
ExecuteInit (name)
char *name;
ExecuteSetMessages (executing, done, stopping, stopped)
char *executing;
char *done;
char *stopping;
char *stopped;
ExecuteDoneCallback (func, arg)
int (*func)();
int arg;
ExecuteList (w, title, helpmsgno, readok, path, arg ...)
Widget w;
char *title;
Boolean readok;
char *path;
char *arg;
ExecuteV (w, title, helpmsgno, readok, path, argv)
Widget w;
char *title;
Boolean readok;
char *path;
char **argv;
ExecuteString (w, title, helpmsgno, readok, cmd)
Widget w;
char *title;
Boolean readok;
char *cmd;
Page 1 (printed 9/3/91)
EXECUTELIST(3A) EXECUTELIST(3A)
DESCRIPTION
ExecuteList executes a command whose path is in path with
the following list of arguments, terminated by NULL. The
first argument following the path is argument zero.
ExecuteV does the same thing, except the arguments are
stored in the NULL-terminated array, argv. ExecuteString
uses the shell to execute the command stored in the string
cmd. It should only be used if some special shell feature
is required, such as I/O redirection or filename expansion.
Otherwise, one of the first two forms should be used to
avoid an extra process for the shell.
The widget w is the widget invoking the execute box. The
execute box is opened near this widget. The title is a
string for the title bar which appears after the short name
of the application. The integer helpmsgno contains the
number of the help message to be displayed when the user
presses the help button. If this is zero, the help button
is not displayed. The message is in the set HELP_TEXT_SET,
defined in <Atari/libgls.h>. There is a corresponding
message with the same number in the set HELP_TITLE_SET, also
defined in <Atari/libgls.h>. The boolean "readok" indicates
whether reading is allowed or not in the execute box.
The execution box requires two separate initialization
routines to be called. The application should call
ExecuteAttachFunctions immediately after the application
calls AtariLibInit(3A), in order to attach the functions
required by the code, as well as to allow the user to call
ExecuteList and ExecuteString from XFaceMaker scripts. The
application should call ExecuteInit after calling
HelpInit(3A) and AlertInit(3A), in order to complete the
initialization process.
Also, before each invocation of the execute window, there
are two functions that may be called for its configuration.
ExecuteSetMessages sets the messages displayed in the line
of text at the top of the window. There are four messages:
execing is the message displayed while the command is
executing, done is the message displayed after the command
Page 2 (printed 9/3/91)
EXECUTELIST(3A) EXECUTELIST(3A)
has finished executing, stopping is the message displayed
when processing a stop request from the user (after it has
been confirmed by the user), and stopped is the message
displayed after the stop request has been processed and the
command terminated. ExecuteDoneCallback arranges for a
function func to be called when the command has completed
and the window has been closed. The calling sequence is
func (arg, status)
int arg;
int status;
where arg is the argument passed to ExecuteDoneCallback, and
status is the exit status of the child process.
There is a global variable ExecuteModal which is attached to
an XFaceMaker 2 active value with the same name. This
controls whether or not the execute box is modal and is
connected to the resouce mwmInputMode in the shell widget of
the execute box. It defaults to
XmDIALOG_PRIMARY_APPLICATION_MODAL.
SEE ALSO
mwm(1X), exec(2), AlertInit(3X), AtariLibInit(3X),
HelpInit(3X)
Page 3 (printed 9/3/91)