1fb07ece0SStephan Aßmus /* 2*325a6253SAxel Dörfler * Copyright 2006-2007, Haiku. All rights reserved. 3fb07ece0SStephan Aßmus * Distributed under the terms of the MIT License. 4fb07ece0SStephan Aßmus * 5fb07ece0SStephan Aßmus * Authors: 6fb07ece0SStephan Aßmus * Stephan Aßmus <superstippi@gmx.de> 7fb07ece0SStephan Aßmus */ 8fb07ece0SStephan Aßmus #ifndef FLAT_ICON_IMPORTER_H 9fb07ece0SStephan Aßmus #define FLAT_ICON_IMPORTER_H 10fb07ece0SStephan Aßmus 11*325a6253SAxel Dörfler 12014c7e94SStephan Aßmus #ifdef ICON_O_MATIC 13014c7e94SStephan Aßmus # include "Importer.h" 14014c7e94SStephan Aßmus #else 15fb07ece0SStephan Aßmus # include <SupportDefs.h> 16014c7e94SStephan Aßmus #endif 17fb07ece0SStephan Aßmus 18fb07ece0SStephan Aßmus class BMessage; 19fb07ece0SStephan Aßmus class BPositionIO; 20*325a6253SAxel Dörfler 21*325a6253SAxel Dörfler namespace BPrivate { 22*325a6253SAxel Dörfler namespace Icon { 23*325a6253SAxel Dörfler 24fb07ece0SStephan Aßmus class Icon; 25fb07ece0SStephan Aßmus class LittleEndianBuffer; 26fb07ece0SStephan Aßmus class PathContainer; 27014c7e94SStephan Aßmus class Shape; 28fb07ece0SStephan Aßmus class ShapeContainer; 29fb07ece0SStephan Aßmus class StyleContainer; 30fb07ece0SStephan Aßmus 31014c7e94SStephan Aßmus #ifdef ICON_O_MATIC 32014c7e94SStephan Aßmus class FlatIconImporter : public Importer { 33014c7e94SStephan Aßmus #else 34fb07ece0SStephan Aßmus class FlatIconImporter { 35014c7e94SStephan Aßmus #endif 36fb07ece0SStephan Aßmus public: 37fb07ece0SStephan Aßmus FlatIconImporter(); 38fb07ece0SStephan Aßmus virtual ~FlatIconImporter(); 39fb07ece0SStephan Aßmus 4086133f5eSStephan Aßmus // FlatIconImporter 4186133f5eSStephan Aßmus status_t Import(Icon* icon, 42fb07ece0SStephan Aßmus BPositionIO* stream); 43fb07ece0SStephan Aßmus 44fb07ece0SStephan Aßmus status_t Import(Icon* icon, 45fb07ece0SStephan Aßmus uint8* buffer, size_t size); 46fb07ece0SStephan Aßmus 47fb07ece0SStephan Aßmus private: 48fb07ece0SStephan Aßmus status_t _ParseSections(LittleEndianBuffer& buffer, 49fb07ece0SStephan Aßmus Icon* icon); 50fb07ece0SStephan Aßmus 51fb07ece0SStephan Aßmus status_t _ParseStyles(LittleEndianBuffer& buffer, 52fb07ece0SStephan Aßmus StyleContainer* styles); 53fb07ece0SStephan Aßmus status_t _ParsePaths(LittleEndianBuffer& buffer, 54fb07ece0SStephan Aßmus PathContainer* paths); 55014c7e94SStephan Aßmus Shape* _ReadPathSourceShape( 56014c7e94SStephan Aßmus LittleEndianBuffer& buffer, 57014c7e94SStephan Aßmus StyleContainer* styles, 58014c7e94SStephan Aßmus PathContainer* paths); 59fb07ece0SStephan Aßmus status_t _ParseShapes(LittleEndianBuffer& buffer, 60fb07ece0SStephan Aßmus StyleContainer* styles, 61fb07ece0SStephan Aßmus PathContainer* paths, 62fb07ece0SStephan Aßmus ShapeContainer* shapes); 63fb07ece0SStephan Aßmus }; 64fb07ece0SStephan Aßmus 65*325a6253SAxel Dörfler } // namespace Icon 66*325a6253SAxel Dörfler } // namespace BPrivate 67*325a6253SAxel Dörfler 68fb07ece0SStephan Aßmus #endif // FLAT_ICON_IMPORTER_H 69