2 * Copyright (C) 2006 John Ellis
3 * Copyright (C) 2008 - 2016 The Geeqie Team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #ifdef HAVE_STRVERSCMP
37 *-------------------------------------
38 * Standard library includes
39 *-------------------------------------
50 #include <sys/types.h>
55 *-------------------------------------
56 * includes for glib / gtk / gdk-pixbuf
57 *-------------------------------------
63 #include <gdk-pixbuf/gdk-pixbuf.h>
64 #include <gdk-pixbuf/gdk-pixbuf-loader.h>
69 *----------------------------------------------------------------------------
71 *----------------------------------------------------------------------------
76 #define GQ_APPNAME "Geeqie"
77 #define GQ_APPNAME_LC "geeqie"
78 #define GQ_WEBSITE "https://www.geeqie.org/"
79 #define GQ_EMAIL_ADDRESS "geeqie@freelists.org"
81 #define GQ_RC_DIR "." GQ_APPNAME_LC
82 #define GQ_COLLECTIONS_DIR "collections"
83 #define GQ_TRASH_DIR "trash"
84 #define GQ_WINDOW_LAYOUTS_DIR "layouts"
85 #define GQ_ARCHIVE_DIR "geeqie-archive"
87 #define GQ_SYSTEM_WIDE_DIR "/etc/" GQ_APPNAME_LC
89 #define RC_FILE_NAME GQ_APPNAME_LC "rc.xml"
90 #define DEFAULT_WINDOW_LAYOUT "default_window_layout.xml"
92 #define GQ_COLLECTION_EXT ".gqv"
94 #define SCROLL_RESET_TOPLEFT 0
95 #define SCROLL_RESET_CENTER 1
96 #define SCROLL_RESET_NOCHANGE 2
98 #define MOUSEWHEEL_SCROLL_SIZE 20
101 #define GQ_DEFAULT_SHELL_PATH "/bin/sh"
102 #define GQ_DEFAULT_SHELL_OPTIONS "-c"
104 #define COLOR_PROFILE_INPUTS 4
106 #define DEFAULT_THUMB_WIDTH 96
107 #define DEFAULT_THUMB_HEIGHT 72
109 #define DEFAULT_MINIMAL_WINDOW_SIZE 100
111 #define IMAGE_MIN_WIDTH 100
112 #define SIDEBAR_DEFAULT_WIDTH 250
115 #define DEFAULT_OVERLAY_INFO "%collection:<i>*</i>\\n%" \
116 "(%number%/%total%) [%zoom%] <b>%name%</b>\n" \
117 "%res%|%date%|%size%\n" \
118 "%formatted.Aperture%|%formatted.ShutterSpeed%|%formatted.ISOSpeedRating:ISO *%|%formatted.FocalLength%|%formatted.ExposureBias:* Ev%\n" \
119 "%formatted.Camera:40%|%formatted.Flash%\n" \
120 "%formatted.star_rating%"
122 #define GQ_LINK_STR "↗"
123 #include "typedefs.h"
127 #define TIMEZONE_DATABASE_WEB "https://cdn.bertold.org/zonedetect/db/db.zip"
128 #define TIMEZONE_DATABASE_FILE "timezone21.bin"
129 #define TIMEZONE_DATABASE_VERSION "out_v1"
130 #define HELP_SEARCH_ENGINE "https://duckduckgo.com/?q=site:geeqie.org/help "
132 #define STAR_RATING_NOT_READ -12345
133 #define STAR_RATING_REJECTED 0x274C //Unicode Character 'Cross Mark'
134 #define STAR_RATING_STAR 0x2738 //Unicode Character 'Heavy Eight Pointed Rectilinear Black Star'
136 /* From http://stackoverflow.com/questions/3417837/ */
138 #elif defined(__GNUC__)
139 # define UNUSED(x) UNUSED_ ## x __attribute__((unused))
140 #elif defined(__LCLINT__)
141 # define UNUSED(x) /*@unused@*/ x
147 *----------------------------------------------------------------------------
149 *----------------------------------------------------------------------------
153 * This also doubles as the main.c header.
156 extern gboolean thumb_format_changed;
158 extern gchar *gq_prefix;
159 extern gchar *gq_localedir;
160 extern gchar *gq_helpdir;
161 extern gchar *gq_htmldir;
162 extern gchar *gq_appdir;
163 extern gchar *gq_bindir;
164 extern gchar *gq_executable_path;
165 extern gchar *desktop_file_template;
166 extern gchar *instance_identifier;
168 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event);
169 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
171 void exit_program(void);
173 #define CASE_SORT(a, b) ( (options->file_sort.case_sensitive) ? strcmp((a), (b)) : strcasecmp((a), (b)) )
177 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */