r280: All objects now have MIME types. This allows you to specify the action for
[rox-filer/ma.git] / ROX-Filer / src / type.h
blobaf880f8d1f920d9c848d79e7abaaed40b674867a
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@ecs.soton.ac.uk>.
6 */
8 #ifndef _TYPE_H
9 #define _TYPE_H
11 typedef struct _MIME_type MIME_type;
12 extern MIME_type text_plain; /* Often used as a default type */
14 #include "pixmaps.h"
15 #include "filer.h"
17 struct _MIME_type
19 char *media_type;
20 char *subtype;
21 MaskedPixmap *image; /* NULL => not loaded yet */
22 time_t image_time; /* When we loaded the image */
25 /* Prototypes */
26 void type_init();
27 char *basetype_name(DirItem *item);
29 MIME_type *type_from_path(char *path);
30 gboolean type_open(char *path, MIME_type *type);
31 MaskedPixmap *type_to_icon(MIME_type *type);
32 GdkAtom type_to_atom(MIME_type *type);
33 char *type_ask_which_action(guchar *media_type, guchar *subtype);
34 MIME_type *mime_type_from_base_type(int base_type);
36 #endif /* _TYPE_H */