IpatchList

IpatchList — An object containing a list of object pointers

Stability Level

Stable, unless otherwise indicated

Functions

Object Hierarchy

    GObject
    ╰── IpatchList

Description

An object which defines a list of object pointers. A GObject reference is held to all objects until the IpatchList itself is released.

Functions

ipatch_list_new ()

IpatchList *
ipatch_list_new (void);

Create a new object list object. IpatchList objects are often used to duplicate multi-thread sensitive object lists, so they can be iterated over at one's own leasure.

Returns

New object list container object.


ipatch_list_duplicate ()

IpatchList *
ipatch_list_duplicate (IpatchList *list);

Duplicate an object list.

Parameters

list

Object list to duplicate

 

Returns

New duplicate object list with a ref count of one which the caller owns.

[transfer full]


ipatch_list_get_items ()

GList *
ipatch_list_get_items (IpatchList *list);

Get the items list in a IpatchList object. Mainly for the benefit of GObject Introspection, since it is common practice to just access the <structfield>items</structfield> field directly.

Parameters

list

List object

 

Returns

The list of items in the list object, which is owned by the list and should not be modified or freed directly.

[element-type GObject][transfer none]

Since: 1.1.0


ipatch_list_set_items ()

void
ipatch_list_set_items (IpatchList *list,
                       GList *items);

Set the items list in a IpatchList object. Mainly for the benefit of GObject Introspection, since it is common practice to just access the <structfield>items</structfield> field directly. Replaces existing items (list if any).

Parameters

list

List object

 

items

List of GObject pointers to assign, list takes over ownership, each object should be referenced already for the list.

[element-type GObject][transfer full]

Since: 1.1.0


ipatch_list_append ()

void
ipatch_list_append (IpatchList *list,
                    GObject *object);

Append an object to an IpatchList.

Parameters

list

List object

 

object

Object to append to the list

 

Since: 1.1.0


ipatch_list_prepend ()

void
ipatch_list_prepend (IpatchList *list,
                     GObject *object);

Prepend an object to an IpatchList.

Parameters

list

List object

 

object

Object to prepend to the list

 

Since: 1.1.0


ipatch_list_insert ()

void
ipatch_list_insert (IpatchList *list,
                    GObject *object,
                    int pos);

Append an object to an IpatchList.

Parameters

list

List object

 

object

Object to insert into the list

 

pos

Position to insert into (0 for start of list, -1 to append)

 

Since: 1.1.0


ipatch_list_remove ()

gboolean
ipatch_list_remove (IpatchList *list,
                    GObject *object);

Remove an object from an IpatchList.

Parameters

list

List object

 

object

Object to remove from the list

 

Returns

TRUE if found and removed, FALSE otherwise

Since: 1.1.0


ipatch_list_init_iter ()

void
ipatch_list_init_iter (IpatchList *list,
                       IpatchIter *iter);

Initializes a user supplied iterator (usually stack allocated) to iterate over the object list . Further operations on iter will use the list .

[skip]

Parameters

list

List object

 

iter

Iterator to initialize