XtAddWorkProc() XtAddWorkProc()
Name
XtAddWorkProc - register a procedure to be called when the event loop is idle.
Synopsis
XtWorkProcId XtAddWorkProc(proc, client_data)
XtWorkProc proc;
XtPointer client_data;
Inputs
proc Specifies the procedure to be called when the application is idle.
client_data
Specifies data to be passed to proc when it is called.
Returns
A handle of type XtWorkProcId that can be passed to XtRemoveWorkProc() to unregister the work procedure.
Availability
Superseded by XtAppAddWorkProc().
Description
XtAddWorkProc() registers the procedure proc and the data client_data to be called by XtAppNextEvent() when there are no pending input
events and it would otherwise block.
Usage
XtAddWorkProc() has been superseded by XtAppAddWorkProc(), which performs the same function on a per-application context basis. XtAd-
dWorkProc() now calls XtAppAddWorkProc() passing the default application context created by XtInitialize(). Very few programs need multi-
ple application contexts, and you can continue to use XtAddWorkProc() if you initialize your application with XtInitialize(). We recom-
mend, however, that you use XtAppInitialize(), XtAppAddWorkProc(), and the other XtApp*() application context specific functions.
See XtAppAddWorkProc() for more information.
See Also
XtAppAddWorkProc(1), XtRemoveWorkProc(1),
XtWorkProc(2).
Xt - Event Handling XtAddWorkProc()