From 88be7c1ea7b8a0eb1909b3ad43ebb8c0ee37a052 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 8 Oct 2024 16:20:36 -0700 Subject: Connection to X, GC and window creation --- src/scapx.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/scapx.h') diff --git a/src/scapx.h b/src/scapx.h index 0615e47..00659d5 100644 --- a/src/scapx.h +++ b/src/scapx.h @@ -1,17 +1,24 @@ #ifndef SCAPX_H #define SCAPX_H -#include -#include #include +#define OPTS(msg) \ + do { \ + fprintf(stderr, "Usage: scapx\n"); \ + fprintf(stderr, "%s\n\n\n", msg); \ + fprintf(stdout, "-d, --display\t\t capture a specific display\n"); \ + fprintf(stdout, "-a, --a\t\t\t capture all displays\n"); \ + fprintf(stdout, "-h, --help\t\t print this menu and quit. Alternatively, man scapx\n"); \ + fprintf(stdout, "-v, --version\t\t print program version and quit\n\n"); \ + exit(EXIT_FAILURE); \ + } while (0) + typedef struct { xcb_connection_t *con; xcb_screen_t *scr; -} Scr_info; - - -/* Connects to the X Server, and accesses the screen */ -Scr_info *init_XCB_server(); + xcb_screen_iterator_t iter; + int scr_nbr; +} Server_context_t; #endif -- cgit v1.2.3