|
NAMEXmtBlock() - process events in a recursive event loop.SYNOPSIS#include <Xmt/Xmt.h>
void XmtBlock(Widget w, Boolean *block) ARGUMENTSINPUTS
DESCRIPTIONXmtBlock() processes events in the application context of w by repeatedly 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. USAGEXmtBlock() 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 functions 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 possible 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 ALSOChapter 8, Utility Functions,XtAppMainLoop(), XtAppProcessEvent().
Visit the GSP FreeBSD Man Page Interface. |