hpux man page for xttimercallbackproc

Query: xttimercallbackproc

OS: hpux

Section: 2

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

XtTimerCallbackProc()													     XtTimerCallbackProc()

Name
  XtTimerCallbackProc - interface definition for procedure invoked when timeouts expire.

Synopsis
  typedef void (*XtTimerCallbackProc)(XtPointer, XtIntervalId *);
	  XtPointer client_data;      XtIntervalId *id;

Inputs
  client_data
	    Specifies the data that was registered with this procedure.

  id	    Specifies the ID returned when this procedure was registered.

Description
  An  XtTimerCallbackProc is registered in a call to XtAppAddTimeOut(), and is invoked when the specified number of milliseconds elapse.  The
  client_data argument is data registered with the procedure in the call to XtAppAddTimeOut(), and the id argument is the value  returned  by
  that function.

  A  timer callback is called once, and then is automatically removed.	If you want a callback to be called repeatedly, re-register the call-
  back each time it is called,

Example
  The following XtTimerCallbackProc is from the xmh program.  It re-registers itself so that it will be called repeatedly.  Note that it uses
  its client_data argument to supply the application context so that it can re-register itself.

     /*ARGSUSED*/
     static void NeedToCheckScans(client_data, id)
	 XtPointer client_data;
	 XtIntervalId *id;	     /* unused */
     {
	 int i;
	 if (!subProcessRunning) {
	     DEBUG("[magic toc check ...")
	     for (i = 0; i < numScrns; i++) {
		 if (scrnList[i]->toc)
		     TocRecheckValidity(scrnList[i]->toc);
		 if (scrnList[i]->msg)
		     TocRecheckValidity(MsgGetToc(scrnList[i]->msg));
	     }
	     DEBUG(" done]0)
	 }
	 (void) XtAppAddTimeOut((XtAppContext)client_data,
				(unsigned long) app_resources.rescan_interval,
				NeedToCheckScans, client_data);
     }

  This procedure is initially registered with the following code:

	 if (app_resources.rescan_interval > 0) {
	     app_resources.rescan_interval *= 60000;
	     (void) XtAppAddTimeOut(appCtx,
		      (unsigned long) app_resources.rescan_interval,
		      NeedToCheckScans, (XtPointer)appCtx);
	 }

See Also
  XtAppAddTimeOut(1), XtRemoveTimeOut(1).

Xt - Event Handling													     XtTimerCallbackProc()
Related Man Pages
xtremovetimeout(3xt) - redhat
xtappaddtimeout(3) - debian
xtappaddtimeout(3) - centos
xtremovetimeout(3) - suse
xtappaddtimeout(1) - hpux
Similar Topics in the Unix Linux Community
PHP Man Pages Now Available (Over 10,000)
How to extract every repeated string between two specific string?
Sequence extraction
Wrong Array...
Tar Command