4
* Copyright 2009 PCMan <pcman.tw@gmail.com>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23
#ifndef __FM_NAV_HISTORY_H__
24
#define __FM_NAV_HISTORY_H__
26
#include <glib-object.h>
31
/* FIXME: Do we really need GObject for such a simple data structure? */
33
#define FM_NAV_HISTORY_TYPE (fm_nav_history_get_type())
34
#define FM_NAV_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
35
FM_NAV_HISTORY_TYPE, FmNavHistory))
36
#define FM_NAV_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
37
FM_NAV_HISTORY_TYPE, FmNavHistoryClass))
38
#define IS_FM_NAV_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\
40
#define IS_FM_NAV_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\
43
typedef struct _FmNavHistory FmNavHistory;
44
typedef struct _FmNavHistoryItem FmNavHistoryItem;
45
typedef struct _FmNavHistoryClass FmNavHistoryClass;
47
struct _FmNavHistoryItem
61
struct _FmNavHistoryClass
63
GObjectClass parent_class;
66
GType fm_nav_history_get_type (void);
67
FmNavHistory* fm_nav_history_new (void);
69
/* The returned GList belongs to FmNavHistory and shouldn't be freed. */
70
GList* fm_nav_history_list(FmNavHistory* nh);
71
const FmNavHistoryItem* fm_nav_history_get_cur(FmNavHistory* nh);
72
GList* fm_nav_history_get_cur_link(FmNavHistory* nh);
73
gboolean fm_nav_history_get_can_back(FmNavHistory* nh);
74
void fm_nav_history_back(FmNavHistory* nh, int old_scroll_pos);
75
gboolean fm_nav_history_get_can_forward(FmNavHistory* nh);
76
void fm_nav_history_forward(FmNavHistory* nh, int old_scroll_pos);
77
void fm_nav_history_chdir(FmNavHistory* nh, FmPath* path, int old_scroll_pos);
78
void fm_nav_history_jump(FmNavHistory* nh, GList* l, int old_scroll_pos);
79
void fm_nav_history_clear(FmNavHistory* nh);
80
void fm_nav_history_set_max(FmNavHistory* nh, guint num);
84
#endif /* __FM_NAV_HISTORY_H__ */