]> git.lizzy.rs Git - bspwm.git/blobdiff - helpers.h
Four hyphens is enough
[bspwm.git] / helpers.h
index 037fac3892be25ce02434091536f4179d61d8b3f..9be286aff5e675e35b8395a0147678890c858553 100644 (file)
--- a/helpers.h
+++ b/helpers.h
@@ -9,10 +9,12 @@
 #define LENGTH(x)         (sizeof(x) / sizeof(*x))
 #define MAX(A, B)         ((A) > (B) ? (A) : (B))
 #define MIN(A, B)         ((A) < (B) ? (A) : (B))
+#define ABS(A)            ((A) < 0 ? -(A) : (A))
 #define BOOLSTR(A)        ((A) ? "true" : "false")
 
-#define XCB_CONFIG_WINDOW_X_Y_WIDTH_HEIGHT XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT
-#define XCB_CONFIG_WINDOW_X_Y XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y
+#define XCB_CONFIG_WINDOW_X_Y               XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y
+#define XCB_CONFIG_WINDOW_WIDTH_HEIGHT      XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT
+#define XCB_CONFIG_WINDOW_X_Y_WIDTH_HEIGHT  XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT
 #define MAXLEN 256
 
 #define REMLEN(x)         (BUFSIZ - strlen(x) - 1)
@@ -29,6 +31,6 @@ void warn(char *, ...);
 __attribute__((noreturn))
 void err(char *, ...);
 uint32_t get_color(char *);
-void update_pointer_position(xcb_point_t *);
+double distance(xcb_point_t, xcb_point_t);
 
 #endif