diff options
author | Travis Spencer <tspencer@cs.pdx.edu> | 2005-07-31 00:11:04 -0800 |
---|---|---|
committer | Travis Spencer <tspencer@cs.pdx.edu> | 2005-07-31 00:11:04 -0800 |
commit | df7c9bdfed8f7e75ff2b594bddf39d4a8fc47887 (patch) | |
tree | c1db2bd48a70d55a832e64a67c9157dd688d33a0 /XCBConnectionOfDisplay.mdwn | |
parent | da70da6c62dca4cc07f6c32c22e665496259d227 (diff) |
XCBConnectionOfDisplay
Diffstat (limited to 'XCBConnectionOfDisplay.mdwn')
-rw-r--r-- | XCBConnectionOfDisplay.mdwn | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/XCBConnectionOfDisplay.mdwn b/XCBConnectionOfDisplay.mdwn index a1ffa32..66132d5 100644 --- a/XCBConnectionOfDisplay.mdwn +++ b/XCBConnectionOfDisplay.mdwn @@ -14,6 +14,11 @@ { Display *dpy = XOpenDisplay(NULL); XCBConnection *c; + XCBSCREEN *screen; + XCBWINDOW window; + + const int depth = 0, x = 0, y = 0, width = 150, height = 150, + border_width = 1; if (! dpy) { @@ -34,7 +39,18 @@ exit(EXIT_FAILURE); } - /* Do something meaningful, fun, and interesting with the new XCBConnection object. */ + /* Do something meaningful, fun, and interesting with the new + * XCBConnection object. + */ + window = XCBWINDOWNew(c); + screen = XCBConnSetupSuccessRepRootsIter(XCBGetSetup(c)).data; + + XCBCreateWindow(c, depth, window, screen->root, x, y, width, height, + border_width, InputOutput, screen->root_visual, 0, NULL); + XCBMapWindow(c, window); + XCBSync(c, 0); + + for (;;) /* Loop forever */ ; return EXIT_SUCCESS; } |