]> Dogcows Code - chaz/openbox/commitdiff
add funcs to create/free pixmap_masks
authorDana Jansens <danakj@orodu.net>
Mon, 17 Mar 2003 00:49:05 +0000 (00:49 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 17 Mar 2003 00:49:05 +0000 (00:49 +0000)
render/mask.c
render/mask.h

index 7aa702950c7b78ec69ce20ce4744230925bfc10f..37e506f3dfe694f959b525a528f8b403dbb0965c 100644 (file)
@@ -1,3 +1,20 @@
 #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/ */
index 2d507a63a70957c47581efcf9478ae97c8029f9e..103b33d0d2374052c668e03d680569b73b6561b3 100644 (file)
@@ -9,4 +9,7 @@ typedef struct {
   guint w, h;
 } pixmap_mask;
 
+pixmap_mask *pixmap_mask_new(int w, int h, char *data);
+void pixmap_mask_free(pixmap_mask *m);
+
 #endif
This page took 0.027778 seconds and 4 git commands to generate.