r2228: Made 'Automatic' an icon size, rather than a separate option.
[rox-filer.git] / ROX-Filer / src / global.h
blobd88fb72bc8173cb63ef10531f06341d1a2bac5e8
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 /* global.h is included by most of the other source files, just after
9 * including config.h and the system header files, but before any other
10 * ROX-Filer header files.
13 #include <glib.h>
15 /* We put all the global typedefs here to avoid creating dependencies
16 * between header files.
19 /* Each filer window has one of these all to itself */
20 typedef struct _FilerWindow FilerWindow;
22 /* There is one Directory object per cached disk directory inode number.
23 * Multiple FilerWindows may share a single Directory. Directories
24 * are cached, so a Directory may exist without any filer windows
25 * referencing it at all.
27 typedef struct _Directory Directory;
29 /* Each item in a directory has a DirItem. The contains information from
30 * stat()ing the file, plus a few other bits. There may be several of these
31 * for a single file, if it appears (hard-linked) in several directories.
32 * Each pinboard and panel icon also has one of these (not shared).
34 typedef struct _DirItem DirItem;
36 /* Widgets which can display directories implement the View interface.
37 * This should be used in preference to the old collection interface because
38 * it isn't specific to a particular type of display.
40 typedef struct _ViewIface ViewIface;
42 /* A ViewIter specifies a single item in a View, rather like an index.
43 * They can be used to iterate over all the items in a View, and remain
44 * valid until the View is changed. If allocated on the stack, they do not need
45 * to be freed.
47 typedef struct _ViewIter ViewIter;
49 /* This contains the pixbufs for an image, in various sizes.
50 * Despite the name, it now contains neither pixmaps nor masks!
52 typedef struct _MaskedPixmap MaskedPixmap;
54 /* Each MIME type (eg 'text/plain') has one of these. It contains
55 * a link to the image and the type's name (used so that the image can
56 * be refreshed, amoung other things).
58 typedef struct _MIME_type MIME_type;
60 /* Icon is an abstract base class for pinboard and panel icons.
61 * It contains the name and path of the icon, as well as its DirItem.
63 typedef struct _Icon Icon;
65 /* There will be one of these if the pinboard is in use. It contains
66 * the name of the pinboard and links to the pinned Icons inside.
68 typedef struct _Pinboard Pinboard;
70 /* There is one of these for each panel window open. Panels work rather
71 * like little pinboards, but with a more rigid layout.
73 typedef struct _Panel Panel;
75 /* Each option has a static Option structure. This is initialised by
76 * calling option_add_int() or similar. See options.c for details.
77 * This structure is read-only.
79 typedef struct _Option Option;
81 /* A filesystem cache provides a quick and easy way to load files.
82 * When a cache is created, functions to load and update files are
83 * registered to it. Requesting an object from the cache will load
84 * or update it as needed, or return the cached copy if the current
85 * version of the file is already cached.
86 * Caches are used to access directories, images and XML files.
88 typedef struct _GFSCache GFSCache;
90 /* Each cached XML file is represented by one of these */
91 typedef struct _XMLwrapper XMLwrapper;
93 /* This holds a pre-parsed version of a filename, which can be quickly
94 * compared with another CollateKey for intelligent sorting.
96 typedef struct _CollateKey CollateKey;
98 /* The minibuffer is a text field which appears at the bottom of
99 * a filer window. It has four modes of operation:
101 typedef enum {
102 MINI_NONE,
103 MINI_PATH,
104 MINI_SHELL,
105 MINI_SELECT_IF,
106 } MiniType;
108 /* The next two correspond to the styles on the Display submenu: */
110 typedef enum { /* Values used in options, must start at 0 */
111 LARGE_ICONS = 0,
112 SMALL_ICONS = 1,
113 HUGE_ICONS = 2,
114 AUTO_SIZE_ICONS = 3,
115 UNKNOWN_STYLE
116 } DisplayStyle;
118 typedef enum { /* Values used in options, must start at 0 */
119 DETAILS_NONE = 0,
120 DETAILS_SIZE = 2,
121 DETAILS_PERMISSIONS = 3,
122 DETAILS_TYPE = 4,
123 DETAILS_TIMES = 5,
124 DETAILS_UNKNOWN = -1,
125 } DetailsType;
127 /* The namespaces for the SOAP messages */
128 #define SOAP_ENV_NS_OLD "http://www.w3.org/2001/06/soap-envelope"
129 #define SOAP_ENV_NS "http://www.w3.org/2001/12/soap-envelope"
130 #define SOAP_RPC_NS "http://www.w3.org/2001/12/soap-rpc"
131 #define ROX_NS "http://rox.sourceforge.net/SOAP/ROX-Filer"
133 /* Stock icons */
134 #define ROX_STOCK_SHOW_DETAILS "rox-show-details"
135 #define ROX_STOCK_SHOW_HIDDEN "rox-show-hidden"
136 #define ROX_STOCK_MOUNT "rox-mount"
137 #define ROX_STOCK_MOUNTED "rox-mounted"
138 #define ROX_STOCK_BOOKMARKS GTK_STOCK_JUMP_TO
140 #include <libxml/tree.h>