r345: Fixed a bug that prevented i18n from working.
[rox-filer/dt.git] / ROX-Filer / src / type.h
bloba5db468d12a2829a72079928bd0c5b7235992602
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 #ifndef _TYPE_H
9 #define _TYPE_H
11 extern MIME_type text_plain; /* Often used as a default type */
12 extern MIME_type special_directory;
13 extern MIME_type special_pipe;
14 extern MIME_type special_socket;
15 extern MIME_type special_block_dev;
16 extern MIME_type special_char_dev;
17 extern MIME_type special_unknown;
19 enum
21 /* Base types - this also determines the sort order */
22 TYPE_ERROR,
23 TYPE_UNKNOWN,
24 TYPE_DIRECTORY,
25 TYPE_PIPE,
26 TYPE_SOCKET,
27 TYPE_FILE,
28 TYPE_CHAR_DEVICE,
29 TYPE_BLOCK_DEVICE,
32 struct _MIME_type
34 char *media_type;
35 char *subtype;
36 MaskedPixmap *image; /* NULL => not loaded yet */
37 time_t image_time; /* When we loaded the image */
40 /* Prototypes */
41 void type_init();
42 char *basetype_name(DirItem *item);
44 MIME_type *type_from_path(char *path);
45 gboolean type_open(char *path, MIME_type *type);
46 MaskedPixmap *type_to_icon(MIME_type *type);
47 GdkAtom type_to_atom(MIME_type *type);
48 char *type_ask_which_action(guchar *media_type, guchar *subtype);
49 MIME_type *mime_type_from_base_type(int base_type);
50 int mode_to_base_type(int st_mode);
52 #endif /* _TYPE_H */