]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/quartz/quartzloader.h
Add some state checking to ImageLoader
[libs/gui.git] / source / graphics / quartz / quartzloader.h
1 #ifndef MSP_GRAPHICS_QUARTZLOADER_H_
2 #define MSP_GRAPHICS_QUARTZLOADER_H_
3
4 #include <msp/graphics/imageloader.h>
5
6 namespace Msp {
7 namespace Graphics {
8
9 class QuartzLoader: public ImageLoader
10 {
11 private:
12         struct Private;
13
14         Private *priv;
15
16 public:
17         QuartzLoader(IO::Seekable &);
18         virtual ~QuartzLoader();
19
20         /* Experimentally found value, works for png and jpeg at least.  8 bytes
21         is not enough for Quartz to recognize png. */
22         static unsigned get_signature_size() { return 12; }
23         static bool detect(const std::string &);
24
25         virtual void load_(Image::Data &);
26 };
27
28 } // namespace Graphics
29 } // namespace Msp
30
31 #endif