diff options
| author | Malfurious <m@lfurio.us> | 2024-03-05 23:55:30 -0500 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-01-17 16:44:04 -0500 |
| commit | 11f97f2e491b84e8d5e1ad2ccb27fe7a9fc0466b (patch) | |
| tree | 12f7aacf9e97673f047b5e03f4da6039912b82d9 /drw.h | |
| parent | fbc4f7063ef1e23514c72aea82323f442ffe1e4e (diff) | |
| download | dmenu-11f97f2e491b84e8d5e1ad2ccb27fe7a9fc0466b.tar.gz dmenu-11f97f2e491b84e8d5e1ad2ccb27fe7a9fc0466b.zip | |
patch: alpha
This patch adds translucency to the dmenu window, while keeping the text
in it opaque, just like the alpha patch for st.
Diffstat (limited to 'drw.h')
| -rw-r--r-- | drw.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -20,6 +20,9 @@ typedef struct { Display *dpy; int screen; Window root; + Visual *visual; + unsigned int depth; + Colormap cmap; Drawable drawable; GC gc; Clr *scheme; @@ -27,7 +30,7 @@ typedef struct { } Drw; /* Drawable abstraction */ -Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); +Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h, Visual*, unsigned int, Colormap); void drw_resize(Drw *drw, unsigned int w, unsigned int h); void drw_free(Drw *drw); @@ -39,8 +42,8 @@ unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); /* Colorscheme abstraction */ -void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); -Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount); +void drw_clr_create(Drw *drw, Clr *dest, const char *clrname, unsigned int alpha); +Clr *drw_scm_create(Drw *drw, const char *clrnames[], const unsigned int alphas[], size_t clrcount); /* Cursor abstraction */ Cur *drw_cur_create(Drw *drw, int shape); |
