docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C++ API
1.4.0
Toggle main menu visibility
Loading...
Searching...
No Matches
Monitor.h
Go to the documentation of this file.
1
/**************************************************************************************************
2
* This file is a part of Ultralight. *
3
* *
4
* See <https://ultralig.ht> for licensing and more. *
5
* *
6
* (C) 2024 Ultralight, Inc. *
7
**************************************************************************************************/
8
#pragma once
9
#include "
Defines.h
"
10
11
namespace
ultralight
{
12
13
///
14
/// A platform-specific monitor.
15
///
16
class
AExport
Monitor
{
17
public
:
18
virtual
~Monitor
() {}
19
20
///
21
/// Get the unique display ID of the monitor.
22
///
23
/// The renderer uses this ID to identify which monitor a View is on (ViewConfig::display_id).
24
///
25
/// AppCore internally tracks the display's hardware refresh event and automatically calls
26
/// Renderer::RefreshDisplay(id) to drive animation in all corresponding Views.
27
///
28
virtual
uint32_t
display_id
()
const
= 0;
29
30
///
31
/// Get the DPI scale (1.0 = 100%)
32
///
33
virtual
double
scale
()
const
= 0;
34
35
///
36
/// Get the width of the monitor (in pixels).
37
///
38
virtual
uint32_t
width
()
const
= 0;
39
40
///
41
/// Get the height of the monitor (in pixels).
42
///
43
virtual
uint32_t
height
()
const
= 0;
44
45
///
46
/// Get the refresh rate of the monitor (in Hz).
47
///
48
virtual
uint32_t
refresh_rate
()
const
= 0;
49
};
50
51
}
// namespace ultralight
Defines.h
AExport
#define AExport
Definition
Defines.h:42
ultralight::Monitor
A platform-specific monitor.
Definition
Monitor.h:16
ultralight::Monitor::~Monitor
virtual ~Monitor()
Definition
Monitor.h:18
ultralight::Monitor::height
virtual uint32_t height() const =0
Get the height of the monitor (in pixels).
ultralight::Monitor::scale
virtual double scale() const =0
Get the DPI scale (1.0 = 100%).
ultralight::Monitor::width
virtual uint32_t width() const =0
Get the width of the monitor (in pixels).
ultralight::Monitor::refresh_rate
virtual uint32_t refresh_rate() const =0
Get the refresh rate of the monitor (in Hz).
ultralight::Monitor::display_id
virtual uint32_t display_id() const =0
Get the unique display ID of the monitor.
ultralight
Definition
Bitmap.h:14
AppCore
Monitor.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4