diff options
author | ben <ben.nagy@arachnida.blog> | 2024-10-17 18:19:25 -0700 |
---|---|---|
committer | ben <ben.nagy@arachnida.blog> | 2024-10-17 18:19:25 -0700 |
commit | 639e8280cc4440f4162c3488f1b5c8ad36dec346 (patch) | |
tree | 429dd4265ac9dc9fd584b4bc073b149278092d0d /src/scapx.h | |
parent | 88be7c1ea7b8a0eb1909b3ad43ebb8c0ee37a052 (diff) |
Key symbols and mouse pointer added
Diffstat (limited to 'src/scapx.h')
-rw-r--r-- | src/scapx.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/scapx.h b/src/scapx.h index 00659d5..c232067 100644 --- a/src/scapx.h +++ b/src/scapx.h @@ -1,9 +1,7 @@ #ifndef SCAPX_H #define SCAPX_H -#include <xcb/xcb.h> - -#define OPTS(msg) \ +#define POPTS(msg) \ do { \ fprintf(stderr, "Usage: scapx\n"); \ fprintf(stderr, "%s\n\n\n", msg); \ @@ -14,11 +12,19 @@ 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; + +#define SLOG(...) (fprintf(stderr, __VA_ARGS__)) + +#define DEBUG_INFO(FMT, ARGS...) do { \ + if (DEBUG) \ + fprintf(stderr, "%s:%d " FMT "\n", __FUNCTION__, __LINE__, ## ARGS); \ + } while (0) + +#define FATAL_ERROR(errstr, ...) \ + do { \ + fprintf(stderr, (errstr), ##__VA_ARGS__); \ + exit(EXIT_FAILURE); \ + } while (0) + #endif |