add funcs to create/free pixmap_masks
This commit is contained in:
parent
14f17c96d0
commit
b824e6ad8e
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,20 @@
|
||||||
#include "mask.h"
|
#include "mask.h"
|
||||||
|
#include "../kernel/openbox.h"
|
||||||
|
|
||||||
|
pixmap_mask *pixmap_mask_new(int w, int h, char *data)
|
||||||
|
{
|
||||||
|
pixmap_mask *m = g_new(pixmap_mask, 1);
|
||||||
|
m->w = w;
|
||||||
|
m->h = h;
|
||||||
|
m->mask = XCreateBitmapFromData(ob_display, ob_root, data, w, h);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pixmap_mask_free(pixmap_mask *m)
|
||||||
|
{
|
||||||
|
XFreePixmap(ob_display, m->mask);
|
||||||
|
g_free(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* DO YOUR MAGIC MANNY WOOT \m/ */
|
/* DO YOUR MAGIC MANNY WOOT \m/ */
|
||||||
|
|
|
@ -9,4 +9,7 @@ typedef struct {
|
||||||
guint w, h;
|
guint w, h;
|
||||||
} pixmap_mask;
|
} pixmap_mask;
|
||||||
|
|
||||||
|
pixmap_mask *pixmap_mask_new(int w, int h, char *data);
|
||||||
|
void pixmap_mask_free(pixmap_mask *m);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue