5

get_frame_clock

 1 year ago
source link: https://docs.gtk.org/gtk4/method.Widget.get_frame_clock.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Method

GtkWidgetget_frame_clock

[−]

Declaration [src]

GdkFrameClock*
gtk_widget_get_frame_clock (
  GtkWidget* widget
)
[−]

Description [src]

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_get_frame_time(), 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_get_frame_time(), and then update the animation by calling gdk_frame_clock_get_frame_time() again during each repaint.

gdk_frame_clock_request_phase() 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_queue_draw() which invalidates the widget (thus scheduling it to receive a draw on the next frame). gtk_widget_queue_draw() 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.

[−]

Return value

Type: GdkFrameClock

A GdkFrameClock

The data is owned by the instance.
The return value can be NULL.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK