Add VIM modelines to new files
[geeqie.git] / src / filecluster.h
index 07d3be1..d63ee03 100644 (file)
 
 #include "main.h"
 
-typedef struct _FileCluster FileCluster;
-typedef struct _FileClusterList FileClusterList;
+// FileCluster methods.
+FileCluster *filecluster_new();  // internal?
+void filecluster_free(FileCluster *fc);
 
-// A FileCluster is a GList with HashTable access to each node (to perform contains() checks quickly).
-struct _FileCluster
-{
-       GList *head;
-       GList *items;
-};
+gboolean filecluster_toggle_show_children(FileCluster *fc);
+gboolean filecluster_has_head(FileCluster *fc, FileData *fd);
+gboolean filecluster_has_child(FileCluster *fc, FileData *fd);
 
-struct _FileClusterList
-{
-       // All of the elements in the list, regardless of whether they're part of a cluster or not.
-       GList *fd_list;
 
-       // A map from any clustered FileData to the FileCluster object that describes the cluster.
-       GHashTable *clusters;
-};
+// FileClusterList methods.
 
 FileClusterList *fileclusterlist_new();
-FileCluster *filecluster_new();  // internal?
 void fileclusterlist_free(FileClusterList *fcl);
-void filecluster_free(FileCluster *fc);
 
 // Creates a cluster with items that must already be in the cluster list.  Will fail (and make no
 // changes) if any of the specified items isn't in the list, or if any of the items is already
@@ -53,5 +43,9 @@ FileCluster *fileclusterlist_create_cluster(FileClusterList *fcl, GList *fd_item
 gboolean fileclusterlist_has_head(FileClusterList *fcl, FileData *fd);
 gboolean fileclusterlist_has_child(FileClusterList *fcl, FileData *fd);
 
+GList *fileclusterlist_next_non_child(FileClusterList *fcl, GList *list);
+GList *fileclusterlist_remove_children_from_list(FileClusterList *fcl, GList *list);
 
 #endif  // FILECLUSTER_H
+
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */