AgsMainLoop

AgsMainLoop — toplevel threads

Functions

Signals

Object Hierarchy

    GInterface
    ╰── AgsMainLoop

Known Implementations

AgsMainLoop is implemented by AgsAudioLoop, AgsAutosaveThread and AgsGenericMainLoop.

Includes

#include <ags/object/ags_main_loop.h>

Description

The AgsMainLoop interface gives you a unique access to toplevel threads.

Functions

ags_main_loop_get_tree_lock ()

pthread_mutex_t *
ags_main_loop_get_tree_lock (AgsMainLoop *main_loop);

Retrieve the tree mutex.

Parameters

main_loop

the AgsMainLoop

 

Returns

the mutex

Since: 0.6


ags_main_loop_set_application_context ()

void
ags_main_loop_set_application_context (AgsMainLoop *main_loop,
                                       AgsApplicationContext *application_context);

Sets the application context.

Parameters

main_loop

the AgsMainLoop

 

application_context

the AgsApplicationContext

 

Since: 0.6.0


ags_main_loop_get_application_context ()

AgsApplicationContext *
ags_main_loop_get_application_context (AgsMainLoop *main_loop);

Retrieve the AgsApplicationContext.

Parameters

main_loop

the AgsMainLoop

 

Returns

the AgsApplicationContext

Since: 0.6.0


ags_main_loop_set_async_queue ()

void
ags_main_loop_set_async_queue (AgsMainLoop *main_loop,
                               GObject *async_queue);

Sets the asynchronous queue.

Parameters

main_loop

the AgsMainLoop

 

async_queue

the AgsAsyncQueue

 

Since: 0.4


ags_main_loop_get_async_queue ()

GObject *
ags_main_loop_get_async_queue (AgsMainLoop *main_loop);

Retrieve the AgsAsyncQueue.

Parameters

main_loop

the AgsMainLoop

 

Returns

the AgsAsyncQueue

Since: 0.4


ags_main_loop_set_tic ()

void
ags_main_loop_set_tic (AgsMainLoop *main_loop,
                       guint tic);

Sets tic to tic .

Parameters

main_loop

the AgsMainLoop

 

tic

tic

 

Since: 0.4


ags_main_loop_get_tic ()

guint
ags_main_loop_get_tic (AgsMainLoop *main_loop);

Retrieve current tic of synchronization context.

Parameters

main_loop

the AgsMainLoop

 

Returns

current tic

Since: 0.4


ags_main_loop_set_last_sync ()

void
ags_main_loop_set_last_sync (AgsMainLoop *main_loop,
                             guint last_sync);

Sets last sync to last_sync .

Parameters

main_loop

the AgsMainLoop

 

last_sync

last sync

 

Since: 0.4


ags_main_loop_get_last_sync ()

guint
ags_main_loop_get_last_sync (AgsMainLoop *main_loop);

Retrieve last sync as tic of synchronization context.

Parameters

main_loop

the AgsMainLoop

 

Returns

last synced tic

Since: 0.4


ags_main_loop_interrupt ()

void
ags_main_loop_interrupt (AgsMainLoop *main_loop,
                         int sig,
                         guint time_cycle,
                         guint *time_spent);

Notify about interrupt threads.

Parameters

main_loop

the AgsMainLoop

 

sig

the singal number

 

time_cycle

the amount of time of a cycle

 

time_spent

the amount of time passed since last cycle

 

Since: 0.7.46


ags_main_loop_monitor ()

gboolean
ags_main_loop_monitor (AgsMainLoop *main_loop,
                       guint time_cycle,
                       guint *time_spent);

Notify to monitor time.

Parameters

main_loop

the AgsMainLoop

 

time_cycle

the amount of time of a cycle

 

time_spent

the amount of time passed since last cycle

 

Returns

if monitor is allowed

Since: 0.7.46

Types and Values

Signal Details

The “interrupt” signal

void
user_function (AgsMainLoop *main_loop,
               gint         sig,
               guint        time_cycle,
               gpointer     time_spent,
               gpointer     user_data)

Flags: Run Last

Since: 0.7.46


The “monitor” signal

gboolean
user_function (AgsMainLoop *main_loop,
               guint        time_cycle,
               gpointer     time_spent,
               gpointer     user_data)

Flags: Run Last

Since: 0.7.46