1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: salvd.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 // -=-= #includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
36 #include <vcl/salvd.hxx>
38 // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
42 // -=-= SalVirDevData -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
43 class X11SalVirtualDevice
: public SalVirtualDevice
45 SalDisplay
*pDisplay_
;
46 X11SalGraphics
*pGraphics_
;
55 BOOL bGraphics_
; // is Graphics used
59 X11SalVirtualDevice();
60 virtual ~X11SalVirtualDevice();
62 BOOL
Init( SalDisplay
*pDisplay
,
66 Pixmap hDrawable
= None
,
67 void* pRenderFormat
= NULL
);
68 inline void InitGraphics( X11SalVirtualDevice
*pVD
);
70 inline Display
*GetXDisplay() const;
71 inline SalDisplay
*GetDisplay() const;
72 inline BOOL
IsDisplay() const;
73 inline Pixmap
GetDrawable() const { return hDrawable_
; }
74 inline USHORT
GetDepth() const { return nDepth_
; }
75 int GetWidth() const { return nDX_
; }
76 int GetHeight() const { return nDY_
; }
77 int GetScreenNumber() const { return m_nScreen
; }
79 virtual SalGraphics
* GetGraphics();
80 virtual void ReleaseGraphics( SalGraphics
* pGraphics
);
82 // Set new size, without saving the old contents
83 virtual BOOL
SetSize( long nNewDX
, long nNewDY
);
84 virtual void GetSize( long& rWidth
, long& rHeight
);
87 #ifdef _SV_SALDISP_HXX
89 inline void X11SalVirtualDevice::InitGraphics( X11SalVirtualDevice
*pVD
)
90 { pGraphics_
->Init( pVD
); }
92 inline Display
*X11SalVirtualDevice::GetXDisplay() const
93 { return pDisplay_
->GetDisplay(); }
95 inline SalDisplay
*X11SalVirtualDevice::GetDisplay() const
98 inline BOOL
X11SalVirtualDevice::IsDisplay() const
99 { return pDisplay_
->IsDisplay(); }
103 #endif // _SV_SALVD_H