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