r3423: Added Xinerama support (Tony Houghton).
[rox-filer.git] / ROX-Filer / src / gui_support.h
blobadfd13b1af7f57f357a731fa663331106d9d9fce
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;
31 typedef void (*HelpFunc)(gpointer data);
32 typedef const char *ParseFunc(gchar *line);
34 void gui_store_screen_geometry(GdkScreen *screen);
36 void gui_support_init(void);
37 int get_choice(const char *title,
38 const char *message,
39 int number_of_buttons, ...);
40 void report_error(const char *message, ...);
41 void info_message(const char *message, ...);
42 void set_cardinal_property(GdkWindow *window, GdkAtom prop, guint32 value);
43 void make_panel_window(GtkWidget *widget);
44 void delayed_error(const char *error, ...);
45 gboolean load_file(const char *pathname, char **data_out, long *length_out);
46 GtkWidget *new_help_button(HelpFunc show_help, gpointer data);
47 void parse_file(const char *path, ParseFunc *parse_line);
48 gboolean get_pointer_xy(int *x, int *y);
49 void centre_window(GdkWindow *window, int x, int y);
50 void wink_widget(GtkWidget *widget);
51 void destroy_on_idle(GtkWidget *widget);
52 gint rox_spawn(const gchar *dir, const gchar **argv);
53 GtkWidget *button_new_mixed(const char *stock, const char *message);
54 GtkWidget *button_new_image_text(GtkWidget *image, const char *message);
55 void entry_set_error(GtkWidget *entry, gboolean error);
56 void window_put_just_above(GdkWindow *higher, GdkWindow *lower);
57 void fixed_move_fast(GtkFixed *fixed, GtkWidget *widget, int x, int y);
58 void tooltip_show(guchar *text);
59 void tooltip_prime(GtkFunction callback, GObject *object);
60 void widget_modify_font(GtkWidget *widget, PangoFontDescription *font_desc);
61 gboolean confirm(const gchar *message, const gchar *stock, const gchar *action);
63 Radios *radios_new(void (*changed)(gpointer data), gpointer data);
64 void radios_add(Radios *radios, const gchar *tip, gint value,
65 const gchar *label, ...);
66 void radios_pack(Radios *radios, GtkBox *box);
67 void radios_set_value(Radios *radios, gint value);
68 gint radios_get_value(Radios *radios);
69 GList *uri_list_to_glist(const char *uri_list);
70 GtkWidget *simple_image_new(GdkPixbuf *pixbuf);
71 void render_pixbuf(GdkPixbuf *pixbuf, GdkDrawable *target, GdkGC *gc,
72 int x, int y, int width, int height);
74 #endif /* _GUI_SUPPORT_H */