vgl.h (53052) | vgl.h (70991) |
---|---|
1/*- 2 * Copyright (c) 1991-1997 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1991-1997 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/lib/libvgl/vgl.h 53052 1999-11-09 12:11:24Z yokota $ | 28 * $FreeBSD: head/lib/libvgl/vgl.h 70991 2001-01-13 11:30:17Z nsouch $ |
29 */ 30 31#include <stdlib.h> 32#include <unistd.h> 33#include <string.h> 34#include <machine/cpufunc.h> 35 36typedef unsigned char byte; 37typedef struct { 38 byte Type; 39 int Xsize, Ysize; 40 int VXsize, VYsize; 41 int Xorigin, Yorigin; 42 byte *Bitmap; | 29 */ 30 31#include <stdlib.h> 32#include <unistd.h> 33#include <string.h> 34#include <machine/cpufunc.h> 35 36typedef unsigned char byte; 37typedef struct { 38 byte Type; 39 int Xsize, Ysize; 40 int VXsize, VYsize; 41 int Xorigin, Yorigin; 42 byte *Bitmap; |
43 int PixelBytes; |
|
43} VGLBitmap; 44 45#define VGLBITMAP_INITIALIZER(t, x, y, bits) \ 46 { (t), (x), (y), (x), (y), 0, 0, (bits) } 47 48/* 49 * Defined Type's 50 */ 51#define MEMBUF 0 52#define VIDBUF4 1 53#define VIDBUF8 2 54#define VIDBUF8X 3 55#define VIDBUF8S 4 56#define VIDBUF4S 5 | 44} VGLBitmap; 45 46#define VGLBITMAP_INITIALIZER(t, x, y, bits) \ 47 { (t), (x), (y), (x), (y), 0, 0, (bits) } 48 49/* 50 * Defined Type's 51 */ 52#define MEMBUF 0 53#define VIDBUF4 1 54#define VIDBUF8 2 55#define VIDBUF8X 3 56#define VIDBUF8S 4 57#define VIDBUF4S 5 |
58#define VIDBUF16 6 /* Direct Color linear buffer */ 59#define VIDBUF24 7 /* Direct Color linear buffer */ 60#define VIDBUF32 8 /* Direct Color linear buffer */ 61#define VIDBUF16S 9 /* Direct Color segmented buffer */ 62#define VIDBUF24S 10 /* Direct Color segmented buffer */ 63#define VIDBUF32S 11 /* Direct Color segmented buffer */ |
|
57#define NOBUF 255 58 59typedef struct VGLText { 60 byte Width, Height; 61 byte *BitmapArray; 62} VGLText; 63 64typedef struct VGLObject { --- 52 unchanged lines hidden (view full) --- 117void VGLMouseAction(int dummy); 118void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask); 119void VGLMouseSetStdImage(void); 120int VGLMouseInit(int mode); 121int VGLMouseStatus(int *x, int *y, char *buttons); 122int VGLMouseFreeze(int x, int y, int width, int hight, byte color); 123void VGLMouseUnFreeze(void); 124/* simple.c */ | 64#define NOBUF 255 65 66typedef struct VGLText { 67 byte Width, Height; 68 byte *BitmapArray; 69} VGLText; 70 71typedef struct VGLObject { --- 52 unchanged lines hidden (view full) --- 124void VGLMouseAction(int dummy); 125void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask); 126void VGLMouseSetStdImage(void); 127int VGLMouseInit(int mode); 128int VGLMouseStatus(int *x, int *y, char *buttons); 129int VGLMouseFreeze(int x, int y, int width, int hight, byte color); 130void VGLMouseUnFreeze(void); 131/* simple.c */ |
125void VGLSetXY(VGLBitmap *object, int x, int y, byte color); 126byte VGLGetXY(VGLBitmap *object, int x, int y); 127void VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color); 128void VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color); 129void VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color); 130void VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color); 131void VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color); 132void VGLClear(VGLBitmap *object, byte color); | 132void VGLSetXY(VGLBitmap *object, int x, int y, u_long color); 133u_long VGLGetXY(VGLBitmap *object, int x, int y); 134void VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color); 135void VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color); 136void VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color); 137void VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color); 138void VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color); 139void VGLClear(VGLBitmap *object, u_long color); |
133void VGLRestorePalette(void); 134void VGLSavePalette(void); 135void VGLSetPalette(byte *red, byte *green, byte *blue); 136void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue); 137void VGLSetBorder(byte color); 138void VGLBlankDisplay(int blank); 139/* text.c */ 140int VGLTextSetFontFile(char *filename); 141void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir); 142void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, byte fgcol, byte bgcol, int fill, int dir); | 140void VGLRestorePalette(void); 141void VGLSavePalette(void); 142void VGLSetPalette(byte *red, byte *green, byte *blue); 143void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue); 144void VGLSetBorder(byte color); 145void VGLBlankDisplay(int blank); 146/* text.c */ 147int VGLTextSetFontFile(char *filename); 148void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir); 149void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, byte fgcol, byte bgcol, int fill, int dir); |