OpenCPN Partial API docs
displays.h
1 /***************************************************************************
2  *
3  * Project: OpenCPN
4  * Purpose: OpenCPN Display utilities
5  * Author: David Register
6  *
7  ***************************************************************************
8  * Copyright (C) 2024 by David S. Register *
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this program; if not, write to the *
22  * Free Software Foundation, Inc., *
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24  **************************************************************************/
25 
26 #ifndef OCPN_DISPLAYS_H
27 #define OCPN_DISPLAYS_H
28 
29 #include <string>
30 #include <vector>
31 
35  std::string name;
37  size_t width_mm;
39  size_t height_mm;
41  size_t width;
43  size_t height;
45  size_t width_px;
47  size_t height_px;
49  size_t scale;
50 };
51 
53 extern size_t g_num_monitors;
55 extern size_t g_current_monitor;
58 extern double g_current_monitor_dip_px_ratio;
60 extern std::vector<OCPN_MonitorInfo> g_monitor_info;
61 
63 void EnumerateMonitors();
64 
65 #endif // OCPN_DISPLAYS_H
Structure to hold information about a monitor.
Definition: displays.h:33
size_t height_px
Height of the monitor in physical pixels, on eg. Apple Retina displays this value differs.
Definition: displays.h:47
size_t width
Width of the monitor in pixels.
Definition: displays.h:41
size_t height_mm
Height of the monitor in millimeters.
Definition: displays.h:39
size_t height
Height of the monitor in pixels.
Definition: displays.h:43
size_t width_mm
Width of the monitor in millimeters.
Definition: displays.h:37
size_t width_px
Width of the monitor in physical pixels, on eg. Apple Retina displays this value differs.
Definition: displays.h:45
size_t scale
Scaling factor in percent.
Definition: displays.h:49
std::string name
Name of the monitor.
Definition: displays.h:35