2023-05-14 00:21:16 +02:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
|
2023-03-16 10:09:51 +01:00
|
|
|
#define INTERSECT(x,y,w,h,r) (MAX(0, MIN((x)+(w),(r).x_org+(r).width) - MAX((x),(r).x_org)) \
|
2023-05-08 23:00:45 +02:00
|
|
|
&& MAX(0, MIN((y)+(h),(r).y_org+(r).height) - MAX((y),(r).y_org)))
|
2023-03-16 10:09:51 +01:00
|
|
|
#define LENGTH(X) (sizeof X / sizeof X[0])
|
|
|
|
#define TEXTW(X) (drw_font_getwidth(drw, (X), False) + lrpad)
|
|
|
|
#define TEXTWM(X) (drw_font_getwidth(drw, (X), True) + lrpad)
|
|
|
|
#define NUMBERSMAXDIGITS 100
|
|
|
|
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
|
2023-03-18 13:07:15 +01:00
|
|
|
#define MAXITEMLENGTH 1024
|