r898: Applied Bernard Jungen's latest patch:
[rox-filer.git] / ROX-Filer / src / icon.h
blob1dc8987427a5dc99df65030f8dc593dd65a6a829
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>
13 #ifdef GTK2
14 # include <pango/pango.h>
15 #endif
17 #include "dir.h"
18 #include "diritem.h"
20 extern GList *icon_selection;
21 extern gboolean tmp_icon_selected;
23 struct _Icon {
24 Panel *panel; /* NULL => Pinboard icon */
25 GtkWidget *widget; /* The drawing area for the icon */
26 gboolean selected;
27 guchar *src_path; /* Eg: ~/Apps */
28 guchar *path; /* Eg: /home/fred/Apps */
29 DirItem item;
31 /* Only used on the pinboard... */
32 GtkWidget *win;
33 GdkBitmap *mask;
34 int x, y;
35 int width, height;
36 #ifdef GTK2
37 PangoLayout *layout; /* The label */
38 #endif
40 /* Only used on the panel... */
41 GtkWidget *label;
42 GtkWidget *socket; /* For applets */
45 void icon_init(void);
46 guchar *icon_convert_path(guchar *path);
47 void icon_hash_path(Icon *icon);
48 void icon_unhash_path(Icon *icon);
49 gboolean icons_require(guchar *path);
50 void icon_may_update(Icon *icon);
51 void icons_may_update(guchar *path);
52 void update_all_icons(void);
53 void icon_show_menu(GdkEventButton *event, Icon *icon, Panel *panel);
54 void icon_set_selected(Icon *icon, gboolean selected);
55 void icon_select_only(Icon *select);
56 void icon_destroyed(Icon *icon);
57 void icon_set_tip(Icon *icon);
58 void icons_update_tip(void);
60 #endif /* _ICON_H */