os/boardsupport/emulator/emulatorbsp/inc/monitors.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/boardsupport/emulator/emulatorbsp/inc/monitors.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,78 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// wins\inc\monitors.h
    1.18 +// Declare stuff we need for multiple monitor support.
    1.19 +// (Not available in the version of windows.h we use.)
    1.20 +// 
    1.21 +//
    1.22 +
    1.23 +#ifndef __MONITORS_H__
    1.24 +#define __MONITORS_H__
    1.25 +
    1.26 +#ifndef SM_CMONITORS
    1.27 +
    1.28 +#ifdef __cplusplus
    1.29 +extern "C" {
    1.30 +#endif
    1.31 +
    1.32 +#define SM_XVIRTUALSCREEN       76
    1.33 +#define SM_YVIRTUALSCREEN       77
    1.34 +#define SM_CXVIRTUALSCREEN      78
    1.35 +#define SM_CYVIRTUALSCREEN      79
    1.36 +#define SM_CMONITORS            80
    1.37 +#define SM_SAMEDISPLAYFORMAT    81
    1.38 +
    1.39 +DECLARE_HANDLE(HMONITOR);
    1.40 +
    1.41 +typedef struct tagMONITORINFO
    1.42 +{
    1.43 +    DWORD   cbSize;
    1.44 +    RECT    rcMonitor;
    1.45 +    RECT    rcWork;
    1.46 +    DWORD   dwFlags;
    1.47 +} MONITORINFO, *LPMONITORINFO;
    1.48 +
    1.49 +#ifdef __cplusplus
    1.50 +}
    1.51 +#endif
    1.52 +
    1.53 +#endif		// ifndef SM_CMONITORS
    1.54 +
    1.55 +/* CodeWarrior include files have SM_CMONITORS defined unconditionally,
    1.56 + * but MONITOR_DEFAULTTONULL etc depend upon _WIN32_WINDOWS values.
    1.57 + */
    1.58 +#ifndef MONITOR_DEFAULTTONULL
    1.59 +
    1.60 +#define MONITOR_DEFAULTTONULL       0x00000000
    1.61 +#define MONITOR_DEFAULTTOPRIMARY    0x00000001
    1.62 +#define MONITOR_DEFAULTTONEAREST    0x00000002
    1.63 +
    1.64 +#endif		// ifndef MONITOR_DEFAULTTONULL
    1.65 +
    1.66 +class SystemMonitors
    1.67 +	{
    1.68 +public:
    1.69 +	SystemMonitors(void);
    1.70 +	inline TInt Count(void) { return iCount; };
    1.71 +	TBool RectAllOnOne(RECT& rect);
    1.72 +	HMONITOR MonitorFromRect(const RECT& rect, UINT flags=MONITOR_DEFAULTTONULL);
    1.73 +	TBool GetMonitorInfo(HMONITOR monitor, LPMONITORINFO pMonInfo);
    1.74 +private:
    1.75 +	TBool iHaveMultiMonFunctions;
    1.76 +	TBool iCount;
    1.77 +	HMONITOR (WINAPI *ipMonitorFromRect)(LPCRECT lprcScreenCoords, UINT uFlags);
    1.78 +	BOOL (WINAPI *ipGetMonitorInfo)(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo);
    1.79 +	};
    1.80 +
    1.81 +#endif		// ifndef __MONITORS_H__