]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/quartz/quartzloader.h
Add decorations for things which should be exported from the library
[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 #include <msp/graphics/mspgui_api.h>
6
7 namespace Msp {
8 namespace Graphics {
9
10 class MSPGUI_API QuartzLoader: public ImageLoader
11 {
12 private:
13         struct Private;
14
15         Private *priv = nullptr;
16
17 public:
18         QuartzLoader(IO::Seekable &);
19         ~QuartzLoader();
20
21         /* Experimentally found value, works for png and jpeg at least.  8 bytes
22         is not enough for Quartz to recognize png. */
23         static unsigned get_signature_size() { return 12; }
24         static bool detect(const std::string &);
25
26         void load_headers_(Image::Data &) override;
27         void load_pixels_(Image::Data &) override;
28 };
29
30 } // namespace Graphics
31 } // namespace Msp
32
33 #endif