moreupdates
[synfig.git] / synfig-core / trunk / src / modules / mod_jpeg / mptr_jpeg.h
1 /*! ========================================================================
2 ** Synfig
3 ** Template Header File
4 ** $Id: mptr_jpeg.h,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
5 **
6 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
7 **
8 ** This software and associated documentation
9 ** are CONFIDENTIAL and PROPRIETARY property of
10 ** the above-mentioned copyright holder.
11 **
12 ** You may not copy, print, publish, or in any
13 ** other way distribute this software without
14 ** a prior written agreement with
15 ** the copyright holder.
16 **
17 ** === N O T E S ===========================================================
18 **
19 ** ========================================================================= */
20
21 /* === S T A R T =========================================================== */
22
23 #ifndef __SYNFIG_MPTR_JPEG_H
24 #define __SYNFIG_MPTR_JPEG_H
25
26 /* === H E A D E R S ======================================================= */
27
28 #define NOMINMAX
29 #include <synfig/importer.h>
30 #include <synfig/string.h>
31 #include <synfig/surface.h>
32 _ETL_BEGIN_CDECLS
33 #include <jpeglib.h>
34 _ETL_END_CDECLS
35 #include <setjmp.h>
36
37 /* === M A C R O S ========================================================= */
38
39 /* === T Y P E D E F S ===================================================== */
40
41 /* === C L A S S E S & S T R U C T S ======================================= */
42
43 class jpeg_mptr : public synfig::Importer
44 {
45         SYNFIG_IMPORTER_MODULE_EXT
46 private:
47         synfig::String filename;
48         synfig::Surface surface_buffer;
49
50         struct jpeg_decompress_struct cinfo;
51
52         static void my_error_exit (j_common_ptr cinfo);
53
54 public:
55         jpeg_mptr(const char *filename);
56         ~jpeg_mptr();
57
58         virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
59 };
60
61 /* === E N D =============================================================== */
62
63 #endif