plusui-native-core 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/include/plusui/app.hpp +73 -73
- package/Core/include/plusui/browser.hpp +68 -68
- package/Core/include/plusui/clipboard.hpp +41 -41
- package/Core/include/plusui/custom_bindings.hpp +17 -17
- package/Core/include/plusui/display.hpp +90 -90
- package/Core/include/plusui/keyboard.hpp +112 -112
- package/Core/include/plusui/menu.hpp +153 -153
- package/Core/include/plusui/native_bindings.hpp +19 -19
- package/Core/include/plusui/tray.hpp +94 -94
- package/Core/include/plusui/webgpu.hpp +434 -434
- package/Core/include/plusui/webview.hpp +142 -142
- package/Core/include/plusui/window.hpp +111 -111
- package/Core/include/plusui/window_manager.hpp +59 -59
- package/package.json +1 -1
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
#ifndef PLUSUI_APP_H
|
|
2
|
-
#define PLUSUI_APP_H
|
|
3
|
-
|
|
4
|
-
#include "tray.hpp"
|
|
5
|
-
#include "webview.hpp"
|
|
6
|
-
#include "window_manager.hpp"
|
|
7
|
-
#include <functional>
|
|
8
|
-
#include <future>
|
|
9
|
-
#include <memory>
|
|
10
|
-
#include <string>
|
|
11
|
-
|
|
12
|
-
namespace plusui {
|
|
13
|
-
|
|
14
|
-
class App {
|
|
15
|
-
public:
|
|
16
|
-
App();
|
|
17
|
-
~App();
|
|
18
|
-
|
|
19
|
-
class Builder;
|
|
20
|
-
|
|
21
|
-
void run();
|
|
22
|
-
void quit();
|
|
23
|
-
|
|
24
|
-
private:
|
|
25
|
-
struct Impl;
|
|
26
|
-
std::unique_ptr<Impl> pImpl;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
class App::Builder {
|
|
30
|
-
public:
|
|
31
|
-
struct Config {
|
|
32
|
-
std::string title = "PlusUI App";
|
|
33
|
-
int width = 1200;
|
|
34
|
-
int height = 800;
|
|
35
|
-
bool resizable = true;
|
|
36
|
-
bool devtools = true;
|
|
37
|
-
std::string trayIconPath;
|
|
38
|
-
std::string trayTooltip;
|
|
39
|
-
bool alwaysOnTop = false;
|
|
40
|
-
bool centered = true;
|
|
41
|
-
bool transparent = false;
|
|
42
|
-
bool decorations = true;
|
|
43
|
-
bool skipTaskbar = false;
|
|
44
|
-
bool scrollbars = true;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
Builder();
|
|
48
|
-
|
|
49
|
-
Builder &title(const std::string &t);
|
|
50
|
-
Builder &width(int w);
|
|
51
|
-
Builder &height(int h);
|
|
52
|
-
Builder &resizable(bool r);
|
|
53
|
-
Builder &devtools(bool d);
|
|
54
|
-
Builder &trayIcon(const std::string &icon);
|
|
55
|
-
Builder &trayTooltip(const std::string &tooltip);
|
|
56
|
-
Builder &alwaysOnTop(bool top);
|
|
57
|
-
Builder ¢ered(bool center);
|
|
58
|
-
Builder &transparent(bool transparent);
|
|
59
|
-
Builder &decorations(bool decorations);
|
|
60
|
-
Builder &skipTaskbar(bool skip);
|
|
61
|
-
Builder &scrollbars(bool show);
|
|
62
|
-
|
|
63
|
-
WebView build();
|
|
64
|
-
|
|
65
|
-
private:
|
|
66
|
-
Config config;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
App::Builder createApp();
|
|
70
|
-
|
|
71
|
-
} // namespace plusui
|
|
72
|
-
|
|
73
|
-
#endif
|
|
1
|
+
#ifndef PLUSUI_APP_H
|
|
2
|
+
#define PLUSUI_APP_H
|
|
3
|
+
|
|
4
|
+
#include "tray.hpp"
|
|
5
|
+
#include "webview.hpp"
|
|
6
|
+
#include "window_manager.hpp"
|
|
7
|
+
#include <functional>
|
|
8
|
+
#include <future>
|
|
9
|
+
#include <memory>
|
|
10
|
+
#include <string>
|
|
11
|
+
|
|
12
|
+
namespace plusui {
|
|
13
|
+
|
|
14
|
+
class App {
|
|
15
|
+
public:
|
|
16
|
+
App();
|
|
17
|
+
~App();
|
|
18
|
+
|
|
19
|
+
class Builder;
|
|
20
|
+
|
|
21
|
+
void run();
|
|
22
|
+
void quit();
|
|
23
|
+
|
|
24
|
+
private:
|
|
25
|
+
struct Impl;
|
|
26
|
+
std::unique_ptr<Impl> pImpl;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
class App::Builder {
|
|
30
|
+
public:
|
|
31
|
+
struct Config {
|
|
32
|
+
std::string title = "PlusUI App";
|
|
33
|
+
int width = 1200;
|
|
34
|
+
int height = 800;
|
|
35
|
+
bool resizable = true;
|
|
36
|
+
bool devtools = true;
|
|
37
|
+
std::string trayIconPath;
|
|
38
|
+
std::string trayTooltip;
|
|
39
|
+
bool alwaysOnTop = false;
|
|
40
|
+
bool centered = true;
|
|
41
|
+
bool transparent = false;
|
|
42
|
+
bool decorations = true;
|
|
43
|
+
bool skipTaskbar = false;
|
|
44
|
+
bool scrollbars = true;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
Builder();
|
|
48
|
+
|
|
49
|
+
Builder &title(const std::string &t);
|
|
50
|
+
Builder &width(int w);
|
|
51
|
+
Builder &height(int h);
|
|
52
|
+
Builder &resizable(bool r);
|
|
53
|
+
Builder &devtools(bool d);
|
|
54
|
+
Builder &trayIcon(const std::string &icon);
|
|
55
|
+
Builder &trayTooltip(const std::string &tooltip);
|
|
56
|
+
Builder &alwaysOnTop(bool top);
|
|
57
|
+
Builder ¢ered(bool center);
|
|
58
|
+
Builder &transparent(bool transparent);
|
|
59
|
+
Builder &decorations(bool decorations);
|
|
60
|
+
Builder &skipTaskbar(bool skip);
|
|
61
|
+
Builder &scrollbars(bool show);
|
|
62
|
+
|
|
63
|
+
WebView build();
|
|
64
|
+
|
|
65
|
+
private:
|
|
66
|
+
Config config;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
App::Builder createApp();
|
|
70
|
+
|
|
71
|
+
} // namespace plusui
|
|
72
|
+
|
|
73
|
+
#endif
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <functional>
|
|
4
|
-
#include <map>
|
|
5
|
-
#include <memory>
|
|
6
|
-
#include <string>
|
|
7
|
-
|
|
8
|
-
namespace plusui {
|
|
9
|
-
|
|
10
|
-
class WebView;
|
|
11
|
-
|
|
12
|
-
struct BrowserState {
|
|
13
|
-
std::string url;
|
|
14
|
-
std::string title;
|
|
15
|
-
bool canGoBack = false;
|
|
16
|
-
bool canGoForward = false;
|
|
17
|
-
bool isLoading = false;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
struct RouteConfig {
|
|
21
|
-
std::string path;
|
|
22
|
-
std::string url;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
class Browser {
|
|
26
|
-
public:
|
|
27
|
-
using NavigateCallback = std::function<void(const std::string &url)>;
|
|
28
|
-
using StateCallback = std::function<void(const BrowserState &state)>;
|
|
29
|
-
using LoadCallback = std::function<void()>;
|
|
30
|
-
|
|
31
|
-
Browser();
|
|
32
|
-
~Browser();
|
|
33
|
-
|
|
34
|
-
static Browser create(WebView *webview);
|
|
35
|
-
|
|
36
|
-
void navigate(const std::string &url);
|
|
37
|
-
void goBack();
|
|
38
|
-
void goForward();
|
|
39
|
-
void reload();
|
|
40
|
-
void stop();
|
|
41
|
-
|
|
42
|
-
void openExternal(const std::string &url);
|
|
43
|
-
void openNewWindow(const std::string &url);
|
|
44
|
-
|
|
45
|
-
std::string getURL() const;
|
|
46
|
-
std::string getTitle() const;
|
|
47
|
-
BrowserState getState() const;
|
|
48
|
-
|
|
49
|
-
bool canGoBack() const;
|
|
50
|
-
bool canGoForward() const;
|
|
51
|
-
bool isLoading() const;
|
|
52
|
-
|
|
53
|
-
void onNavigate(NavigateCallback callback);
|
|
54
|
-
void onStateChange(StateCallback callback);
|
|
55
|
-
void onLoadStart(LoadCallback callback);
|
|
56
|
-
void onLoadEnd(LoadCallback callback);
|
|
57
|
-
void onLoadError(std::function<void(const std::string &error)> callback);
|
|
58
|
-
|
|
59
|
-
void setRoutes(const std::map<std::string, std::string> &routes);
|
|
60
|
-
void push(const std::string &route);
|
|
61
|
-
void replace(const std::string &route);
|
|
62
|
-
std::string getCurrentRoute() const;
|
|
63
|
-
|
|
64
|
-
private:
|
|
65
|
-
struct Impl;
|
|
66
|
-
std::shared_ptr<Impl> pImpl;
|
|
67
|
-
};
|
|
68
|
-
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <functional>
|
|
4
|
+
#include <map>
|
|
5
|
+
#include <memory>
|
|
6
|
+
#include <string>
|
|
7
|
+
|
|
8
|
+
namespace plusui {
|
|
9
|
+
|
|
10
|
+
class WebView;
|
|
11
|
+
|
|
12
|
+
struct BrowserState {
|
|
13
|
+
std::string url;
|
|
14
|
+
std::string title;
|
|
15
|
+
bool canGoBack = false;
|
|
16
|
+
bool canGoForward = false;
|
|
17
|
+
bool isLoading = false;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
struct RouteConfig {
|
|
21
|
+
std::string path;
|
|
22
|
+
std::string url;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
class Browser {
|
|
26
|
+
public:
|
|
27
|
+
using NavigateCallback = std::function<void(const std::string &url)>;
|
|
28
|
+
using StateCallback = std::function<void(const BrowserState &state)>;
|
|
29
|
+
using LoadCallback = std::function<void()>;
|
|
30
|
+
|
|
31
|
+
Browser();
|
|
32
|
+
~Browser();
|
|
33
|
+
|
|
34
|
+
static Browser create(WebView *webview);
|
|
35
|
+
|
|
36
|
+
void navigate(const std::string &url);
|
|
37
|
+
void goBack();
|
|
38
|
+
void goForward();
|
|
39
|
+
void reload();
|
|
40
|
+
void stop();
|
|
41
|
+
|
|
42
|
+
void openExternal(const std::string &url);
|
|
43
|
+
void openNewWindow(const std::string &url);
|
|
44
|
+
|
|
45
|
+
std::string getURL() const;
|
|
46
|
+
std::string getTitle() const;
|
|
47
|
+
BrowserState getState() const;
|
|
48
|
+
|
|
49
|
+
bool canGoBack() const;
|
|
50
|
+
bool canGoForward() const;
|
|
51
|
+
bool isLoading() const;
|
|
52
|
+
|
|
53
|
+
void onNavigate(NavigateCallback callback);
|
|
54
|
+
void onStateChange(StateCallback callback);
|
|
55
|
+
void onLoadStart(LoadCallback callback);
|
|
56
|
+
void onLoadEnd(LoadCallback callback);
|
|
57
|
+
void onLoadError(std::function<void(const std::string &error)> callback);
|
|
58
|
+
|
|
59
|
+
void setRoutes(const std::map<std::string, std::string> &routes);
|
|
60
|
+
void push(const std::string &route);
|
|
61
|
+
void replace(const std::string &route);
|
|
62
|
+
std::string getCurrentRoute() const;
|
|
63
|
+
|
|
64
|
+
private:
|
|
65
|
+
struct Impl;
|
|
66
|
+
std::shared_ptr<Impl> pImpl;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
69
|
} // namespace plusui
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <string>
|
|
4
|
-
#include <vector>
|
|
5
|
-
#include <functional>
|
|
6
|
-
|
|
7
|
-
namespace PlusUI {
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Clipboard - Cross-platform clipboard management
|
|
11
|
-
*
|
|
12
|
-
* Provides access to system clipboard for text and images.
|
|
13
|
-
* Supports clipboard change events.
|
|
14
|
-
*/
|
|
15
|
-
class Clipboard {
|
|
16
|
-
public:
|
|
17
|
-
Clipboard();
|
|
18
|
-
~Clipboard();
|
|
19
|
-
|
|
20
|
-
// Text operations
|
|
21
|
-
std::string getText();
|
|
22
|
-
void setText(const std::string& text);
|
|
23
|
-
bool hasText();
|
|
24
|
-
|
|
25
|
-
// Image operations (base64 encoded)
|
|
26
|
-
std::string getImage();
|
|
27
|
-
void setImage(const std::string& base64Data);
|
|
28
|
-
bool hasImage();
|
|
29
|
-
|
|
30
|
-
// Clear clipboard
|
|
31
|
-
void clear();
|
|
32
|
-
|
|
33
|
-
// Clipboard change events
|
|
34
|
-
void onClipboardChange(std::function<void(const std::string&)> callback);
|
|
35
|
-
|
|
36
|
-
private:
|
|
37
|
-
struct Impl;
|
|
38
|
-
Impl* pImpl;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
} // namespace PlusUI
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <string>
|
|
4
|
+
#include <vector>
|
|
5
|
+
#include <functional>
|
|
6
|
+
|
|
7
|
+
namespace PlusUI {
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Clipboard - Cross-platform clipboard management
|
|
11
|
+
*
|
|
12
|
+
* Provides access to system clipboard for text and images.
|
|
13
|
+
* Supports clipboard change events.
|
|
14
|
+
*/
|
|
15
|
+
class Clipboard {
|
|
16
|
+
public:
|
|
17
|
+
Clipboard();
|
|
18
|
+
~Clipboard();
|
|
19
|
+
|
|
20
|
+
// Text operations
|
|
21
|
+
std::string getText();
|
|
22
|
+
void setText(const std::string& text);
|
|
23
|
+
bool hasText();
|
|
24
|
+
|
|
25
|
+
// Image operations (base64 encoded)
|
|
26
|
+
std::string getImage();
|
|
27
|
+
void setImage(const std::string& base64Data);
|
|
28
|
+
bool hasImage();
|
|
29
|
+
|
|
30
|
+
// Clear clipboard
|
|
31
|
+
void clear();
|
|
32
|
+
|
|
33
|
+
// Clipboard change events
|
|
34
|
+
void onClipboardChange(std::function<void(const std::string&)> callback);
|
|
35
|
+
|
|
36
|
+
private:
|
|
37
|
+
struct Impl;
|
|
38
|
+
Impl* pImpl;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace PlusUI
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <functional>
|
|
4
|
-
#include <string>
|
|
5
|
-
#include <vector>
|
|
6
|
-
|
|
7
|
-
namespace plusui {
|
|
8
|
-
|
|
9
|
-
using CustomBindingCallback = std::function<void(const std::string &payload)>;
|
|
10
|
-
|
|
11
|
-
class CustomBindings {
|
|
12
|
-
public:
|
|
13
|
-
static void registerBinding(const std::string &name,
|
|
14
|
-
CustomBindingCallback callback);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
} // namespace plusui
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <functional>
|
|
4
|
+
#include <string>
|
|
5
|
+
#include <vector>
|
|
6
|
+
|
|
7
|
+
namespace plusui {
|
|
8
|
+
|
|
9
|
+
using CustomBindingCallback = std::function<void(const std::string &payload)>;
|
|
10
|
+
|
|
11
|
+
class CustomBindings {
|
|
12
|
+
public:
|
|
13
|
+
static void registerBinding(const std::string &name,
|
|
14
|
+
CustomBindingCallback callback);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
} // namespace plusui
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
#ifndef PLUSUI_DISPLAY_H
|
|
2
|
-
#define PLUSUI_DISPLAY_H
|
|
3
|
-
|
|
4
|
-
#include <string>
|
|
5
|
-
#include <vector>
|
|
6
|
-
#include <memory>
|
|
7
|
-
#include <functional>
|
|
8
|
-
|
|
9
|
-
namespace plusui {
|
|
10
|
-
|
|
11
|
-
struct DisplayMode {
|
|
12
|
-
int width = 0;
|
|
13
|
-
int height = 0;
|
|
14
|
-
int refreshRate = 60;
|
|
15
|
-
int bitDepth = 32;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
struct DisplayBounds {
|
|
19
|
-
int x = 0;
|
|
20
|
-
int y = 0;
|
|
21
|
-
int width = 0;
|
|
22
|
-
int height = 0;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
struct DisplayResolution {
|
|
26
|
-
int width = 0;
|
|
27
|
-
int height = 0;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
struct Display {
|
|
31
|
-
int id = 0;
|
|
32
|
-
std::string name;
|
|
33
|
-
bool isPrimary = false;
|
|
34
|
-
DisplayBounds bounds;
|
|
35
|
-
DisplayBounds workArea;
|
|
36
|
-
DisplayResolution resolution;
|
|
37
|
-
DisplayMode currentMode;
|
|
38
|
-
double scaleFactor = 1.0;
|
|
39
|
-
double rotation = 0.0;
|
|
40
|
-
bool isInternal = false;
|
|
41
|
-
bool isConnected = true;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
class DisplayManager {
|
|
45
|
-
public:
|
|
46
|
-
DisplayManager();
|
|
47
|
-
~DisplayManager();
|
|
48
|
-
|
|
49
|
-
static DisplayManager& instance();
|
|
50
|
-
|
|
51
|
-
std::vector<Display> getAllDisplays();
|
|
52
|
-
Display getPrimaryDisplay();
|
|
53
|
-
Display getDisplayAt(int x, int y);
|
|
54
|
-
Display getDisplayAtCursor();
|
|
55
|
-
Display getDisplayById(int id);
|
|
56
|
-
|
|
57
|
-
void onDisplayConnected(std::function<void(const Display&)> callback);
|
|
58
|
-
void onDisplayDisconnected(std::function<void(int displayId)> callback);
|
|
59
|
-
void onDisplayChanged(std::function<void(const Display&)> callback);
|
|
60
|
-
|
|
61
|
-
void refresh();
|
|
62
|
-
|
|
63
|
-
bool setDisplayMode(int displayId, const DisplayMode& mode);
|
|
64
|
-
bool setPosition(int displayId, int x, int y);
|
|
65
|
-
bool turnOff(int displayId);
|
|
66
|
-
|
|
67
|
-
private:
|
|
68
|
-
struct Impl;
|
|
69
|
-
std::unique_ptr<Impl> pImpl;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
class Screen {
|
|
73
|
-
public:
|
|
74
|
-
static int getWidth();
|
|
75
|
-
static int getHeight();
|
|
76
|
-
static int getWidthMM();
|
|
77
|
-
static int getHeightMM();
|
|
78
|
-
|
|
79
|
-
static double getScaleFactor();
|
|
80
|
-
static double getRefreshRate();
|
|
81
|
-
|
|
82
|
-
static bool isMain();
|
|
83
|
-
static bool isMulti();
|
|
84
|
-
|
|
85
|
-
static std::string getName();
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
#endif
|
|
1
|
+
#ifndef PLUSUI_DISPLAY_H
|
|
2
|
+
#define PLUSUI_DISPLAY_H
|
|
3
|
+
|
|
4
|
+
#include <string>
|
|
5
|
+
#include <vector>
|
|
6
|
+
#include <memory>
|
|
7
|
+
#include <functional>
|
|
8
|
+
|
|
9
|
+
namespace plusui {
|
|
10
|
+
|
|
11
|
+
struct DisplayMode {
|
|
12
|
+
int width = 0;
|
|
13
|
+
int height = 0;
|
|
14
|
+
int refreshRate = 60;
|
|
15
|
+
int bitDepth = 32;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
struct DisplayBounds {
|
|
19
|
+
int x = 0;
|
|
20
|
+
int y = 0;
|
|
21
|
+
int width = 0;
|
|
22
|
+
int height = 0;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
struct DisplayResolution {
|
|
26
|
+
int width = 0;
|
|
27
|
+
int height = 0;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
struct Display {
|
|
31
|
+
int id = 0;
|
|
32
|
+
std::string name;
|
|
33
|
+
bool isPrimary = false;
|
|
34
|
+
DisplayBounds bounds;
|
|
35
|
+
DisplayBounds workArea;
|
|
36
|
+
DisplayResolution resolution;
|
|
37
|
+
DisplayMode currentMode;
|
|
38
|
+
double scaleFactor = 1.0;
|
|
39
|
+
double rotation = 0.0;
|
|
40
|
+
bool isInternal = false;
|
|
41
|
+
bool isConnected = true;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
class DisplayManager {
|
|
45
|
+
public:
|
|
46
|
+
DisplayManager();
|
|
47
|
+
~DisplayManager();
|
|
48
|
+
|
|
49
|
+
static DisplayManager& instance();
|
|
50
|
+
|
|
51
|
+
std::vector<Display> getAllDisplays();
|
|
52
|
+
Display getPrimaryDisplay();
|
|
53
|
+
Display getDisplayAt(int x, int y);
|
|
54
|
+
Display getDisplayAtCursor();
|
|
55
|
+
Display getDisplayById(int id);
|
|
56
|
+
|
|
57
|
+
void onDisplayConnected(std::function<void(const Display&)> callback);
|
|
58
|
+
void onDisplayDisconnected(std::function<void(int displayId)> callback);
|
|
59
|
+
void onDisplayChanged(std::function<void(const Display&)> callback);
|
|
60
|
+
|
|
61
|
+
void refresh();
|
|
62
|
+
|
|
63
|
+
bool setDisplayMode(int displayId, const DisplayMode& mode);
|
|
64
|
+
bool setPosition(int displayId, int x, int y);
|
|
65
|
+
bool turnOff(int displayId);
|
|
66
|
+
|
|
67
|
+
private:
|
|
68
|
+
struct Impl;
|
|
69
|
+
std::unique_ptr<Impl> pImpl;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
class Screen {
|
|
73
|
+
public:
|
|
74
|
+
static int getWidth();
|
|
75
|
+
static int getHeight();
|
|
76
|
+
static int getWidthMM();
|
|
77
|
+
static int getHeightMM();
|
|
78
|
+
|
|
79
|
+
static double getScaleFactor();
|
|
80
|
+
static double getRefreshRate();
|
|
81
|
+
|
|
82
|
+
static bool isMain();
|
|
83
|
+
static bool isMulti();
|
|
84
|
+
|
|
85
|
+
static std::string getName();
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
#endif
|