Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / arch / i386-pc / drivers / vga.hidd / bitmap.h
blob9d8448bd2a4e0c35c99f034cecc9a602c0c9c24f
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef _BITMAP_H
7 #define _BITMAP_H
9 #include "vgahw.h"
10 #include <hidd/graphics.h>
13 This attribute interface is common for both vga onscreen and offscreen bitmap
14 classes, although they don't have a common superclass
17 #define IID_Hidd_VGABitMap "hidd.bitmap.vgabitmap"
19 #define HiddVGABitMapAB __abHidd_VGABitMap
20 /* extern OOP_AttrBase HiddVGABitMapAB; */
22 enum {
23 aoHidd_VGABitMap_Drawable,
25 num_Hidd_VGABitMap_Attrs
28 #define aHidd_VGABitMap_Drawable (HiddVGABitMapAB + aoHidd_VGABitMap_Drawable)
32 /* This structure is used for both onscreen and offscreen VGA bitmaps !! */
34 #define IS_BM_ATTR(attr, idx) ( ( (idx) = (attr) - HiddBitMapAttrBase) < num_Hidd_BitMap_Attrs)
35 #define IS_VGABM_ATTR(attr, idx) ( ( (idx) = (attr) - HiddVGABitMapAB) < num_Hidd_VGABitMap_Attrs)
39 This structure is used as instance data for both the
40 onbitmap and offbitmap classes.
43 struct bitmap_data
45 struct vgaHWRec *Regs; /* Registers */
46 unsigned char *VideoData; /* Pointing to video data */
47 unsigned int width; /* Width of bitmap */
48 unsigned int height; /* Height of bitmap */
49 unsigned int cmap[16]; /* ColorMap */
50 char bpp; /* 8 -> chunky; planar otherwise */
51 char disp; /* !=0 - displayable */
54 struct Box
56 int x1, y1;
57 int x2, y2;
60 VOID bitmap_clear(OOP_Class *, OOP_Object *, struct pHidd_BitMap_Clear *);
61 BOOL bitmap_setcolors(OOP_Class *, OOP_Object *, struct pHidd_BitMap_SetColors *);
62 VOID bitmap_putpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_PutPixel *);
63 HIDDT_Pixel bitmap_getpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_GetPixel *);
64 ULONG bitmap_drawpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_DrawPixel *);
66 void vgaRefreshArea(struct bitmap_data *, int , struct Box *);
68 #endif /* _BITMAP_H */