IupTimer

IUP - Portable User Interface

IupTimer

Creates a timer which periodicaly invokes a callback when the time is up. Each timer should be destroyed using IupDestroy.

Creation

Ihandle* IupTimer(void); [in C]
iup.timer{} -> (elem: ihandle) [in Lua] 
timer() [in LED]

Returns: the identifier of the created element, or NULL if an error occurs.

Attributes

TIME: The time interval in miliseconds. In Windows the minimum value is 10ms.

RUN: Starts and stops the timer. Possible values: "YES" or "NO". Returns the current timer state.

WID (read-only): Returns the native serial number of the timer. Returns -1 if not running. A timer is mapped only when it is running.

Callbacks

ACTION_CB: Called when the time is up.

int function(Ihandle *ih); [in C]
elem:action_cb() -> (ret: number) [in Lua]

ih: identifier of the element that activated the event.

Return: IUP_CLOSE will be processed.

Examples

Browse Example Files