Mercurial > geeqie.yaz
annotate src/ui_misc.h @ 415:4f7362028062
Add zoom ratio display to OSD in fullscreen mode.
It appears as [%zoom%] in fullscreen info string.
It is now displayed by default.
author | zas_ |
---|---|
date | Fri, 18 Apr 2008 23:09:03 +0000 |
parents | de1c2cd06fce |
children | 4b2d7f9af171 |
rev | line source |
---|---|
9 | 1 /* |
2 * (SLIK) SimpLIstic sKin functions | |
3 * (C) 2004 John Ellis | |
4 * | |
5 * Author: John Ellis | |
6 * | |
7 * This software is released under the GNU General Public License (GNU GPL). | |
8 * Please read the included file COPYING for more information. | |
9 * This software comes with no warranty of any kind, use at your own risk! | |
10 */ | |
11 | |
12 | |
13 #ifndef UI_MISC_H | |
14 #define UI_MISC_H | |
15 | |
16 | |
17 #include <sys/time.h> | |
18 #include <sys/types.h> | |
19 #include <time.h> | |
20 | |
21 | |
22 /* these values are per GNOME HIG */ | |
23 | |
24 /* HIG 2.0 chapter 8 defines: */ | |
25 | |
26 /* space between elements within control (ex: icon and it's text) */ | |
27 #define PREF_PAD_GAP 6 | |
28 /* space between label and control(s) */ | |
29 #define PREF_PAD_SPACE 12 | |
30 /* space between window border and controls */ | |
31 #define PREF_PAD_BORDER 12 | |
32 /* indent for group members */ | |
33 #define PREF_PAD_INDENT 12 | |
34 /* vertical space between groups */ | |
35 #define PREF_PAD_GROUP 18 | |
36 | |
37 /* HIG 2.0 chapter 3.13 defines: */ | |
38 | |
39 /* gap between buttons in a dialog */ | |
40 #define PREF_PAD_BUTTON_GAP 6 | |
41 /* space between buttons in a dialog and it's contents */ | |
42 #define PREF_PAD_BUTTON_SPACE 24 | |
43 | |
44 /* and these are not in the GNOME HIG */ | |
45 | |
46 /* gap between similar toolbar items (buttons) */ | |
47 #define PREF_PAD_TOOLBAR_GAP 0 | |
48 | |
49 /* HIG 2.0 states 6 pixels between icons and text, | |
50 * but GTK's stock buttons ignore this (hard coded to 2), we do it too for consistency | |
51 */ | |
52 #define PREF_PAD_BUTTON_ICON_GAP 2 | |
53 | |
54 | |
55 GtkWidget *pref_box_new(GtkWidget *parent_box, gint fill, | |
56 GtkOrientation orientation, gint padding); | |
57 | |
58 GtkWidget *pref_group_new(GtkWidget *parent_box, gint fill, | |
59 const gchar *text, GtkOrientation orientation); | |
60 GtkWidget *pref_group_parent(GtkWidget *child); | |
61 | |
62 GtkWidget *pref_frame_new(GtkWidget *parent_box, gint fill, | |
63 const gchar *text, | |
64 GtkOrientation orientation, gint padding); | |
65 | |
66 GtkWidget *pref_spacer(GtkWidget *parent_box, gint padding); | |
67 GtkWidget *pref_line(GtkWidget *parent_box, gint padding); | |
68 | |
69 GtkWidget *pref_label_new(GtkWidget *parent_box, const gchar *text); | |
70 GtkWidget *pref_label_new_mnemonic(GtkWidget *parent_box, const gchar *text, GtkWidget *widget); | |
71 void pref_label_bold(GtkWidget *label, gint bold, gint increase_size); | |
72 | |
73 GtkWidget *pref_button_new(GtkWidget *parent_box, const gchar *stock_id, | |
74 const gchar *text, gint hide_stock_text, | |
75 GCallback func, gpointer data); | |
76 | |
77 GtkWidget *pref_checkbox_new(GtkWidget *parent_box, const gchar *text, gint active, | |
78 GCallback func, gpointer data); | |
79 GtkWidget *pref_checkbox_new_mnemonic(GtkWidget *parent_box, const gchar *text, gint active, | |
80 GCallback func, gpointer data); | |
81 | |
82 GtkWidget *pref_checkbox_new_int(GtkWidget *parent_box, const gchar *text, gint active, | |
83 gint *result); | |
84 | |
85 void pref_checkbox_link_sensitivity(GtkWidget *button, GtkWidget *widget); | |
86 void pref_checkbox_link_sensitivity_swap(GtkWidget *button, GtkWidget *widget); | |
87 | |
88 GtkWidget *pref_radiobutton_new(GtkWidget *parent_box, GtkWidget *sibling, | |
89 const gchar *text, gint active, | |
90 GCallback func, gpointer data); | |
91 GtkWidget *pref_radiobutton_new_mnemonic(GtkWidget *parent_box, GtkWidget *sibling, | |
92 const gchar *text, gint active, | |
93 GCallback func, gpointer data); | |
94 | |
95 GtkWidget *pref_radiobutton_new_int(GtkWidget *parent_box, GtkWidget *sibling, | |
96 const gchar *text, gint active, | |
97 gint *result, gint value, | |
98 GCallback func, gpointer data); | |
99 | |
100 GtkWidget *pref_spin_new(GtkWidget *parent_box, const gchar *text, const gchar *suffix, | |
101 gdouble min, gdouble max, gdouble step, gint digits, | |
102 gdouble value, | |
103 GCallback func, gpointer data); | |
104 GtkWidget *pref_spin_new_mnemonic(GtkWidget *parent_box, const gchar *text, const gchar *suffix, | |
105 gdouble min, gdouble max, gdouble step, gint digits, | |
106 gdouble value, | |
107 GCallback func, gpointer data); | |
108 | |
109 GtkWidget *pref_spin_new_int(GtkWidget *parent_box, const gchar *text, const gchar *suffix, | |
110 gint min, gint max, gint step, | |
111 gint value, gint *value_var); | |
112 | |
113 void pref_link_sensitivity(GtkWidget *widget, GtkWidget *watch); | |
114 | |
115 void pref_signal_block_data(GtkWidget *widget, gpointer data); | |
116 void pref_signal_unblock_data(GtkWidget *widget, gpointer data); | |
117 | |
118 | |
119 GtkWidget *pref_table_new(GtkWidget *parent_box, gint columns, gint rows, | |
120 gint homogenious, gint fill); | |
121 | |
122 GtkWidget *pref_table_box(GtkWidget *table, gint column, gint row, | |
123 GtkOrientation orientation, const gchar *text); | |
124 | |
125 GtkWidget *pref_table_label(GtkWidget *table, gint column, gint row, | |
126 const gchar *text, gfloat alignment); | |
127 | |
128 GtkWidget *pref_table_button(GtkWidget *table, gint column, gint row, | |
129 const gchar *stock_id, const gchar *text, gint hide_stock_text, | |
130 GCallback func, gpointer data); | |
131 | |
132 GtkWidget *pref_table_spin(GtkWidget *table, gint column, gint row, | |
133 const gchar *text, const gchar *suffix, | |
134 gdouble min, gdouble max, gdouble step, gint digits, | |
135 gdouble value, | |
136 GCallback func, gpointer data); | |
137 | |
138 | |
139 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
|
140 GtkWidget *pref_toolbar_button(GtkWidget *toolbar, |
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
141 const gchar *stock_id, const gchar *label, gint toggle, |
9 | 142 const gchar *description, |
143 GCallback func, gpointer data); | |
41
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
144 void pref_toolbar_button_set_icon(GtkWidget *button, GtkWidget *widget, const gchar *stock_id); |
9 | 145 GtkWidget *pref_toolbar_spacer(GtkWidget *toolbar); |
146 | |
147 | |
148 GtkWidget *date_selection_new(void); | |
149 | |
150 void date_selection_set(GtkWidget *widget, gint day, gint month, gint year); | |
151 void date_selection_get(GtkWidget *widget, gint *day, gint *month, gint *year); | |
152 | |
153 void date_selection_time_set(GtkWidget *widget, time_t t); | |
154 time_t date_selection_time_get(GtkWidget *widget); | |
155 | |
156 | |
157 typedef enum { | |
158 SIZER_POS_LEFT = 1 << 0, | |
159 SIZER_POS_RIGHT = 1 << 1, | |
160 SIZER_POS_TOP = 1 << 2, | |
161 SIZER_POS_BOTTOM = 1 << 3 | |
162 } SizerPositionType; | |
163 | |
164 GtkWidget *sizer_new(GtkWidget *parent, GtkWidget *bounding_widget, | |
165 SizerPositionType position); | |
166 | |
167 void sizer_set_limits(GtkWidget *sizer, | |
168 gint hsize_min, gint hsize_max, | |
169 gint vsize_min, gint vsize_max); | |
170 | |
171 | |
172 void pref_list_int_set(const gchar *group, const gchar *key, gint value); | |
173 gint pref_list_int_get(const gchar *group, const gchar *key, gint *result); | |
174 | |
175 void pref_list_double_set(const gchar *group, const gchar *key, gdouble value); | |
176 gint pref_list_double_get(const gchar *group, const gchar *key, gdouble *result); | |
177 | |
178 void pref_list_string_set(const gchar *group, const gchar *key, const gchar *value); | |
179 gint pref_list_string_get(const gchar *group, const gchar *key, const gchar **result); | |
180 | |
181 | |
339
de1c2cd06fce
Rename user_specified_window_background and window_background_color
zas_
parents:
208
diff
changeset
|
182 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
|
183 GtkWidget *pref_color_button_new(GtkWidget *parent_box, |
de1c2cd06fce
Rename user_specified_window_background and window_background_color
zas_
parents:
208
diff
changeset
|
184 const gchar *title, const GdkColor *color, |
de1c2cd06fce
Rename user_specified_window_background and window_background_color
zas_
parents:
208
diff
changeset
|
185 GCallback func, gpointer data); |
208
fa0e05f985c3
set user-defined color as image background - patch by Laurent MONIN
nadvornik
parents:
41
diff
changeset
|
186 |
fa0e05f985c3
set user-defined color as image background - patch by Laurent MONIN
nadvornik
parents:
41
diff
changeset
|
187 |
9 | 188 #endif |
189 |