2 * Copyright (C) 2001-2005 Bart Massey and Jamey Sharp.
3 * All Rights Reserved. See the file COPYING in this directory
4 * for licensing information.
7 #include <X11/XCB/xcb.h>
8 #include <X11/XCB/dpms.h>
13 int main(int argc, char **argv)
15 XCBConnection *c = XCBConnect(0, 0);
16 XCBDPMSGetVersionCookie vc;
17 XCBDPMSGetVersionRep *ver;
18 XCBDPMSCapableCookie cc;
19 XCBDPMSCapableRep *cap;
20 XCBDPMSGetTimeoutsCookie tc;
21 XCBDPMSGetTimeoutsRep *time;
23 XCBPrefetchExtensionData(c, &XCBDPMSId);
25 vc = XCBDPMSGetVersion(c, 1, 1);
26 cc = XCBDPMSCapable(c);
27 tc = XCBDPMSGetTimeouts(c);
29 ver = XCBDPMSGetVersionReply(c, vc, 0);
30 cap = XCBDPMSCapableReply(c, cc, 0);
31 time = XCBDPMSGetTimeoutsReply(c, tc, 0);
34 assert(ver->server_major_version == 1);
35 assert(ver->server_minor_version == 1);
43 printf("Standby: %d\n" "Suspend: %d\n" "Off: %d\n",
44 time->standby_timeout, time->suspend_timeout, time->off_timeout);