2006-05-13 16:09:46 -05:00
|
|
|
/*
|
2005-08-25 09:29:01 +00:00
|
|
|
* moobookmarkmgr.h
|
|
|
|
*
|
2010-12-21 20:15:45 -08:00
|
|
|
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
|
2005-08-25 09:29:01 +00:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* This file is part of medit. medit 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.1 of the License,
|
|
|
|
* or (at your option) any later version.
|
2005-08-25 09:29:01 +00:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
|
2005-08-25 09:29:01 +00:00
|
|
|
*/
|
|
|
|
|
2007-06-10 04:06:03 -05:00
|
|
|
#ifndef MOO_BOOKMARK_MGR_H
|
|
|
|
#define MOO_BOOKMARK_MGR_H
|
2005-08-25 09:29:01 +00:00
|
|
|
|
2005-10-13 14:08:18 +00:00
|
|
|
#include <gtk/gtkwidget.h>
|
|
|
|
#include <gtk/gtktreemodel.h>
|
2005-11-18 20:07:56 +00:00
|
|
|
#include <mooutils/moouixml.h>
|
2005-08-25 09:29:01 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
#define MOO_TYPE_BOOKMARK_MGR (_moo_bookmark_mgr_get_type ())
|
2005-08-25 09:29:01 +00:00
|
|
|
#define MOO_BOOKMARK_MGR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_BOOKMARK_MGR, MooBookmarkMgr))
|
|
|
|
#define MOO_BOOKMARK_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_BOOKMARK_MGR, MooBookmarkMgrClass))
|
|
|
|
#define MOO_IS_BOOKMARK_MGR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_BOOKMARK_MGR))
|
|
|
|
#define MOO_IS_BOOKMARK_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_BOOKMARK_MGR))
|
|
|
|
#define MOO_BOOKMARK_MGR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_BOOKMARK_MGR, MooBookmarkMgrClass))
|
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
#define MOO_TYPE_BOOKMARK (_moo_bookmark_get_type ())
|
2005-08-25 09:29:01 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
MOO_BOOKMARK_MGR_COLUMN_BOOKMARK = 0,
|
|
|
|
MOO_BOOKMARK_MGR_NUM_COLUMNS
|
|
|
|
} MooBookmarkMgrModelColumn;
|
|
|
|
|
|
|
|
typedef struct _MooBookmark MooBookmark;
|
|
|
|
typedef struct _MooBookmarkMgr MooBookmarkMgr;
|
|
|
|
typedef struct _MooBookmarkMgrPrivate MooBookmarkMgrPrivate;
|
|
|
|
typedef struct _MooBookmarkMgrClass MooBookmarkMgrClass;
|
|
|
|
|
|
|
|
struct _MooBookmark {
|
|
|
|
char *path;
|
|
|
|
char *display_path;
|
|
|
|
char *label;
|
|
|
|
char *icon_stock_id;
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _MooBookmarkMgr
|
|
|
|
{
|
|
|
|
GObject parent;
|
|
|
|
MooBookmarkMgrPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _MooBookmarkMgrClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
2005-11-18 20:07:56 +00:00
|
|
|
void (*changed) (MooBookmarkMgr *mgr);
|
|
|
|
|
|
|
|
void (*activate) (MooBookmarkMgr *mgr,
|
|
|
|
MooBookmark *bookmark,
|
|
|
|
GObject *user);
|
2005-08-25 09:29:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
GType _moo_bookmark_get_type (void) G_GNUC_CONST;
|
|
|
|
GType _moo_bookmark_mgr_get_type (void) G_GNUC_CONST;
|
2005-08-25 09:29:01 +00:00
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
MooBookmark *_moo_bookmark_new (const char *name,
|
2005-08-25 09:29:01 +00:00
|
|
|
const char *path,
|
|
|
|
const char *icon);
|
2006-05-13 16:09:46 -05:00
|
|
|
void _moo_bookmark_free (MooBookmark *bookmark);
|
2005-08-25 09:29:01 +00:00
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
MooBookmarkMgr *_moo_bookmark_mgr_new (void);
|
|
|
|
GtkTreeModel *_moo_bookmark_mgr_get_model (MooBookmarkMgr *mgr);
|
2005-08-25 09:29:01 +00:00
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
void _moo_bookmark_mgr_add (MooBookmarkMgr *mgr,
|
2005-08-25 09:29:01 +00:00
|
|
|
MooBookmark *bookmark);
|
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
GtkWidget *_moo_bookmark_mgr_get_editor(MooBookmarkMgr *mgr);
|
2005-08-25 09:29:01 +00:00
|
|
|
|
2006-05-13 16:09:46 -05:00
|
|
|
void _moo_bookmark_mgr_add_user (MooBookmarkMgr *mgr,
|
2005-11-18 20:07:56 +00:00
|
|
|
gpointer user, /* GObject* */
|
2006-08-15 02:12:41 -05:00
|
|
|
MooActionCollection *actions,
|
2008-09-13 14:56:47 -05:00
|
|
|
MooUiXml *xml,
|
2005-11-18 20:07:56 +00:00
|
|
|
const char *path);
|
2006-05-13 16:09:46 -05:00
|
|
|
void _moo_bookmark_mgr_remove_user(MooBookmarkMgr *mgr,
|
2005-11-18 20:07:56 +00:00
|
|
|
gpointer user); /* GObject* */
|
|
|
|
|
2005-08-25 09:29:01 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2007-06-10 04:06:03 -05:00
|
|
|
#endif /* MOO_BOOKMARK_MGR_H */
|