#include <X11/X.h>
#include <X11/Xlib.h>
#include <stddef.h>
Go to the source code of this file.
◆ GetMonitors()
| size_t GetMonitors |
( |
Display * |
dpy, |
|
|
Window |
window, |
|
|
Monitor * |
out_monitors, |
|
|
size_t |
max_monitors |
|
) |
| |
Queries the current monitor configuration.
Note: out_monitors will be zero padded and sorted in some deterministic order so memcmp can be used to check if the monitor configuration has actually changed.
- Parameters
-
| dpy | The current display. |
| w | The window this application intends to draw in. |
| out_monitors | A pointer to an array that will receive the monitor configuration (in coordinates relative and clipped to the window w. |
| max_monitors | The size of the array. |
- Returns
- The number of monitors returned in the array.
◆ IsMonitorChangeEvent()
| int IsMonitorChangeEvent |
( |
Display * |
dpy, |
|
|
int |
type |
|
) |
| |
Returns the event type that indicates a change to the monitor configuration.
- Parameters
-
| dpy | The current display. |
| type | The received event type. |
- Returns
- 1 if the received event is a monitor change event and GetMonitors should be called, or 0 otherwise.
◆ SelectMonitorChangeEvents()
| void SelectMonitorChangeEvents |
( |
Display * |
dpy, |
|
|
Window |
window |
|
) |
| |
Enable receiving monitor change events for the given display at w.