|
NAMEXmtCliGets() - get synchronous input from an XmtCli widget.SYNOPSIS#include <Xmt/Cli.h>
char *XmtCliGets(char *buffer, int buffer_len, Widget w) ARGUMENTSINPUTS
OUTPUTS
RETURNS buffer, the character array into which input is stored. DESCRIPTIONXmtCliGets() is the XmtCli widget analog to the C library function fgets(). It is a synchronous input function that appears to ``block'' in an internal event loop, and is designed to be used for simple ports of terminal-based applications to the X toolkit. Note the unusual order of its arguments-the XmtCli widget w is last by analogy to the input stream argument to fgets().XmtCliGets() calls XmProcessTraversal() to give keyboard focus to the XmtCli widget, and calls XtAddGrab() to tell the Intrinsics to ignore user events that occur on any other widgets. Then it enters an internal event loop, processing events until the user has entered a string and typed the Return key. When the user completes the input, XmtCliGets() calls XtRemoveGrab() to return event dispatching to normal, and calls XmProcessTraversal() to restore keyboard focus to its previous location. Finally, XmtCliGets() copies the input string (up to a maximum of buffer_len-1 characters) into buffer, null-terminates the string, and returns buffer as its return value. SEE ALSOChapter 21, Command Line Input,XmtCli, XmtCliClear(), XmtCliFlush(), XmtCliPrintf(), XmtCliPuts().
Visit the GSP FreeBSD Man Page Interface. |