EomListStore

## EomListStore EomListStore |

## Synopsis

    #define             EOM_LIST_STORE_THUMB_SIZE
    enum                EomListStoreColumn;
    struct              EomListStore;
    GtkListStore *      eom_list_store_new                  (void);
    GtkListStore *      eom_list_store_new_from_glist       (GList *list);
    void                eom_list_store_append_image         (EomListStore *store,
                                                             EomImage *image);
    void                eom_list_store_add_files            (EomListStore *store,
                                                             GList *file_list);
    void                eom_list_store_remove_image         (EomListStore *store,
                                                             EomImage *image);
    gint                eom_list_store_get_pos_by_image     (EomListStore *store,
                                                             EomImage *image);
    EomImage *          eom_list_store_get_image_by_pos     (EomListStore *store,
                                                             gint pos);
    gint                eom_list_store_get_pos_by_iter      (EomListStore *store,
                                                             GtkTreeIter *iter);
    gint                eom_list_store_length               (EomListStore *store);
    gint                eom_list_store_get_initial_pos      (EomListStore *store);
    void                eom_list_store_thumbnail_set        (EomListStore *store,
                                                             GtkTreeIter *iter);
    void                eom_list_store_thumbnail_unset      (EomListStore *store,
                                                             GtkTreeIter *iter);
    void                eom_list_store_thumbnail_refresh    (EomListStore *store,
                                                             GtkTreeIter *iter);

## Object Hierarchy

      GObject
       +----GtkListStore
             +----EomListStore

## Implemented Interfaces

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

## Description

## Details

### EOM_LIST_STORE_THUMB_SIZE

    #define EOM_LIST_STORE_THUMB_SIZE 90

### enum EomListStoreColumn

    typedef enum {
    	EOM_LIST_STORE_THUMBNAIL = 0,
    	EOM_LIST_STORE_THUMB_SET,
    	EOM_LIST_STORE_EOM_IMAGE,
    	EOM_LIST_STORE_EOM_JOB,
    	EOM_LIST_STORE_NUM_COLUMNS
    } EomListStoreColumn;

`EOM_LIST_STORE_THUMBNAIL` |
`EOM_LIST_STORE_THUMB_SET` |
`EOM_LIST_STORE_EOM_IMAGE` |
`EOM_LIST_STORE_EOM_JOB` |
`EOM_LIST_STORE_NUM_COLUMNS` |

### struct EomListStore

    struct EomListStore;

### eom_list_store_new ()

    GtkListStore *      eom_list_store_new                  (void);

Creates a new and empty EomListStore.

Returns : | a newly created EomListStore.

### eom_list_store_new_from_glist ()

    GtkListStore *      eom_list_store_new_from_glist       (GList *list);

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

`list` : | a `NULL`-terminated list of EomImage's.
Returns : | a new EomListStore.

### eom_list_store_append_image ()

    void                eom_list_store_append_image         (EomListStore *store,
                                                             EomImage *image);

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

`store` : | An EomListStore.
`image` : | An EomImage.

### eom_list_store_add_files ()

    void                eom_list_store_add_files            (EomListStore *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 EomListStore.
`file_list` : | A `NULL`-terminated list of GFile's.

### eom_list_store_remove_image ()

    void                eom_list_store_remove_image         (EomListStore *store,
                                                             EomImage *image);

Removes `image` from `store`.

`store` : | An EomListStore.
`image` : | An EomImage.

### eom_list_store_get_pos_by_image ()

    gint                eom_list_store_get_pos_by_image     (EomListStore *store,
                                                             EomImage *image);

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

`store` : | An EomListStore.
`image` : | An EomImage.
Returns : | the position of `image` in `store` or -1 if not found.

### eom_list_store_get_image_by_pos ()

    EomImage *          eom_list_store_get_image_by_pos     (EomListStore *store,
                                                             gint pos);

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

`store` : | An EomListStore.
`pos` : | the position of the required EomImage.
Returns : | the EomImage in position `pos` or `NULL`.

### eom_list_store_get_pos_by_iter ()

    gint                eom_list_store_get_pos_by_iter      (EomListStore *store,
                                                             GtkTreeIter *iter);

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

`store` : | An EomListStore.
`iter` : | A GtkTreeIter pointing to an image in `store`.
Returns : | The position of the image pointed by `iter`.

### eom_list_store_length ()

    gint                eom_list_store_length               (EomListStore *store);

Returns the number of images in the store.

`store` : | An EomListStore.
Returns : | The number of images in `store`.

### eom_list_store_get_initial_pos ()

    gint                eom_list_store_get_initial_pos      (EomListStore *store);

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

`store` : | An EomListStore.
Returns : | the position of the image to be loaded first or -1.

### eom_list_store_thumbnail_set ()

    void                eom_list_store_thumbnail_set        (EomListStore *store,
                                                             GtkTreeIter *iter);

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

`store` : | An EomListStore.
`iter` : | A GtkTreeIter pointing to an image in `store`.

### eom_list_store_thumbnail_unset ()

    void                eom_list_store_thumbnail_unset      (EomListStore *store,
                                                             GtkTreeIter *iter);

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

`store` : | An EomListStore.
`iter` : | A GtkTreeIter pointing to an image in `store`.

### eom_list_store_thumbnail_refresh ()

    void                eom_list_store_thumbnail_refresh    (EomListStore *store,
                                                             GtkTreeIter *iter);

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

`store` : | An EomListStore.
`iter` : | A GtkTreeIter pointing to an image in `store`.