summaryrefslogtreecommitdiff
path: root/src/scapx.h
blob: 00659d5bb7b130dafd5726cc3e3a7bc08feccd8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef SCAPX_H
#define SCAPX_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;
	xcb_screen_iterator_t iter;
	int scr_nbr;
} Server_context_t;

#endif