r1996: Cope slightly better with invalid filenames in various places (reported by
[rox-filer.git] / ROX-Filer / src / icon.h
blob3172e9c0e2ffd377de810662e61c8d6abe2ccebc
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 #ifndef _ICON_H
9 #define _ICON_H
11 #include <glib.h>
12 #include <X11/Xlib.h>
14 extern GList *icon_selection;
15 extern GtkWidget *icon_menu; /* The popup icon menu */
17 typedef struct _IconClass IconClass;
19 typedef struct {
20 KeyCode keycode;
21 int modifier;
22 } MyKey;
24 struct _IconClass {
25 GObjectClass parent;
27 gboolean (*same_group)(Icon *icon, Icon *other);
28 void (*destroy)(Icon *icon);
29 void (*redraw)(Icon *icon);
30 void (*update)(Icon *icon);
31 void (*wink)(Icon *icon);
33 /* Acts on selected items */
34 void (*remove_items)(void);
37 struct _Icon {
38 GObject object;
40 gboolean selected;
41 guchar *src_path; /* Eg: ~/Apps */
42 guchar *path; /* Eg: /home/fred/Apps */
43 DirItem *item;
44 gchar *shortcut; /* Eg: Control + x */
45 MyKey shortcut_key; /* Parsed version of shortcut */
47 GtkWidget *dialog; /* Current rename box, if any */
50 GType icon_get_type(void);
51 gboolean icons_require(const gchar *path);
52 void icon_may_update(Icon *icon);
53 void icons_may_update(const gchar *path);
54 void icon_prepare_menu(Icon *icon, gboolean pinboard);
55 void icon_set_selected(Icon *icon, gboolean selected);
56 void icon_select_only(Icon *select);
57 void icon_set_path(Icon *icon, const char *pathname, const char *name);
58 gchar *icon_create_uri_list(void);
59 void icon_destroy(Icon *icon);
60 void icon_set_shortcut(Icon *icon, const gchar *shortcut);
62 #endif /* _ICON_H */