Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
winDisplayDeviceHelper.h
1 /* -*- mode: c++ -*-
2  *
3  * pointing/output/windows/winDisplayDeviceHelper.h --
4  *
5  * Initial software
6  * Authors: Géry Casiez, Nicolas Roussel, Izzat 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 winDisplayDeviceHelper_h
17 #define winDisplayDeviceHelper_h
18 
19 #include <windows.h>
20 #include <iostream>
21 #include <list>
22 
23 namespace pointing {
24 
28  struct winDisplayInfo {
29  int w;
30  int h;
31  int resx;
32  int resy;
34  float ppi;
35  char monitorName[14];
36  } ;
37 
43  bool isdisplayIDvalid(std::wstring displayID);
44 
53  void decodeEDID(unsigned char edid[], winDisplayInfo* dinfo);
54 
60  void getDisplayInfo(std::wstring displayKey, winDisplayInfo* dinfo);
61 
65  void listDisplays(std::wostream& out);
66 
71  std::list<std::wstring> getAllKeys();
72 
76  int numberDisplays();
77 
81  std::wstring getFirstDisplay();
82 
86  std::wstring getControlPanelDisplayName(int* numberDisplays);
87 
91  std::wstring getMatchingRegistryKey(std::wstring displayName);
92 
93  bool matchStrings(std::wstring nameControlPanel, std::string nameEDID);
94 }
95 
96 #endif
int resx
height in mm
Definition: winDisplayDeviceHelper.h:31
Stores all the information about the monitor.
Definition: winDisplayDeviceHelper.h:28
char monitorName[14]
resolution in pixel per inch
Definition: winDisplayDeviceHelper.h:35
int h
width in mm
Definition: winDisplayDeviceHelper.h:30
Definition: DummyPointingDevice.cpp:23
float ppi
in Hz
Definition: winDisplayDeviceHelper.h:34
int resy
pixels in horizontal
Definition: winDisplayDeviceHelper.h:32
int refreshRate
vertical
Definition: winDisplayDeviceHelper.h:33