AgsDestroyWorker

AgsDestroyWorker — destroy worker

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── AgsThread
        ╰── AgsWorkerThread
            ╰── AgsDestroyWorker

Includes

#include <ags/worker/ags_destroy_worker.h>

Description

The AgsDestroyWorker does non-realtime work. You might want give it the responsibility to destroy your objects.

Functions

AGS_DESTROY_ENTRY()

#define AGS_DESTROY_ENTRY(ptr) ((AgsDestroyEntry *) (ptr))

AgsDestroyFunc ()

void
(*AgsDestroyFunc) (gpointer ptr);

ags_destroy_entry_alloc ()

AgsDestroyEntry *
ags_destroy_entry_alloc (gpointer ptr,
                         AgsDestroyFunc destroy_func);

Allocated a destroy entry.

Parameters

ptr

a pointer

 

destroy_func

the ptr 's destroy function.

[scope call]

Returns

the allocated AgsDestroyEntry.

[type gpointer][transfer none]

Since: 3.0.0


ags_destroy_worker_add ()

void
ags_destroy_worker_add (AgsDestroyWorker *destroy_worker,
                        gpointer ptr,
                        AgsDestroyFunc destroy_func);

Add ptr for destruction using destroy_func .

Parameters

destroy_worker

the AgsDestroyWorker.

[type gpointer]

ptr

the gpointer to destroy

 

destroy_func

the AgsDestroyFunc.

[scope call]

Since: 3.0.0


ags_destroy_worker_get_instance ()

AgsDestroyWorker *
ags_destroy_worker_get_instance ();

Get your destroy worker instance.

Returns

the AgsDestroyWorker instance.

[transfer none]

Since: 3.0.0


ags_destroy_worker_new ()

AgsDestroyWorker *
ags_destroy_worker_new ();

Create a new AgsDestroyWorker.

Returns

the new AgsDestroyWorker

Since: 3.0.0

Types and Values

struct AgsDestroyEntry

struct AgsDestroyEntry {
  gpointer ptr;

  void (*destroy_func)(gpointer ptr);
};

The struct to specify an entry to destroy.

Members

gpointer ptr;

the entry to destroy

 

destroy_func ()

the destroy function