]> Pileus Git - ~andy/gtk/blob - gtk/gtkpathbar.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkpathbar.h
1 /* gtkpathbar.h
2  * Copyright (C) 2004  Red Hat, Inc.,  Jonathan Blandford <jrb@gnome.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #ifndef __GTK_PATH_BAR_H__
19 #define __GTK_PATH_BAR_H__
20
21 #include "gtkcontainer.h"
22 #include "gtkfilesystem.h"
23
24 G_BEGIN_DECLS
25
26 typedef struct _GtkPathBar      GtkPathBar;
27 typedef struct _GtkPathBarClass GtkPathBarClass;
28
29
30 #define GTK_TYPE_PATH_BAR                 (gtk_path_bar_get_type ())
31 #define GTK_PATH_BAR(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PATH_BAR, GtkPathBar))
32 #define GTK_PATH_BAR_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PATH_BAR, GtkPathBarClass))
33 #define GTK_IS_PATH_BAR(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PATH_BAR))
34 #define GTK_IS_PATH_BAR_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PATH_BAR))
35 #define GTK_PATH_BAR_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PATH_BAR, GtkPathBarClass))
36
37 struct _GtkPathBar
38 {
39   GtkContainer parent;
40
41   GtkFileSystem *file_system;
42   GFile *root_file;
43   GFile *home_file;
44   GFile *desktop_file;
45
46   GCancellable *get_info_cancellable;
47
48   GdkPixbuf *root_icon;
49   GdkPixbuf *home_icon;
50   GdkPixbuf *desktop_icon;
51
52   GdkWindow *event_window;
53
54   GList *button_list;
55   GList *first_scrolled_button;
56   GList *fake_root;
57   GtkWidget *up_slider_button;
58   GtkWidget *down_slider_button;
59   guint settings_signal_id;
60   gint icon_size;
61   gint16 slider_width;
62   gint16 spacing;
63   gint16 button_offset;
64   guint timer;
65   guint slider_visible : 1;
66   guint need_timer     : 1;
67   guint ignore_click   : 1;
68   guint scrolling_up   : 1;
69   guint scrolling_down : 1;
70 };
71
72 struct _GtkPathBarClass
73 {
74   GtkContainerClass parent_class;
75
76   void (* path_clicked) (GtkPathBar  *path_bar,
77                          GFile       *file,
78                          GFile       *child_file,
79                          gboolean     child_is_hidden);
80 };
81
82 GType    gtk_path_bar_get_type (void) G_GNUC_CONST;
83 void     _gtk_path_bar_set_file_system (GtkPathBar         *path_bar,
84                                         GtkFileSystem      *file_system);
85 void     _gtk_path_bar_set_file        (GtkPathBar         *path_bar,
86                                         GFile              *file,
87                                         gboolean            keep_trail);
88 void     _gtk_path_bar_up              (GtkPathBar *path_bar);
89 void     _gtk_path_bar_down            (GtkPathBar *path_bar);
90
91 G_END_DECLS
92
93 #endif /* __GTK_PATH_BAR_H__ */