OpenCPN Partial API docs
Loading...
Searching...
No Matches
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;
46 size_t width_px;
49 size_t height_px;
51 size_t scale;
52};
53
55extern size_t g_num_monitors;
57extern size_t g_current_monitor;
61extern double g_current_monitor_dip_px_ratio;
63extern std::vector<OCPN_MonitorInfo> g_monitor_info;
64
66void EnumerateMonitors();
67
68#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.
Definition displays.h:49
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.
Definition displays.h:46
size_t scale
Scaling factor in percent.
Definition displays.h:51
std::string name
Name of the monitor.
Definition displays.h:35