1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SV_SALVD_H 29 #define _SV_SALVD_H 30 31 #include "premac.h" 32 #include <ApplicationServices/ApplicationServices.h> 33 #include "postmac.h" 34 35 #include "aqua/salconst.h" 36 #include "aqua/salcolorutils.hxx" 37 #include "aqua/salgdi.h" 38 39 #include "salvd.hxx" 40 41 #if PRAGMA_ONCE 42 #pragma once 43 #endif 44 45 // ======================================================================= 46 47 // ======================================================================= 48 49 // ----------------- 50 // - SalVirDevData - 51 // ----------------- 52 53 struct SalVirDevData 54 { 55 }; 56 57 typedef struct SalVirDevData SalVirDevData; 58 typedef SalVirDevData *SalVirDevDataPtr; 59 typedef SalVirDevDataPtr *SalVirDevDataHandle; 60 61 // ======================================================================= 62 63 class AquaSalGraphics; 64 65 // ----------------- 66 // - SalVirDevData - 67 // ----------------- 68 69 class AquaSalVirtualDevice : public SalVirtualDevice 70 { 71 private: 72 bool mbGraphicsUsed; // is Graphics used 73 bool mbForeignContext; // is mxContext from outside VCL 74 CGContextRef mxBitmapContext; 75 int mnBitmapDepth; 76 CGLayerRef mxLayer; // Quartz layer 77 AquaSalGraphics* mpGraphics; // current VirDev graphics 78 79 void Destroy(); 80 81 public: 82 AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData ); 83 virtual ~AquaSalVirtualDevice(); 84 85 virtual SalGraphics* GetGraphics(); 86 virtual void ReleaseGraphics( SalGraphics* pGraphics ); 87 virtual sal_Bool SetSize( long nNewDX, long nNewDY ); 88 virtual void GetSize( long& rWidth, long& rHeight ); 89 }; 90 91 // ======================================================================= 92 93 #endif // _SV_SALVD_H 94