timer.h File Reference

Timer Abstract Widget. More...

#include "ntw.h"

Go to the source code of this file.

Functions

int ntw_timer_set_timeout (ntwWidget *widget, unsigned int seconds)
 Change the timeout of a timer.
int ntw_timer_reset (ntwWidget *widget)
 Reset the timer.
int ntw_timer_set_callback (ntwWidget *widget, func_ptr callback, ntwWidget *userdata)
 Assign a callback to a timer.
ntwWidget * ntw_timer_new (unsigned int seconds, int synchronized)
 Create timer.


Detailed Description

Timer Abstract Widget.

This is an abstract widget that causes the client to send an event every N seconds, where N is specified by the programmer.


Function Documentation

ntwWidget* ntw_timer_new unsigned int  seconds,
int  synchronized
 

Create timer.

Returns:
Newly created timer

int ntw_timer_reset ntwWidget *  widget  ) 
 

Reset the timer.

Parameters:
widget timer to reset
Returns:
-1 on failure

int ntw_timer_set_callback ntwWidget *  widget,
func_ptr  callback,
ntwWidget *  userdata
 

Assign a callback to a timer.

Parameters:
widget timer to assign to
callback callback function
userdata data passed to the function
Returns:
-1 on failure

int ntw_timer_set_timeout ntwWidget *  widget,
unsigned int  seconds
 

Change the timeout of a timer.

This will change the timeout of a timer AFTER the next timeout occurs. This will not shorten or lengthen the currently running timer.

Parameters:
widget timer to change
Returns:
-1 on failure


Generated on Wed Jun 28 17:00:07 2006 for NTW Server C Library by  doxygen 1.4.6