#include <u.h>
#include <libc.h>
#include <libg.h>
#include <layer.h>
Layer* lalloc(Cover *c, Rectangle r)
void lfree(Layer *l)
void ltofront(Layer *l)
void ltoback(Layer *l)
void lcstring(Bitmap *b, int height, uchar *widths, uchar *msg,
int n)
typedef struct Layer Layer;
typedef struct Cover Cover;
typedef enum Lvis {
Visible,
Obscured,
Invisible,
}Lvis;
struct Layer {
Bitmap; /* Bitmap.cache!=0 ==> layer */
Layer *next; /* next layer from front to back */
Cover *cover; /* layer etc. that derived this one */
int user; /* a place for the user to stick stuff */
Lvis vis; /* visibility state */
};
struct Cover {
Layer *layer; /* layer on which these are painted */
Layer *front; /* first sublayer */
Bitmap *ground; /* background texture */
};