dws

a new direct/dynamic/dri/drm based window system
git clone git://git.suckless.org/dws
Log | Files | Refs | README | LICENSE

commit 193e414ddf481991d6d091813e8e390f8c357790
parent 91f946d623d6f9b509c391c4fd83c17d08fde5c9
Author: arg@garbe.us <unknown>
Date:   Thu, 26 Feb 2009 16:41:39 +0000

some other sanity changes
Diffstat:
leinwand.h | 29++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/leinwand.h b/leinwand.h @@ -1,10 +1,10 @@ /* See LICENSE file for license details */ typedef enum { - CompositorTypeSourceOver, - CompositorTypeSourceAtTop, - CompositorTypeSourceIn, - CompositorTypeSourceOut, + CompositorTypeSrcOver, + CompositorTypeSrcAtTop, + CompositorTypeSrcIn, + CompositorTypeSrcOut, CompositorTypeDestOver, CompositorTypeDestAtTop, CompositorTypeDestIn, @@ -55,7 +55,7 @@ struct _LDisplay { unsigned int id; LRectangle r; /* virtual rectangle spanned over all screens */ LCompositor *compositor; - LSurface *root; /* root surface tier is 0 */ + LSurface *surfaces; LScreen *screens; LInput *inputs; }; @@ -81,16 +81,15 @@ struct _LScreen { unsigned int id; LDisplay *dpy; LRectangle r; - LSurface *surface; LScreen *next; }; struct _LSurface { unsigned int id; - unsigned int tier; LDisplay *dpy; - LSurface *parent; + LSurface *parent; /* if parent == NULL, then it's the root surface */ LSurface *childs; + LSurface *prev; LSurface *next; }; @@ -102,21 +101,25 @@ void LClose(LDisplay *dpy); LSurface *LGetRootSurface(LDisplay *dpy); +void LMapSurface(LDisplay *dpy, LSurface *surface); + LSurface *LCreateSurface(LDisplay *dpy, LSurface *parent); +void LDestroySurface(LDisplay *dpy, LSurface *surface); + void LSetCompositor(LDisplay *dpy, LSurface *surface, LCompositor *compositor); -void LDrawSurface(LDisplay *dpy, LSurface *surface, LRectangle destr, LImage *src, LRectangle srcr); +void LDrawImage(LDisplay *dpy, LSurface *surface, LRectangle destr, LRectangle srcr, LImage *src); LImage *LGetImage(LDisplay *dpy, LSurface *surface, LRectangle r); void LFreeImage(LDisplay *dpy, LImage *img); -void LDestroySurface(LSurface *surface); - LInput *LGetInput(LDisplay *dpy, LInputType type); -void LAddInputHandler(LDisplay *dpy, LInput *input, void (*handler)(LEvent *event)); +void LAddEventHandler(LDisplay *dpy, void (*handler)(LEvent *event)); + +void LRemoveEventHandler(LDisplay *dpy, void (*handler)(LEvent *event)); -void LRemoveInputHandler(LDisplay *dpy, LInput *input, void (*handler)(LEvent *event)); +void LCommit(LDisplay *dpy);