From 0d5347e057b883efd48535317109cdc6c73bae98 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 27 May 2019 22:12:42 -0500 Subject: [PATCH] I'm not sure I understand the transaction that's taking place here. --- examples/cluster.c | 2 +- include/hexagram/window.h | 9 +++++++-- src/Makefile | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/cluster.c b/examples/cluster.c index 07df158..2bc5d60 100644 --- a/examples/cluster.c +++ b/examples/cluster.c @@ -283,7 +283,7 @@ int main(int argc, char **argv) { */ draw_gauge_cluster_bg(bg, display, screen, width, height); - XSelectInput(display, win, ExposureMask | ButtonPressMask | KeyPressMask); + printf("XSelectInput %d\n", XSelectInput(display, win, ExposureMask | ButtonPressMask | KeyPressMask)); XMapWindow(display, win); /* diff --git a/include/hexagram/window.h b/include/hexagram/window.h index a2e41fb..5f67dde 100644 --- a/include/hexagram/window.h +++ b/include/hexagram/window.h @@ -7,11 +7,16 @@ ButtonReleaseMask | ExposureMask | \ StructureNotifyMask) +#define HEXAGRAM_WINDOW_GC_FLAGS (GCForeground | GCBackground | \ + GCGraphicsExposures) + typedef struct _hexagram_window hexagram_window; hexagram_window *hexagram_window_new_x11(const char *display, - int width, - int height); + unsigned int width, + unsigned int height); + +int hexagram_window_get_display_fd(hexagram_window *window); int hexagram_window_show(hexagram_window *window); diff --git a/src/Makefile b/src/Makefile index c0f97d9..c47ca6b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,10 +7,10 @@ CC = $(CROSS)cc CFLAGS += -fPIC -I$(INCLUDE_PATH) LDFLAGS = -HEADERS = dict.h hash.h can.h capture.h pcapng.h module.h sim.h +HEADERS = dict.h hash.h can.h capture.h pcapng.h module.h window.h sim.h HEADERS_LOCAL = util.h -OBJS = dict.o hash.o can.o capture.o pcapng.o module.o sim.o +OBJS = dict.o hash.o can.o capture.o pcapng.o module.o window.o sim.o VERSION_MAJOR = 0 VERSION_MINOR = 0.1