1
|
1 /*
|
9
|
2 * GQview
|
|
3 * (C) 2004 John Ellis
|
1
|
4 *
|
|
5 * Author: John Ellis
|
|
6 *
|
9
|
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!
|
1
|
10 */
|
|
11
|
9
|
12
|
|
13 #ifndef GQVIEW_H
|
|
14 #define GQVIEW_H
|
|
15
|
1
|
16 #ifdef HAVE_CONFIG_H
|
|
17 # include "config.h"
|
|
18 #endif
|
|
19
|
9
|
20 #ifdef HAVE_STRVERSCMP
|
|
21 # define _GNU_SOURCE
|
|
22 #endif
|
|
23
|
1
|
24 #include "intl.h"
|
|
25
|
|
26 /*
|
|
27 *-------------------------------------
|
|
28 * Standard library includes
|
|
29 *-------------------------------------
|
|
30 */
|
|
31
|
|
32 #include <pwd.h>
|
|
33 #include <stdio.h>
|
|
34 #include <stdlib.h>
|
|
35 #include <string.h>
|
|
36 #include <time.h>
|
|
37 #include <unistd.h>
|
|
38 #include <sys/stat.h>
|
9
|
39 #include <sys/time.h>
|
|
40 #include <sys/types.h>
|
1
|
41 #include <dirent.h>
|
9
|
42 #include <fcntl.h>
|
1
|
43
|
|
44 /*
|
|
45 *-------------------------------------
|
9
|
46 * includes for glib / gtk / gdk-pixbuf
|
1
|
47 *-------------------------------------
|
|
48 */
|
|
49
|
|
50 #include <gdk/gdk.h>
|
|
51 #include <gtk/gtk.h>
|
9
|
52
|
|
53 #include <gdk-pixbuf/gdk-pixbuf.h>
|
|
54 #include <gdk-pixbuf/gdk-pixbuf-loader.h>
|
|
55
|
|
56 #include "typedefs.h"
|
1
|
57
|
|
58 /*
|
|
59 *----------------------------------------------------------------------------
|
|
60 * defines
|
|
61 *----------------------------------------------------------------------------
|
|
62 */
|
|
63
|
9
|
64 #define GQVIEW_RC_DIR ".gqview"
|
|
65 #define GQVIEW_RC_DIR_COLLECTIONS GQVIEW_RC_DIR"/collections"
|
|
66 #define GQVIEW_RC_DIR_TRASH GQVIEW_RC_DIR"/trash"
|
|
67
|
|
68 #define RC_FILE_NAME "gqviewrc"
|
1
|
69
|
|
70 #define ZOOM_RESET_ORIGINAL 0
|
|
71 #define ZOOM_RESET_FIT_WINDOW 1
|
|
72 #define ZOOM_RESET_NONE 2
|
|
73
|
9
|
74 #define SCROLL_RESET_TOPLEFT 0
|
|
75 #define SCROLL_RESET_CENTER 1
|
|
76 #define SCROLL_RESET_NOCHANGE 2
|
|
77
|
4
|
78 #define MOUSEWHEEL_SCROLL_SIZE 20
|
|
79
|
9
|
80 #define GQVIEW_EDITOR_SLOTS 10
|
1
|
81
|
9
|
82 /*
|
|
83 *----------------------------------------------------------------------------
|
|
84 * globals
|
|
85 *----------------------------------------------------------------------------
|
|
86 */
|
1
|
87
|
9
|
88 /*
|
|
89 * Since globals are used everywhere,
|
|
90 * it is easier to define them here.
|
|
91 */
|
1
|
92
|
|
93 extern GList *filename_filter;
|
|
94
|
|
95 /* -- options -- */
|
|
96 extern gint main_window_w;
|
|
97 extern gint main_window_h;
|
|
98 extern gint main_window_x;
|
|
99 extern gint main_window_y;
|
9
|
100 extern gint main_window_maximized;
|
1
|
101
|
|
102 extern gint float_window_w;
|
|
103 extern gint float_window_h;
|
|
104 extern gint float_window_x;
|
|
105 extern gint float_window_y;
|
9
|
106 extern gint float_window_divider;
|
|
107
|
|
108 extern gint window_hdivider_pos;
|
|
109 extern gint window_vdivider_pos;
|
1
|
110
|
|
111 extern gint save_window_positions;
|
|
112 extern gint tools_float;
|
|
113 extern gint tools_hidden;
|
9
|
114 extern gint toolbar_hidden;
|
1
|
115 extern gint progressive_key_scrolling;
|
|
116
|
|
117 extern gint startup_path_enable;
|
|
118 extern gchar *startup_path;
|
|
119 extern gint confirm_delete;
|
9
|
120 extern gint enable_delete_key;
|
|
121 extern gint safe_delete_enable;
|
|
122 extern gchar *safe_delete_path;
|
|
123 extern gint safe_delete_size;
|
1
|
124 extern gint restore_tool;
|
|
125 extern gint zoom_mode;
|
9
|
126 extern gint two_pass_zoom;
|
|
127 extern gint scroll_reset_method;
|
1
|
128 extern gint fit_window;
|
|
129 extern gint limit_window_size;
|
9
|
130 extern gint zoom_to_fit_expands;
|
1
|
131 extern gint max_window_size;
|
|
132 extern gint thumb_max_width;
|
|
133 extern gint thumb_max_height;
|
|
134 extern gint enable_thumb_caching;
|
9
|
135 extern gint enable_thumb_dirs;
|
1
|
136 extern gint use_xvpics_thumbnails;
|
9
|
137 extern gint thumbnail_spec_standard;
|
|
138 extern gint enable_metadata_dirs;
|
1
|
139 extern gint show_dot_files;
|
|
140 extern gint file_filter_disable;
|
|
141 extern gchar *editor_name[];
|
|
142 extern gchar *editor_command[];
|
|
143
|
|
144 extern gint thumbnails_enabled;
|
9
|
145 extern SortType file_sort_method;
|
|
146 extern gint file_sort_ascending;
|
1
|
147
|
9
|
148 extern gint slideshow_delay; /* in tenths of a second */
|
1
|
149 extern gint slideshow_random;
|
|
150 extern gint slideshow_repeat;
|
|
151
|
4
|
152 extern gint mousewheel_scrolls;
|
9
|
153 extern gint enable_in_place_rename;
|
|
154
|
|
155 extern gint black_window_background;
|
|
156
|
|
157 extern gint fullscreen_screen;
|
|
158 extern gint fullscreen_clean_flip;
|
|
159 extern gint fullscreen_disable_saver;
|
|
160 extern gint fullscreen_above;
|
|
161
|
|
162 extern gint dupe_custom_threshold;
|
4
|
163
|
1
|
164 extern gint debug;
|
|
165
|
9
|
166 extern gint recent_list_max;
|
1
|
167
|
9
|
168 extern gint collection_rectangular_selection;
|
1
|
169
|
9
|
170 extern gint tile_cache_max; /* in megabytes */
|
|
171 extern gint thumbnail_quality;
|
|
172 extern gint zoom_quality;
|
|
173 extern gint dither_quality;
|
1
|
174
|
9
|
175 extern gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
|
|
176
|
|
177 extern gint enable_read_ahead;
|
1
|
178
|
9
|
179 extern gint place_dialogs_under_mouse;
|
|
180
|
|
181 /* layout */
|
|
182 extern gchar *layout_order;
|
|
183 extern gint layout_style;
|
1
|
184
|
9
|
185 extern gint layout_view_icons;
|
|
186 extern gint layout_view_tree;
|
|
187
|
|
188 extern gint show_icon_names;
|
|
189
|
|
190 extern gint tree_descend_subdirs;
|
1
|
191
|
9
|
192 extern gint lazy_image_sync;
|
|
193 extern gint update_on_time_change;
|
|
194 extern gint exif_rotate_enable;
|
1
|
195
|
9
|
196 /*
|
|
197 *----------------------------------------------------------------------------
|
|
198 * main.c
|
|
199 *----------------------------------------------------------------------------
|
|
200 */
|
1
|
201
|
9
|
202 /*
|
|
203 * This also doubles as the main.c header.
|
|
204 */
|
1
|
205
|
9
|
206 void window_set_icon(GtkWidget *window, const char **icon, const gchar *file);
|
|
207 gint window_maximized(GtkWidget *window);
|
1
|
208
|
9
|
209 gdouble get_zoom_increment(void);
|
1
|
210
|
9
|
211 void help_window_show(const gchar *key);
|
1
|
212
|
9
|
213 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event);
|
|
214 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
|
|
215 void exit_gqview(void);
|
1
|
216
|
|
217
|
9
|
218 #endif
|
1
|
219
|
|
220
|
|
221
|