Update ooo320-m1
[ooovba.git] / vcl / win / inc / salsys.h
blobe01fd1433d23a628dddb7caba4c33c71a021f6de
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: salsys.h,v $
10 * $Revision: 1.6 $
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 _SV_SALSYS_H
32 #define _SV_SALSYS_H
34 #include <vcl/salsys.hxx>
36 #include <vector>
37 #include <map>
39 class WinSalSystem : public SalSystem
41 public:
42 struct DisplayMonitor
44 rtl::OUString m_aName;
45 rtl::OUString m_aDeviceName;
46 Rectangle m_aArea;
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,
55 DWORD nStateFlags )
56 : m_aName( rName ),
57 m_aDeviceName( rDevName ),
58 m_aArea( rArea ),
59 m_aWorkArea( rWorkArea ),
60 m_nStateFlags( nStateFlags )
63 ~DisplayMonitor() {}
65 private:
66 std::vector<DisplayMonitor> m_aMonitors;
67 std::map<rtl::OUString, unsigned int> m_aDeviceNameToMonitor;
68 unsigned int m_nPrimary;
69 public:
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,
82 int nDefaultButton);
83 bool initMonitors();
84 // discards monitorinfo; used by WM_DISPLAYCHANGED handler
85 void clearMonitors();
86 const std::vector<DisplayMonitor>& getMonitors()
87 { initMonitors(); return m_aMonitors;}
89 BOOL handleMonitorCallback( sal_IntPtr /*HMONITOR*/,
90 sal_IntPtr /*HDC*/,
91 sal_IntPtr /*LPRECT*/ );
94 #endif // _SV_SALSYS_H