vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

memlayer.h (1788B)


      1 
      2 typedef struct Memscreen Memscreen;
      3 typedef void (*Refreshfn)(Memimage*, Rectangle, void*);
      4 
      5 struct Memscreen
      6 {
      7 	Memimage	*frontmost;	/* frontmost layer on screen */
      8 	Memimage	*rearmost;	/* rearmost layer on screen */
      9 	Memimage	*image;		/* upon which all layers are drawn */
     10 	Memimage	*fill;			/* if non-zero, picture to use when repainting */
     11 };
     12 
     13 struct Memlayer
     14 {
     15 	Rectangle		screenr;	/* true position of layer on screen */
     16 	Point			delta;	/* add delta to go from image coords to screen */
     17 	Memscreen	*screen;	/* screen this layer belongs to */
     18 	Memimage	*front;	/* window in front of this one */
     19 	Memimage	*rear;	/* window behind this one*/
     20 	int		clear;	/* layer is fully visible */
     21 	Memimage	*save;	/* save area for obscured parts */
     22 	Refreshfn	refreshfn;		/* function to call to refresh obscured parts if save==nil */
     23 	void		*refreshptr;	/* argument to refreshfn */
     24 };
     25 
     26 /*
     27  * These functions accept local coordinates
     28  */
     29 int			memload(Memimage*, Rectangle, uchar*, int, int);
     30 int			memunload(Memimage*, Rectangle, uchar*, int);
     31 
     32 /*
     33  * All these functions accept screen coordinates, not local ones.
     34  */
     35 void			_memlayerop(void (*fn)(Memimage*, Rectangle, Rectangle, void*, int), Memimage*, Rectangle, Rectangle, void*);
     36 Memimage*	memlalloc(Memscreen*, Rectangle, Refreshfn, void*, ulong);
     37 void			memldelete(Memimage*);
     38 void			memlfree(Memimage*);
     39 void			memltofront(Memimage*);
     40 void			memltofrontn(Memimage**, int);
     41 void			_memltofrontfill(Memimage*, int);
     42 void			memltorear(Memimage*);
     43 void			memltorearn(Memimage**, int);
     44 int			memlsetrefresh(Memimage*, Refreshfn, void*);
     45 void			memlhide(Memimage*, Rectangle);
     46 void			memlexpose(Memimage*, Rectangle);
     47 void			_memlsetclear(Memscreen*);
     48 int			memlorigin(Memimage*, Point, Point);
     49 void			memlnorefresh(Memimage*, Rectangle, void*);