Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
winDisplayDeviceManager.h
1 /* -*- mode: c++ -*-
2  *
3  * pointing/output/windows/winDisplayDeviceManager.h --
4  *
5  * Initial software
6  * Authors: Izzatbek Mukhanov
7  * Copyright © Inria
8  *
9  * http://libpointing.org/
10  *
11  * This software may be used and distributed according to the terms of
12  * the GNU General Public License version 2 or any later version.
13  *
14  */
15 
16 #ifndef WINDISPLAYDEVICEMANAGER_H
17 #define WINDISPLAYDEVICEMANAGER_H
18 
19 #include <windows.h>
20 #include <pointing/output/DisplayDeviceManager.h>
21 #include <map>
22 
23 namespace pointing
24 {
26  {
27  // Called only from DisplayDeviceManager
29 
30  friend class DisplayDeviceManager;
31 
32  typedef std::map<HMONITOR, DisplayDeviceDescriptor> descMap_t;
33 
34  descMap_t descMap;
35 
36  HANDLE loopThread;
37  DWORD dwThreadId;
38  HWND msgWndw;
39  static DWORD WINAPI Loop(LPVOID lpvThreadParam);
40  static LONG APIENTRY wndwProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
41 
42  static BOOL CALLBACK EnumDispProc(HMONITOR hMon, HDC dcMon, RECT* pRcMon, LPARAM lParam);
43  void scanDisplays();
44 
45  bool ConvertDevice(HMONITOR hMon, DisplayDeviceDescriptor &desc);
46 
47  public:
52  DisplayDescriptorSet readAllFromRegistry();
53 
62  };
63 }
64 
65 #endif // WINDISPLAYDEVICEMANAGER_H
DisplayDeviceDescriptor uriFromPoint(int x, int y)
Finds the display containing a given point. If the point is not contained within any display monitor...
Definition: winDisplayDeviceManager.cpp:196
Definition: DummyPointingDevice.cpp:23
Definition: winDisplayDeviceManager.h:25
DisplayDescriptorSet readAllFromRegistry()
readAllFromRegistry
Definition: winDisplayDeviceManager.cpp:174
Definition: DisplayDeviceManager.h:24
Definition: DisplayDeviceManager.h:43