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 | |
| parent | 72f4c783fffbb4f8ec3a65cf23ad4a28e488bfaa (diff) | |
changes for clutter and for debugging for clutter
Diffstat (limited to 'libmemlayer')
| -rw-r--r-- | libmemlayer/draw.c | 13 | ||||
| -rw-r--r-- | libmemlayer/lalloc.c | 18 | ||||
| -rw-r--r-- | libmemlayer/ldelete.c | 12 | ||||
| -rw-r--r-- | libmemlayer/ltofront.c | 5 | ||||
| -rw-r--r-- | libmemlayer/ltorear.c | 5 |
5 files changed, 52 insertions, 1 deletions
diff --git a/libmemlayer/draw.c b/libmemlayer/draw.c index 413c7bc..f5b893d 100644 --- a/libmemlayer/draw.c +++ b/libmemlayer/draw.c @@ -69,8 +69,19 @@ if(drawdebug) iprint("mask->layer != nil\n"); } Top: - if(dst->layer==nil && src->layer==nil){ + if( +#ifndef EXT_WIN + dst->layer==nil && + src->layer==nil +#else + 1 +#endif + ){ +#ifndef EXT_WIN memimagedraw(dst, r, src, p0, mask, p1, op); +#else + memimagedraw(dst, r, src, p0, mask, p1, op); +#endif return; } 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)); diff --git a/libmemlayer/ldelete.c b/libmemlayer/ldelete.c index fdf4fb6..99a473e 100644 --- a/libmemlayer/ldelete.c +++ b/libmemlayer/ldelete.c @@ -3,6 +3,18 @@ #include "memdraw.h" #include "memlayer.h" + +#ifdef EXT_WIN +#include <android/log.h> + + +#define LOG_TAG "inferno LDEL" +#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) +#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__) +#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) +#endif + + void memldelete(Memimage *i) { diff --git a/libmemlayer/ltofront.c b/libmemlayer/ltofront.c index 04066ca..e5a11e9 100644 --- a/libmemlayer/ltofront.c +++ b/libmemlayer/ltofront.c @@ -72,6 +72,11 @@ memltofrontn(Memimage **ip, int n) front = nil; while(--n >= 0){ i = *ip++; +#ifdef EXT_WIN + if(i->ext_win){ + clutter_ext_win_tofront(i->ext_win); + }else +#endif _memltofront(i, front, 1); front = i; } diff --git a/libmemlayer/ltorear.c b/libmemlayer/ltorear.c index 4409761..0bb64a4 100644 --- a/libmemlayer/ltorear.c +++ b/libmemlayer/ltorear.c @@ -60,6 +60,11 @@ memltorearn(Memimage **ip, int n) rear = nil; while(--n >= 0){ i = *ip++; +#ifdef EXT_WIN + if(i->ext_win){ + clutter_ext_win_torear(i->ext_win); + }else +#endif _memltorear(i, rear); rear = i; } |
