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

FreeBSD Manual Pages

  
 
  

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

NAME
       XmtBlock() - process events in a	recursive event	loop.

SYNOPSIS
       #include	<Xmt/Xmt.h>

       void XmtBlock(Widget w, Boolean *block)

ARGUMENTS
       INPUTS

	    w	   Any	widget in the application context for which events are
		   to be processed.

	    block  A pointer to	a  flag	 that  indicates  when	this  function
		   should return.

DESCRIPTION
       XmtBlock()  processes events in the application context of w by repeat-
       edly calling XtAppProcessEvent()	until the Boolean value	pointed	to  by
       block  becomes  False. Then it performs an XSync() for the display of w
       and calls XmUpdateDisplay() to dispatch any pending expose events.

       XmtBlock() is a recursive event loop, and processes events in the  same
       way that	XtAppMainLoop()	does.

USAGE
       XmtBlock()  is  intended	for use	when you want to write a function that
       appears to the caller to	block and synchronously	return	a  value.  The
       Xmt  simple dialog input	routines, such as XmtAskForBoolean() are func-
       tions of	this sort. True	blocking is not	 possible  in  X  applications
       because	of  the	asynchronous, event-driven nature of the X programming
       model.

       XmtBlock() should generally only	be  called  when  a  modal  dialog  is
       active,	or when	the user is in some other way prevented	from repeating
       whatever	action caused XmtBlock() to be called. Otherwise it is	possi-
       ble  for	 the  application  to enter event loops	within recursive event
       loops.

       When you	use XmtBlock() you should be very sure that you	know what will
       cause the flag block to be set to False and the loop to exit.  This  is
       usually	done  in a callback or action procedure	triggered by some user
       action. It is equally important that you	 indicate  to  the  user  what
       action they must	take to	end the	modal, synchronous input.

SEE ALSO
       Chapter 8, Utility Functions,
       XtAppMainLoop(),	XtAppProcessEvent().

Xmt				  Motif	Tools			   XmtBlock(3)

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

home | help