Gcr.Collection
Description: Reference for Gcr.Collection

### Interface

# GcrCollection

#### Description [src]

    interface Gcr.Collection : GObject.Object

A `GcrCollection` is used to group a set of objects.

This is an abstract interface which can be used to determine which objects show up in a selector or other user interface element.

Use `gcr_simple_collection_new()` to create a concrete implementation of this interface which you can add objects to.

#### Prerequisite

In order to implement Collection, your type must inherit from`GObject`.

#### Implementations

- GcrFilterCollection
- GcrSimpleCollection
- GcrUnionCollection

#### Instance methods

###### gcr_collection_contains

Check whether the collection contains an object or not.

###### gcr_collection_emit_added

Emit the `GcrCollection::added` signal for the given object. This function is used by implementors of this interface.

###### gcr_collection_emit_removed

Emit the `GcrCollection::removed` signal for the given object. This function is used by implementors of this interface.

###### gcr_collection_get_length

Get the number of objects in this collection.

###### gcr_collection_get_objects

Get a list of the objects in this collection.

#### Signals

###### Gcr.Collection::added

This signal is emitted when an object is added to the collection.

###### Gcr.Collection::removed

This signal is emitted when an object is removed from the collection.

#### Interface structure

    struct GcrCollectionIface {
      GTypeInterface parent;
      void (* added) (
        GcrCollection* self,
        GObject* object
      );
      void (* removed) (
        GcrCollection* self,
        GObject* object
      );
      guint (* get_length) (
        GcrCollection* self
      );
      GList* (* get_objects) (
        GcrCollection* self
      );
      gboolean (* contains) (
        GcrCollection* self,
        GObject* object
      );

    }

No description available.

###### Interface members

`parent` |
    GTypeInterface
| No description available.
`added` |
    void (* added) (
        GcrCollection* self,
        GObject* object
      )
| No description available.
`removed` |
    void (* removed) (
        GcrCollection* self,
        GObject* object
      )
| No description available.
`get_length` |
    guint (* get_length) (
        GcrCollection* self
      )
| No description available.
`get_objects` |
    GList* (* get_objects) (
        GcrCollection* self
      )
| No description available.
`contains` |
    gboolean (* contains) (
        GcrCollection* self,
        GObject* object
      )
| No description available.

#### Virtual methods

###### Gcr.Collection.added

No description available.

###### Gcr.Collection.contains

Check whether the collection contains an object or not.

###### Gcr.Collection.get_length

Get the number of objects in this collection.

###### Gcr.Collection.get_objects

Get a list of the objects in this collection.

###### Gcr.Collection.removed

No description available.