summaryrefslogtreecommitdiff
path: root/xlib-tutorial/prog-1.cc
diff options
context:
space:
mode:
authornasr <nsrddyn@gmail.com>2026-03-13 22:31:21 +0100
committernasr <nsrddyn@gmail.com>2026-03-13 22:31:21 +0100
commit444bfa2f41143aff7490e4fa21565947565b7d30 (patch)
tree696b06d40140c85805d171597e37deb8290ead73 /xlib-tutorial/prog-1.cc
parent3913d1778318cd0c6bfb871148d38abb33ec7fd3 (diff)
cleanup: generalisation
Diffstat (limited to 'xlib-tutorial/prog-1.cc')
-rw-r--r--xlib-tutorial/prog-1.cc29
1 files changed, 0 insertions, 29 deletions
diff --git a/xlib-tutorial/prog-1.cc b/xlib-tutorial/prog-1.cc
deleted file mode 100644
index 3ba596b..0000000
--- a/xlib-tutorial/prog-1.cc
+++ /dev/null
@@ -1,29 +0,0 @@
1// Written by Ch. Tronche (http://tronche.lri.fr:8000/)
2// Copyright by the author. This is unmaintained, no-warranty free software.
3// Please use freely. It is appreciated (but by no means mandatory) to
4// acknowledge the author's contribution. Thank you.
5// Started on Thu Jun 26 23:29:03 1997
6
7//
8// Xlib tutorial: 1st program
9// Make a window appear on the screen.
10//
11
12#include <X11/Xlib.h> // Every Xlib program must include this
13#include <assert.h> // I include this to test return values the lazy way
14#include <unistd.h> // So we got the profile for 10 seconds
15
16#define NIL (0) // A name for the void pointer
17
18main()
19{
20 Display *dpy = XOpenDisplay(NIL);
21 assert(dpy);
22 Window w = XCreateWindow(dpy, DefaultRootWindow(dpy), 0, 0,
23 200, 100, 0,
24 CopyFromParent, CopyFromParent, CopyFromParent,
25 NIL, 0);
26 XMapWindow(dpy, w);
27 XFlush(dpy);
28 sleep(10);
29}