xref: /trunk/main/vcl/inc/aqua/salvd.h (revision 24f6443d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SV_SALVD_H
25 #define _SV_SALVD_H
26 
27 #include "premac.h"
28 #include <ApplicationServices/ApplicationServices.h>
29 #include "postmac.h"
30 
31 #include "aqua/salconst.h"
32 #include "aqua/salcolorutils.hxx"
33 #include "aqua/salgdi.h"
34 
35 #include "salvd.hxx"
36 
37 #if PRAGMA_ONCE
38 	#pragma once
39 #endif
40 
41 // =======================================================================
42 
43 // =======================================================================
44 
45 // -----------------
46 // - SalVirDevData -
47 // -----------------
48 
49 struct SalVirDevData
50 {
51 };
52 
53 typedef struct SalVirDevData   SalVirDevData;
54 typedef SalVirDevData         *SalVirDevDataPtr;
55 typedef SalVirDevDataPtr      *SalVirDevDataHandle;
56 
57 // =======================================================================
58 
59 class AquaSalGraphics;
60 
61 // -----------------
62 // - SalVirDevData -
63 // -----------------
64 
65 class AquaSalVirtualDevice : public SalVirtualDevice
66 {
67 private:
68 	bool mbGraphicsUsed;             // is Graphics used
69     bool mbForeignContext;           // is mxContext from outside VCL
70     CGContextRef mxBitmapContext;
71     int mnBitmapDepth;
72 	CGLayerRef mxLayer;              // Quartz layer
73 	AquaSalGraphics* mpGraphics;     // current VirDev graphics
74 
75 	void Destroy();
76 
77 public:
78     AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData );
79     virtual ~AquaSalVirtualDevice();
80 
81     virtual SalGraphics*			GetGraphics();
82     virtual void					ReleaseGraphics( SalGraphics* pGraphics );
83     virtual sal_Bool                    SetSize( long nNewDX, long nNewDY );
84     virtual void                       GetSize( long& rWidth, long& rHeight );
85 };
86 
87 // =======================================================================
88 
89 #endif // _SV_SALVD_H
90