2 * (SLIK) SimpLIstic sKin functions
4 * Copyright (C) 2008 - 2012 The Geeqie Team
8 * This software is released under the GNU General Public License (GNU GPL).
9 * Please read the included file COPYING for more information.
10 * This software comes with no warranty of any kind, use at your own risk!
19 #include <sys/types.h>
23 /* these values are per GNOME HIG */
25 /* HIG 2.0 chapter 8 defines: */
27 /* space between elements within control (ex: icon and it's text) */
28 #define PREF_PAD_GAP 6
29 /* space between label and control(s) */
30 #define PREF_PAD_SPACE 12
31 /* space between window border and controls */
32 #define PREF_PAD_BORDER 12
33 /* indent for group members */
34 #define PREF_PAD_INDENT 12
35 /* vertical space between groups */
36 #define PREF_PAD_GROUP 18
38 /* HIG 2.0 chapter 3.13 defines: */
40 /* gap between buttons in a dialog */
41 #define PREF_PAD_BUTTON_GAP 6
42 /* space between buttons in a dialog and it's contents */
43 #define PREF_PAD_BUTTON_SPACE 24
45 /* and these are not in the GNOME HIG */
47 /* gap between similar toolbar items (buttons) */
48 #define PREF_PAD_TOOLBAR_GAP 0
50 /* HIG 2.0 states 6 pixels between icons and text,
51 * but GTK's stock buttons ignore this (hard coded to 2), we do it too for consistency
53 #define PREF_PAD_BUTTON_ICON_GAP 2
56 GtkWidget *pref_box_new(GtkWidget *parent_box, gboolean fill,
57 GtkOrientation orientation, gboolean padding);
59 GtkWidget *pref_group_new(GtkWidget *parent_box, gboolean fill,
60 const gchar *text, GtkOrientation orientation);
61 GtkWidget *pref_group_parent(GtkWidget *child);
63 GtkWidget *pref_frame_new(GtkWidget *parent_box, gboolean fill,
65 GtkOrientation orientation, gboolean padding);
67 GtkWidget *pref_spacer(GtkWidget *parent_box, gboolean padding);
68 GtkWidget *pref_line(GtkWidget *parent_box, gboolean padding);
70 GtkWidget *pref_label_new(GtkWidget *parent_box, const gchar *text);
71 GtkWidget *pref_label_new_mnemonic(GtkWidget *parent_box, const gchar *text, GtkWidget *widget);
72 void pref_label_bold(GtkWidget *label, gboolean bold, gboolean increase_size);
74 GtkWidget *pref_button_new(GtkWidget *parent_box, const gchar *stock_id,
75 const gchar *text, gboolean hide_stock_text,
76 GCallback func, gpointer data);
78 GtkWidget *pref_checkbox_new(GtkWidget *parent_box, const gchar *text, gboolean active,
79 GCallback func, gpointer data);
80 GtkWidget *pref_checkbox_new_mnemonic(GtkWidget *parent_box, const gchar *text, gboolean active,
81 GCallback func, gpointer data);
83 GtkWidget *pref_checkbox_new_int(GtkWidget *parent_box, const gchar *text, gboolean active,
86 void pref_checkbox_link_sensitivity(GtkWidget *button, GtkWidget *widget);
87 void pref_checkbox_link_sensitivity_swap(GtkWidget *button, GtkWidget *widget);
89 GtkWidget *pref_radiobutton_new(GtkWidget *parent_box, GtkWidget *sibling,
90 const gchar *text, gboolean active,
91 GCallback func, gpointer data);
92 GtkWidget *pref_radiobutton_new_mnemonic(GtkWidget *parent_box, GtkWidget *sibling,
93 const gchar *text, gboolean active,
94 GCallback func, gpointer data);
96 GtkWidget *pref_radiobutton_new_int(GtkWidget *parent_box, GtkWidget *sibling,
97 const gchar *text, gboolean active,
98 gboolean *result, gboolean value,
99 GCallback func, gpointer data);
101 GtkWidget *pref_spin_new(GtkWidget *parent_box, const gchar *text, const gchar *suffix,
102 gdouble min, gdouble max, gdouble step, gint digits,
104 GCallback func, gpointer data);
105 GtkWidget *pref_spin_new_mnemonic(GtkWidget *parent_box, const gchar *text, const gchar *suffix,
106 gdouble min, gdouble max, gdouble step, gint digits,
108 GCallback func, gpointer data);
110 GtkWidget *pref_spin_new_int(GtkWidget *parent_box, const gchar *text, const gchar *suffix,
111 gint min, gint max, gint step,
112 gint value, gint *value_var);
114 void pref_link_sensitivity(GtkWidget *widget, GtkWidget *watch);
116 void pref_signal_block_data(GtkWidget *widget, gpointer data);
117 void pref_signal_unblock_data(GtkWidget *widget, gpointer data);
120 GtkWidget *pref_table_new(GtkWidget *parent_box, gint columns, gint rows,
121 gboolean homegeneous, gboolean fill);
123 GtkWidget *pref_table_box(GtkWidget *table, gint column, gint row,
124 GtkOrientation orientation, const gchar *text);
126 GtkWidget *pref_table_label(GtkWidget *table, gint column, gint row,
127 const gchar *text, gfloat alignment);
129 GtkWidget *pref_table_button(GtkWidget *table, gint column, gint row,
130 const gchar *stock_id, const gchar *text, gboolean hide_stock_text,
131 GCallback func, gpointer data);
133 GtkWidget *pref_table_spin(GtkWidget *table, gint column, gint row,
134 const gchar *text, const gchar *suffix,
135 gdouble min, gdouble max, gdouble step, gint digits,
137 GCallback func, gpointer data);
139 GtkWidget *pref_table_spin_new_int(GtkWidget *table, gint column, gint row,
140 const gchar *text, const gchar *suffix,
141 gint min, gint max, gint step,
142 gint value, gint *value_var);
145 GtkWidget *pref_toolbar_new(GtkWidget *parent_box, GtkToolbarStyle style);
146 GtkWidget *pref_toolbar_button(GtkWidget *toolbar,
147 const gchar *stock_id, const gchar *label, gboolean toggle,
148 const gchar *description,
149 GCallback func, gpointer data);
150 void pref_toolbar_button_set_icon(GtkWidget *button, GtkWidget *widget, const gchar *stock_id);
151 GtkWidget *pref_toolbar_spacer(GtkWidget *toolbar);
154 GtkWidget *date_selection_new(void);
156 void date_selection_set(GtkWidget *widget, gint day, gint month, gint year);
157 void date_selection_get(GtkWidget *widget, gint *day, gint *month, gint *year);
159 void date_selection_time_set(GtkWidget *widget, time_t t);
160 time_t date_selection_time_get(GtkWidget *widget);
164 SIZER_POS_LEFT = 1 << 0,
165 SIZER_POS_RIGHT = 1 << 1,
166 SIZER_POS_TOP = 1 << 2,
167 SIZER_POS_BOTTOM = 1 << 3
170 GtkWidget *sizer_new(GtkWidget *parent, GtkWidget *bounding_widget,
171 SizerPositionType position);
173 void sizer_set_limits(GtkWidget *sizer,
174 gint hsize_min, gint hsize_max,
175 gint vsize_min, gint vsize_max);
178 void pref_list_int_set(const gchar *group, const gchar *key, gint value);
179 gboolean pref_list_int_get(const gchar *group, const gchar *key, gint *result);
181 void pref_list_double_set(const gchar *group, const gchar *key, gdouble value);
182 gboolean pref_list_double_get(const gchar *group, const gchar *key, gdouble *result);
184 void pref_list_string_set(const gchar *group, const gchar *key, const gchar *value);
185 gboolean pref_list_string_get(const gchar *group, const gchar *key, const gchar **result);
188 void pref_color_button_set_cb(GtkWidget *widget, gpointer data);
189 GtkWidget *pref_color_button_new(GtkWidget *parent_box,
190 const gchar *title, const GdkColor *color,
191 GCallback func, gpointer data);
193 gchar *text_widget_text_pull(GtkWidget *text_widget);
196 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */