EogListStore
3
EOG Library

# EogListStore

## Synopsis

    #define             EOG_LIST_STORE_THUMB_SIZE
    enum                EogListStoreColumn;
                        EogListStore;
    GtkListStore*       eog_list_store_new                  (void);
    GtkListStore*       eog_list_store_new_from_glist       (GList *list);
    void                eog_list_store_append_image         (EogListStore *store,
                                                             EogImage *image);
    void                eog_list_store_add_files            (EogListStore *store,
                                                             GList *file_list);
    void                eog_list_store_remove_image         (EogListStore *store,
                                                             EogImage *image);
    gint                eog_list_store_get_pos_by_image     (EogListStore *store,
                                                             EogImage *image);
    EogImage*           eog_list_store_get_image_by_pos     (EogListStore *store,
                                                             const gint pos);
    gint                eog_list_store_get_pos_by_iter      (EogListStore *store,
                                                             GtkTreeIter *iter);
    gint                eog_list_store_length               (EogListStore *store);
    gint                eog_list_store_get_initial_pos      (EogListStore *store);
    void                eog_list_store_thumbnail_set        (EogListStore *store,
                                                             GtkTreeIter *iter);
    void                eog_list_store_thumbnail_unset      (EogListStore *store,
                                                             GtkTreeIter *iter);
    void                eog_list_store_thumbnail_refresh    (EogListStore *store,
                                                             GtkTreeIter *iter);

## Object Hierarchy

      GObject
       +----GtkListStore
             +----EogListStore

## Implemented Interfaces

EogListStore implements GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest, GtkTreeSortable and GtkBuildable.

## Description

## Details

### EOG_LIST_STORE_THUMB_SIZE

    #define EOG_LIST_STORE_THUMB_SIZE 90

### enum EogListStoreColumn

    typedef enum {
    	EOG_LIST_STORE_THUMBNAIL = 0,
    	EOG_LIST_STORE_THUMB_SET,
    	EOG_LIST_STORE_EOG_IMAGE,
    	EOG_LIST_STORE_EOG_JOB,
    	EOG_LIST_STORE_NUM_COLUMNS
    } EogListStoreColumn;

### EogListStore

    typedef struct _EogListStore EogListStore;

### eog_list_store_new ()

    GtkListStore*       eog_list_store_new                  (void);

Creates a new and empty EogListStore.

Returns :

  a newly created EogListStore.

### eog_list_store_new_from_glist ()

    GtkListStore*       eog_list_store_new_from_glist       (GList *list);

Creates a new EogListStore from a list of EogImage's. The given list must be `NULL`-terminated.

`list` :

  a `NULL`-terminated list of EogImage's.

Returns :

  a new EogListStore.

### eog_list_store_append_image ()

    void                eog_list_store_append_image         (EogListStore *store,
                                                             EogImage *image);

Adds an EogImage to `store`. The thumbnail of the image is not loaded and will only be loaded if the thumbnail is made visible or `eog_list_store_set_thumbnail()` is called.

`store` :

  An EogListStore.

`image` :

  An EogImage.

### eog_list_store_add_files ()

    void                eog_list_store_add_files            (EogListStore *store,
                                                             GList *file_list);

Adds a list of GFile's to `store`. The given list must be `NULL`-terminated.

If any of the GFile's in `file_list` is a directory, all the images in that directory will be added to `store`. If the list of files contains only one file and this is a regular file, then all the images in the same directory will be added as well to `store`.

`store` :

  An EogListStore.

`file_list` :

  A `NULL`-terminated list of GFile's.

### eog_list_store_remove_image ()

    void                eog_list_store_remove_image         (EogListStore *store,
                                                             EogImage *image);

Removes `image` from `store`.

`store` :

  An EogListStore.

`image` :

  An EogImage.

### eog_list_store_get_pos_by_image ()

    gint                eog_list_store_get_pos_by_image     (EogListStore *store,
                                                             EogImage *image);

Gets the position where `image` is stored in `store`. If `image` is not stored in `store`, -1 is returned.

`store` :

  An EogListStore.

`image` :

  An EogImage.

Returns :

  the position of `image` in `store` or -1 if not found.

### eog_list_store_get_image_by_pos ()

    EogImage*           eog_list_store_get_image_by_pos     (EogListStore *store,
                                                             const gint pos);

Gets the EogImage in the position `pos` of `store`. If there is no image at position `pos`, `NULL` is returned.

`store` :

  An EogListStore.

`pos` :

  the position of the required EogImage.

Returns :

  the EogImage in position `pos` or `NULL`.

### eog_list_store_get_pos_by_iter ()

    gint                eog_list_store_get_pos_by_iter      (EogListStore *store,
                                                             GtkTreeIter *iter);

Gets the position of the image pointed by `iter`.

`store` :

  An EogListStore.

`iter` :

  A GtkTreeIter pointing to an image in `store`.

Returns :

  The position of the image pointed by `iter`.

### eog_list_store_length ()

    gint                eog_list_store_length               (EogListStore *store);

Returns the number of images in the store.

`store` :

  An EogListStore.

Returns :

  The number of images in `store`.

### eog_list_store_get_initial_pos ()

    gint                eog_list_store_get_initial_pos      (EogListStore *store);

Gets the position of the EogImage that should be loaded first. If not set, it returns -1.

`store` :

  An EogListStore.

Returns :

  the position of the image to be loaded first or -1.

### eog_list_store_thumbnail_set ()

    void                eog_list_store_thumbnail_set        (EogListStore *store,
                                                             GtkTreeIter *iter);

Sets the thumbnail for the image pointed by `iter`.

`store` :

  An EogListStore.

`iter` :

  A GtkTreeIter pointing to an image in `store`.

### eog_list_store_thumbnail_unset ()

    void                eog_list_store_thumbnail_unset      (EogListStore *store,
                                                             GtkTreeIter *iter);

Unsets the thumbnail for the image pointed by `iter`, changing it to a "busy" icon.

`store` :

  An EogListStore.

`iter` :

  A GtkTreeIter pointing to an image in `store`.

### eog_list_store_thumbnail_refresh ()

    void                eog_list_store_thumbnail_refresh    (EogListStore *store,
                                                             GtkTreeIter *iter);

Refreshes the thumbnail for the image pointed by `iter`.

`store` :

  An EogListStore.

`iter` :

  A GtkTreeIter pointing to an image in `store`.