summaryrefslogtreecommitdiffstats
path: root/Tests/X11/X11.c
blob: fae99998b90a204db6d4824ed4beb28e2da47d6c (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
#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

int main()
{
  return 0;
}

#endif