Remove cursor code, we don't need it.

The cursor code was originally here, because dmenu and dwm share the
same drw.c and drw.h. I do not care about that however, so having
the cursor code here is a waste.
This commit is contained in:
speedie 2023-06-09 23:58:31 +02:00
parent b68666dc6b
commit e06f2031d9
2 changed files with 0 additions and 31 deletions

View file

@ -392,29 +392,6 @@ void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned in
*h = font->h; *h = font->h;
} }
Cur * drw_cur_create(Drw *drw, int shape) {
Cur *cur;
if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
return NULL;
#if USEX
cur->cursor = XCreateFontCursor(drw->dpy, shape);
#endif
return cur;
}
void drw_cur_free(Drw *drw, Cur *cursor) {
#if USEX
if (!cursor)
return;
XFreeCursor(drw->dpy, cursor->cursor);
free(cursor);
#endif
}
void drw_set_img(Drw *drw, void *data, int w, int h) { void drw_set_img(Drw *drw, void *data, int w, int h) {
if (!w || !h || !drw) { if (!w || !h || !drw) {
return; return;

View file

@ -6,10 +6,6 @@
#include <pango/pango.h> #include <pango/pango.h>
#include <pango/pangocairo.h> #include <pango/pangocairo.h>
typedef struct {
Cursor cursor;
} Cur;
typedef struct Fnt { typedef struct Fnt {
Display *dpy; Display *dpy;
unsigned int h; unsigned int h;
@ -58,10 +54,6 @@ unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int
unsigned int drw_font_getwidth(Drw *drw, const char *text, Bool markup); unsigned int drw_font_getwidth(Drw *drw, const char *text, Bool markup);
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h, Bool markup); void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h, Bool markup);
/* Cursor abstraction */
Cur *drw_cur_create(Drw *drw, int shape);
void drw_cur_free(Drw *drw, Cur *cursor);
/* Drawing functions */ /* Drawing functions */
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert, char *fgcol, char *bgcol, int fgalpha, int bgalpha); void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert, char *fgcol, char *bgcol, int fgalpha, int bgalpha);
int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert, Bool markup, char *fgcol, char *bgcol, int fgalpha, int bgalpha); int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert, Bool markup, char *fgcol, char *bgcol, int fgalpha, int bgalpha);