2016-02-04 03:20:42 -06:00
|
|
|
/*
|
2016-12-26 15:25:50 -06:00
|
|
|
* xed-file-browser-widget.h - Xed plugin providing easy file access
|
2016-02-04 03:20:42 -06:00
|
|
|
* from the sidepanel
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 - Jesse van den Kieboom <jesse@icecrew.nl>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __XED_FILE_BROWSER_WIDGET_H__
|
|
|
|
#define __XED_FILE_BROWSER_WIDGET_H__
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include "xed-file-browser-store.h"
|
|
|
|
#include "xed-file-bookmarks-store.h"
|
|
|
|
#include "xed-file-browser-view.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2016-12-26 15:25:50 -06:00
|
|
|
#define XED_TYPE_FILE_BROWSER_WIDGET (xed_file_browser_widget_get_type ())
|
|
|
|
#define XED_FILE_BROWSER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_FILE_BROWSER_WIDGET, XedFileBrowserWidget))
|
|
|
|
#define XED_FILE_BROWSER_WIDGET_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_FILE_BROWSER_WIDGET, XedFileBrowserWidget const))
|
|
|
|
#define XED_FILE_BROWSER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XED_TYPE_FILE_BROWSER_WIDGET, XedFileBrowserWidgetClass))
|
|
|
|
#define XED_IS_FILE_BROWSER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XED_TYPE_FILE_BROWSER_WIDGET))
|
|
|
|
#define XED_IS_FILE_BROWSER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XED_TYPE_FILE_BROWSER_WIDGET))
|
|
|
|
#define XED_FILE_BROWSER_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XED_TYPE_FILE_BROWSER_WIDGET, XedFileBrowserWidgetClass))
|
2016-02-04 03:20:42 -06:00
|
|
|
|
|
|
|
typedef struct _XedFileBrowserWidget XedFileBrowserWidget;
|
|
|
|
typedef struct _XedFileBrowserWidgetClass XedFileBrowserWidgetClass;
|
|
|
|
typedef struct _XedFileBrowserWidgetPrivate XedFileBrowserWidgetPrivate;
|
|
|
|
|
|
|
|
typedef
|
|
|
|
gboolean (*XedFileBrowserWidgetFilterFunc) (XedFileBrowserWidget * obj,
|
2016-12-26 15:25:50 -06:00
|
|
|
XedFileBrowserStore *
|
|
|
|
model, GtkTreeIter * iter,
|
|
|
|
gpointer user_data);
|
2016-02-04 03:20:42 -06:00
|
|
|
|
2016-12-26 15:25:50 -06:00
|
|
|
struct _XedFileBrowserWidget
|
2016-02-04 03:20:42 -06:00
|
|
|
{
|
2016-12-26 15:25:50 -06:00
|
|
|
GtkBox parent;
|
2016-02-04 03:20:42 -06:00
|
|
|
|
2016-12-26 15:25:50 -06:00
|
|
|
XedFileBrowserWidgetPrivate *priv;
|
2016-02-04 03:20:42 -06:00
|
|
|
};
|
|
|
|
|
2016-12-26 15:25:50 -06:00
|
|
|
struct _XedFileBrowserWidgetClass
|
2016-02-04 03:20:42 -06:00
|
|
|
{
|
2016-12-26 15:25:50 -06:00
|
|
|
GtkBoxClass parent_class;
|
|
|
|
|
|
|
|
/* Signals */
|
2017-01-14 13:48:19 -06:00
|
|
|
void (*location_activated) (XedFileBrowserWidget * widget,
|
|
|
|
GFile *location);
|
2016-12-26 15:25:50 -06:00
|
|
|
void (*error) (XedFileBrowserWidget * widget,
|
|
|
|
guint code,
|
|
|
|
gchar const *message);
|
|
|
|
gboolean (*confirm_delete) (XedFileBrowserWidget * widget,
|
|
|
|
XedFileBrowserStore * model,
|
|
|
|
GList *list);
|
|
|
|
gboolean (*confirm_no_trash) (XedFileBrowserWidget * widget,
|
|
|
|
GList *list);
|
2016-02-04 03:20:42 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
GType xed_file_browser_widget_get_type (void) G_GNUC_CONST;
|
2017-01-09 13:57:48 -06:00
|
|
|
void _xed_file_browser_widget_register_type (GTypeModule *type_module);
|
2016-02-04 03:20:42 -06:00
|
|
|
|
|
|
|
GtkWidget *xed_file_browser_widget_new (const gchar *data_dir);
|
|
|
|
|
|
|
|
void xed_file_browser_widget_show_bookmarks (XedFileBrowserWidget * obj);
|
|
|
|
void xed_file_browser_widget_show_files (XedFileBrowserWidget * obj);
|
|
|
|
|
|
|
|
void xed_file_browser_widget_set_root (XedFileBrowserWidget * obj,
|
2017-01-14 13:48:19 -06:00
|
|
|
GFile *root,
|
2016-02-04 03:20:42 -06:00
|
|
|
gboolean virtual_root);
|
|
|
|
void
|
|
|
|
xed_file_browser_widget_set_root_and_virtual_root (XedFileBrowserWidget * obj,
|
2017-01-14 13:48:19 -06:00
|
|
|
GFile *root,
|
|
|
|
GFile *virtual_root);
|
2016-02-04 03:20:42 -06:00
|
|
|
|
|
|
|
gboolean
|
2016-12-26 15:25:50 -06:00
|
|
|
xed_file_browser_widget_get_selected_directory (XedFileBrowserWidget * obj,
|
2016-02-04 03:20:42 -06:00
|
|
|
GtkTreeIter * iter);
|
|
|
|
|
2016-12-26 15:25:50 -06:00
|
|
|
XedFileBrowserStore *
|
2016-02-04 03:20:42 -06:00
|
|
|
xed_file_browser_widget_get_browser_store (XedFileBrowserWidget * obj);
|
2016-12-26 15:25:50 -06:00
|
|
|
XedFileBookmarksStore *
|
2016-02-04 03:20:42 -06:00
|
|
|
xed_file_browser_widget_get_bookmarks_store (XedFileBrowserWidget * obj);
|
|
|
|
XedFileBrowserView *
|
|
|
|
xed_file_browser_widget_get_browser_view (XedFileBrowserWidget * obj);
|
|
|
|
GtkWidget *
|
|
|
|
xed_file_browser_widget_get_filter_entry (XedFileBrowserWidget * obj);
|
|
|
|
|
2016-12-26 15:25:50 -06:00
|
|
|
GtkUIManager *
|
2016-02-04 03:20:42 -06:00
|
|
|
xed_file_browser_widget_get_ui_manager (XedFileBrowserWidget * obj);
|
|
|
|
|
|
|
|
gulong xed_file_browser_widget_add_filter (XedFileBrowserWidget * obj,
|
2016-12-26 15:25:50 -06:00
|
|
|
XedFileBrowserWidgetFilterFunc func,
|
2016-02-04 03:20:42 -06:00
|
|
|
gpointer user_data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
void xed_file_browser_widget_remove_filter (XedFileBrowserWidget * obj,
|
|
|
|
gulong id);
|
|
|
|
void xed_file_browser_widget_set_filter_pattern (XedFileBrowserWidget * obj,
|
|
|
|
gchar const *pattern);
|
|
|
|
|
2016-12-26 15:25:50 -06:00
|
|
|
void xed_file_browser_widget_refresh (XedFileBrowserWidget * obj);
|
|
|
|
void xed_file_browser_widget_history_back (XedFileBrowserWidget * obj);
|
|
|
|
void xed_file_browser_widget_history_forward (XedFileBrowserWidget * obj);
|
2016-02-04 03:20:42 -06:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __XED_FILE_BROWSER_WIDGET_H__ */
|
|
|
|
|
|
|
|
// ex:ts=8:noet:
|