#define MAX_SPLIT_IMAGES 4
+typedef enum {
+ SELECTION_NONE = 0,
+ SELECTION_SELECTED = 1 << 0,
+ SELECTION_PRELIGHT = 1 << 1,
+ SELECTION_FOCUS = 1 << 2,
+ SELECTION_CLUSTER_HEAD = 1 << 3,
+ SELECTION_CLUSTER_CHILD = 1 << 4
+} SelectionType;
+
typedef struct _ImageLoader ImageLoader;
typedef struct _ThumbLoader ThumbLoader;
typedef struct _ImageWindow ImageWindow;
+typedef struct _FileCluster FileCluster;
+typedef struct _FileClusterList FileClusterList;
+
typedef struct _FileData FileData;
typedef struct _FileDataChangeInfo FileDataChangeInfo;
gboolean mouse_wheel_mode;
};
+// A FileCluster is a GList with HashTable access to each node (to perform contains() checks quickly).
+struct _FileCluster
+{
+ GList *head;
+ GList *items;
+ gboolean show_children;
+};
+
+struct _FileClusterList
+{
+ // A map from any clustered FileData to the FileCluster object that describes the cluster.
+ GHashTable *clusters;
+};
+
#define FILEDATA_MARKS_SIZE 6
struct _FileDataChangeInfo {
GHashTable *modified_xmp; // hash table which contains unwritten xmp metadata in format: key->list of string values
GList *cached_metadata;
gint rating;
+
+ SelectionType selected; // Used by view_file_icon.
};
struct _LayoutOptions
struct _ViewFile
{
FileViewType type;
+ // TODO(xsdg): Turn this into a union (see VFLIST and VFICON from view_file.h).
gpointer info;
GtkWidget *widget;
FileData *dir_fd;
GList *list;
+ FileClusterList *cluster_list;
SortType sort_method;
gboolean sort_ascend;
guint select_idle_id; /* event source id */
};
-typedef enum {
- SELECTION_NONE = 0,
- SELECTION_SELECTED = 1 << 0,
- SELECTION_PRELIGHT = 1 << 1,
- SELECTION_FOCUS = 1 << 2
-} SelectionType;
-
-typedef struct _IconData IconData;
-struct _IconData
-{
- SelectionType selected;
- FileData *fd;
-};
-
struct _ViewFileInfoIcon
{
/* table stuff */
gint rows;
GList *selection;
- struct _IconData *prev_selection;
+ FileData *prev_selection;
GtkWidget *tip_window;
guint tip_delay_id; /* event source id */
- struct _IconData *tip_id;
+ FileData *tip_fd;
- struct _IconData *click_id;
+ FileData *click_fd;
- struct _IconData *focus_id;
+ FileData *focus_fd;
gint focus_row;
gint focus_column;