Fix warnings in exiv2
[geeqie.git] / src / image-load-jpeg.h
1 /*
2  * Copyright (C) 2004 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: Vladimir Nadvornik
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 IMAGE_LOAD_JPEG_H
23 #define IMAGE_LOAD_JPEG_H
24
25 #include <config.h>
26
27 #if HAVE_JPEG
28 #include <memory>
29
30 #include <gdk-pixbuf/gdk-pixbuf.h>
31 #include <glib.h>
32
33 #include "image-load.h"
34
35 struct ImageLoaderJpeg : public ImageLoaderBackend
36 {
37 public:
38         ~ImageLoaderJpeg() override;
39
40         void init(AreaUpdatedCb area_updated_cb, SizePreparedCb size_prepared_cb, AreaPreparedCb area_prepared_cb, gpointer data) override;
41         void set_size(int width, int height) override;
42         gboolean write(const guchar *buf, gsize &chunk_size, gsize count, GError **error) override;
43         GdkPixbuf *get_pixbuf() override;
44         void abort() override;
45         gchar *get_format_name() override;
46         gchar **get_format_mime_types() override;
47
48 private:
49         AreaUpdatedCb area_updated_cb;
50         SizePreparedCb size_prepared_cb;
51         AreaPreparedCb area_prepared_cb;
52
53         gpointer data;
54
55         GdkPixbuf *pixbuf;
56         guint requested_width;
57         guint requested_height;
58
59         gboolean aborted;
60         gboolean stereo;
61 };
62
63 std::unique_ptr<ImageLoaderBackend> get_image_loader_backend_jpeg();
64 #endif
65
66 #endif
67
68 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */