Indentation fix, cleanup.
[AROS.git] / arch / all-native / hidd / vga / bitmap.h
blob57fef97922e1642cfbd82c197f565ff25ae1b48c
1 /*
2 Copyright © 1995-2015, 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 CLID_Hidd_BitMap_VGA "hidd.bitmap.vga"
18 #define IID_Hidd_BitMap_VGA "hidd.bitmap.vga"
20 #define HiddVGABitMapAB __abHidd_VGABitMap
21 extern OOP_AttrBase HiddVGABitMapAB;
23 enum {
24 aoHidd_VGABitMap_Drawable,
26 num_Hidd_VGABitMap_Attrs
29 #define aHidd_VGABitMap_Drawable (HiddVGABitMapAB + aoHidd_VGABitMap_Drawable)
33 /* This structure is used for both onscreen and offscreen VGA bitmaps !! */
35 #define IS_BM_ATTR(attr, idx) ( ( (idx) = (attr) - HiddBitMapAttrBase) < num_Hidd_BitMap_Attrs)
36 #define IS_VGABM_ATTR(attr, idx) ( ( (idx) = (attr) - HiddVGABitMapAB) < num_Hidd_VGABitMap_Attrs)
40 This structure is used as instance data for both the
41 onbitmap and offbitmap classes.
44 struct bitmap_data
46 struct vgaHWRec *Regs; /* Registers */
47 unsigned char *VideoData; /* Pointing to video data */
48 unsigned int width; /* Width of bitmap */
49 unsigned int height; /* Height of bitmap */
50 unsigned int bpr; /* Bytes per row */
51 unsigned int disp_width; /* Display width */
52 unsigned int disp_height; /* Display height */
53 int xoffset; /* Logical screen offset */
54 int yoffset;
55 char bpp; /* bits per pixel */
56 BOOL disp; /* !=0 - displayed */
59 struct Box
61 int x1, y1;
62 int x2, y2;
65 VOID bitmap_clear(OOP_Class *, OOP_Object *, struct pHidd_BitMap_Clear *);
66 BOOL bitmap_setcolors(OOP_Class *, OOP_Object *, struct pHidd_BitMap_SetColors *);
67 VOID bitmap_putpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_PutPixel *);
68 HIDDT_Pixel bitmap_getpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_GetPixel *);
69 ULONG bitmap_drawpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_DrawPixel *);
71 void vgaRefreshPixel(struct bitmap_data *data, unsigned int x, unsigned int y);
72 void vgaRefreshArea(struct bitmap_data *, struct Box *);
73 void vgaEraseArea(struct bitmap_data *, struct Box *);
75 #endif /* _BITMAP_H */