summaryrefslogtreecommitdiff
path: root/os/boot/rpcg/gnot.h
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 21:39:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 21:39:35 +0000
commit74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (patch)
treec6e220ba61db3a6ea4052e6841296d829654e664 /os/boot/rpcg/gnot.h
parent46439007cf417cbd9ac8049bb4122c890097a0fa (diff)
20060303
Diffstat (limited to 'os/boot/rpcg/gnot.h')
-rw-r--r--os/boot/rpcg/gnot.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/os/boot/rpcg/gnot.h b/os/boot/rpcg/gnot.h
new file mode 100644
index 00000000..7b99e6bb
--- /dev/null
+++ b/os/boot/rpcg/gnot.h
@@ -0,0 +1,71 @@
+
+extern void *bbmalloc(int);
+extern void bbfree(void *, int);
+extern int bbonstack(void);
+extern void bbexec(void(*)(void), int, int);
+
+/*
+ * Graphics types
+ */
+
+typedef struct GBitmap GBitmap;
+typedef struct GFont GFont;
+typedef struct GSubfont GSubfont;
+typedef struct GCacheinfo GCacheinfo;
+
+struct GBitmap
+{
+ ulong *base; /* pointer to start of data */
+ long zero; /* base+zero=&word containing (0,0) */
+ ulong width; /* width in 32 bit words of total data area */
+ int ldepth; /* log base 2 of number of bits per pixel */
+ Rectangle r; /* rectangle in data area, local coords */
+ Rectangle clipr; /* clipping region */
+ GBitmap *cache; /* zero; distinguishes bitmap from layer */
+};
+
+
+/*
+ * GFont etc. are not used in the library, only in devbit.c.
+ * GSubfont is only barely used.
+ */
+struct GSubfont
+{
+ short n; /* number of chars in font */
+ char height; /* height of bitmap */
+ char ascent; /* top of bitmap to baseline */
+ Fontchar *info; /* n+1 character descriptors */
+ GBitmap *bits; /* where the characters are */
+};
+struct GCacheinfo
+{
+ ulong xright; /* right edge of bits */
+ Fontchar;
+};
+
+struct GFont
+{
+ uchar height; /* max height of bitmap, interline spacing */
+ char ascent; /* top of bitmap to baseline */
+ char width; /* widest so far; used in caching only */
+ char ldepth; /* of images */
+ short id; /* of font */
+ int ncache; /* number of entries in cache */
+ GCacheinfo *cache; /* cached characters */
+ GBitmap *b; /* cached images */
+};
+
+extern ulong *gaddr(GBitmap*, Point);
+extern uchar *gbaddr(GBitmap*, Point);
+extern void gbitblt(GBitmap*, Point, GBitmap*, Rectangle, Fcode);
+extern void gbitbltclip(void*);
+extern void gtexture(GBitmap*, Rectangle, GBitmap*, Fcode);
+extern Point gsubfstrsize(GSubfont*, char*);
+extern int gsubfstrwidth(GSubfont*, char*);
+extern Point gsubfstring(GBitmap*, Point, GSubfont*, char*, Fcode);
+extern Point gbitbltstring(GBitmap*, Point, GSubfont*, char*, Fcode);
+extern void gsegment(GBitmap*, Point, Point, int, Fcode);
+extern void gpoint(GBitmap*, Point, int, Fcode);
+extern void gflushcpucache(void);
+extern GBitmap* gballoc(Rectangle, int);
+extern void gbfree(GBitmap*);