Don't allow SetIcon/UnsetIcon SOAP calls to (un)set icons set by the user.
[rox-filer/dt.git] / ROX-Filer / src / gui_support.h
bloba6f45de0d6eee4c9ef2699d20f04af4806f6c6bc
1 /*
2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
4 */
6 #ifndef _GUI_SUPPORT_H
7 #define _GUI_SUPPORT_H
9 #include <gtk/gtk.h>
11 #define WIN_STATE_STICKY (1<<0) /* Fixed relative to screen */
12 #define WIN_STATE_HIDDEN (1<<4) /* Not on taskbar but window visible */
13 #define WIN_STATE_FIXED_POSITION (1<<8) /* Window is fixed in position even */
14 #define WIN_STATE_ARRANGE_IGNORE (1<<9) /* Ignore for auto arranging */
16 #define WIN_HINTS_SKIP_FOCUS (1<<0) /* Do not focus */
17 #define WIN_HINTS_SKIP_WINLIST (1<<1) /* Not in win list */
18 #define WIN_HINTS_SKIP_TASKBAR (1<<2) /* Not on taskbar */
20 typedef struct _Radios Radios;
22 extern GdkFont *fixed_font;
23 extern gint screen_width, screen_height;
25 /* For Xinerama */
26 extern gint n_monitors;
27 extern GdkRectangle *monitor_geom;
28 /* Smallest monitor - use for sizing windows */
29 extern gint monitor_width, monitor_height;
30 typedef struct {
31 gboolean left, right, top, bottom;
32 } MonitorAdjacent;
33 extern MonitorAdjacent *monitor_adjacent;
35 typedef void (*HelpFunc)(gpointer data);
36 typedef const char *ParseFunc(gchar *line);
38 void gui_store_screen_geometry(GdkScreen *screen);
40 void gui_support_init(void);
41 int get_choice(const char *title,
42 const char *message,
43 int number_of_buttons, ...);
44 void report_error(const char *message, ...);
45 void info_message(const char *message, ...);
46 void set_cardinal_property(GdkWindow *window, GdkAtom prop, gulong value);
47 void make_panel_window(GtkWidget *widget);
48 void delayed_error(const char *error, ...);
49 gboolean load_file(const char *pathname, char **data_out, long *length_out);
50 GtkWidget *new_help_button(HelpFunc show_help, gpointer data);
51 void parse_file(const char *path, ParseFunc *parse_line);
52 gboolean get_pointer_xy(int *x, int *y);
53 int get_monitor_under_pointer(void);
54 void centre_window(GdkWindow *window, int x, int y);
55 void wink_widget(GtkWidget *widget);
56 void destroy_on_idle(GtkWidget *widget);
57 gint rox_spawn(const gchar *dir, const gchar **argv);
58 GtkWidget *button_new_mixed(const char *stock, const char *message);
59 GtkWidget *button_new_image_text(GtkWidget *image, const char *message);
60 void entry_set_error(GtkWidget *entry, gboolean error);
61 void window_put_just_above(GdkWindow *higher, GdkWindow *lower);
62 void fixed_move_fast(GtkFixed *fixed, GtkWidget *widget, int x, int y);
63 void tooltip_show(guchar *text);
64 void tooltip_prime(GtkFunction callback, GObject *object);
65 void widget_modify_font(GtkWidget *widget, PangoFontDescription *font_desc);
66 gboolean confirm(const gchar *message, const gchar *stock, const gchar *action);
68 Radios *radios_new(void (*changed)(Radios *, gpointer data), gpointer data);
69 void radios_add(Radios *radios, const gchar *tip, gint value,
70 const gchar *label, ...);
71 void radios_pack(Radios *radios, GtkBox *box);
72 void radios_set_value(Radios *radios, gint value);
73 gint radios_get_value(Radios *radios);
74 GList *uri_list_to_glist(const char *uri_list);
75 GtkWidget *simple_image_new(GdkPixbuf *pixbuf);
76 void render_pixbuf(GdkPixbuf *pixbuf, GdkDrawable *target, GdkGC *gc,
77 int x, int y, int width, int height);
78 /* gdk_window_set_keep_below() only exists in GTK >= 2.4 and is broken until
79 * 2.4.6 */
80 void keep_below(GdkWindow *window, gboolean setting);
81 GdkPixbuf * rox_pixbuf_new_from_file_at_scale (const char *filename,
82 int width,
83 int height,
84 gboolean preserve_aspect_ratio,
85 GError **error);
86 void make_heading(GtkWidget *label, double scale_factor);
87 void launch_uri(const char *uri);
88 void allow_right_click(GtkWidget *button);
89 gint current_event_button(void);
90 GdkPixbuf *create_spotlight_pixbuf(GdkPixbuf *src, GdkColor *color);
92 #endif /* _GUI_SUPPORT_H */