X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3-nagbar%2Fi3-nagbar.h;h=c5e94cc6140fb554d3fa48f1f6b26c1c2107f1db;hb=c474ddd782782190f48c0ea045d485e7974977a0;hp=2fbe3cbb4cf68bed1784ba6e4173f8f8c2388121;hpb=0f276fdefa5428a9137996bd2d36ae24d86b80df;p=i3%2Fi3 diff --git a/i3-nagbar/i3-nagbar.h b/i3-nagbar/i3-nagbar.h index 2fbe3cbb..c5e94cc6 100644 --- a/i3-nagbar/i3-nagbar.h +++ b/i3-nagbar/i3-nagbar.h @@ -1,26 +1,20 @@ -#ifndef _I3_NAGBAR -#define _I3_NAGBAR +#pragma once + +#include #include #define die(...) errx(EXIT_FAILURE, __VA_ARGS__); -#define FREE(pointer) do { \ +#define FREE(pointer) \ + do { \ if (pointer != NULL) { \ - free(pointer); \ - pointer = NULL; \ - } \ -} \ -while (0) + free(pointer); \ + pointer = NULL; \ + } \ + } while (0) -#define xmacro(atom) xcb_atom_t A_ ## atom; +#define xmacro(atom) xcb_atom_t A_##atom; #include "atoms.xmacro" #undef xmacro extern xcb_window_t root; - -uint32_t get_colorpixel(xcb_connection_t *conn, char *hex); -xcb_window_t open_input_window(xcb_connection_t *conn, uint32_t width, uint32_t height); -int get_font_id(xcb_connection_t *conn, char *pattern, int *font_height); -void xcb_change_gc_single(xcb_connection_t *conn, xcb_gcontext_t gc, uint32_t mask, uint32_t value); - -#endif