1 | /* gtkplacessidebarprivate.h |
2 | * |
3 | * Copyright (C) 2015 Red Hat |
4 | * |
5 | * This file is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU Lesser General Public License as |
7 | * published by the Free Software Foundation; either version 2.1 of the |
8 | * License, or (at your option) any later version. |
9 | * |
10 | * This file is distributed in the hope that it will be useful, but |
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Lesser General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General Public License |
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * |
18 | * Authors: Carlos Soriano <csoriano@gnome.org> |
19 | */ |
20 | |
21 | #ifndef __GTK_PLACES_SIDEBAR_PRIVATE_H__ |
22 | #define |
23 | |
24 | #include <glib.h> |
25 | #include <gtk/gtkwidget.h> |
26 | #include <gtk/gtkenums.h> |
27 | |
28 | G_BEGIN_DECLS |
29 | |
30 | #define (gtk_places_sidebar_get_type ()) |
31 | #define (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PLACES_SIDEBAR, GtkPlacesSidebar)) |
32 | #define (klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PLACES_SIDEBAR, GtkPlacesSidebarClass)) |
33 | #define (obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PLACES_SIDEBAR)) |
34 | #define (klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PLACES_SIDEBAR)) |
35 | #define (obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PLACES_SIDEBAR, GtkPlacesSidebarClass)) |
36 | |
37 | typedef struct ; |
38 | typedef struct ; |
39 | |
40 | /* |
41 | * GtkPlacesOpenFlags: |
42 | * @GTK_PLACES_OPEN_NORMAL: This is the default mode that GtkPlacesSidebar uses if no other flags |
43 | * are specified. It indicates that the calling application should open the selected location |
44 | * in the normal way, for example, in the folder view beside the sidebar. |
45 | * @GTK_PLACES_OPEN_NEW_TAB: When passed to gtk_places_sidebar_set_open_flags(), this indicates |
46 | * that the application can open folders selected from the sidebar in new tabs. This value |
47 | * will be passed to the GtkPlacesSidebar::open-location signal when the user selects |
48 | * that a location be opened in a new tab instead of in the standard fashion. |
49 | * @GTK_PLACES_OPEN_NEW_WINDOW: Similar to @GTK_PLACES_OPEN_NEW_TAB, but indicates that the application |
50 | * can open folders in new windows. |
51 | * |
52 | * These flags serve two purposes. First, the application can call gtk_places_sidebar_set_open_flags() |
53 | * using these flags as a bitmask. This tells the sidebar that the application is able to open |
54 | * folders selected from the sidebar in various ways, for example, in new tabs or in new windows in |
55 | * addition to the normal mode. |
56 | * |
57 | * Second, when one of these values gets passed back to the application in the |
58 | * GtkPlacesSidebar::open-location signal, it means that the application should |
59 | * open the selected location in the normal way, in a new tab, or in a new |
60 | * window. The sidebar takes care of determining the desired way to open the location, |
61 | * based on the modifier keys that the user is pressing at the time the selection is made. |
62 | * |
63 | * If the application never calls gtk_places_sidebar_set_open_flags(), then the sidebar will only |
64 | * use GTK_PLACES_OPEN_NORMAL in the GtkPlacesSidebar::open-location signal. This is the |
65 | * default mode of operation. |
66 | */ |
67 | typedef enum { |
68 | GTK_PLACES_OPEN_NORMAL = 1 << 0, |
69 | GTK_PLACES_OPEN_NEW_TAB = 1 << 1, |
70 | GTK_PLACES_OPEN_NEW_WINDOW = 1 << 2 |
71 | } GtkPlacesOpenFlags; |
72 | |
73 | GType (void) G_GNUC_CONST; |
74 | GtkWidget * (void); |
75 | |
76 | GtkPlacesOpenFlags (GtkPlacesSidebar *); |
77 | void (GtkPlacesSidebar *, |
78 | GtkPlacesOpenFlags flags); |
79 | |
80 | GFile * (GtkPlacesSidebar *); |
81 | void (GtkPlacesSidebar *, |
82 | GFile *location); |
83 | |
84 | gboolean (GtkPlacesSidebar *); |
85 | void (GtkPlacesSidebar *, |
86 | gboolean show_recent); |
87 | |
88 | gboolean (GtkPlacesSidebar *); |
89 | void (GtkPlacesSidebar *, |
90 | gboolean show_desktop); |
91 | |
92 | gboolean (GtkPlacesSidebar *); |
93 | void (GtkPlacesSidebar *, |
94 | gboolean show_enter_location); |
95 | |
96 | void (GtkPlacesSidebar *, |
97 | GFile *location); |
98 | void (GtkPlacesSidebar *, |
99 | GFile *location); |
100 | GListModel * (GtkPlacesSidebar *); |
101 | |
102 | GFile * (GtkPlacesSidebar *, |
103 | int n); |
104 | void (GtkPlacesSidebar *, |
105 | gboolean visible); |
106 | gboolean (GtkPlacesSidebar *); |
107 | void (GtkPlacesSidebar *, |
108 | gboolean show_trash); |
109 | |
110 | void (GtkPlacesSidebar *, |
111 | gboolean show_other_locations); |
112 | gboolean (GtkPlacesSidebar *); |
113 | |
114 | void (GtkPlacesSidebar *, |
115 | gboolean show_starred_location); |
116 | gboolean (GtkPlacesSidebar *); |
117 | |
118 | /* Keep order, since it's used for the sort functions */ |
119 | typedef enum { |
120 | GTK_PLACES_SECTION_INVALID, |
121 | GTK_PLACES_SECTION_COMPUTER, |
122 | GTK_PLACES_SECTION_MOUNTS, |
123 | GTK_PLACES_SECTION_CLOUD, |
124 | GTK_PLACES_SECTION_BOOKMARKS, |
125 | GTK_PLACES_SECTION_OTHER_LOCATIONS, |
126 | GTK_PLACES_N_SECTIONS |
127 | } GtkPlacesSectionType; |
128 | |
129 | typedef enum { |
130 | GTK_PLACES_INVALID, |
131 | GTK_PLACES_BUILT_IN, |
132 | GTK_PLACES_XDG_DIR, |
133 | GTK_PLACES_MOUNTED_VOLUME, |
134 | GTK_PLACES_BOOKMARK, |
135 | GTK_PLACES_HEADING, |
136 | GTK_PLACES_CONNECT_TO_SERVER, |
137 | GTK_PLACES_ENTER_LOCATION, |
138 | GTK_PLACES_DROP_FEEDBACK, |
139 | GTK_PLACES_BOOKMARK_PLACEHOLDER, |
140 | GTK_PLACES_OTHER_LOCATIONS, |
141 | GTK_PLACES_STARRED_LOCATION, |
142 | GTK_PLACES_N_PLACES |
143 | } GtkPlacesPlaceType; |
144 | |
145 | char * (GtkPlacesSidebar *); |
146 | |
147 | G_END_DECLS |
148 | |
149 | #endif /* __GTK_PLACES_SIDEBAR_PRIVATE_H__ */ |
150 | |