| 1 | #ifndef VX11_RANDR_TEST_ABI_H |
| 2 | #define VX11_RANDR_TEST_ABI_H |
| 3 | #include <limits.h> |
| 4 | #include <X11/extensions/Xrandr.h> |
| 5 | /* Fill fields with the maximum of their C type so V-side width mistakes truncate. */ |
| 6 | static inline void vx11_rr_test_fill_mode(XRRModeInfo *m) { |
| 7 | m->id = ULONG_MAX; m->dotClock = ULONG_MAX; m->modeFlags = ULONG_MAX; |
| 8 | m->vTotal = UINT_MAX; m->nameLength = UINT_MAX; |
| 9 | } |
| 10 | static inline void vx11_rr_test_fill_output(XRROutputInfo *o) { |
| 11 | o->timestamp = ULONG_MAX; o->mm_height = ULONG_MAX; o->connection = USHRT_MAX; |
| 12 | o->subpixel_order = USHRT_MAX; o->npreferred = INT_MIN; |
| 13 | } |
| 14 | static inline void vx11_rr_test_fill_crtc_event(XRRCrtcChangeNotifyEvent *e) { |
| 15 | e->crtc = ULONG_MAX; e->rotation = USHRT_MAX; e->x = INT_MIN; e->height = UINT_MAX; |
| 16 | } |
| 17 | static inline void vx11_rr_test_fill_screen_event(XRRScreenChangeNotifyEvent *e) { |
| 18 | e->config_timestamp = ULONG_MAX; e->size_index = USHRT_MAX; e->rotation = USHRT_MAX; |
| 19 | e->mheight = INT_MIN; |
| 20 | } |
| 21 | static inline void vx11_rr_test_fill_property(XRRPropertyInfo *p, long *values) { |
| 22 | values[0] = LONG_MIN; p->values = values; p->num_values = 1; p->immutable = 1; |
| 23 | } |
| 24 | #endif |
| 25 | |