os/boardsupport/emulator/emulatorbsp/inc/monitors.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// wins\inc\monitors.h
sl@0
    15
// Declare stuff we need for multiple monitor support.
sl@0
    16
// (Not available in the version of windows.h we use.)
sl@0
    17
// 
sl@0
    18
//
sl@0
    19
sl@0
    20
#ifndef __MONITORS_H__
sl@0
    21
#define __MONITORS_H__
sl@0
    22
sl@0
    23
#ifndef SM_CMONITORS
sl@0
    24
sl@0
    25
#ifdef __cplusplus
sl@0
    26
extern "C" {
sl@0
    27
#endif
sl@0
    28
sl@0
    29
#define SM_XVIRTUALSCREEN       76
sl@0
    30
#define SM_YVIRTUALSCREEN       77
sl@0
    31
#define SM_CXVIRTUALSCREEN      78
sl@0
    32
#define SM_CYVIRTUALSCREEN      79
sl@0
    33
#define SM_CMONITORS            80
sl@0
    34
#define SM_SAMEDISPLAYFORMAT    81
sl@0
    35
sl@0
    36
DECLARE_HANDLE(HMONITOR);
sl@0
    37
sl@0
    38
typedef struct tagMONITORINFO
sl@0
    39
{
sl@0
    40
    DWORD   cbSize;
sl@0
    41
    RECT    rcMonitor;
sl@0
    42
    RECT    rcWork;
sl@0
    43
    DWORD   dwFlags;
sl@0
    44
} MONITORINFO, *LPMONITORINFO;
sl@0
    45
sl@0
    46
#ifdef __cplusplus
sl@0
    47
}
sl@0
    48
#endif
sl@0
    49
sl@0
    50
#endif		// ifndef SM_CMONITORS
sl@0
    51
sl@0
    52
/* CodeWarrior include files have SM_CMONITORS defined unconditionally,
sl@0
    53
 * but MONITOR_DEFAULTTONULL etc depend upon _WIN32_WINDOWS values.
sl@0
    54
 */
sl@0
    55
#ifndef MONITOR_DEFAULTTONULL
sl@0
    56
sl@0
    57
#define MONITOR_DEFAULTTONULL       0x00000000
sl@0
    58
#define MONITOR_DEFAULTTOPRIMARY    0x00000001
sl@0
    59
#define MONITOR_DEFAULTTONEAREST    0x00000002
sl@0
    60
sl@0
    61
#endif		// ifndef MONITOR_DEFAULTTONULL
sl@0
    62
sl@0
    63
class SystemMonitors
sl@0
    64
	{
sl@0
    65
public:
sl@0
    66
	SystemMonitors(void);
sl@0
    67
	inline TInt Count(void) { return iCount; };
sl@0
    68
	TBool RectAllOnOne(RECT& rect);
sl@0
    69
	HMONITOR MonitorFromRect(const RECT& rect, UINT flags=MONITOR_DEFAULTTONULL);
sl@0
    70
	TBool GetMonitorInfo(HMONITOR monitor, LPMONITORINFO pMonInfo);
sl@0
    71
private:
sl@0
    72
	TBool iHaveMultiMonFunctions;
sl@0
    73
	TBool iCount;
sl@0
    74
	HMONITOR (WINAPI *ipMonitorFromRect)(LPCRECT lprcScreenCoords, UINT uFlags);
sl@0
    75
	BOOL (WINAPI *ipGetMonitorInfo)(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo);
sl@0
    76
	};
sl@0
    77
sl@0
    78
#endif		// ifndef __MONITORS_H__