blob: bac0836c4eb64827bb6e7ad1cce6f671a83ced87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#ifdef CMAKE_HAS_X
#include <X11/Xlib.h>
#include <X11/Xutil.h>
char hello[]="hello.world";
char hi[]="Hi";
main(argc, argv)
int argc;
char **argv;
{
Display *mydisplay;
Window mywindow;
GC mygc;
XEvent myevent;
KeySym mykey;
XSizeHints myhint;
int myscreen;
unsigned long myforeground, mybackground;
int i;
char text[10];
int done;
mydisplay=XOpenDisplay("");
/*
myscreen=DefaultScreen(mydisplay);
myforeground=BlackPixel(mydisplay, myscreen);
mywindow=XCreateSimpleWindow(mydisplay,
DefaultRootWindow(mydisplay),
myhint.x, myhint.y, myhint.width,
myhint.height, 5,
myforeground, mybackground );
XDestroyWindow(mydisplay, mywindow);
*/
XCloseDisplay(mydisplay);
exit(0);
}
#else
#include "stdio.h"
int main()
{
printf("No X on this computer\n");
return 0;
}
#endif
|