Obtains the frame clock for a widget.
The frame clock is a global “ticker” that can be used to drive animations and repaints. The most common reason to get the frame clock is to call gdk.frame_clock.FrameClock.getFrameTime, in order to get a time to use for animating. For example you might record the start of the animation with an initial value from gdk.frame_clock.FrameClock.getFrameTime, and then update the animation by calling gdk.frame_clock.FrameClock.getFrameTime again during each repaint.
gdk.frame_clock.FrameClock.requestPhase will result in a new frame on the clock, but won’t necessarily repaint any widgets. To repaint a widget, you have to use gtk.widget.Widget.queueDraw which invalidates the widget (thus scheduling it to receive a draw on the next frame). gtk.widget.Widget.queueDraw will also end up requesting a frame on the appropriate frame clock.
A widget’s frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget’s frame clock.
Unrealized widgets do not have a frame clock.
a gdk.frame_clock.FrameClock
Obtains the frame clock for a widget.
The frame clock is a global “ticker” that can be used to drive animations and repaints. The most common reason to get the frame clock is to call gdk.frame_clock.FrameClock.getFrameTime, in order to get a time to use for animating. For example you might record the start of the animation with an initial value from gdk.frame_clock.FrameClock.getFrameTime, and then update the animation by calling gdk.frame_clock.FrameClock.getFrameTime again during each repaint.
gdk.frame_clock.FrameClock.requestPhase will result in a new frame on the clock, but won’t necessarily repaint any widgets. To repaint a widget, you have to use gtk.widget.Widget.queueDraw which invalidates the widget (thus scheduling it to receive a draw on the next frame). gtk.widget.Widget.queueDraw will also end up requesting a frame on the appropriate frame clock.
A widget’s frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget’s frame clock.
Unrealized widgets do not have a frame clock.