summaryrefslogtreecommitdiff
path: root/src/scapx.h
diff options
context:
space:
mode:
authorben <ben.nagy@arachnida.blog>2024-10-08 16:20:36 -0700
committerben <ben.nagy@arachnida.blog>2024-10-08 16:20:36 -0700
commit88be7c1ea7b8a0eb1909b3ad43ebb8c0ee37a052 (patch)
tree0c7dee867d4f1449de7297e4dd049c8f529f4485 /src/scapx.h
parent3b65d725ff54fd389b9930dc3cda5af6a6c028ed (diff)
Connection to X, GC and window creation
Diffstat (limited to 'src/scapx.h')
-rw-r--r--src/scapx.h21
1 files changed, 14 insertions, 7 deletions
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 <stdio.h>
-#include <stdlib.h>
#include <xcb/xcb.h>
+#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