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: salsys.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 #include <vcl/salsys.hxx>
39 class WinSalSystem
: public SalSystem
44 rtl::OUString m_aName
;
45 rtl::OUString m_aDeviceName
;
47 Rectangle m_aWorkArea
;
48 sal_Int32 m_nStateFlags
;
50 DisplayMonitor() : m_nStateFlags( 0 ) {}
51 DisplayMonitor( const rtl::OUString
& rName
,
52 const rtl::OUString
& rDevName
,
53 const Rectangle
& rArea
,
54 const Rectangle
& rWorkArea
,
57 m_aDeviceName( rDevName
),
59 m_aWorkArea( rWorkArea
),
60 m_nStateFlags( nStateFlags
)
66 std::vector
<DisplayMonitor
> m_aMonitors
;
67 std::map
<rtl::OUString
, unsigned int> m_aDeviceNameToMonitor
;
68 unsigned int m_nPrimary
;
70 WinSalSystem() : m_nPrimary( 0 ) {}
71 virtual ~WinSalSystem();
73 virtual unsigned int GetDisplayScreenCount();
74 virtual bool IsMultiDisplay();
75 virtual unsigned int GetDefaultDisplayNumber();
76 virtual Rectangle
GetDisplayScreenPosSizePixel( unsigned int nScreen
);
77 virtual Rectangle
GetDisplayWorkAreaPosSizePixel( unsigned int nScreen
);
78 virtual rtl::OUString
GetScreenName( unsigned int nScreen
);
79 virtual int ShowNativeMessageBox( const String
& rTitle
,
80 const String
& rMessage
,
81 int nButtonCombination
,
84 // discards monitorinfo; used by WM_DISPLAYCHANGED handler
86 const std::vector
<DisplayMonitor
>& getMonitors()
87 { initMonitors(); return m_aMonitors
;}
89 BOOL
handleMonitorCallback( sal_IntPtr
/*HMONITOR*/,
91 sal_IntPtr
/*LPRECT*/ );
94 #endif // _SV_SALSYS_H