-
Notifications
You must be signed in to change notification settings - Fork 2
/
util.h
25 lines (25 loc) · 924 Bytes
/
util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// jbwm - Minimalist Window Manager for X
// Copyright 2008-2020, Alisa Bedard <alisabedard@gmail.com>
// Copyright 1999-2015, Ciaran Anscomb <evilwm@6809.org.uk>
// See README for license and other details.
#ifndef JBWM_UTIL_H
#define JBWM_UTIL_H
#include <X11/Xlib.h>
#include <stdint.h>
#include "pixel_t.h"
void jbwm_error(const char * msg) __attribute__((noreturn));
jbwm_pixel_t jbwm_get_pixel(Display * dpy, const uint8_t screen,
const char * name);
// Free the result with XFree
void * jbwm_get_property(Display * dpy, const Window w,
Atom property, uint16_t * num_items)
__attribute__((warn_unused_result,nonnull));
void jbwm_grab_button(Display * d, const Window w,
const unsigned int mask) __attribute__((nonnull(1)));
#ifdef DEBUG
void jbwm_print_atom(Display * d, const Atom a, const char * src,
const uint16_t line);
#else//!DEBUG
#define jbwm_print_atom(d, a, s, l)
#endif//DEBUG
#endif//!JBWM_UTIL_H