diff options
| author | bhgv <bhgv.empire@gmail.com> | 2018-07-06 02:17:43 +0300 |
|---|---|---|
| committer | bhgv <bhgv.empire@gmail.com> | 2018-07-06 02:17:43 +0300 |
| commit | 4f791e70fbee965278c7881be83f1c86f6909fc3 (patch) | |
| tree | 573b2332f34f8568d40b34bdd509747466f8adef /libmemlayer/lalloc.c | |
| parent | 72f4c783fffbb4f8ec3a65cf23ad4a28e488bfaa (diff) | |
changes for clutter and for debugging for clutter
Diffstat (limited to 'libmemlayer/lalloc.c')
| -rw-r--r-- | libmemlayer/lalloc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libmemlayer/lalloc.c b/libmemlayer/lalloc.c index 0dee2a1..dc92054 100644 --- a/libmemlayer/lalloc.c +++ b/libmemlayer/lalloc.c @@ -3,6 +3,12 @@ #include "memdraw.h" #include "memlayer.h" + +#ifdef EXT_WIN +extern void* attach_clutter_actor(char* buffer, int min_x, int min_y, int max_x, int max_y); +#endif + + Memimage* memlalloc(Memscreen *s, Rectangle screenr, Refreshfn refreshfn, void *refreshptr, ulong val) { @@ -18,7 +24,19 @@ memlalloc(Memscreen *s, Rectangle screenr, Refreshfn refreshfn, void *refreshptr paint->clipr = Rect(-0x3FFFFFF, -0x3FFFFFF, 0x3FFFFFF, 0x3FFFFFF); } +#ifndef EXT_WIN n = allocmemimaged(screenr, s->image->chan, s->image->data); +#else + n = allocmemimage(screenr, s->image->chan); + if(n && n->data && n->data->bdata /*&& !n->ext_win*/){ + n->ext_win = attach_clutter_actor(n->data->bdata, + n->r.min.x, n->r.min.y, + n->r.max.x, n->r.max.y); + }else{ + n->ext_win = NULL; + } +print("clutter new window chan=%d\n", chantodepth(s->image->chan) ); +#endif if(n == nil) return nil; l = malloc(sizeof(Memlayer)); |
