1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 3 /* 4 * GThumb 5 * 6 * Copyright (C) 2001-2008 The Free Software Foundation, Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef TYPEDEFS_H 23 #define TYPEDEFS_H 24 25 #include <gtk/gtk.h> 26 27 G_BEGIN_DECLS 28 29 30 #define BOOKMARKS_FILE "bookmarks.xbel" 31 #define FILTERS_FILE "filters.xml" 32 #define TAGS_FILE "tags.xml" 33 #define FILE_CACHE "cache" 34 #define SHORTCUTS_FILE "shortcuts.xml" 35 36 37 typedef enum { 38 GTH_CLICK_POLICY_NAUTILUS, 39 GTH_CLICK_POLICY_SINGLE, 40 GTH_CLICK_POLICY_DOUBLE 41 } GthClickPolicy; 42 43 44 typedef enum { 45 GTH_DIRECTION_FORWARD, 46 GTH_DIRECTION_REVERSE, 47 GTH_DIRECTION_RANDOM 48 } GthDirection; 49 50 51 /* The GthTransform numeric values range from 1 to 8, corresponding to 52 * the valid range of Exif orientation tags. The name associated with each 53 * numeric valid describes the data transformation required that will allow 54 * the orientation value to be reset to "1" without changing the displayed 55 * image. 56 * GthTransform and ExifShort values are interchangeably in a number of 57 * places. The main difference is that ExifShort can have a value of zero, 58 * corresponding to an error or an absence of an Exif orientation tag. 59 * See bug 361913 for additional details. */ 60 typedef enum { 61 GTH_TRANSFORM_NONE = 1, /* no transformation */ 62 GTH_TRANSFORM_FLIP_H, /* horizontal flip */ 63 GTH_TRANSFORM_ROTATE_180, /* 180-degree rotation */ 64 GTH_TRANSFORM_FLIP_V, /* vertical flip */ 65 GTH_TRANSFORM_TRANSPOSE, /* transpose across UL-to-LR axis (= rotate_90 + flip_h) */ 66 GTH_TRANSFORM_ROTATE_90, /* 90-degree clockwise rotation */ 67 GTH_TRANSFORM_TRANSVERSE, /* transpose across UR-to-LL axis (= rotate_90 + flip_v) */ 68 GTH_TRANSFORM_ROTATE_270 /* 270-degree clockwise */ 69 } GthTransform; 70 71 72 typedef enum { 73 GTH_UNIT_PIXELS, 74 GTH_UNIT_PERCENTAGE 75 } GthUnit; 76 77 78 typedef enum { 79 GTH_METRIC_PIXELS, 80 GTH_METRIC_MILLIMETERS, 81 GTH_METRIC_INCHES 82 } GthMetric; 83 84 85 typedef enum { 86 GTH_ASPECT_RATIO_NONE = 0, 87 GTH_ASPECT_RATIO_SQUARE, 88 GTH_ASPECT_RATIO_IMAGE, 89 GTH_ASPECT_RATIO_DISPLAY, 90 GTH_ASPECT_RATIO_5x4, 91 GTH_ASPECT_RATIO_4x3, 92 GTH_ASPECT_RATIO_7x5, 93 GTH_ASPECT_RATIO_3x2, 94 GTH_ASPECT_RATIO_16x10, 95 GTH_ASPECT_RATIO_16x9, 96 GTH_ASPECT_RATIO_185x100, 97 GTH_ASPECT_RATIO_239x100, 98 GTH_ASPECT_RATIO_CUSTOM 99 } GthAspectRatio; 100 101 102 typedef enum { 103 GTH_OVERWRITE_SKIP, 104 GTH_OVERWRITE_RENAME, 105 GTH_OVERWRITE_ASK, 106 GTH_OVERWRITE_OVERWRITE 107 } GthOverwriteMode; 108 109 110 typedef enum { 111 GTH_GRID_NONE = 0, 112 GTH_GRID_THIRDS, 113 GTH_GRID_GOLDEN, 114 GTH_GRID_CENTER, 115 GTH_GRID_UNIFORM 116 } GthGridType; 117 118 119 typedef enum /*< skip >*/ { 120 GTH_CHANNEL_RED = 0, 121 GTH_CHANNEL_GREEN = 1, 122 GTH_CHANNEL_BLUE = 2, 123 GTH_CHANNEL_ALPHA = 3 124 } GthChannel; 125 126 127 typedef enum /*< skip >*/ { 128 GTH_COLOR_SPACE_UNKNOWN, 129 GTH_COLOR_SPACE_SRGB, 130 GTH_COLOR_SPACE_UNCALIBRATED 131 } GthColorSpace; 132 133 134 typedef enum /*< skip >*/ { 135 GTH_ZOOM_IN, 136 GTH_ZOOM_OUT 137 } GthZoomType; 138 139 140 typedef enum /*< skip >*/ { 141 /* Shortcut handled by Gtk, not customizable, specified for 142 * documentation. */ 143 GTH_SHORTCUT_CONTEXT_INTERNAL = 1 << 1, 144 145 /* Shortcut handled in gth_window_activate_shortcut, not customizable, 146 * specified for documentation. */ 147 GTH_SHORTCUT_CONTEXT_FIXED = 1 << 2, 148 149 /* Shortcut available when the window is in browser mode. */ 150 GTH_SHORTCUT_CONTEXT_BROWSER = 1 << 3, 151 152 /* Shortcut available when the window is in viewer mode. */ 153 GTH_SHORTCUT_CONTEXT_VIEWER = 1 << 4, 154 155 /* Shortcut available in slideshows. */ 156 GTH_SHORTCUT_CONTEXT_SLIDESHOW = 1 << 5, 157 158 /* Entry used for documentation only. */ 159 GTH_SHORTCUT_CONTEXT_DOC = 1 << 6, 160 161 /* Aggregated values: */ 162 163 GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER = (GTH_SHORTCUT_CONTEXT_BROWSER | GTH_SHORTCUT_CONTEXT_VIEWER), 164 GTH_SHORTCUT_CONTEXT_ANY = (GTH_SHORTCUT_CONTEXT_BROWSER | GTH_SHORTCUT_CONTEXT_VIEWER | GTH_SHORTCUT_CONTEXT_SLIDESHOW), 165 } GthShortcutContext; 166 167 168 typedef void (*DataFunc) (gpointer user_data); 169 typedef void (*ReadyFunc) (GError *error, 170 gpointer user_data); 171 typedef void (*ReadyCallback) (GObject *object, 172 GError *error, 173 gpointer user_data); 174 typedef void (*ProgressCallback) (GObject *object, 175 const char *description, 176 const char *details, 177 gboolean pulse, 178 double fraction, 179 gpointer user_data); 180 typedef void (*DialogCallback) (gboolean opened, 181 GtkWidget *dialog, 182 gpointer user_data); 183 184 185 G_END_DECLS 186 187 #endif /* TYPEDEFS_H */ 188