Implement preliminary support for XDG Base Directory Specification.
[geeqie.git] / src / main.h
1 /*
2  * Geeqie
3  * (C) 2006 John Ellis
4  * Copyright (C) 2008 The Geeqie Team
5  *
6  * Author: John Ellis
7  *
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!
11  */
12
13
14 #ifndef MAIN_H
15 #define MAIN_H
16
17 #ifdef HAVE_CONFIG_H
18 #  include "config.h"
19 #endif
20
21 #ifdef HAVE_STRVERSCMP
22 #  ifndef _GNU_SOURCE
23 #    define _GNU_SOURCE
24 #  endif
25 #endif
26
27 #include "intl.h"
28
29
30 /*
31  *-------------------------------------
32  * Standard library includes
33  *-------------------------------------
34  */
35
36 #include <pwd.h>
37 #include <stdio.h>
38 #include <stdlib.h>
39 #include <string.h>
40 #include <time.h>
41 #include <unistd.h>
42 #include <sys/stat.h>
43 #include <sys/time.h>
44 #include <sys/types.h>
45 #include <dirent.h>
46 #include <fcntl.h>
47
48 /*
49  *-------------------------------------
50  * includes for glib / gtk / gdk-pixbuf
51  *-------------------------------------
52  */
53
54 #include <gdk/gdk.h>
55 #include <gtk/gtk.h>
56
57 #include <gdk-pixbuf/gdk-pixbuf.h>
58 #include <gdk-pixbuf/gdk-pixbuf-loader.h>
59
60
61 /*
62  *----------------------------------------------------------------------------
63  * defines
64  *----------------------------------------------------------------------------
65  */
66
67 #define USE_XDG 0
68
69 #define GQ_APPNAME "Geeqie"
70 #define GQ_APPNAME_LC "geeqie"
71 #define GQ_WEBSITE "geeqie.sourceforge.net"
72 #define GQ_EMAIL_ADDRESS "geeqie-devel@lists.sourceforge.net"
73
74 #define GQ_WMCLASS GQ_APPNAME_LC
75
76 #define GQ_RC_DIR               "." GQ_APPNAME_LC
77 #define GQ_COLLECTIONS_DIR      "collections"
78 #define GQ_TRASH_DIR            "trash"
79
80 #define GQ_SYSTEM_WIDE_DIR    "/etc/" GQ_APPNAME_LC
81
82 #define RC_FILE_NAME GQ_APPNAME_LC "rc"
83
84 #define GQ_COLLECTION_EXT ".gqv"
85
86 #define SCROLL_RESET_TOPLEFT 0
87 #define SCROLL_RESET_CENTER 1
88 #define SCROLL_RESET_NOCHANGE 2
89
90 #define MOUSEWHEEL_SCROLL_SIZE 20
91
92 #define GQ_EDITOR_GENERIC_SLOTS 10
93
94 #define GQ_DEFAULT_SHELL_PATH "/bin/sh"
95 #define GQ_DEFAULT_SHELL_OPTIONS "-c"
96
97 #define COLOR_PROFILE_INPUTS 4
98
99 #define DEFAULT_THUMB_WIDTH     96
100 #define DEFAULT_THUMB_HEIGHT    72
101
102 #define DEFAULT_MINIMAL_WINDOW_SIZE 32
103
104 #define IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT   4096
105 #define IMAGE_LOADER_READ_BUFFER_SIZE_MIN       512
106 #define IMAGE_LOADER_READ_BUFFER_SIZE_MAX       16*1024*1024
107
108 #define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT       1
109 #define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN           1
110 #define IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX           16
111
112 #define PANEL_MIN_WIDTH 64
113 #define PANEL_DEFAULT_WIDTH 288
114 #define PANEL_MAX_WIDTH 1200
115
116 #define DEFAULT_OVERLAY_INFO    "%collection:<i>*</i>\\n%" \
117                                 "(%number%/%total%) [%zoom%] <b>%name%</b>\n" \
118                                 "%res%|%date%|%size%\n" \
119                                 "%formatted.Aperture%|%formatted.ShutterSpeed%|%formatted.ISOSpeedRating:ISO *%|%formatted.FocalLength%|%formatted.ExposureBias:* Ev%\n" \
120                                 "%formatted.Camera:40%|%formatted.Flash%"
121
122 #include "typedefs.h"
123 #include "debug.h"
124 #include "options.h"
125
126 /*
127  *----------------------------------------------------------------------------
128  * main.c
129  *----------------------------------------------------------------------------
130  */
131
132 /*
133  * This also doubles as the main.c header.
134  */
135
136 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event);
137 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
138
139 void exit_program(void);
140
141 #define CASE_SORT(a, b) ( (options->file_sort.case_sensitive) ? strcmp((a), (b)) : strcasecmp((a), (b)) )
142
143
144 #endif
145 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */