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: dx_config.hxx,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 ************************************************************************/
31 #ifndef _DXCANVAS_DXCONFIG_HXX
32 #define _DXCANVAS_DXCONFIG_HXX
34 #include <unotools/configitem.hxx>
35 #include <boost/optional.hpp>
38 namespace basegfx
{ class B2IVector
; }
42 /** Provide DX canvas config data
44 class DXCanvasItem
: public ::utl::ConfigItem
53 sal_Int32 nDeviceSubSysId
;
54 sal_Int32 nDeviceRevision
;
57 sal_Int32 nDriverVersion
;
58 sal_Int32 nDriverSubVersion
;
59 sal_Int32 nDriverBuildId
;
61 bool operator<( const DeviceInfo
& rRHS
) const
63 return nVendorId
!= rRHS
.nVendorId
? nVendorId
< rRHS
.nVendorId
:
64 (nDeviceId
!= rRHS
.nDeviceId
? nDeviceId
< rRHS
.nDeviceId
:
65 (nDeviceSubSysId
!= rRHS
.nDeviceSubSysId
? nDeviceSubSysId
< rRHS
.nDeviceSubSysId
:
66 (nDeviceRevision
!= rRHS
.nDeviceRevision
? nDeviceRevision
< rRHS
.nDeviceRevision
:
67 (nDriverId
!= rRHS
.nDriverId
? nDriverId
< rRHS
.nDriverId
:
68 (nDriverVersion
!= rRHS
.nDriverVersion
? nDriverVersion
< rRHS
.nDriverVersion
:
69 (nDriverSubVersion
!= rRHS
.nDriverSubVersion
? nDriverSubVersion
< rRHS
.nDriverSubVersion
:
70 (nDriverBuildId
!= rRHS
.nDriverBuildId
? nDriverBuildId
< rRHS
.nDriverBuildId
: false)))))));
76 bool isDeviceUsable( const DeviceInfo
& rDeviceInfo
) const;
77 bool isBlacklistCurrentDevice() const;
78 void blacklistDevice( const DeviceInfo
& rDeviceInfo
);
79 void adaptMaxTextureSize( basegfx::B2IVector
& io_maxTextureSize
) const;
82 typedef std::set
< DeviceInfo
> ValueSet
;
84 boost::optional
<sal_Int32
> maMaxTextureSize
;
85 bool mbBlacklistCurrentDevice
;
90 #endif /* #ifndef _DXCANVAS_DXCONFIG_HXX */