summaryrefslogtreecommitdiff
path: root/gtk/gtkbookmarksmanager.h
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2011-09-29 09:24:57 -0500
committerFederico Mena Quintero <federico@gnome.org>2012-09-03 20:42:04 -0500
commitd0196e99e1312cf3c0629cf59a49621cd83b3de0 (patch)
tree2657172216c9c2ef261b5fe70921f3aeae6d84fc /gtk/gtkbookmarksmanager.h
parent91b3ad95c6f67f8f5c3903b1312d3144f5c8ac62 (diff)
downloadgtk+-d0196e99e1312cf3c0629cf59a49621cd83b3de0.tar.gz
Split out a GtkBookmarksManager from gtkfilesystem.[ch]
We had the bookmarks machinery in GtkFileSystem for historical reasons. Now, we'll keep this separately. This will allow us to make the bookmarks machinery public if needed in the future. Signed-off-by: Federico Mena Quintero <federico@gnome.org> Conflicts: gtk/Makefile.am
Diffstat (limited to 'gtk/gtkbookmarksmanager.h')
-rw-r--r--gtk/gtkbookmarksmanager.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/gtk/gtkbookmarksmanager.h b/gtk/gtkbookmarksmanager.h
new file mode 100644
index 0000000000..ee98d875d6
--- /dev/null
+++ b/gtk/gtkbookmarksmanager.h
@@ -0,0 +1,73 @@
+/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
+/* GTK - The GIMP Toolkit
+ * gtkbookmarksmanager.h: Utilities to manage and monitor ~/.gtk-bookmarks
+ * Copyright (C) 2003, Red Hat, Inc.
+ * Copyright (C) 2007-2008 Carlos Garnacho
+ * Copyright (C) 2011 Suse
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors: Federico Mena Quintero <federico@gnome.org>
+ */
+
+#ifndef __GTK_BOOKMARKS_MANAGER_H__
+#define __GTK_BOOKMARKS_MANAGER_H__
+
+#include <gio/gio.h>
+
+typedef void (* GtkBookmarksChangedFunc) (gpointer data);
+
+typedef struct
+{
+ /* This list contains GtkBookmark structs */
+ GSList *bookmarks;
+
+ GFileMonitor *bookmarks_monitor;
+
+ gpointer changed_func_data;
+ GtkBookmarksChangedFunc changed_func;
+} GtkBookmarksManager;
+
+typedef struct
+{
+ GFile *file;
+ gchar *label;
+} GtkBookmark;
+
+GtkBookmarksManager *_gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func,
+ gpointer changed_func_data);
+
+
+void _gtk_bookmarks_manager_free (GtkBookmarksManager *manager);
+
+GSList *_gtk_bookmarks_manager_list_bookmarks (GtkBookmarksManager *manager);
+
+gboolean _gtk_bookmarks_manager_insert_bookmark (GtkBookmarksManager *manager,
+ GFile *file,
+ gint position,
+ GError **error);
+
+gboolean _gtk_bookmarks_manager_remove_bookmark (GtkBookmarksManager *manager,
+ GFile *file,
+ GError **error);
+
+gchar * _gtk_bookmarks_manager_get_bookmark_label (GtkBookmarksManager *manager,
+ GFile *file);
+
+void _gtk_bookmarks_manager_set_bookmark_label (GtkBookmarksManager *manager,
+ GFile *file,
+ const gchar *label);
+
+#endif /* __GTK_BOOKMARKS_MANAGER_H__ */