|
6 | 6 | #include <string>
|
7 | 7 | #include "types.h"
|
8 | 8 |
|
| 9 | +/** |
| 10 | + * `getWindows` returns a list of 64bit window handles listing all top-level windows |
| 11 | + */ |
9 | 12 | std::vector<WindowHandle> getWindows();
|
| 13 | +/** |
| 14 | + * `getActiveWindow` returns the 64bit window handle of the currently active top-level window. |
| 15 | + * If no window is active, the return value is platform dependent. |
| 16 | + * On Windows, if no particular window is focused, it may return either size and position of the Windows task bar (might be focues unintentionally), |
| 17 | + * or size and position of the desktop window (which results in (0, 0, X_RESOLUTION, Y_RESOLUTION)). |
| 18 | + * On macOS, if no window is focused the return value will be the error return of window handle -1 and (0, 0, 0, 0) for size and position. |
| 19 | + * On Linux it returns the desktop window as well (which results in (0, 0, X_RESOLUTION, Y_RESOLUTION)). |
| 20 | + */ |
10 | 21 | WindowHandle getActiveWindow();
|
11 | 22 |
|
| 23 | +/** |
| 24 | + * `getWindowTitle` returns an std::string holding the window title for a window adressed via its window handle. |
| 25 | + * The respective window handle may be aquired via `getWindows` or `getActiveWindow` |
| 26 | + */ |
12 | 27 | std::string getWindowTitle(const WindowHandle windowHandle);
|
| 28 | +/** |
| 29 | + * `getWindowRect` returns an MMRect struct representing the window's size and position. |
| 30 | + * Windows are adressed via their window handle. |
| 31 | + * That is, a window's top left position given as `x` and `y` coordinate, as well as it's window size given as `width` and `height` |
| 32 | + * The respective window handle may be aquired via `getWindows` or `getActiveWindow` |
| 33 | + */ |
13 | 34 | MMRect getWindowRect(const WindowHandle windowHandle);
|
14 | 35 |
|
15 | 36 | #endif
|
0 commit comments