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

FreeBSD Manual Pages

  
 
  

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

NAME
       XmtMsgLineGetString(),	 XmtMsgLineGetDouble(),	   XmtMsgLineGetInt(),
       XmtMsgLineGetUnsigned(),	XmtMsgLineGetChar() - use an XmtMsgLine	widget
       to synchronously	get input from the user.

SYNOPSIS
       #include	<Xmt/MsgLine.h>

       String XmtMsgLineGetString(Widget w, String buf,	int len)

       Boolean XmtMsgLineGetDouble(Widget w, double *value_return)

       Boolean XmtMsgLineGetInt(Widget w, int *value_return)

       Boolean XmtMsgLineGetUnsigned(Widget w, unsigned	*value_return)

       int XmtMsgLineGetChar(Widget w)

ARGUMENTS
       INPUTS

	    w	   An XmtMsgLine widget.

	    len	   The size of the character buffer buf.

       OUTPUTS

	    buf	   For XmtMsgLineGetString(), a	character buffer in which  the
		   user's input	will be	returned.

	    value_return
		   The	address	of a double, int or unsigned variable in which
		   the user's numeric input will be returned.

       RETURNS

	    XmtMsgLineGetString() returns buf, or NULL when cancelled.

	    The	numeric	input functions	return True for	valid input, or	 False
	    when cancelled.

	    XmtMsgLineGetChar()	 returns the input character, or EOF when can-
	    celled.

DESCRIPTION
       XmtMsgLineGetString() transfers keyboard	focus to the XmtMsgLine	widget
       w, disallows events to any other	widgets, and enters an internal	 event
       loop  to	 wait  for  the	 use  to enter a string. When the user strikes
       Return, it copies the input string into buf,  and  null-terminates  it.
       Then  it	 resumes normal	event handling,	restores keyboard focus	to its
       original	location and returns buf. The user's input is  guaranteed  not
       to be longer than len-1 characters. The user can	also cancel the	input,
       generally  by  typing  Escape  or  Ctrl-C. In this case,	XmtMsgLineGet-
       String()	does not modify	the contents of	buf and	returns	NULL.

       XmtMsgLineGetDouble(), XmtMsgLineGetInt(), and  XmtMsgLineGetUnsigned()
       are  closely  related to	XmtMsgLineGetString().	They also perform syn-
       chronous	input, but only	accept input characters	that are legal in dou-
       ble, int, and unsigned values. When  the	 user  strikes	Return,	 these
       functions  convert  the input to	the appropriate	numeric	type, store it
       at the address specified	by value_return	and return True. If  the  user
       cancels	the  input,  these  functions  return  False  without changing
       value_return.

       XmtMsgLineGetChar() also	performs synchronous input. It waits  for  the
       user  to	 enter	a  character  into the specified XmtMsgLine widget and
       returns that character, or if the user cancels the input	it returns the
       constant	EOF (defined in	the header file	<stdio.h>). This function dif-
       fers from the other XmtMsgLine synchronous input	functions in  that  it
       does  not  require  the	user  to  strike  the  Return key to enter the
       input-it	returns	after any single character is typed.

       When using any of these functions, you must  be	sure  to  check	 their
       return  values.	If  they  return  NULL,	False or EOF then the user has
       requested that the operation in progress	be cancelled.

SEE ALSO
       Chapter 22, The Message Line,
       XmtMsgLine, XmtMsgLineClear(), XmtMsgLineGetInput(), XmtMsgLinePop(),
       XmtMsgLinePrintf(), XmtMsgLinePush(), XmtMsgLineSet(),
       XmtMsgLineSetInput().

Xmt				  Motif	Tools		XmtMsgLineGetString(3)

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

home | help