summaryrefslogtreecommitdiff
path: root/color.c
diff options
context:
space:
mode:
authorBrett Weiland <techcrazybsw@gmail.com>2020-07-20 23:17:24 -0500
committerBrett Weiland <techcrazybsw@gmail.com>2020-07-20 23:17:24 -0500
commit95531208bf941f05fd1d3c63abcb403b637a4316 (patch)
treef1373adb9db82d578a7dceb12dbbbb7ab1e8d0c0 /color.c
new file: Makefile
new file: color new file: color.c
Diffstat (limited to 'color.c')
-rw-r--r--color.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/color.c b/color.c
new file mode 100644
index 0000000..827e02c
--- /dev/null
+++ b/color.c
@@ -0,0 +1,37 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/Xlib.h>
+
+#define START_COLOR 0xffffff
+
+int main() {
+ Display *display;
+ Window window;
+ int screen;
+
+
+ if((display = XOpenDisplay(NULL)) == NULL) {
+ printf("There was an error opening the screen: %s\n", strerror(errno));
+ exit(errno);
+ }
+
+ screen = DefaultScreen(display);
+
+ window = XCreateSimpleWindow(
+ display,
+ RootWindow(display, screen),
+ 10, 10,
+ 1000, 1000,
+ 0,
+ BlackPixel(display, screen),
+ WhitePixel(display, screen));
+
+ XMapWindow(display, screen);
+ XFlush(display);
+
+
+
+}
+