r4097: Removed GNOME-VFS from --version output; we never use it now (Thomas Leonard).
[rox-filer/translations.git] / ROX-Filer / src / global.h
blob4dc52a0a7078adb092f30c727ba1e8d0b8b38830
1 /*
2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
4 */
6 /* global.h is included by most of the other source files, just after
7 * including config.h and the system header files, but before any other
8 * ROX-Filer header files.
9 */
11 #include <glib.h>
13 /* We put all the global typedefs here to avoid creating dependencies
14 * between header files.
17 /* Each filer window has one of these all to itself */
18 typedef struct _FilerWindow FilerWindow;
20 /* There is one Directory object per cached disk directory inode number.
21 * Multiple FilerWindows may share a single Directory. Directories
22 * are cached, so a Directory may exist without any filer windows
23 * referencing it at all.
25 typedef struct _Directory Directory;
27 /* Each item in a directory has a DirItem. This contains information from
28 * stat()ing the file, plus a few other bits. There may be several of these
29 * for a single file, if it appears (hard-linked) in several directories.
30 * Each pinboard and panel icon also has one of these (not shared).
32 typedef struct _DirItem DirItem;
34 /* Widgets which can display directories implement the View interface.
35 * This should be used in preference to the old collection interface because
36 * it isn't specific to a particular type of display.
38 typedef struct _ViewIface ViewIface;
40 /* A ViewIter specifies a single item in a View, rather like an index.
41 * They can be used to iterate over all the items in a View, and remain
42 * valid until the View is changed. If allocated on the stack, they do not need
43 * to be freed.
45 typedef struct _ViewIter ViewIter;
47 /* This contains the pixbufs for an image, in various sizes.
48 * Despite the name, it now contains neither pixmaps nor masks!
50 typedef struct _MaskedPixmap MaskedPixmap;
52 /* Each MIME type (eg 'text/plain') has one of these. It contains
53 * a link to the image and the type's name (used so that the image can
54 * be refreshed, among other things).
56 typedef struct _MIME_type MIME_type;
58 /* Icon is an abstract base class for pinboard and panel icons.
59 * It contains the name and path of the icon, as well as its DirItem.
61 typedef struct _Icon Icon;
63 /* There will be one of these if the pinboard is in use. It contains
64 * the name of the pinboard and links to the pinned Icons inside.
66 typedef struct _Pinboard Pinboard;
68 /* There is one of these for each panel window open. Panels work rather
69 * like little pinboards, but with a more rigid layout.
71 typedef struct _Panel Panel;
73 /* Each option has a static Option structure. This is initialised by
74 * calling option_add_int() or similar. See options.c for details.
75 * This structure is read-only.
77 typedef struct _Option Option;
79 /* A filesystem cache provides a quick and easy way to load files.
80 * When a cache is created, functions to load and update files are
81 * registered to it. Requesting an object from the cache will load
82 * or update it as needed, or return the cached copy if the current
83 * version of the file is already cached.
84 * Caches are used to access directories, images and XML files.
86 typedef struct _GFSCache GFSCache;
88 /* Each cached XML file is represented by one of these */
89 typedef struct _XMLwrapper XMLwrapper;
91 /* This holds a pre-parsed version of a filename, which can be quickly
92 * compared with another CollateKey for intelligent sorting.
94 typedef struct _CollateKey CollateKey;
96 /* Like a regular GtkLabel, except that the text can be wrapped to any
97 * width. Used for pinboard icons.
99 typedef struct _WrappedLabel WrappedLabel;
101 /* A filename where " " has been replaced by "%20", etc.
102 * This is really just a string, but we try to catch type errors.
104 typedef struct _EscapedPath EscapedPath;
106 /* The minibuffer is a text field which appears at the bottom of
107 * a filer window. It has various modes of operation:
109 typedef enum {
110 MINI_NONE,
111 MINI_PATH,
112 MINI_SHELL,
113 MINI_SELECT_IF,
114 MINI_FILTER,
115 MINI_SELECT_BY_NAME,
116 } MiniType;
118 /* The next three correspond to the styles on the Display submenu: */
120 typedef enum { /* Values used in options, must start at 0 */
121 LARGE_ICONS = 0,
122 SMALL_ICONS = 1,
123 HUGE_ICONS = 2,
124 AUTO_SIZE_ICONS = 3,
125 UNKNOWN_STYLE
126 } DisplayStyle;
128 typedef enum { /* Values used in options, must start at 0 */
129 DETAILS_NONE = 0,
130 DETAILS_SIZE = 2,
131 DETAILS_PERMISSIONS = 3,
132 DETAILS_TYPE = 4,
133 DETAILS_TIMES = 5,
134 DETAILS_UNKNOWN = -1,
135 } DetailsType;
137 typedef enum { /* Values used in options */
138 SORT_NAME = 0,
139 SORT_TYPE = 1,
140 SORT_DATE = 2,
141 SORT_SIZE = 3,
142 SORT_OWNER = 4,
143 SORT_GROUP = 5
144 } SortType;
146 /* Each DirItem has a base type with indicates what kind of object it is.
147 * If the base_type is TYPE_FILE, then the MIME type field gives the exact
148 * type.
150 enum
152 /* Base types - this also determines the sort order */
153 TYPE_ERROR,
154 TYPE_UNKNOWN, /* Not scanned yet */
155 TYPE_DIRECTORY,
156 TYPE_PIPE,
157 TYPE_SOCKET,
158 TYPE_FILE,
159 TYPE_CHAR_DEVICE,
160 TYPE_BLOCK_DEVICE,
161 TYPE_DOOR,
163 /* These are purely for colour allocation */
164 TYPE_EXEC,
165 TYPE_APPDIR,
168 /* The namespaces for the SOAP messages */
169 #define SOAP_ENV_NS_OLD "http://www.w3.org/2001/06/soap-envelope"
170 #define SOAP_ENV_NS "http://www.w3.org/2001/12/soap-envelope"
171 #define SOAP_RPC_NS "http://www.w3.org/2001/12/soap-rpc"
172 #define ROX_NS "http://rox.sourceforge.net/SOAP/ROX-Filer"
174 /* Namespace for configuration */
175 #define SITE "rox.sourceforge.net"
177 /* Stock icons */
178 #define ROX_STOCK_SHOW_DETAILS "rox-show-details"
179 #define ROX_STOCK_SHOW_HIDDEN "rox-show-hidden"
180 #define ROX_STOCK_SELECT "rox-select"
181 #define ROX_STOCK_MOUNT "rox-mount"
182 #define ROX_STOCK_MOUNTED "rox-mounted"
183 #define ROX_STOCK_BOOKMARKS GTK_STOCK_JUMP_TO
185 #include <libxml/tree.h>