GimpList

GimpList

Synopsis

                    GimpList;
GimpContainer *     gimp_list_new                       (GType children_type,
                                                         gboolean unique_names);
GimpContainer *     gimp_list_new_weak                  (GType children_type,
                                                         gboolean unique_names);
void                gimp_list_reverse                   (GimpList *list);
void                gimp_list_set_sort_func             (GimpList *list,
                                                         GCompareFunc sort_func);
void                gimp_list_sort                      (GimpList *list,
                                                         GCompareFunc sort_func);
void                gimp_list_sort_by_name              (GimpList *list);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpContainer
               +----GimpList
                     +----GimpDeviceManager
                     +----GimpDocumentList
                     +----GimpItemStack
                     +----GimpFilteredContainer
                     +----GimpFontList

Implemented Interfaces

GimpList implements GimpConfigInterface.

Properties

  "append"                   gboolean              : Read / Write / Construct
  "sort-func"                gpointer              : Read / Write / Construct
  "unique-names"             gboolean              : Read / Write / Construct Only

Description

Details

GimpList

typedef struct _GimpList GimpList;


gimp_list_new ()

GimpContainer *     gimp_list_new                       (GType children_type,
                                                         gboolean unique_names);

Creates a new GimpList object. Since GimpList is a GimpContainer implementation, it holds GimpObjects. Thus children_type must be GIMP_TYPE_OBJECT or a type derived from it.

The returned list has the GIMP_CONTAINER_POLICY_STRONG.

children_type :

the GType of objects the list is going to hold

unique_names :

if the list should ensure that all its children have unique names.

Returns :

a new GimpList object

gimp_list_new_weak ()

GimpContainer *     gimp_list_new_weak                  (GType children_type,
                                                         gboolean unique_names);

Creates a new GimpList object. Since GimpList is a GimpContainer implementation, it holds GimpObjects. Thus children_type must be GIMP_TYPE_OBJECT or a type derived from it.

The returned list has the GIMP_CONTAINER_POLICY_WEAK.

children_type :

the GType of objects the list is going to hold

unique_names :

if the list should ensure that all its children have unique names.

Returns :

a new GimpList object

gimp_list_reverse ()

void                gimp_list_reverse                   (GimpList *list);

Reverses the order of elements in a GimpList.

list :

a GimpList

gimp_list_set_sort_func ()

void                gimp_list_set_sort_func             (GimpList *list,
                                                         GCompareFunc sort_func);

Sorts the elements of list using gimp_list_sort() and remembers the passed sort_func in order to keep the list ordered across inserting or renaming children.

list :

a GimpList

sort_func :

a GCompareFunc

gimp_list_sort ()

void                gimp_list_sort                      (GimpList *list,
                                                         GCompareFunc sort_func);

Sorts the elements of a GimpList according to the given sort_func. See g_list_sort() for a detailed description of this function.

list :

a GimpList

sort_func :

a GCompareFunc

gimp_list_sort_by_name ()

void                gimp_list_sort_by_name              (GimpList *list);

Sorts the GimpObject elements of a GimpList by their names.

list :

a GimpList

Property Details

The "append" property

  "append"                   gboolean              : Read / Write / Construct

Default value: FALSE


The "sort-func" property

  "sort-func"                gpointer              : Read / Write / Construct


The "unique-names" property

  "unique-names"             gboolean              : Read / Write / Construct Only

Default value: FALSE