summaryrefslogtreecommitdiff
path: root/src/scapx.h
diff options
context:
space:
mode:
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