Update clang-tidy-check for build options
[geeqie.git] / src / pan-view / pan-types.h
1 /*
2  * Copyright (C) 2006 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: John Ellis
6  *
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.
11  *
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.
16  *
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.
20  */
21
22 #ifndef PAN_VIEW_PAN_TYPES_H
23 #define PAN_VIEW_PAN_TYPES_H
24
25 #include <gtk/gtk.h>
26
27 #include "cache-loader.h"
28 #include "filedata.h"
29
30 struct FullScreenData;
31 struct ImageWindow;
32 struct PanViewFilterUi;
33 struct PanViewSearchUi;
34 struct ThumbLoader;
35
36 /* thumbnail sizes and spacing */
37
38 #define PAN_THUMB_SIZE_DOTS 4
39 #define PAN_THUMB_SIZE_NONE 24
40 #define PAN_THUMB_SIZE_SMALL 64
41 #define PAN_THUMB_SIZE_NORMAL 128
42 #define PAN_THUMB_SIZE_LARGE 256
43 #define PAN_THUMB_SIZE pw->thumb_size
44
45 #define PAN_THUMB_GAP_DOTS 2
46 #define PAN_THUMB_GAP_SMALL 14
47 #define PAN_THUMB_GAP_NORMAL 30
48 #define PAN_THUMB_GAP_LARGE 40
49 #define PAN_THUMB_GAP_HUGE 50
50 #define PAN_THUMB_GAP pw->thumb_gap
51
52 /* basic sizes, colors, spacings */
53
54 #define PAN_SHADOW_OFFSET 6
55 #define PAN_SHADOW_FADE 5
56 #define PAN_SHADOW_COLOR 0, 0, 0
57 #define PAN_SHADOW_ALPHA 64
58
59 #define PAN_BOX_COLOR 255, 255, 255
60 #define PAN_BOX_ALPHA 100
61 #define PAN_BOX_BORDER 20
62
63 #define PAN_BOX_OUTLINE_THICKNESS 4
64 #define PAN_BOX_OUTLINE_COLOR 0, 0, 0
65 #define PAN_BOX_OUTLINE_ALPHA 128
66
67 #define PAN_TEXT_COLOR 0, 0, 0
68
69
70 enum PanLayoutType {
71         PAN_LAYOUT_TIMELINE = 0,
72         PAN_LAYOUT_CALENDAR,
73         PAN_LAYOUT_FOLDERS_LINEAR,
74         PAN_LAYOUT_FOLDERS_FLOWER,
75         PAN_LAYOUT_GRID,
76         PAN_LAYOUT_COUNT
77 };
78
79 enum PanImageSize {
80         PAN_IMAGE_SIZE_THUMB_DOTS = 0,
81         PAN_IMAGE_SIZE_THUMB_NONE,
82         PAN_IMAGE_SIZE_THUMB_SMALL,
83         PAN_IMAGE_SIZE_THUMB_NORMAL,
84         PAN_IMAGE_SIZE_THUMB_LARGE,
85         PAN_IMAGE_SIZE_10,
86         PAN_IMAGE_SIZE_25,
87         PAN_IMAGE_SIZE_33,
88         PAN_IMAGE_SIZE_50,
89         PAN_IMAGE_SIZE_100,
90         PAN_IMAGE_SIZE_COUNT
91 };
92
93 enum PanItemType {
94         PAN_ITEM_NONE,
95         PAN_ITEM_THUMB,
96         PAN_ITEM_BOX,
97         PAN_ITEM_TRIANGLE,
98         PAN_ITEM_TEXT,
99         PAN_ITEM_IMAGE
100 };
101
102 enum PanTextAttrType {
103         PAN_TEXT_ATTR_NONE = 0,
104         PAN_TEXT_ATTR_BOLD = 1 << 0,
105         PAN_TEXT_ATTR_HEADING = 1 << 1,
106         PAN_TEXT_ATTR_MARKUP = 1 << 2
107 };
108
109 enum PanBorderType {
110         PAN_BORDER_NONE = 0,
111         PAN_BORDER_1 = 1 << 0,
112         PAN_BORDER_2 = 1 << 1,
113         PAN_BORDER_3 = 1 << 2,
114         PAN_BORDER_4 = 1 << 3
115 };
116
117 #define PAN_BORDER_TOP          PAN_BORDER_1
118 #define PAN_BORDER_RIGHT                PAN_BORDER_2
119 #define PAN_BORDER_BOTTOM       PAN_BORDER_3
120 #define PAN_BORDER_LEFT         PAN_BORDER_4
121
122
123 struct PanColor {
124         guint8 r;
125         guint8 g;
126         guint8 b;
127         guint8 a;
128 };
129
130 struct PanItem {
131         PanItemType type;
132         gint x;
133         gint y;
134         gint width;
135         gint height;
136         gchar *key;
137
138         FileData *fd;
139
140         GdkPixbuf *pixbuf;
141         gint refcount;
142
143         gchar *text;
144         PanTextAttrType text_attr;
145
146         PanColor color;
147
148         PanColor color2;
149         gint border;
150
151         gpointer data;
152
153         gboolean queued;
154 };
155
156 struct PanWindow
157 {
158         GtkWidget *window;
159         ImageWindow *imd;
160         ImageWindow *imd_normal;
161         FullScreenData *fs;
162
163         GtkWidget *path_entry;
164
165         GtkWidget *label_message;
166         GtkWidget *label_zoom;
167
168         PanViewSearchUi *search_ui;
169         PanViewFilterUi *filter_ui;
170
171         GtkWidget *date_button;
172
173         GtkWidget *scrollbar_h;
174         GtkWidget *scrollbar_v;
175
176         FileData *dir_fd;
177         PanLayoutType layout;
178         PanImageSize size;
179         gint thumb_size;
180         gint thumb_gap;
181         gint image_size;
182         gboolean exif_date_enable;
183
184         gint info_image_size;
185         gboolean info_includes_exif;
186
187         gboolean ignore_symlinks;
188
189         GList *list;
190         GList *list_static;
191         GList *list_grid;
192
193         GList *cache_list;
194         GList *cache_todo;
195         gint cache_count;
196         gint cache_total;
197         gint cache_tick;
198         CacheLoader *cache_cl;
199
200         ImageLoader *il;
201         ThumbLoader *tl;
202         PanItem *queue_pi;
203         GList *queue;
204
205         PanItem *click_pi;
206         PanItem *search_pi;
207
208         gint idle_id;
209 };
210
211 struct PanCacheData {
212         FileData *fd;
213         CacheData *cd;
214 };
215
216 #endif
217 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */