XviewerListStore

XviewerListStore

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GtkListStore
        ╰── XviewerListStore

Implemented Interfaces

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

Description

Functions

xviewer_list_store_new ()

GtkListStore *
xviewer_list_store_new (void);

Creates a new and empty XviewerListStore.

Returns

a newly created XviewerListStore.


xviewer_list_store_new_from_glist ()

GtkListStore *
xviewer_list_store_new_from_glist (GList *list);

Creates a new XviewerListStore from a list of XviewerImage's. The given list must be NULL-terminated.

Parameters

list

a NULL-terminated list of XviewerImage's.

[element-type XviewerImage]

Returns

a new XviewerListStore.


xviewer_list_store_append_image ()

void
xviewer_list_store_append_image (XviewerListStore *store,
                                 XviewerImage *image);

Adds an XviewerImage to store . The thumbnail of the image is not loaded and will only be loaded if the thumbnail is made visible.

Parameters

store

An XviewerListStore.

 

image

An XviewerImage.

 

xviewer_list_store_add_files ()

void
xviewer_list_store_add_files (XviewerListStore *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 .

If file_list contains multiple entries and no directories, images will follow the given order, otherwise default sorting will be applied.

Parameters

store

An XviewerListStore.

 

file_list

A NULL-terminated list of GFile's.

[element-type GFile]

xviewer_list_store_remove_image ()

void
xviewer_list_store_remove_image (XviewerListStore *store,
                                 XviewerImage *image);

Removes image from store .

Parameters

store

An XviewerListStore.

 

image

An XviewerImage.

 

xviewer_list_store_get_pos_by_image ()

gint
xviewer_list_store_get_pos_by_image (XviewerListStore *store,
                                     XviewerImage *image);

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

Parameters

store

An XviewerListStore.

 

image

An XviewerImage.

 

Returns

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


xviewer_list_store_get_image_by_pos ()

XviewerImage *
xviewer_list_store_get_image_by_pos (XviewerListStore *store,
                                     gint pos);

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

Parameters

store

An XviewerListStore.

 

pos

the position of the required XviewerImage.

 

Returns

the XviewerImage in position pos or NULL.

[transfer full]


xviewer_list_store_get_pos_by_iter ()

gint
xviewer_list_store_get_pos_by_iter (XviewerListStore *store,
                                    GtkTreeIter *iter);

Gets the position of the image pointed by iter .

Parameters

store

An XviewerListStore.

 

iter

A GtkTreeIter pointing to an image in store .

 

Returns

The position of the image pointed by iter .


xviewer_list_store_length ()

gint
xviewer_list_store_length (XviewerListStore *store);

Returns the number of images in the store.

Parameters

store

An XviewerListStore.

 

Returns

The number of images in store .


xviewer_list_store_get_initial_pos ()

gint
xviewer_list_store_get_initial_pos (XviewerListStore *store);

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

Parameters

store

An XviewerListStore.

 

Returns

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


xviewer_list_store_thumbnail_set ()

void
xviewer_list_store_thumbnail_set (XviewerListStore *store,
                                  GtkTreeIter *iter);

Sets the thumbnail for the image pointed by iter .

Parameters

store

An XviewerListStore.

 

iter

A GtkTreeIter pointing to an image in store .

 

xviewer_list_store_thumbnail_unset ()

void
xviewer_list_store_thumbnail_unset (XviewerListStore *store,
                                    GtkTreeIter *iter);

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

Parameters

store

An XviewerListStore.

 

iter

A GtkTreeIter pointing to an image in store .

 

xviewer_list_store_thumbnail_refresh ()

void
xviewer_list_store_thumbnail_refresh (XviewerListStore *store,
                                      GtkTreeIter *iter);

Refreshes the thumbnail for the image pointed by iter .

Parameters

store

An XviewerListStore.

 

iter

A GtkTreeIter pointing to an image in store .

 

Types and Values

XVIEWER_LIST_STORE_THUMB_SIZE

#define XVIEWER_LIST_STORE_THUMB_SIZE 90

enum XviewerListStoreColumn

Members

XVIEWER_LIST_STORE_THUMBNAIL

   

XVIEWER_LIST_STORE_THUMB_SET

   

XVIEWER_LIST_STORE_XVIEWER_IMAGE

   

XVIEWER_LIST_STORE_XVIEWER_JOB

   

XVIEWER_LIST_STORE_NUM_COLUMNS

   

struct XviewerListStore

struct XviewerListStore;