OpenGLContext.events.timeevents
Events relating to time and timers
Classes
class CycleEvent(
TimeEvent
):
Event generated when the internal time reaches cycle boundary
This event is generated:
* when an InternalTime reaches a cycle boundary
which does not cause a StopEvent (i.e. when
the InternalTime continues past a cycle
boundary)
If the InternalTime generates fractional events,
then a fractional event will be generated at the
same time as the CycleEvent
class FractionalEvent(
TimeEvent
):
Event generated when the InternalTime changes time fraction
FractionalEvents are only generated when the
InternalTime's discreteOnly attribute is false.
This event is generated:
* when InternalTime.poll is called
* when InternalTime.stop is called
Note:
This is the only non-discrete event at the moment
class PauseEvent(
TimeEvent
):
Event generated when the internal time is paused
This event is generated:
* when InternalTime.pause is called
class ResumeEvent(
TimeEvent
):
Event generated when the internal time is resumed
This event is generated:
* when InternalTime.resume is called
class StartEvent(
TimeEvent
):
Event generated when the internal time is started
This event is generated:
when InternalTime.start is called
Event generated when the internal time stops
This event is generated:
* when InternalTime.stop is called
* when a non-repeating InternalTime reaches
the end of the cycle (natural finish)
* when a repeating, but count-limited
InternalTime reaches the end of its last
cycle.
If the InternalTime generates fractional events,
then a fractional event will be generated at the
same time as the StopEvent
Base class for all time-related events
Attributes:
discrete -- whether or not this is a discrete-time
event, that is whether it a non-fractional event,
defaults to true
type -- static event type, "time"
timetype -- a string specifying the time-event sub-type
see subclasses in this module for valid specifiers
__init__(
self
,
internal
)
Initialize the TimeEvent
- internal
- pointer to the InternalTime object which is instantiating us. We will store a reference to the internal time as well as caching various values specific to this event.
getTimer(
self
)
Get (opaque) pointer to Timer object
This method allows higher-level timer abstractions
to store a pointer to their implementations to allow
higher-level operation.