EmpireJones
EmpireJones

Reputation: 3086

C GTK+ periodic event to update the UI

How can I update a GTK+ interface on a periodic event. For example, let's say I wanted to update a text field containing the time every 200 milliseconds. How is this typically done?


Update:

Another question (How one executes a periodic job in gtk application?) mentiones g_timeout_add. Is this the best way to go about doing this? It is said in that thread that it may not be efficient?

Upvotes: 3

Views: 3344

Answers (1)

Nemo
Nemo

Reputation: 71615

This tutorial has an example. (Search for the section titled "A timer example".)

The short answer is "use g_timeout_add".

Upvotes: 7

Related Questions