Bugfix : Zooming works correct, no more errors on screen.
[xara-cairo.git] / xarlib / xarlib.h
blobe08bf4d0ce84d21bcac0e860974aa165353faac4
1 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
2 ============================XARAHEADERSTART================================
3 Xara X/Xtreme, a vector drawing and manipulation program.
4 Copyright (C) 2005 Xara Group Ltd.
6 This program is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation; either version 2 of the License, or (at your option) any later
9 version.
11 This program is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along with
16 this program; if not, write to the Free Software Foundation, Inc., 51
17 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 Users wishing to use this library in proprietary products which are not
20 themselves to be released under the GNU Public License should contact Xara for
21 a license to do so. Such a license will normally be granted free of charge.
23 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
24 http://www.xara.com/
26 ===========================XARAHEADEREND===================================*/
28 #ifndef INC_XARLIB
29 #define INC_XARLIB
31 #include "camtypes.h"
32 #include "cxftags.h"
33 #include "cxfrec.h"
35 class CXaraFileRecord;
36 class CXaraFile;
37 class CCDiskFile;
38 class CCMemFile;
40 typedef BOOL (RecordHandler)(void*, CXaraFileRecord*);
42 class CXarImport
44 public:
45 virtual ~CXarImport() {};
46 virtual BOOL PrepareImport() = 0;
47 virtual BOOL PrepareImport(TCHAR* pFileName) = 0;
48 #if defined(USE_COM_STREAM)
49 virtual BOOL PrepareImport(IStream* pStream) = 0;
50 #endif // defined(USE_COM_STREAM)
51 virtual BOOL PrepareImport(BYTE* pBuffer, UINT32 Size) = 0;
52 virtual BOOL SetHandler(void* pMagic, RecordHandler* pHandlerFunk) = 0;
53 virtual BOOL DoImport() = 0;
56 class CXarExport
58 public:
59 virtual ~CXarExport() {};
60 virtual BOOL StartExport() = 0;
61 virtual BOOL StartExport(TCHAR* pFileName) = 0;
62 #if defined(USE_COM_STREAM)
63 virtual BOOL StartExport(IStream* pStream) = 0;
64 #endif // defined(USE_COM_STREAM)
65 virtual BOOL StartBufferedExport() = 0;
66 virtual BOOL WriteRecord(CXaraFileRecord* pRecord, UINT32* pRecordNum = NULL) = 0;
67 virtual BOOL WriteZeroSizedRecord(UINT32 Tag, UINT32* pRecordNum = NULL) = 0;
68 virtual BOOL GetExportBuffer(BYTE** ppBuffer, UINT32* pSize) = 0;
71 namespace XarLibrary
73 CXarImport* CreateImporter();
74 CXarExport* CreateExporter();
77 #endif