Mercurial > geeqie
annotate src/ui_misc.h @ 1701:2309e6150e8c
do not try to reload deleted image
deleted image is replaced by the next one from the list, keep
the old image displayed until the new one is set
author | nadvornik |
---|---|
date | Fri, 24 Jul 2009 12:56:54 +0000 |
parents | 89dedc61b1bd |
children | 956aab097ea7 |
rev | line source |
---|---|
9 | 1 /* |
2 * (SLIK) SimpLIstic sKin functions | |
3 * (C) 2004 John Ellis | |
1284 | 4 * Copyright (C) 2008 - 2009 The Geeqie Team |
9 | 5 * |
6 * Author: John Ellis | |
7 * | |
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! | |
11 */ | |
12 | |
13 | |
14 #ifndef UI_MISC_H | |
15 #define UI_MISC_H | |
16 | |
17 | |
18 #include <sys/time.h> | |
19 #include <sys/types.h> | |
20 #include <time.h> | |
21 | |
22 | |
23 /* these values are per GNOME HIG */ | |
24 | |
25 /* HIG 2.0 chapter 8 defines: */ | |
26 | |
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 | |
37 | |
38 /* HIG 2.0 chapter 3.13 defines: */ | |
39 | |
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 | |
44 | |
45 /* and these are not in the GNOME HIG */ | |
46 | |
47 /* gap between similar toolbar items (buttons) */ | |
48 #define PREF_PAD_TOOLBAR_GAP 0 | |
49 | |
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 | |
52 */ | |
53 #define PREF_PAD_BUTTON_ICON_GAP 2 | |
54 | |
55 | |
1448 | 56 GtkWidget *pref_box_new(GtkWidget *parent_box, gboolean fill, |
57 GtkOrientation orientation, gboolean padding); | |
9 | 58 |
1448 | 59 GtkWidget *pref_group_new(GtkWidget *parent_box, gboolean fill, |
9 | 60 const gchar *text, GtkOrientation orientation); |
61 GtkWidget *pref_group_parent(GtkWidget *child); | |
62 | |
1448 | 63 GtkWidget *pref_frame_new(GtkWidget *parent_box, gboolean fill, |
9 | 64 const gchar *text, |
1448 | 65 GtkOrientation orientation, gboolean padding); |
9 | 66 |
1448 | 67 GtkWidget *pref_spacer(GtkWidget *parent_box, gboolean padding); |
68 GtkWidget *pref_line(GtkWidget *parent_box, gboolean padding); | |
9 | 69 |
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); | |
1448 | 72 void pref_label_bold(GtkWidget *label, gboolean bold, gboolean increase_size); |
9 | 73 |
74 GtkWidget *pref_button_new(GtkWidget *parent_box, const gchar *stock_id, | |
1448 | 75 const gchar *text, gboolean hide_stock_text, |
9 | 76 GCallback func, gpointer data); |
77 | |
1448 | 78 GtkWidget *pref_checkbox_new(GtkWidget *parent_box, const gchar *text, gboolean active, |
9 | 79 GCallback func, gpointer data); |
1448 | 80 GtkWidget *pref_checkbox_new_mnemonic(GtkWidget *parent_box, const gchar *text, gboolean active, |
9 | 81 GCallback func, gpointer data); |
82 | |
1448 | 83 GtkWidget *pref_checkbox_new_int(GtkWidget *parent_box, const gchar *text, gboolean active, |
84 gboolean *result); | |
9 | 85 |
86 void pref_checkbox_link_sensitivity(GtkWidget *button, GtkWidget *widget); | |
87 void pref_checkbox_link_sensitivity_swap(GtkWidget *button, GtkWidget *widget); | |
88 | |
89 GtkWidget *pref_radiobutton_new(GtkWidget *parent_box, GtkWidget *sibling, | |
1448 | 90 const gchar *text, gboolean active, |
9 | 91 GCallback func, gpointer data); |
92 GtkWidget *pref_radiobutton_new_mnemonic(GtkWidget *parent_box, GtkWidget *sibling, | |
1448 | 93 const gchar *text, gboolean active, |
9 | 94 GCallback func, gpointer data); |
95 | |
96 GtkWidget *pref_radiobutton_new_int(GtkWidget *parent_box, GtkWidget *sibling, | |
1448 | 97 const gchar *text, gboolean active, |
98 gboolean *result, gboolean value, | |
9 | 99 GCallback func, gpointer data); |
100 | |
101 GtkWidget *pref_spin_new(GtkWidget *parent_box, const gchar *text, const gchar *suffix, | |
102 gdouble min, gdouble max, gdouble step, gint digits, | |
103 gdouble value, | |
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, | |
107 gdouble value, | |
108 GCallback func, gpointer data); | |
109 | |
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); | |
113 | |
114 void pref_link_sensitivity(GtkWidget *widget, GtkWidget *watch); | |
115 | |
116 void pref_signal_block_data(GtkWidget *widget, gpointer data); | |
117 void pref_signal_unblock_data(GtkWidget *widget, gpointer data); | |
118 | |
119 | |
120 GtkWidget *pref_table_new(GtkWidget *parent_box, gint columns, gint rows, | |
1448 | 121 gboolean homegeneous, gboolean fill); |
9 | 122 |
123 GtkWidget *pref_table_box(GtkWidget *table, gint column, gint row, | |
124 GtkOrientation orientation, const gchar *text); | |
125 | |
126 GtkWidget *pref_table_label(GtkWidget *table, gint column, gint row, | |
127 const gchar *text, gfloat alignment); | |
128 | |
129 GtkWidget *pref_table_button(GtkWidget *table, gint column, gint row, | |
1448 | 130 const gchar *stock_id, const gchar *text, gboolean hide_stock_text, |
9 | 131 GCallback func, gpointer data); |
132 | |
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, | |
136 gdouble value, | |
137 GCallback func, gpointer data); | |
138 | |
139 | |
140 GtkWidget *pref_toolbar_new(GtkWidget *parent_box, GtkToolbarStyle style); | |
41
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
141 GtkWidget *pref_toolbar_button(GtkWidget *toolbar, |
1448 | 142 const gchar *stock_id, const gchar *label, gboolean toggle, |
9 | 143 const gchar *description, |
144 GCallback func, gpointer data); | |
41
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
145 void pref_toolbar_button_set_icon(GtkWidget *button, GtkWidget *widget, const gchar *stock_id); |
9 | 146 GtkWidget *pref_toolbar_spacer(GtkWidget *toolbar); |
147 | |
148 | |
149 GtkWidget *date_selection_new(void); | |
150 | |
151 void date_selection_set(GtkWidget *widget, gint day, gint month, gint year); | |
152 void date_selection_get(GtkWidget *widget, gint *day, gint *month, gint *year); | |
153 | |
154 void date_selection_time_set(GtkWidget *widget, time_t t); | |
155 time_t date_selection_time_get(GtkWidget *widget); | |
156 | |
157 | |
158 typedef enum { | |
159 SIZER_POS_LEFT = 1 << 0, | |
160 SIZER_POS_RIGHT = 1 << 1, | |
161 SIZER_POS_TOP = 1 << 2, | |
162 SIZER_POS_BOTTOM = 1 << 3 | |
163 } SizerPositionType; | |
164 | |
165 GtkWidget *sizer_new(GtkWidget *parent, GtkWidget *bounding_widget, | |
166 SizerPositionType position); | |
167 | |
168 void sizer_set_limits(GtkWidget *sizer, | |
442 | 169 gint hsize_min, gint hsize_max, |
170 gint vsize_min, gint vsize_max); | |
9 | 171 |
172 | |
173 void pref_list_int_set(const gchar *group, const gchar *key, gint value); | |
1448 | 174 gboolean pref_list_int_get(const gchar *group, const gchar *key, gint *result); |
9 | 175 |
176 void pref_list_double_set(const gchar *group, const gchar *key, gdouble value); | |
1448 | 177 gboolean pref_list_double_get(const gchar *group, const gchar *key, gdouble *result); |
9 | 178 |
179 void pref_list_string_set(const gchar *group, const gchar *key, const gchar *value); | |
1448 | 180 gboolean pref_list_string_get(const gchar *group, const gchar *key, const gchar **result); |
9 | 181 |
182 | |
339
de1c2cd06fce
Rename user_specified_window_background and window_background_color
zas_
parents:
208
diff
changeset
|
183 void pref_color_button_set_cb(GtkWidget *widget, gpointer data); |
de1c2cd06fce
Rename user_specified_window_background and window_background_color
zas_
parents:
208
diff
changeset
|
184 GtkWidget *pref_color_button_new(GtkWidget *parent_box, |
442 | 185 const gchar *title, const GdkColor *color, |
186 GCallback func, gpointer data); | |
208
fa0e05f985c3
set user-defined color as image background - patch by Laurent MONIN
nadvornik
parents:
41
diff
changeset
|
187 |
1291
50ae02a4a675
replaced bar_info with an universal bar, restored the original
nadvornik
parents:
1284
diff
changeset
|
188 gchar *text_widget_text_pull(GtkWidget *text_widget); |
208
fa0e05f985c3
set user-defined color as image background - patch by Laurent MONIN
nadvornik
parents:
41
diff
changeset
|
189 |
9 | 190 #endif |
1055
1646720364cf
Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents:
475
diff
changeset
|
191 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |