A widget that invokes a callback after a given length of time
PtWidget --> PtTimer
For more information, see the diagram of the widget hierarchy.
<photon/PtTimer.h>
A PtTimer widget invokes a callback after an initial and repeated time period. The time period is given in milliseconds. This widget is intended to provide a non-accurate, resourceless time base for the application. Setting the Pt_ARG_TIMER_INITIAL resource to 0 or unrealizing the widget disables the timer.
When you create a PtTimer widget in PhAB, it appears as a
black box. The
box doesn't appear when you run the application; it's just a placeholder.
PtTimer is easy to use, but doesn't give accurate timer events. In particular, it doesn't guarantee a constant repeat rate; since the repetition is handled by rearming the timer for each event, any delays in handling the events accumulate. Kernel timers guarantee an accurate repeat rate even if your application can't keep up with them. |
Resource | C type | Pt type | Default |
---|---|---|---|
Pt_ARG_TIMER_INITIAL | long | Scalar | 0 |
Pt_ARG_TIMER_REPEAT | long | Scalar | 0 |
Pt_CB_TIMER_ACTIVATE | PtCallback_t * | Link | NULL |
C type | Pt type | Default |
---|---|---|
long | Scalar | 0 |
Time in milliseconds before the first timer callback is activated.
C type | Pt type | Default |
---|---|---|
long | Scalar | 0 |
Time in milliseconds for the repeat rate of the timer once the initial time period has expired.
C type | Pt type | Default |
---|---|---|
PtCallback_t * | Link | NULL |
A list of callbacks that the widget invokes when the timer has expired.
If the widget modifies an inherited resource, the "Default override" column indicates the new value. This modification affects any subclasses of the widget.
Resource | Inherited from | Default override |
---|---|---|
Pt_ARG_AREA | PtWidget | Not used by this class. |
Pt_ARG_BITMAP_CURSOR | PtWidget | |
Pt_ARG_BORDER_WIDTH | PtWidget | Not used by this class. |
Pt_ARG_CURSOR_COLOR | PtWidget | Not used by this class. |
Pt_ARG_CURSOR_TYPE | PtWidget | Not used by this class. |
Pt_ARG_DATA | PtWidget | |
Pt_ARG_DIM | PtWidget | Not used by this class. |
Pt_ARG_EFLAGS | PtWidget | Not used by this class. |
Pt_ARG_FLAGS | PtWidget | |
Pt_ARG_HELP_TOPIC | PtWidget | Not used by this class. |
Pt_ARG_POS | PtWidget | Not used by this class. |
Pt_ARG_RESIZE_FLAGS | PtWidget | Not used by this class. |
Pt_ARG_USER_DATA | PtWidget | |
Pt_CB_BLOCKED | PtWidget | |
Pt_CB_DESTROYED | PtWidget | |
Pt_CB_HOTKEY | PtWidget | |
Pt_CB_RAW | PtWidget | |
Pt_CB_REALIZED | PtWidget | |
Pt_CB_UNREALIZED | PtWidget |