diff --git a/lib/libvgl/mouse.c b/lib/libvgl/mouse.c index 40b15e707163..fae8a84992ba 100644 --- a/lib/libvgl/mouse.c +++ b/lib/libvgl/mouse.c @@ -1,287 +1,287 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1991-1997 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include #include #include #include #include "vgl.h" #define X 0xff static byte StdAndMask[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE] = { X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0, X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0, X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0, X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,0, X,X,X,X,X,X,0,0,0,0,0,0,0,0,0,0, X,X,X,X,X,X,X,0,0,0,0,0,0,0,0,0, X,X,X,X,X,X,X,X,0,0,0,0,0,0,0,0, X,X,X,X,X,X,X,X,X,0,0,0,0,0,0,0, X,X,X,X,X,X,X,0,0,0,0,0,0,0,0,0, 0,0,0,X,X,X,X,0,0,0,0,0,0,0,0,0, 0,0,0,X,X,X,X,X,0,0,0,0,0,0,0,0, 0,0,0,0,X,X,X,X,0,0,0,0,0,0,0,0, 0,0,0,0,X,X,X,X,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; static byte StdOrMask[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0, 0,X,X,X,X,0,0,0,0,0,0,0,0,0,0,0, 0,X,X,X,X,X,0,0,0,0,0,0,0,0,0,0, 0,X,X,X,X,X,X,0,0,0,0,0,0,0,0,0, 0,X,X,0,X,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,X,X,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,X,X,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; #undef X static VGLBitmap VGLMouseStdAndMask = VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdAndMask); static VGLBitmap VGLMouseStdOrMask = VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdOrMask); static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask; static byte map[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4]; static VGLBitmap VGLMouseSave = VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, map); static int VGLMouseVisible = 0; static int VGLMouseFrozen = 0; static int VGLMouseShown = 0; static int VGLMouseXpos = 0; static int VGLMouseYpos = 0; static int VGLMouseButtons = 0; void VGLMousePointerShow() { byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4]; VGLBitmap buffer = VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf); byte crtcidx, crtcval, gdcidx, gdcval; int pos; if (!VGLMouseVisible) { VGLMouseVisible = 1; crtcidx = inb(0x3c4); crtcval = inb(0x3c5); gdcidx = inb(0x3ce); gdcval = inb(0x3cf); __VGLBitmapCopy(VGLDisplay, VGLMouseXpos, VGLMouseYpos, &VGLMouseSave, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); bcopy(VGLMouseSave.Bitmap, buffer.Bitmap, MOUSE_IMG_SIZE*MOUSE_IMG_SIZE); for (pos = 0; pos < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; pos++) buffer.Bitmap[pos]=(buffer.Bitmap[pos]&~(VGLMouseAndMask->Bitmap[pos])) | VGLMouseOrMask->Bitmap[pos]; __VGLBitmapCopy(&buffer, 0, 0, VGLDisplay, VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); outb(0x3c4, crtcidx); outb(0x3c5, crtcval); outb(0x3ce, gdcidx); outb(0x3cf, gdcval); } } void VGLMousePointerHide() { byte crtcidx, crtcval, gdcidx, gdcval; if (VGLMouseVisible) { VGLMouseVisible = 0; crtcidx = inb(0x3c4); crtcval = inb(0x3c5); gdcidx = inb(0x3ce); gdcval = inb(0x3cf); __VGLBitmapCopy(&VGLMouseSave, 0, 0, VGLDisplay, VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); outb(0x3c4, crtcidx); outb(0x3c5, crtcval); outb(0x3ce, gdcidx); outb(0x3cf, gdcval); } } void VGLMouseMode(int mode) { if (mode == VGL_MOUSESHOW) { if (VGLMouseShown == VGL_MOUSEHIDE) { VGLMousePointerShow(); VGLMouseShown = VGL_MOUSESHOW; } } else { if (VGLMouseShown == VGL_MOUSESHOW) { VGLMousePointerHide(); VGLMouseShown = VGL_MOUSEHIDE; } } } void VGLMouseAction(int dummy) { struct mouse_info mouseinfo; if (VGLMouseFrozen) { VGLMouseFrozen++; return; } mouseinfo.operation = MOUSE_GETINFO; ioctl(0, CONS_MOUSECTL, &mouseinfo); if (VGLMouseShown == VGL_MOUSESHOW) VGLMousePointerHide(); VGLMouseXpos = mouseinfo.u.data.x; VGLMouseYpos = mouseinfo.u.data.y; VGLMouseButtons = mouseinfo.u.data.buttons; if (VGLMouseShown == VGL_MOUSESHOW) VGLMousePointerShow(); } void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask) { if (VGLMouseShown == VGL_MOUSESHOW) VGLMousePointerHide(); VGLMouseAndMask = AndMask; VGLMouseOrMask = OrMask; if (VGLMouseShown == VGL_MOUSESHOW) VGLMousePointerShow(); } void VGLMouseSetStdImage() { if (VGLMouseShown == VGL_MOUSESHOW) VGLMousePointerHide(); VGLMouseAndMask = &VGLMouseStdAndMask; VGLMouseOrMask = &VGLMouseStdOrMask; if (VGLMouseShown == VGL_MOUSESHOW) VGLMousePointerShow(); } int VGLMouseInit(int mode) { struct mouse_info mouseinfo; int error; VGLMouseSetStdImage(); mouseinfo.operation = MOUSE_MODE; mouseinfo.u.mode.signal = SIGUSR2; if ((error = ioctl(0, CONS_MOUSECTL, &mouseinfo))) return error; signal(SIGUSR2, VGLMouseAction); mouseinfo.operation = MOUSE_GETINFO; ioctl(0, CONS_MOUSECTL, &mouseinfo); VGLMouseXpos = mouseinfo.u.data.x; VGLMouseYpos = mouseinfo.u.data.y; VGLMouseButtons = mouseinfo.u.data.buttons; VGLMouseMode(mode); return 0; } int VGLMouseStatus(int *x, int *y, char *buttons) { signal(SIGUSR2, SIG_IGN); *x = VGLMouseXpos; *y = VGLMouseYpos; *buttons = VGLMouseButtons; signal(SIGUSR2, VGLMouseAction); return VGLMouseShown; } int -VGLMouseFreeze(int x, int y, int width, int hight, byte color) +VGLMouseFreeze(int x, int y, int width, int hight, u_long color) { if (!VGLMouseFrozen) { VGLMouseFrozen = 1; if (width > 1 || hight > 1) { /* bitmap */ if (VGLMouseShown == 1) { int overlap; if (x > VGLMouseXpos) overlap = (VGLMouseXpos + MOUSE_IMG_SIZE) - x; else overlap = (x + width) - VGLMouseXpos; if (overlap > 0) { if (y > VGLMouseYpos) overlap = (VGLMouseYpos + MOUSE_IMG_SIZE) - y; else overlap = (y + hight) - VGLMouseYpos; if (overlap > 0) VGLMousePointerHide(); } } } else { /* bit */ if (VGLMouseShown && x >= VGLMouseXpos && x < VGLMouseXpos + MOUSE_IMG_SIZE && y >= VGLMouseYpos && y < VGLMouseYpos + MOUSE_IMG_SIZE) { VGLMouseSave.Bitmap[(y-VGLMouseYpos)*MOUSE_IMG_SIZE+(x-VGLMouseXpos)] = (color); if (VGLMouseAndMask->Bitmap [(y-VGLMouseYpos)*MOUSE_IMG_SIZE+(x-VGLMouseXpos)]) { return 1; } } } } return 0; } void VGLMouseUnFreeze() { if (VGLMouseFrozen > 1) { VGLMouseFrozen = 0; VGLMouseAction(0); } else { VGLMouseFrozen = 0; if (VGLMouseShown == VGL_MOUSESHOW && !VGLMouseVisible) VGLMousePointerShow(); } } diff --git a/lib/libvgl/text.c b/lib/libvgl/text.c index be83ab08dc9e..18633f8d4be0 100644 --- a/lib/libvgl/text.c +++ b/lib/libvgl/text.c @@ -1,251 +1,251 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1991-1997 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include "vgl.h" static VGLText *VGLTextFont; extern byte VGLFont[]; int VGLTextSetFontFile(char *filename) { FILE *fd; if (VGLTextFont) { if (VGLTextFont->BitmapArray != VGLFont) free (VGLTextFont->BitmapArray); free(VGLTextFont); } if ((VGLTextFont=(VGLText*)malloc(sizeof(VGLText))) == (VGLText*)0) return 1; if (filename==NULL) { VGLTextFont->Width = 8; VGLTextFont->Height = 8; VGLTextFont->BitmapArray = VGLFont; } else { if ((fd=fopen(filename, "r"))==(FILE*)0) return 1; fread(&VGLTextFont->Width, 1 , 1, fd); fread(&VGLTextFont->Height, 1 , 1, fd); VGLTextFont->BitmapArray = (byte*)malloc(256*((VGLTextFont->Width + 7)/8)*VGLTextFont->Height); fread(VGLTextFont->BitmapArray, 1, (256*((VGLTextFont->Width + 7)/8)*VGLTextFont->Height), fd); fclose(fd); } return 0; } void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, - byte fgcol, byte bgcol, int fill, int dir) + u_long fgcol, u_long bgcol, int fill, int dir) { int b, Bpc, Bpl, lin, bit, topbit; Bpl = (VGLTextFont->Width + 7) / 8; Bpc = Bpl * VGLTextFont->Height; topbit = VGLTextFont->Width - 1; for(lin = 0; lin < VGLTextFont->Height; lin++) { for(bit = 0; bit < VGLTextFont->Width; bit++) { b = bit + (-VGLTextFont->Width & 7); if (VGLTextFont->BitmapArray[(ch*Bpc)+(lin*Bpl)+(b/8)]&(1<<(b%8))) switch (dir) { case 0: VGLSetXY(Object, (x+topbit-bit), (y+lin), fgcol); break; case 1: VGLSetXY(Object, (x+lin), (y-topbit+bit), fgcol); break; case 2: VGLSetXY(Object, (x-topbit+bit), (y-lin), fgcol); break; case 3: VGLSetXY(Object, (x-lin), (y+topbit-bit), fgcol); break; case 4: VGLSetXY(Object, (x+lin+topbit-bit), (y+lin+bit), fgcol); break; } else if (fill) switch (dir) { case 0: VGLSetXY(Object, (x+topbit-bit), (y+lin), bgcol); break; case 1: VGLSetXY(Object, (x+lin), (y-topbit+bit), bgcol); break; case 2: VGLSetXY(Object, (x-topbit+bit), (y-lin), bgcol); break; case 3: VGLSetXY(Object, (x-lin), (y+topbit-bit), bgcol); break; case 4: VGLSetXY(Object, (x+lin+topbit-bit), (y+lin+bit), bgcol); break; } } } } void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, - byte fgcol, byte bgcol, int fill, int dir) + u_long fgcol, u_long bgcol, int fill, int dir) { int pos; for (pos=0; posWidth), y, str[pos], fgcol, bgcol, fill, dir); break; case 1: VGLBitmapPutChar(Object, x, y-(pos*VGLTextFont->Width), str[pos], fgcol, bgcol, fill, dir); break; case 2: VGLBitmapPutChar(Object, x-(pos*VGLTextFont->Width), y, str[pos], fgcol, bgcol, fill, dir); break; case 3: VGLBitmapPutChar(Object, x, y+(pos*VGLTextFont->Width), str[pos], fgcol, bgcol, fill, dir); break; case 4: VGLBitmapPutChar(Object, x+(pos*VGLTextFont->Width), y-(pos*VGLTextFont->Width), str[pos], fgcol, bgcol, fill, dir); break; } } } byte VGLFont[] = { 0,0,0,0,0,0,0,0,126,129,165,129,189,153,129,126,126,255,219,255,195,231, 255,126,108,254,254,254,124,56,16,0,16,56,124,254,124,56,16,0,56,124,56, 254,254,124,56,124,16,16,56,124,254,124,56,124,0,0,24,60,60,24,0,0,255, 255,231,195,195,231,255,255,0,60,102,66,66,102,60,0,255,195,153,189,189, 153,195,255,15,7,15,125,204,204,204,120,60,102,102,102,60,24,126,24,63, 51,63,48,48,112,240,224,127,99,127,99,99,103,230,192,153,90,60,231,231, 60,90,153,128,224,248,254,248,224,128,0,2,14,62,254,62,14,2,0,24,60,126, 24,24,126,60,24,102,102,102,102,102,0,102,0,127,219,219,123,27,27,27,0, 62,99,56,108,108,56,204,120,0,0,0,0,126,126,126,0,24,60,126,24,126,60,24, 255,24,60,126,24,24,24,24,0,24,24,24,24,126,60,24,0,0,24,12,254,12,24,0, 0,0,48,96,254,96,48,0,0,0,0,192,192,192,254,0,0,0,36,102,255,102,36,0,0, 0,24,60,126,255,255,0,0,0,255,255,126,60,24,0,0,0,0,0,0,0,0,0,0,48,120, 120,48,48,0,48,0,108,108,108,0,0,0,0,0,108,108,254,108,254,108,108,0,48, 124,192,120,12,248,48,0,0,198,204,24,48,102,198,0,56,108,56,118,220,204, 118,0,96,96,192,0,0,0,0,0,24,48,96,96,96,48,24,0,96,48,24,24,24,48,96,0, 0,102,60,255,60,102,0,0,0,48,48,252,48,48,0,0,0,0,0,0,0,48,48,96,0,0,0, 252,0,0,0,0,0,0,0,0,0,48,48,0,6,12,24,48,96,192,128,0,124,198,206,222,246, 230,124,0,48,112,48,48,48,48,252,0,120,204,12,56,96,204,252,0,120,204,12, 56,12,204,120,0,28,60,108,204,254,12,30,0,252,192,248,12,12,204,120,0,56, 96,192,248,204,204,120,0,252,204,12,24,48,48,48,0,120,204,204,120,204,204, 120,0,120,204,204,124,12,24,112,0,0,48,48,0,0,48,48,0,0,48,48,0,0,48,48, 96,24,48,96,192,96,48,24,0,0,0,252,0,0,252,0,0,96,48,24,12,24,48,96,0,120, 204,12,24,48,0,48,0,124,198,222,222,222,192,120,0,48,120,204,204,252,204, 204,0,252,102,102,124,102,102,252,0,60,102,192,192,192,102,60,0,248,108, 102,102,102,108,248,0,254,98,104,120,104,98,254,0,254,98,104,120,104,96, 240,0,60,102,192,192,206,102,62,0,204,204,204,252,204,204,204,0,120,48, 48,48,48,48,120,0,30,12,12,12,204,204,120,0,230,102,108,120,108,102,230, 0,240,96,96,96,98,102,254,0,198,238,254,254,214,198,198,0,198,230,246,222, 206,198,198,0,56,108,198,198,198,108,56,0,252,102,102,124,96,96,240,0,120, 204,204,204,220,120,28,0,252,102,102,124,108,102,230,0,120,204,224,112, 28,204,120,0,252,180,48,48,48,48,120,0,204,204,204,204,204,204,252,0,204, 204,204,204,204,120,48,0,198,198,198,214,254,238,198,0,198,198,108,56,56, 108,198,0,204,204,204,120,48,48,120,0,254,198,140,24,50,102,254,0,120,96, 96,96,96,96,120,0,192,96,48,24,12,6,2,0,120,24,24,24,24,24,120,0,16,56, 108,198,0,0,0,0,0,0,0,0,0,0,0,255,48,48,24,0,0,0,0,0,0,0,120,12,124,204, 118,0,224,96,96,124,102,102,220,0,0,0,120,204,192,204,120,0,28,12,12,124, 204,204,118,0,0,0,120,204,252,192,120,0,56,108,96,240,96,96,240,0,0,0,118, 204,204,124,12,248,224,96,108,118,102,102,230,0,48,0,112,48,48,48,120,0, 12,0,12,12,12,204,204,120,224,96,102,108,120,108,230,0,112,48,48,48,48, 48,120,0,0,0,204,254,254,214,198,0,0,0,248,204,204,204,204,0,0,0,120,204, 204,204,120,0,0,0,220,102,102,124,96,240,0,0,118,204,204,124,12,30,0,0, 220,118,102,96,240,0,0,0,124,192,120,12,248,0,16,48,124,48,48,52,24,0,0, 0,204,204,204,204,118,0,0,0,204,204,204,120,48,0,0,0,198,214,254,254,108, 0,0,0,198,108,56,108,198,0,0,0,204,204,204,124,12,248,0,0,252,152,48,100, 252,0,28,48,48,224,48,48,28,0,24,24,24,0,24,24,24,0,224,48,48,28,48,48, 224,0,118,220,0,0,0,0,0,0,0,16,56,108,198,198,254,0,0,0,0,0,0,0,0,0,0,0, 60,126,255,126,24,0,170,85,85,170,170,85,85,170,68,68,68,68,31,4,4,4,124, 64,64,64,31,16,16,16,56,68,68,56,30,17,20,19,64,64,64,124,31,16,16,16,56, 108,56,0,0,0,0,0,0,0,24,24,24,24,126,0,68,100,76,68,16,16,16,31,68,68,40, 16,31,4,4,4,24,24,24,24,248,0,0,0,0,0,0,0,248,24,24,24,0,0,0,0,31,24,24, 24,24,24,24,24,31,0,0,0,24,24,24,24,255,24,24,24,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,24,24,24, 24,31,24,24,24,24,24,24,24,248,24,24,24,24,24,24,24,255,0,0,0,0,0,0,0,255, 24,24,24,24,24,24,24,24,24,24,24,0,12,48,96,24,12,126,0,0,48,12,6,24,48, 126,0,0,0,3,62,54,54,108,0,0,0,4,126,16,126,64,0,0,28,48,48,48,48,126,0, 0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,48,0,48,48,120,120,48,0,0,0,16,124,192, 192,124,16,0,56,96,96,240,96,252,0,0,195,60,102,102,60,195,0,0,204,204, 120,48,252,48,0,24,24,24,0,24,24,24,0,126,192,124,198,124,6,252,0,198,0, 0,0,0,0,0,0,124,130,186,162,186,130,124,0,28,6,30,34,31,63,0,0,0,51,102, 204,102,51,0,0,0,254,6,0,0,0,0,0,0,0,0,0,0,0,0,0,124,130,186,178,170,130, 124,0,254,0,0,0,0,0,0,0,56,108,56,0,0,0,0,0,0,16,124,16,0,124,0,0,28,54, 6,24,62,0,0,0,30,2,14,2,30,0,0,0,24,48,0,0,0,0,0,0,0,0,204,204,204,204, 118,192,126,202,202,126,10,10,10,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,24,48,6, 14,6,6,6,0,0,0,14,17,17,17,14,31,0,0,0,204,102,51,102,204,0,0,96,224,102, 108,51,103,15,3,96,224,102,108,54,106,4,14,240,32,150,108,51,103,15,3,48, 0,48,96,192,204,120,0,24,12,48,120,204,252,204,0,96,192,48,120,204,252, 204,0,120,132,48,120,204,252,204,0,102,152,48,120,204,252,204,0,204,0,48, 120,204,252,204,0,48,72,48,120,204,252,204,0,62,120,152,156,248,152,158, 0,60,102,192,192,192,102,28,48,48,24,254,98,120,98,254,0,24,48,254,98,120, 98,254,0,56,68,254,98,120,98,254,0,102,0,254,98,120,98,254,0,96,48,120, 48,48,48,120,0,24,48,120,48,48,48,120,0,120,132,120,48,48,48,120,0,204, 0,120,48,48,48,120,0,120,108,102,246,102,108,120,0,102,152,230,246,222, 206,198,0,48,24,124,198,198,198,124,0,24,48,124,198,198,198,124,0,56,68, 124,198,198,198,124,0,102,152,124,198,198,198,124,0,198,0,124,198,198,198, 124,0,0,198,108,56,56,108,198,0,6,124,206,154,178,230,120,192,96,48,204, 204,204,204,252,0,24,48,204,204,204,204,252,0,120,132,204,204,204,204,252, 0,204,0,204,204,204,204,252,0,24,48,204,204,120,48,120,0,96,120,108,120, 96,96,96,0,120,204,196,220,198,198,220,192,48,24,120,12,124,204,118,0,24, 48,120,12,124,204,118,0,120,132,120,12,124,204,118,0,102,152,120,12,124, 204,118,0,204,0,120,12,124,204,118,0,48,72,56,12,124,204,118,0,0,0,236, 50,126,176,110,0,0,0,60,102,192,102,28,48,48,24,120,204,252,192,120,0,24, 48,120,204,252,192,120,0,120,132,120,204,252,192,120,0,204,0,120,204,252, 192,120,0,96,48,0,112,48,48,120,0,24,48,0,112,48,48,120,0,112,136,0,112, 48,48,120,0,204,0,0,112,48,48,120,0,108,56,108,12,108,204,120,0,102,152, 248,204,204,204,204,0,96,48,0,124,198,198,124,0,24,48,0,124,198,198,124, 0,56,68,0,124,198,198,124,0,102,152,0,124,198,198,124,0,198,0,0,124,198, 198,124,0,0,0,24,0,126,0,24,0,0,0,6,124,222,246,124,192,96,48,0,204,204, 204,118,0,24,48,0,204,204,204,118,0,48,72,0,204,204,204,118,0,204,0,0,204, 204,204,118,0,24,48,204,204,204,124,12,248,224,120,108,102,108,120,224, 0,204,0,204,204,204,124,12,248 }; diff --git a/lib/libvgl/vgl.3 b/lib/libvgl/vgl.3 index d70ea73ddf3f..749ca3b65576 100644 --- a/lib/libvgl/vgl.3 +++ b/lib/libvgl/vgl.3 @@ -1,471 +1,471 @@ .\"- .\" Copyright (c) 1997 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer, .\" in this position and unchanged. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd February 25, 2012 .Dt VGL 3 .Os .Sh NAME .Nm VGLBitmapAllocateBits , .Nm VGLBitmapCopy , .Nm VGLBitmapCreate , .Nm VGLBitmapDestroy , .Nm VGLBitmapPutChar , .Nm VGLBitmapString , .Nm VGLBlankDisplay , .Nm VGLBox , .Nm VGLCheckSwitch , .Nm VGLClear , .Nm VGLEllipse , .Nm VGLEnd , .Nm VGLFilledBox , .Nm VGLFilledEllipse , .Nm VGLGetXY , .Nm VGLInit , .Nm VGLLine , .Nm VGLKeyboardInit , .Nm VGLKeyboardEnd , .Nm VGLKeyboardGetCh , .Nm VGLMouseInit , .Nm VGLMouseMode , .Nm VGLMouseSetImage , .Nm VGLMouseSetStdImage , .Nm VGLMouseStatus , .Nm VGLPanScreen , .Nm VGLSetBorder , .Nm VGLSetPalette , .Nm VGLSetPaletteIndex , .Nm VGLSetVScreenSize , .Nm VGLSetXY , .Nm VGLTextSetFontFile .Nd Video Graphics Library functions .Sh LIBRARY .Lb libvgl .Sh SYNOPSIS .In sys/fbio.h .In sys/consio.h .In sys/kbio.h .In vgl.h .Ft int .Fn VGLInit "int mode" .Ft void .Fn VGLEnd "void" .Ft void .Fn VGLCheckSwitch "void" .Ft int .Fn VGLTextSetFontFile "char *filename" .Ft int .Fn VGLKeyboardInit "int code" .Ft void .Fn VGLKeyboardEnd "void" .Ft int .Fn VGLKeyboardGetCh "void" .Ft int .Fn VGLMouseInit "int mode" .Ft void .Fn VGLMouseMode "int mode" .Ft int .Fn VGLMouseStatus "int *x" "int *y" "char *buttons" .Ft void .Fn VGLMouseSetImage "VGLBitmap *AndMask" "VGLBitmap *OrMask" .Ft void .Fn VGLMouseSetStdImage "void" .Ft u_long .Fn VGLGetXY "VGLBitmap *object" "int x" "int y" .Ft void .Fn VGLSetXY "VGLBitmap *object" "int x" "int y" "u_long color" .Ft void .Fn VGLLine "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "u_long color" .Ft void .Fn VGLBox "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "u_long color" .Ft void .Fn VGLFilledBox "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "u_long color" .Ft void .Fn VGLEllipse "VGLBitmap *object" "int xc" "int yc" "int a" "int b" "u_long color" .Ft void .Fn VGLFilledEllipse "VGLBitmap *object" "int xc" "int yc" "int a" "int b" "u_long color" .Ft VGLBitmap * .Fn VGLBitmapCreate "int type" "int xsize" "int ysize" "byte *bits" .Ft void .Fn VGLBitmapDestroy "VGLBitmap *object" .Ft int .Fn VGLBitmapAllocateBits "VGLBitmap *object" .Ft int .Fn VGLBitmapCopy "VGLBitmap *src" "int srcx" "int srcy" "VGLBitmap *dst" "int dstx" "int dsty" "int width" "int hight" .Ft void -.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "byte fgcol" "byte bgcol" "int fill" "int dir" +.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "u_long fgcol" "u_long bgcol" "int fill" "int dir" .Ft void -.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "byte fgcol" "byte bgcol" "int fill" "int dir" +.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "u_long fgcol" "u_long bgcol" "int fill" "int dir" .Ft void .Fn VGLClear "VGLBitmap *object" "u_long color" .Ft void .Fn VGLSetPalette "byte *red" "byte *green" "byte *blue" .Ft void .Fn VGLSetPaletteIndex "byte color" "byte red" "byte green" "byte blue" .Ft void -.Fn VGLSetBorder "byte color" +.Fn VGLSetBorder "u_long color" .Ft int .Fn VGLSetVScreenSize "VGLBitmap *object" "int vxsize" "int vysize" .Ft int .Fn VGLPanScreen "VGLBitmap *object" "int x" "int y" .Ft void .Fn VGLBlankDisplay "int blank" .Sh DESCRIPTION .Nm Libvgl is a library that enables the programmer access to the graphics modes supported by the console driver (syscons). The library takes care of programming the actual video hardware, and provides a number of simple functions to do various graphic operations. There is also support for a mouse via the standard mouse system in .Fx , see .Xr mouse 4 , including the ability to transparently have a mouse pointer superimposed on the graphic image currently being worked on. The library takes care of screen switching by storing the current image in memory before switching to another virtual console, and restoring when the user switches back. This allows several graphic applications at once, but on different virtual consoles. .Pp Below is a short description of the various functions: .Pp .Fn VGLInit initialize the library and set up the graphic mode .Va mode . .Pp .Fn VGLEnd terminate graphic mode, and restore the screenmode that was active before .Fn VGLInit was called. .Pp .Fn VGLCheckSwitch if the program goes into longer periods of processing without doing any graphics output, calling this function occasionally will allow the system to switch screens. .Pp .Fn VGLTextSetFontFile instruct the char/string functions to use the font in file .Pa filename instead of the builtin font. .Pp .Fn VGLKeyboardInit set up the keyboard in the .Dq raw I/O mode and specify the key code to be used. .Va code must be .Dv VGL_XLATEKEYS , .Dv VGL_CODEKEYS , or .Dv VGL_RAWKEYS . When .Dv VGL_XLATEKEYS is specified, the keyboard translates the raw keyboard scan code into a character code. If .Dv VGL_RAWKEYS is used, the raw keyboard scan code is read as is. .Dv VGL_CODEKEYS is the intermediate key code; each key is assigned a unique code whereas more than one raw scan code may be generated when a key is pressed. .Pp .Fn VGLKeyboardEnd when you have finished using the keyboard, call this function. .Pp .Fn VGLKeyboardGetCh read one byte from the keyboard. As the keyboard I/O is in the .Dq raw input mode, the function will not block even if there is no input data, and returns 0. .Pp .Fn VGLMouseInit initialize the mouse. The optional on-screen mouse pointer is shown if the argument is .Dv VGL_MOUSESHOW . .Pp .Fn VGLMouseMode either shows the mouse pointer if the argument is .Dv VGL_MOUSESHOW , or hides the mouse pointer if the argument is .Dv VGL_MOUSEHIDE . .Pp .Fn VGLMouseStatus returns the current mouse pointer coordinates and button state in .Va x , y , buttons. The return value reflects if the mouse pointer is currently shown on screen or not. .Pp .Fn VGLMouseSetImage with this function it is possible to change the image of the mouse pointer on screen. .Pp .Fn VGLMouseSetStdImage this function restores the mouse pointer to the standard arrow. .Pp .Fn VGLGetXY retrieves the color of the pixel located at .Va x , y , coordinates of the .Va object -argument, and returns it as a byte value. +argument, and returns it as a u_long value. .Pp .Fn VGLSetXY sets the color of the pixel located at .Va x , y , coordinates of the .Va object argument to .Va color -byte value. +u_long value. .Pp .Fn VGLLine draw a line from .Va x1 , y1 to .Va x2 , y2 in color .Va color . .Pp .Fn VGLBox draw a box with upper left hand corner at .Va x1 , y1 and lower right hand corner at .Va x2 , y2 in color .Va color . .Pp .Fn VGLFilledBox draw a filled (solid) box with upper left hand corner at .Va x1 , y1 and lower right hand corner at .Va x2 , y2 in color .Va color . .Pp .Fn VGLEllipse draw an ellipse centered at .Va xc , yc make it .Va a pixels wide, and .Va b pixels high in color .Va color . .Pp .Fn VGLFilledEllipse draw a filled (solid) ellipse centered at .Va xc , yc make it .Va a pixels wide, and .Va b pixels high in color .Va color . .Pp .Fn VGLBitmapCreate create a bitmap object and initialize it with the specified values and bit data. .Va type must be .Dv MEMBUF for the in-memory bitmap. .Va bits may be NULL so that bitmap data may be associated later. .Pp There also is a macro, .Fn VGLBITMAP_INITIALIZER "type" "xsize" "ysize" "bits" to initialize a statically declared bitmap object. .Pp .Fn VGLBitmapDestroy free the bitmap data and the bitmap object. .Pp .Fn VGLBitmapAllocateBits allocate a bit data buffer for the specified object. .Pp .Fn VGLBitmapCopy copy a rectangle of pixels from bitmap .Va src upper left hand corner at .Va srcx , srcy to bitmap .Va dst at .Va dstx , dsty of the size .Va width , height . .Pp .Fn VGLBitmapPutChar write the character .Va ch at position .Va x , y in foreground color .Va fgcol . If .Va fill is != 0, use the color .Va bgcol as background otherwise the background is transparent. The character is drawn in the direction specified by the argument .Va dir . .Pp .Fn VGLBitmapString write the string .Va str at position .Va x , y in foreground color .Va fgcol . If .Va fill is != 0, use the color .Va bgcol as background otherwise the background is transparent. The string is drawn in the direction specified by the argument .Va dir . .Pp .Fn VGLClear clears the entire bitmap to color .Va color . .Pp .Fn VGLSetPalette this function sets the palette used, the arguments .Va red , green , blue should point to byte arrays of 256 positions each. .Pp .Fn VGLSetPaletteIndex set the palette index .Va color to the specified RGB value. .Pp .Fn VGLSetBorder set the border color to color .Va color . .Pp .Fn VGLSetVScreenSize change the virtual screen size of the display. Note that this function must be called when our vty is in the foreground. And .Va object must be .Va VGLDisplay . Passing an in-memory bitmap to this function results in error. .Pp The desired virtual screen width may not be achievable because of the video card hardware. In such case the video driver (and underlying video BIOS) may choose the next largest values. Always examine .Va object->VXsize and .Va VYsize after calling this function, in order to see how the virtual screen is actually set up. .Pp In order to set up the largest possible virtual screen, you may call this function with arbitrary large values. .Pp .Dl VGLSetVScreenSize(10000, 10000); .Pp .Fn VGLPanScreen change the origin of the displayed screen in the virtual screen. Note that this function must be called when our vty is in the foreground. .Va object must be .Va VGLDisplay . Passing an in-memory bitmap to this function results in error. .Pp .Fn VGLBlankDisplay blank the display if the argument .Va blank \*(Ne 0. This can be done to shut off the screen during display updates that the user should first see when it is done. .Ss Program termination and signal processing It is important to call .Fn VGLEnd before terminating the program. Care must be taken if you install signal handlers and try to call .Fn VGLEnd and .Xr exit 3 to end the program. If a signal is caught while the program is inside .Nm libvgl functions, .Fn VGLEnd may not be able to properly restore the graphics hardware. .Pp The recommended way to handle signals and program termination is to have a flag to indicate signal's delivery. Your signal handlers set this flag but do not terminate the program immediately. The main part of the program checks the flag to see if it is supposed to terminate, and calls .Fn VGLEnd and .Xr exit 3 if the flag is set. .Pp Note that .Fn VGLInit installs its internal signal handlers for .Dv SIGINT , SIGTERM , SIGSEGV , and .Dv SIGBUS , and terminates the program at appropriate time, after one of these signals is caught. If you want to have your own signal handlers for these signals, install handlers .Em after .Fn VGLInit . .Pp .Dv SIGUSR1 and .Dv SIGUSR2 are internally used by .Nm libvgl to control screen switching and the mouse pointer, and are not available to .Nm libvgl client programs. .Sh HISTORY The .Nm vgl library appeared in .Fx 3.0 . .Sh AUTHORS .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org diff --git a/lib/libvgl/vgl.h b/lib/libvgl/vgl.h index 67b1d0e56ce1..ca5779ab8028 100644 --- a/lib/libvgl/vgl.h +++ b/lib/libvgl/vgl.h @@ -1,156 +1,156 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1991-1997 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _VGL_H_ #define _VGL_H_ #include #include #include #include typedef unsigned char byte; typedef struct { byte Type; int Xsize, Ysize; int VXsize, VYsize; int Xorigin, Yorigin; byte *Bitmap; int PixelBytes; } VGLBitmap; #define VGLBITMAP_INITIALIZER(t, x, y, bits) \ { (t), (x), (y), (x), (y), 0, 0, (bits), -1 } /* * Defined Type's */ #define MEMBUF 0 #define VIDBUF4 1 #define VIDBUF8 2 #define VIDBUF8X 3 #define VIDBUF8S 4 #define VIDBUF4S 5 #define VIDBUF16 6 /* Direct Color linear buffer */ #define VIDBUF24 7 /* Direct Color linear buffer */ #define VIDBUF32 8 /* Direct Color linear buffer */ #define VIDBUF16S 9 /* Direct Color segmented buffer */ #define VIDBUF24S 10 /* Direct Color segmented buffer */ #define VIDBUF32S 11 /* Direct Color segmented buffer */ #define NOBUF 255 typedef struct VGLText { byte Width, Height; byte *BitmapArray; } VGLText; typedef struct VGLObject { int Id; int Type; int Status; int Xpos, Ypos; int Xhot, Yhot; VGLBitmap *Image; VGLBitmap *Mask; int (*CallBackFunction)(); } VGLObject; #define MOUSE_IMG_SIZE 16 #define VGL_MOUSEHIDE 0 #define VGL_MOUSESHOW 1 #define VGL_MOUSEFREEZE 0 #define VGL_MOUSEUNFREEZE 1 #define VGL_DIR_RIGHT 0 #define VGL_DIR_UP 1 #define VGL_DIR_LEFT 2 #define VGL_DIR_DOWN 3 #define VGL_RAWKEYS 1 #define VGL_CODEKEYS 2 #define VGL_XLATEKEYS 3 extern video_adapter_info_t VGLAdpInfo; extern video_info_t VGLModeInfo; extern VGLBitmap *VGLDisplay; extern byte *VGLBuf; /* * Prototypes */ /* bitmap.c */ int __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, VGLBitmap *dst, int dstx, int dsty, int width, int hight); int VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, VGLBitmap *dst, int dstx, int dsty, int width, int hight); VGLBitmap *VGLBitmapCreate(int type, int xsize, int ysize, byte *bits); void VGLBitmapDestroy(VGLBitmap *object); int VGLBitmapAllocateBits(VGLBitmap *object); /* keyboard.c */ int VGLKeyboardInit(int mode); void VGLKeyboardEnd(void); int VGLKeyboardGetCh(void); /* main.c */ void VGLEnd(void); int VGLInit(int mode); void VGLCheckSwitch(void); int VGLSetVScreenSize(VGLBitmap *object, int VXsize, int VYsize); int VGLPanScreen(VGLBitmap *object, int x, int y); int VGLSetSegment(unsigned int offset); /* mouse.c */ void VGLMousePointerShow(void); void VGLMousePointerHide(void); void VGLMouseMode(int mode); void VGLMouseAction(int dummy); void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask); void VGLMouseSetStdImage(void); int VGLMouseInit(int mode); int VGLMouseStatus(int *x, int *y, char *buttons); -int VGLMouseFreeze(int x, int y, int width, int hight, byte color); +int VGLMouseFreeze(int x, int y, int width, int hight, u_long color); void VGLMouseUnFreeze(void); /* simple.c */ void VGLSetXY(VGLBitmap *object, int x, int y, u_long color); u_long VGLGetXY(VGLBitmap *object, int x, int y); void VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color); void VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color); void VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color); void VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color); void VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color); void VGLClear(VGLBitmap *object, u_long color); void VGLRestorePalette(void); void VGLSavePalette(void); void VGLSetPalette(byte *red, byte *green, byte *blue); void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue); -void VGLSetBorder(byte color); +void VGLSetBorder(u_long color); void VGLBlankDisplay(int blank); /* text.c */ int VGLTextSetFontFile(char *filename); -void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir); -void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, byte fgcol, byte bgcol, int fill, int dir); +void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, u_long fgcol, u_long bgcol, int fill, int dir); +void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, u_long fgcol, u_long bgcol, int fill, int dir); #endif /* !_VGL_H_ */