#ifndef COLLECT_H
#define COLLECT_H
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "typedefs.h"
+
+struct CollectTable;
+struct FileData;
+struct ThumbLoader;
+
+struct CollectInfo
+{
+ FileData *fd;
+ GdkPixbuf *pixbuf;
+ guint flag_mask;
+};
CollectInfo *collection_info_new(FileData *fd, struct stat *st, GdkPixbuf *pixbuf);
void collection_info_free(CollectInfo *ci);
void collection_info_set_thumb(CollectInfo *ci, GdkPixbuf *pixbuf);
-gboolean collection_info_load_thumb(CollectInfo *ci);
-
-void collection_list_free(GList *list);
GList *collection_list_sort(GList *list, SortType method);
GList *collection_list_add(GList *list, CollectInfo *ci, SortType method);
CollectInfo *collection_list_find_fd(GList *list, FileData *fd);
GList *collection_list_to_filelist(GList *list);
+struct CollectionData
+{
+ gchar *path;
+ gchar *name;
+ GList *list;
+ SortType sort_method;
+
+ ThumbLoader *thumb_loader;
+ CollectInfo *thumb_info;
+
+ void (*info_updated_func)(CollectionData *, CollectInfo *, gpointer);
+ gpointer info_updated_data;
+
+ gint ref;
+
+ /* geometry */
+ gboolean window_read;
+ GdkRectangle window;
+
+ gboolean changed; /**< contents changed since save flag */
+
+ GHashTable *existence;
+
+ GtkWidget *dialog_name_entry;
+ gchar *collection_path; /**< Full path to collection including extension */
+ gint collection_append_index;
+};
+
CollectionData *collection_new(const gchar *path);
void collection_free(CollectionData *cd);
gint collection_to_number(CollectionData *cd);
CollectionData *collection_from_number(gint n);
-/* pass a NULL pointer to whatever you don't need
+/**
+ * @headerfile collection_from_dnd_data
+ * pass a NULL pointer to whatever you don't need
* use free_selected_list to free list, and
* g_list_free to free info_list, which is a list of
* CollectInfo pointers into CollectionData
void collection_update_geometry(CollectionData *cd);
+struct CollectWindow
+{
+ GtkWidget *window;
+ CollectTable *table;
+ GtkWidget *status_box;
+
+ GtkWidget *close_dialog;
+
+ CollectionData *cd;
+};
+
CollectWindow *collection_window_new(const gchar *path);
void collection_window_close_by_collection(CollectionData *cd);
CollectWindow *collection_window_find(CollectionData *cd);
CollectWindow *collection_window_find_by_path(const gchar *path);
-gboolean collection_window_modified_exists(void);
+gboolean collection_window_modified_exists();
+
+gboolean is_collection(const gchar *param);
+gchar *collection_path(const gchar *param);
+void collection_contents(const gchar *name, GString **contents);
+GList *collection_contents_fd(const gchar *name);
-gboolean is_collection(gchar *param);
-gchar *collection_path(gchar *param);
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */