Method

MetaIdleMonitoradd_idle_watch

Declaration [src]

guint
meta_idle_monitor_add_idle_watch (
  MetaIdleMonitor* monitor,
  guint64 interval_msec,
  MetaIdleMonitorWatchFunc callback,
  gpointer user_data,
  GDestroyNotify notify
)

Description

No description available.

Parameters

interval_msec

Type: guint64

The idletime interval, in milliseconds.

callback

Type: MetaIdleMonitorWatchFunc

The callback to call when the user has accumulated interval_msec milliseconds of idle time.

The argument can be NULL.
user_data

Type: gpointer

The user data to pass to the callback.

The argument can be NULL.
The data is owned by the caller of the method.
notify

Type: GDestroyNotify

A GDestroyNotify.

Return value

Type: guint

A watch id

Adds a watch for a specific idle time. The callback will be called when the user has accumulated interval_msec milliseconds of idle time. This function will return an ID that can either be passed to meta_idle_monitor_remove_watch(), or can be used to tell idle time watches apart if you have more than one.

Also note that this function will only care about positive transitions (user’s idle time exceeding a certain time). If you want to know about when the user has become active, use meta_idle_monitor_add_user_active_watch().