Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtCliGets(3)		    Library Functions Manual		   XmtCliGets(3)

NAME
     XmtCliGets() - get synchronous input from an XmtCli widget.

SYNOPSIS
     #include <Xmt/Cli.h>

     char *XmtCliGets(char *buffer, int buffer_len, Widget w)

ARGUMENTS
     INPUTS

	  buffer_len
		 The number of characters in buffer.

	  w	 The XmtCli widget from which input is to be read.

     OUTPUTS

	  buffer An array of characters into which user input is stored. No more
		 than  buffer_len-1  characters will be stored into this buffer,
		 and the input will be null terminated.

     RETURNS

	  buffer, the character array into which input is stored.

DESCRIPTION
     XmtCliGets() 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 wid-
     get w is last by analogy to the input stream argument to fgets().

     XmtCliGets() calls XmProcessTraversal() to give keyboard focus to the  Xmt-
     Cli  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 XtRemove-
     Grab() to return event dispatching to normal,  and  calls	XmProcessTraver-
     sal()  to	restore  keyboard  focus to its previous location. Finally, Xmt-
     CliGets() copies the input string (up to a maximum of buffer_len-1  charac-
     ters)  into  buffer,  null-terminates the string, and returns buffer as its
     return value.

SEE ALSO
     Chapter 21, Command Line Input,
     XmtCli, XmtCliClear(), XmtCliFlush(), XmtCliPrintf(), XmtCliPuts().

Xmt				   Motif Tools			   XmtCliGets(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtCliGets&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help