Mercurial > geeqie
annotate src/main.h @ 708:444705451f3a
Use G_DIR_SEPARATOR_S instead of hardcoded "/".
author | zas_ |
---|---|
date | Tue, 20 May 2008 23:11:47 +0000 |
parents | c0dda0ffb931 |
children | 5042236af960 |
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 |
475 | 4 * Copyright (C) 2008 The Geeqie Team |
1 | 5 * |
6 * Author: John Ellis | |
7 * | |
9 | 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! | |
1 | 11 */ |
12 | |
9 | 13 |
282 | 14 #ifndef MAIN_H |
15 #define MAIN_H | |
9 | 16 |
1 | 17 #ifdef HAVE_CONFIG_H |
18 # include "config.h" | |
19 #endif | |
20 | |
9 | 21 #ifdef HAVE_STRVERSCMP |
213 | 22 # ifndef _GNU_SOURCE |
23 # define _GNU_SOURCE | |
24 # endif | |
9 | 25 #endif |
26 | |
1 | 27 #include "intl.h" |
686 | 28 #include "debug.h" |
1 | 29 |
671
8268cbe682f1
Include debug.h from main.h since debug macros may be used anywhere in the code.
zas_
parents:
653
diff
changeset
|
30 |
1 | 31 /* |
32 *------------------------------------- | |
33 * Standard library includes | |
34 *------------------------------------- | |
35 */ | |
36 | |
37 #include <pwd.h> | |
38 #include <stdio.h> | |
39 #include <stdlib.h> | |
40 #include <string.h> | |
41 #include <time.h> | |
42 #include <unistd.h> | |
43 #include <sys/stat.h> | |
9 | 44 #include <sys/time.h> |
45 #include <sys/types.h> | |
1 | 46 #include <dirent.h> |
9 | 47 #include <fcntl.h> |
1 | 48 |
49 /* | |
50 *------------------------------------- | |
9 | 51 * includes for glib / gtk / gdk-pixbuf |
1 | 52 *------------------------------------- |
53 */ | |
54 | |
55 #include <gdk/gdk.h> | |
56 #include <gtk/gtk.h> | |
9 | 57 |
58 #include <gdk-pixbuf/gdk-pixbuf.h> | |
59 #include <gdk-pixbuf/gdk-pixbuf-loader.h> | |
60 | |
1 | 61 |
62 /* | |
63 *---------------------------------------------------------------------------- | |
64 * defines | |
65 *---------------------------------------------------------------------------- | |
66 */ | |
67 | |
288
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
68 #define GQ_APPNAME "Geeqie" |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
69 #define GQ_APPNAME_LC "geeqie" |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
70 #define GQ_WEBSITE "geeqie.sourceforge.net" |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
71 #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
|
72 |
288
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
73 #define GQ_WMCLASS GQ_APPNAME_LC |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
74 |
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
75 #define GQ_RC_DIR "." GQ_APPNAME_LC |
283 | 76 #define GQ_RC_DIR_COLLECTIONS GQ_RC_DIR"/collections" |
77 #define GQ_RC_DIR_TRASH GQ_RC_DIR"/trash" | |
9 | 78 |
288
d1f74154463e
Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents:
283
diff
changeset
|
79 #define RC_FILE_NAME GQ_APPNAME_LC "rc" |
1 | 80 |
81 #define ZOOM_RESET_ORIGINAL 0 | |
82 #define ZOOM_RESET_FIT_WINDOW 1 | |
83 #define ZOOM_RESET_NONE 2 | |
84 | |
9 | 85 #define SCROLL_RESET_TOPLEFT 0 |
86 #define SCROLL_RESET_CENTER 1 | |
87 #define SCROLL_RESET_NOCHANGE 2 | |
88 | |
4 | 89 #define MOUSEWHEEL_SCROLL_SIZE 20 |
90 | |
283 | 91 #define GQ_EDITOR_GENERIC_SLOTS 10 |
1 | 92 |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
93 #define COLOR_PROFILE_INPUTS 4 |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
94 |
226
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
95 #define DEFAULT_THUMB_WIDTH 96 |
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
96 #define DEFAULT_THUMB_HEIGHT 72 |
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
97 |
413
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
98 #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
|
99 #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
|
100 #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
|
101 |
9e521adbf312
Add two new options to control image read buffer at runtime.
zas_
parents:
386
diff
changeset
|
102 #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
|
103 #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
|
104 #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
|
105 |
489
3809ffa3567b
Save state and width of exif, info and sort panels to rc file.
zas_
parents:
475
diff
changeset
|
106 #define PANEL_MIN_WIDTH 64 |
3809ffa3567b
Save state and width of exif, info and sort panels to rc file.
zas_
parents:
475
diff
changeset
|
107 #define PANEL_DEFAULT_WIDTH 288 |
3809ffa3567b
Save state and width of exif, info and sort panels to rc file.
zas_
parents:
475
diff
changeset
|
108 #define PANEL_MAX_WIDTH 1200 |
415 | 109 |
622 | 110 #define DEFAULT_OVERLAY_INFO "%collection:<i>*</i>\\n%" \ |
111 "(%number%/%total%) [%zoom%] <b>%name%</b>\n" \ | |
442 | 112 "%res%|%date%|%size%\n" \ |
622 | 113 "%formatted.Aperture%|%formatted.ShutterSpeed%|%formatted.ISOSpeedRating:ISO *%|%formatted.FocalLength%|%formatted.ExposureBias:* Ev%\n" \ |
114 "%formatted.Camera:40%|%formatted.Flash%" | |
495 | 115 |
134
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
113
diff
changeset
|
116 #include "typedefs.h" |
671
8268cbe682f1
Include debug.h from main.h since debug macros may be used anywhere in the code.
zas_
parents:
653
diff
changeset
|
117 #include "debug.h" |
508
011a6be611c8
Move options stuff to options.{c,h} and remove globals.c
zas_
parents:
507
diff
changeset
|
118 #include "options.h" |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
119 |
9 | 120 /* |
121 *---------------------------------------------------------------------------- | |
122 * main.c | |
123 *---------------------------------------------------------------------------- | |
124 */ | |
1 | 125 |
9 | 126 /* |
127 * This also doubles as the main.c header. | |
128 */ | |
1 | 129 |
9 | 130 gdouble get_zoom_increment(void); |
645
b50deb0f9968
Rename bar_exif_validate_text() to utf8_validate_or_convert() and move it to main.[ch].
zas_
parents:
622
diff
changeset
|
131 gchar *utf8_validate_or_convert(gchar *text); |
653 | 132 gchar *expand_tilde(const gchar *filename); |
1 | 133 |
9 | 134 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event); |
135 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); | |
648
e34c1002e553
Move some functions from main.[ch] to new window.[ch].
zas_
parents:
645
diff
changeset
|
136 |
278 | 137 void exit_program(void); |
1 | 138 |
329 | 139 #define CASE_SORT(a, b) ( (options->file_sort.case_sensitive) ? strcmp((a), (b)) : strcasecmp((a), (b)) ) |
319 | 140 |
1 | 141 |
9 | 142 #endif |