Skip to content

Commit b81d49e

Browse files
author
Simon Hofmann
committed
(#17) Added doc comments to window_manager interface
1 parent 6d62a7c commit b81d49e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Diff for: src/window_manager.h

+21
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,31 @@
66
#include <string>
77
#include "types.h"
88

9+
/**
10+
* `getWindows` returns a list of 64bit window handles listing all top-level windows
11+
*/
912
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+
*/
1021
WindowHandle getActiveWindow();
1122

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+
*/
1227
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+
*/
1334
MMRect getWindowRect(const WindowHandle windowHandle);
1435

1536
#endif

0 commit comments

Comments
 (0)