annotate src/gqview.h @ 8:e0d0593d519e

Sync to GQview 1.5.9 release. ######## DO NOT BASE ENHANCEMENTS OR TRANSLATION UPDATES ON CODE IN THIS CVS! This CVS is never up to date with current development and is provided solely for reference purposes, please use the latest official release package when making any changes or translation updates. ########
author gqview
date Sat, 26 Feb 2005 00:07:07 +0000
parents e149abcda4eb
children d907d608745f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
1 /*
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
2 * GQview image viewer
3
gqview
parents: 1
diff changeset
3 * (C)2000 John Ellis
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
4 *
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
5 * Author: John Ellis
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
6 *
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
7 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
8
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
9 #ifdef HAVE_CONFIG_H
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
10 # include "config.h"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
11 #endif
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
12
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
13 #include "intl.h"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
14
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
15 /*
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
16 *-------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
17 * Standard library includes
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
18 *-------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
19 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
20
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
21 #include <pwd.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
22 #include <stdio.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
23 #include <stdlib.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
24 #include <string.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
25 #include <time.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
26 #include <unistd.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
27 #include <sys/stat.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
28 #include <dirent.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
29
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
30 /*
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
31 *-------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
32 * includes for glib / gtk / imlib
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
33 *-------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
34 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
35
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
36 #include <gdk/gdk.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
37 #include <gtk/gtk.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
38 #include <gdk_imlib.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
39
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
40 /*
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
41 *----------------------------------------------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
42 * defines
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
43 *----------------------------------------------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
44 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
45
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
46 #define RC_FILE_NAME ".gqviewrc"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
47 #define RC_THUMB_DIR ".gqview_thmb"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
48
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
49 #define ZOOM_RESET_ORIGINAL 0
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
50 #define ZOOM_RESET_FIT_WINDOW 1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
51 #define ZOOM_RESET_NONE 2
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
52
4
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
53 #define MOUSEWHEEL_SCROLL_SIZE 20
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
54
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
55 typedef struct _ImageWindow ImageWindow;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
56 struct _ImageWindow
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
57 {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
58 GtkWidget *eventbox;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
59 GtkWidget *table;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
60 GtkWidget *viewport;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
61 GtkWidget *image;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
62
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
63 gchar *image_path;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
64 gchar *image_name;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
65
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
66 gint width;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
67 gint height;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
68 gint size;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
69
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
70 gint old_width;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
71 gint old_height;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
72
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
73 gint unknown;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
74 gint zoom;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
75
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
76 GdkPixmap *image_pixmap;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
77 GdkImlibImage *image_data;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
78
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
79 gint in_drag;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
80 gint drag_last_x;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
81 gint drag_last_y;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
82 gint drag_moved;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
83
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
84 gint artificial_size;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
85 gint new_img;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
86
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
87 /* info, zoom labels & windows */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
88
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
89 GtkWidget *top_window; /* window that gets title set to image filename */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
90 GtkWidget *info_label; /* label set to show image h x w , size */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
91 GtkWidget *zoom_label; /* label to display zoom */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
92 gchar *title; /* window title to display left of file name */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
93 gint show_title_zoom; /* option to include zoom in window title */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
94
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
95 /* button functions */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
96 void (*func_btn1)(ImageWindow *, GdkEventButton *, gpointer);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
97 void (*func_btn2)(ImageWindow *, GdkEventButton *, gpointer);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
98 void (*func_btn3)(ImageWindow *, GdkEventButton *, gpointer);
4
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
99 void (*func_btn4)(ImageWindow *, GdkEventButton *, gpointer);
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
100 void (*func_btn5)(ImageWindow *, GdkEventButton *, gpointer);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
101
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
102 gpointer data_btn1;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
103 gpointer data_btn2;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
104 gpointer data_btn3;
4
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
105 gpointer data_btn4;
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
106 gpointer data_btn5;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
107 };
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
108
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
109 /* image */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
110 extern ImageWindow *main_image;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
111
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
112 /* main window */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
113 extern GtkWidget *mainwindow;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
114 extern GtkWidget *mainwindow_hbox;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
115 extern GtkWidget *mainwindow_vbox;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
116 extern GtkAccelGroup *mainwindow_accel_grp;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
117
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
118 extern GtkWidget *info_box;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
119 extern GtkWidget *info_progress_bar;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
120 extern GtkWidget *info_status;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
121 extern GtkWidget *info_details;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
122 extern GtkWidget *info_zoom;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
123
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
124 /* full screen */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
125 extern ImageWindow *normal_image;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
126 extern ImageWindow *full_screen_image;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
127 extern GtkWidget *full_screen_window;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
128
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
129 /* tools floating window */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
130 extern GtkWidget *toolwindow;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
131
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
132 /* tools */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
133 extern GtkWidget *tool_vbox;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
134
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
135 extern GtkWidget *path_entry;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
136 extern GtkWidget *history_menu;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
137
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
138 extern GtkWidget *dir_clist;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
139 extern GtkWidget *file_clist;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
140
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
141 extern GtkWidget *menu_file;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
142 extern GtkWidget *menu_edit;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
143 extern GtkWidget *menu_view;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
144 extern GtkWidget *menu_help;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
145 extern GtkWidget *menu_file_popup;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
146 extern GtkWidget *menu_filelist_edit;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
147 extern GtkWidget *menu_image_popup;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
148 extern GtkWidget *menu_image_edit;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
149 extern GtkWidget *menu_window_full;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
150 extern GtkWidget *menu_window_full_edit;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
151 extern GtkWidget *menu_window_view;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
152 extern GtkWidget *menu_window_view_edit;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
153
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
154 extern GtkWidget *thumb_button;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
155 extern GtkWidget *thumb_menu_item;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
156
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
157 /* lists */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
158 extern GList *dir_list;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
159 extern GList *file_list;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
160 extern gchar *current_path;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
161
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
162 extern GList *filename_filter;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
163
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
164 /* -- options -- */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
165 extern gint main_window_w;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
166 extern gint main_window_h;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
167 extern gint main_window_x;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
168 extern gint main_window_y;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
169
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
170 extern gint float_window_w;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
171 extern gint float_window_h;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
172 extern gint float_window_x;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
173 extern gint float_window_y;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
174
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
175 extern gint save_window_positions;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
176 extern gint tools_float;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
177 extern gint tools_hidden;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
178 extern gint progressive_key_scrolling;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
179
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
180 extern gint startup_path_enable;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
181 extern gchar *startup_path;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
182 extern gint confirm_delete;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
183 extern gint restore_tool;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
184 extern gint zoom_mode;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
185 extern gint fit_window;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
186 extern gint limit_window_size;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
187 extern gint max_window_size;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
188 extern gint thumb_max_width;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
189 extern gint thumb_max_height;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
190 extern gint enable_thumb_caching;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
191 extern gint use_xvpics_thumbnails;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
192 extern gint show_dot_files;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
193 extern gint file_filter_disable;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
194 extern gint filter_include_jpg;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
195 extern gint filter_include_xpm;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
196 extern gint filter_include_tif;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
197 extern gint filter_include_gif;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
198 extern gint filter_include_png;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
199 extern gint filter_include_ppm;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
200 extern gint filter_include_pgm;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
201 extern gint filter_include_pcx;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
202 extern gint filter_include_bmp;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
203 extern gchar *custom_filter;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
204 extern gchar *editor_name[];
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
205 extern gchar *editor_command[];
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
206
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
207 extern gint thumbnails_enabled;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
208
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
209 extern gint slideshow_delay; /* in seconds */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
210 extern gint slideshow_random;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
211 extern gint slideshow_repeat;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
212
4
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
213 extern gint mousewheel_scrolls;
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
214
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
215 extern gint debug;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
216
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
217 /* logo & misc images */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
218 extern const int logo_width;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
219 extern const int logo_height;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
220 extern const unsigned char logo[];
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
221
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
222 /* -- functions -- */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
223
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
224 /* main.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
225 gchar *filename_from_path(char *t);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
226 gchar *remove_level_from_path(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
227 void parse_out_relatives(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
228 void start_editor_from_file(gint n, gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
229 void start_editor_from_image(gint n);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
230 void start_editor_from_list(gint n);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
231 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
232 gint key_press_cb(GtkWidget *widget, GdkEventKey *event);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
233 void exit_gqview();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
234
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
235 /* window.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
236 void toolwindow_float();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
237 void toolwindow_hide();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
238 void create_main_window();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
239
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
240 /* menu.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
241 void add_menu_popup_item(GtkWidget *menu, gchar *label,
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
242 GtkSignalFunc func, gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
243 void add_menu_divider(GtkWidget *menu);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
244 void update_edit_menus(GtkAccelGroup *accel_grp);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
245 GtkWidget *create_menu_bar(GtkAccelGroup *accel_grp);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
246 void create_menu_popups();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
247 GtkWidget *create_button_bar(GtkTooltips *tooltips);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
248
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
249 /* img-main.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
250 void full_screen_start();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
251 void full_screen_stop();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
252 void full_screen_toggle();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
253 void image_scroll(gint x, gint y);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
254 void image_adjust_zoom(gint increment);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
255 void image_set_zoom(gint zoom);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
256 void image_set_path(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
257 gchar *image_get_path();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
258 gchar *image_get_name();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
259 void image_change_to(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
260 void image_set_labels(GtkWidget *info, GtkWidget *zoom);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
261 GtkWidget *image_create();
3
gqview
parents: 1
diff changeset
262 void image_to_root();
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
263
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
264 /* filelist.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
265 void update_status_label(gchar *text);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
266 void rebuild_file_filter();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
267 gint find_file_in_list(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
268 GList *file_get_selected_list();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
269 void free_selected_list(GList *list);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
270 gint file_clicked_is_selected();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
271 gchar *file_clicked_get_path();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
272 gint file_count();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
273 gint file_selection_count();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
274 gchar *file_get_path(gint row);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
275 gint file_is_selected(gint row);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
276 void file_image_change_to(gint row);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
277 void file_next_image();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
278 void file_prev_image();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
279 void file_first_image();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
280 void file_last_image();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
281 void file_is_gone(gchar *path, GList *ignore_list);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
282 void file_is_renamed(gchar *source, gchar *dest);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
283 void dir_select_cb(GtkWidget *widget, gint row, gint col,
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
284 GdkEvent *event, gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
285 void dir_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
286 void file_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
287 void file_select_cb(GtkWidget *widget, gint row, gint col,
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
288 GdkEvent *event, gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
289 void file_unselect_cb(GtkWidget *widget, gint row, gint col,
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
290 GdkEvent *event, gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
291 void file_clist_highlight_set();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
292 void file_clist_highlight_unset();
3
gqview
parents: 1
diff changeset
293 void path_entry_tab_cb(gchar *newpath, gpointer data);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
294 void path_entry_cb(gchar *newdir, gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
295 void interrupt_thumbs();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
296 void filelist_populate_clist();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
297 void filelist_refresh();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
298 void filelist_change_to(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
299
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
300 /* config.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
301 void show_config_window();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
302 void show_about_window();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
303
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
304 /* rcfile.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
305 void save_options();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
306 void load_options();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
307
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
308 /* tabcomp.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
309 GtkWidget *tab_completion_new_with_history(GtkWidget **entry, GtkWidget *window, gchar *text,
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
310 const gchar *history_key, gint max_levels,
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
311 void (*enter_func)(gchar *, gpointer), gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
312 gchar *tab_completion_set_to_last_history(GtkWidget *entry);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
313 void tab_completion_append_to_history(GtkWidget *entry, gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
314
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
315 GtkWidget *tab_completion_new(GtkWidget **entry, GtkWidget *window, gchar *text,
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
316 void (*enter_func)(gchar *, gpointer), gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
317 void tab_completion_add_to_entry(GtkWidget *entry, void (*enter_func)(gchar *, gpointer), gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
318 void tab_completion_add_tab_func(GtkWidget *entry, void (*tab_func)(gchar *, gpointer), gpointer data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
319 gchar *remove_trailing_slash(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
320
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
321 /* fileops.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
322 gchar *homedir();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
323 int isfile(char *s);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
324 int isdir(char *s);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
325 int filesize(char *s);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
326 time_t filetime(gchar *s);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
327 int copy_file(char *s, char *t);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
328 int move_file(char *s, char *t);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
329 gchar *get_current_dir();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
330
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
331 /* dnd.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
332 void image_dnd_init(ImageWindow *imd);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
333 void init_dnd();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
334
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
335 /* pathsel.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
336 GtkWidget *destination_widget_new(gchar *path, GtkWidget *entry);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
337 void destination_widget_sync_to_entry(GtkWidget *entry);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
338
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
339 #include "utildlg.h"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
340
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
341 /* utilops.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
342 void file_util_delete(gchar *source_path, GList *source_list);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
343 void file_util_move(gchar *source_path, GList *source_list, gchar *dest_path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
344 void file_util_copy(gchar *source_path, GList *source_list, gchar *dest_path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
345 void file_util_rename(gchar *source_path, GList *source_list);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
346 void file_util_create_dir(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
347
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
348 /* thumb.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
349 gint create_thumbnail(gchar *path, GdkPixmap **thumb_pixmap, GdkBitmap **thumb_mask);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
350 gint maintain_thumbnail_dir(gchar *dir, gint recursive);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
351
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
352 /* slideshow.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
353 void slideshow_start();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
354 void slideshow_stop();
3
gqview
parents: 1
diff changeset
355 void slideshow_next();
gqview
parents: 1
diff changeset
356 void slideshow_prev();
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
357 void slideshow_toggle();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
358 gint slideshow_is_running();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
359
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
360 /* img-view.c */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
361 void view_window_new(gchar *path);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
362 void view_window_active_edit(gint n);
3
gqview
parents: 1
diff changeset
363 void view_window_active_to_root(gint n);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
364 void create_menu_view_popup();
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
365
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
366
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
367