/************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: salsys.h,v $ * * $Revision: 1.4 $ * * last change: $Author: hr $ $Date: 2007-06-27 20:55:36 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. * * * GNU Lesser General Public License Version 2.1 * ============================================= * Copyright 2005 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * ************************************************************************/ #ifndef _SV_SALSYS_H #define _SV_SALSYS_H #include #include #include class WinSalSystem : public SalSystem { struct DisplayMonitor { rtl::OUString m_aName; rtl::OUString m_aDeviceName; Rectangle m_aArea; Rectangle m_aWorkArea; sal_Int32 m_nStateFlags; DisplayMonitor() : m_nStateFlags( 0 ) {} DisplayMonitor( const rtl::OUString& rName, const rtl::OUString& rDevName, const Rectangle& rArea, const Rectangle& rWorkArea, DWORD nStateFlags ) : m_aName( rName ), m_aDeviceName( rDevName ), m_aArea( rArea ), m_aWorkArea( rWorkArea ), m_nStateFlags( nStateFlags ) { } ~DisplayMonitor() {} }; std::vector m_aMonitors; std::map m_aDeviceNameToMonitor; unsigned int m_nPrimary; public: WinSalSystem() : m_nPrimary( 0 ) {} virtual ~WinSalSystem(); virtual unsigned int GetDisplayScreenCount(); virtual bool IsMultiDisplay(); virtual unsigned int GetDefaultDisplayNumber(); virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); virtual rtl::OUString GetScreenName( unsigned int nScreen ); virtual int ShowNativeMessageBox( const String& rTitle, const String& rMessage, int nButtonCombination, int nDefaultButton); bool initMonitors(); // discards monitorinfo; used by WM_DISPLAYCHANGED handler void clearMonitors(); BOOL handleMonitorCallback( sal_IntPtr /*HMONITOR*/, sal_IntPtr /*HDC*/, sal_IntPtr /*LPRECT*/ ); }; #endif // _SV_SALSYS_H