2011-09-29 14:24:57 +00:00
|
|
|
/* -*- 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
|
2015-11-19 12:11:05 +00:00
|
|
|
* published by the Free Software Foundation; either version 2.1 of the
|
2011-09-29 14:24:57 +00:00
|
|
|
* 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
|
2015-11-19 12:11:05 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2011-09-29 14:24:57 +00:00
|
|
|
*
|
2015-11-19 12:11:05 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
2014-01-12 12:56:49 +00:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2011-09-29 14:24:57 +00:00
|
|
|
*
|
|
|
|
* 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;
|
2011-09-30 14:43:59 +00:00
|
|
|
gulong bookmarks_monitor_changed_id;
|
2011-09-29 14:24:57 +00:00
|
|
|
|
|
|
|
gpointer changed_func_data;
|
|
|
|
GtkBookmarksChangedFunc changed_func;
|
2020-08-27 16:34:02 +00:00
|
|
|
|
|
|
|
GCancellable *cancellable;
|
2011-09-29 14:24:57 +00:00
|
|
|
} GtkBookmarksManager;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GFile *file;
|
2020-07-24 18:40:36 +00:00
|
|
|
char *label;
|
2011-09-29 14:24:57 +00:00
|
|
|
} 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,
|
2020-07-24 13:54:49 +00:00
|
|
|
int position,
|
2011-09-29 14:24:57 +00:00
|
|
|
GError **error);
|
|
|
|
|
|
|
|
gboolean _gtk_bookmarks_manager_remove_bookmark (GtkBookmarksManager *manager,
|
|
|
|
GFile *file,
|
|
|
|
GError **error);
|
|
|
|
|
2012-09-11 20:17:03 +00:00
|
|
|
gboolean _gtk_bookmarks_manager_reorder_bookmark (GtkBookmarksManager *manager,
|
|
|
|
GFile *file,
|
2020-07-24 13:54:49 +00:00
|
|
|
int new_position,
|
2012-09-11 20:17:03 +00:00
|
|
|
GError **error);
|
|
|
|
|
2013-01-21 22:38:34 +00:00
|
|
|
gboolean _gtk_bookmarks_manager_has_bookmark (GtkBookmarksManager *manager,
|
|
|
|
GFile *file);
|
|
|
|
|
2020-07-24 18:40:36 +00:00
|
|
|
char * _gtk_bookmarks_manager_get_bookmark_label (GtkBookmarksManager *manager,
|
2011-09-29 14:24:57 +00:00
|
|
|
GFile *file);
|
|
|
|
|
2012-09-11 20:02:01 +00:00
|
|
|
gboolean _gtk_bookmarks_manager_set_bookmark_label (GtkBookmarksManager *manager,
|
|
|
|
GFile *file,
|
2020-07-24 18:40:36 +00:00
|
|
|
const char *label,
|
2012-09-11 20:02:01 +00:00
|
|
|
GError **error);
|
2011-09-29 14:24:57 +00:00
|
|
|
|
2013-01-21 22:32:02 +00:00
|
|
|
gboolean _gtk_bookmarks_manager_get_is_builtin (GtkBookmarksManager *manager,
|
|
|
|
GFile *file);
|
|
|
|
|
|
|
|
gboolean _gtk_bookmarks_manager_get_is_xdg_dir_builtin (GUserDirectory xdg_type);
|
|
|
|
|
2011-09-29 14:24:57 +00:00
|
|
|
#endif /* __GTK_BOOKMARKS_MANAGER_H__ */
|