gdk.Threads

Undocumented in source.

Public Imports

gdk.c.types
public import gdk.c.types;
gtkc.gdktypes
public import gtkc.gdktypes;

Members

Functions

threadsAddIdle
uint threadsAddIdle(GSourceFunc function_, void* data)

A wrapper for the common usage of Threads.addIdleFull assigning the default priority, G_PRIORITY_DEFAULT_IDLE

threadsAddIdleFull
uint threadsAddIdleFull(int priority, GSourceFunc function_, void* data, GDestroyNotify notify)

Adds a function to be called whenever there are no higher priority events pending. If the function returns FALSE it is automatically removed from the list of event sources and will not be called again.

threadsAddTimeout
uint threadsAddTimeout(uint interval, GSourceFunc function_, void* data)

A wrapper for the common usage of Threads.addTimeoutFull assigning the default priority, G_PRIORITY_DEFAULT

threadsAddTimeoutFull
uint threadsAddTimeoutFull(int priority, uint interval, GSourceFunc function_, void* data, GDestroyNotify notify)

Sets a function to be called at regular intervals holding the GDK lock, with the given priority. The function is called repeatedly until it returns FALSE, at which point the timeout is automatically destroyed and the function will not be called again. The notify function is called when the timeout is destroyed. The first call to the function will be at the end of the first interval.

threadsAddTimeoutSeconds
uint threadsAddTimeoutSeconds(uint interval, GSourceFunc function_, void* data)

A wrapper for the common usage of Threads.addTimeoutSecondsFull assigning the default priority, G_PRIORITY_DEFAULT

threadsAddTimeoutSecondsFull
uint threadsAddTimeoutSecondsFull(int priority, uint interval, GSourceFunc function_, void* data, GDestroyNotify notify)

A variant of Threads.addTimeoutFull with second-granularity. See Timeout.addSecondsFull for a discussion of why it is a good idea to use this function if you don’t need finer granularity.

threadsEnter
void threadsEnter()

This function marks the beginning of a critical section in which GDK and GTK+ functions can be called safely and without causing race conditions. Only one thread at a time can be in such a critial section.

threadsInit
void threadsInit()

Initializes GDK so that it can be used from multiple threads in conjunction with Threads.enter and Threads.leave.

threadsLeave
void threadsLeave()

Leaves a critical region begun with Threads.enter.

threadsSetLockFunctions
void threadsSetLockFunctions(GCallback enterFn, GCallback leaveFn)

Allows the application to replace the standard method that GDK uses to protect its data structures. Normally, GDK creates a single glib.Mutex that is locked by Threads.enter, and released by Threads.leave; using this function an application provides, instead, a function enter_fn that is called by Threads.enter and a function leave_fn that is called by Threads.leave.