Mercurial > geeqie.yaz
annotate src/main.h @ 454:57459cf0952c
Prefix editor entries in the main menu with numbers.
It allows Alt+E+number as shortcut to start an editor.
author | zas_ |
---|---|
date | Sun, 20 Apr 2008 22:29:23 +0000 |
parents | ddabc4873a3f |
children | 48c8e49b571c |
rev | line source |
---|---|
1 | 1 /* |
196 | 2 * Geeqie |
67
f63ecca6c087
Fri Oct 13 05:22:43 2006 John Ellis <johne@verizon.net>
gqview
parents:
14
diff
changeset
|
3 * (C) 2006 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 |
282 | 13 #ifndef MAIN_H |
14 #define MAIN_H | |
9 | 15 |
1 | 16 #ifdef HAVE_CONFIG_H |
17 # include "config.h" | |
18 #endif | |
19 | |
9 | 20 #ifdef HAVE_STRVERSCMP |
213 | 21 # ifndef _GNU_SOURCE |
22 # define _GNU_SOURCE | |
23 # endif | |
9 | 24 #endif |
25 | |
1 | 26 #include "intl.h" |
27 | |
28 /* | |
29 *------------------------------------- | |
30 * Standard library includes | |
31 *------------------------------------- | |
32 */ | |
33 | |
34 #include <pwd.h> | |
35 #include <stdio.h> | |
36 #include <stdlib.h> | |
37 #include <string.h> | |
38 #include <time.h> | |
39 #include <unistd.h> | |
40 #include <sys/stat.h> | |
9 | 41 #include <sys/time.h> |
42 #include <sys/types.h> | |
1 | 43 #include <dirent.h> |
9 | 44 #include <fcntl.h> |
1 | 45 |
46 /* | |
47 *------------------------------------- | |
9 | 48 * includes for glib / gtk / gdk-pixbuf |
1 | 49 *------------------------------------- |
50 */ | |
51 | |
52 #include <gdk/gdk.h> | |
53 #include <gtk/gtk.h> | |
9 | 54 |
55 #include <gdk-pixbuf/gdk-pixbuf.h> | |
56 #include <gdk-pixbuf/gdk-pixbuf-loader.h> | |
57 | |
1 | 58 |
59 /* | |
60 *---------------------------------------------------------------------------- | |
61 * defines | |
62 *---------------------------------------------------------------------------- | |
63 */ | |
64 | |
288
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
65 #define GQ_APPNAME "Geeqie" |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
66 #define GQ_APPNAME_LC "geeqie" |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
67 #define GQ_WEBSITE "geeqie.sourceforge.net" |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
68 #define GQ_EMAIL_ADDRESS "geeqie-devel@lists.sourceforge.net" |
254
9faf34f047b1
Make the wmclass value unique among the code by defining
zas_
parents:
243
diff
changeset
|
69 |
288
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
70 #define GQ_WMCLASS GQ_APPNAME_LC |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
71 |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
72 #define GQ_RC_DIR "." GQ_APPNAME_LC |
283 | 73 #define GQ_RC_DIR_COLLECTIONS GQ_RC_DIR"/collections" |
74 #define GQ_RC_DIR_TRASH GQ_RC_DIR"/trash" | |
9 | 75 |
288
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
76 #define RC_FILE_NAME GQ_APPNAME_LC "rc" |
1 | 77 |
78 #define ZOOM_RESET_ORIGINAL 0 | |
79 #define ZOOM_RESET_FIT_WINDOW 1 | |
80 #define ZOOM_RESET_NONE 2 | |
81 | |
9 | 82 #define SCROLL_RESET_TOPLEFT 0 |
83 #define SCROLL_RESET_CENTER 1 | |
84 #define SCROLL_RESET_NOCHANGE 2 | |
85 | |
4 | 86 #define MOUSEWHEEL_SCROLL_SIZE 20 |
87 | |
283 | 88 #define GQ_EDITOR_GENERIC_SLOTS 10 |
1 | 89 |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
90 #define COLOR_PROFILE_INPUTS 4 |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
91 |
226
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
92 #define DEFAULT_THUMB_WIDTH 96 |
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
93 #define DEFAULT_THUMB_HEIGHT 72 |
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
94 |
413
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
95 #define IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT 4096 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
96 #define IMAGE_LOADER_READ_BUFFER_SIZE_MIN 512 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
97 #define IMAGE_LOADER_READ_BUFFER_SIZE_MAX 16*1024*1024 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
98 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
99 #define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT 1 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
100 #define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN 1 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
101 #define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX 16 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
102 |
415 | 103 |
104 #define DEFAULT_OVERLAY_INFO "%collection%(%number%/%total%) [%zoom%] <b>%name%</b>\n" \ | |
442 | 105 "%res%|%date%|%size%\n" \ |
415 | 106 "%fAperture%|%fShutterSpeed%|%fISOSpeedRating%|%fFocalLength%|%fExposureBias%\n" \ |
107 "%fCamera%|%fFlash%" \ | |
108 | |
227
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
109 #if 1 /* set to 0 to disable debugging code and related options */ |
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
110 # ifndef DEBUG |
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
111 # define DEBUG 1 |
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
112 # endif |
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
113 #endif |
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
114 #ifndef DEBUG |
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
115 # define debug 0 |
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
116 #endif |
226
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
117 |
134
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
113
diff
changeset
|
118 #include "typedefs.h" |
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
113
diff
changeset
|
119 |
9 | 120 /* |
121 *---------------------------------------------------------------------------- | |
122 * globals | |
123 *---------------------------------------------------------------------------- | |
124 */ | |
318 | 125 ConfOptions *init_options(ConfOptions *options); /* TODO: move to globals.h */ |
126 | |
127 ConfOptions *options; | |
1 | 128 |
129 | |
4 | 130 |
227
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
131 #ifdef DEBUG |
1 | 132 extern gint debug; |
227
41fc4bfc8b25
Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents:
226
diff
changeset
|
133 #endif |
1 | 134 |
9 | 135 |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
136 |
9 | 137 /* |
138 *---------------------------------------------------------------------------- | |
139 * main.c | |
140 *---------------------------------------------------------------------------- | |
141 */ | |
1 | 142 |
9 | 143 /* |
144 * This also doubles as the main.c header. | |
145 */ | |
1 | 146 |
289
6a7298988a7a
Simplify and unify gtk_window creation with the help of
zas_
parents:
288
diff
changeset
|
147 GtkWidget *window_new(GtkWindowType type, const gchar *name, const gchar *icon, |
6a7298988a7a
Simplify and unify gtk_window creation with the help of
zas_
parents:
288
diff
changeset
|
148 const gchar *icon_file, const gchar *subtitle); |
91
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
149 void window_set_icon(GtkWidget *window, const gchar *icon, const gchar *file); |
9 | 150 gint window_maximized(GtkWidget *window); |
1 | 151 |
9 | 152 gdouble get_zoom_increment(void); |
1 | 153 |
386
0226daf8c30b
in debug mode print time information on selected events
nadvornik
parents:
329
diff
changeset
|
154 const gchar *get_exec_time(); |
0226daf8c30b
in debug mode print time information on selected events
nadvornik
parents:
329
diff
changeset
|
155 |
9 | 156 void help_window_show(const gchar *key); |
1 | 157 |
9 | 158 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event); |
159 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); | |
278 | 160 void exit_program(void); |
1 | 161 |
329 | 162 #define CASE_SORT(a, b) ( (options->file_sort.case_sensitive) ? strcmp((a), (b)) : strcasecmp((a), (b)) ) |
319 | 163 |
1 | 164 |
9 | 165 #endif |