use USER_CPPFLAGS
[AROS.git] / arch / all-native / hidd / vgagfx / vgagfx_bitmap.h
blob419a333016097a1ff76685b6781b80d75035e5a7
1 /*
2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef VGAGFX_BITMAP_H
7 #define VGAGFX_BITMAP_H
9 #include "vgagfx_support.h"
10 #include <hidd/gfx.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
22 #ifndef __OOP_NOATTRBASES__
23 extern OOP_AttrBase HiddVGABitMapAB;
24 #endif
26 enum {
27 aoHidd_VGABitMap_Drawable,
29 num_Hidd_VGABitMap_Attrs
32 #define aHidd_VGABitMap_Drawable (HiddVGABitMapAB + aoHidd_VGABitMap_Drawable)
36 /* This structure is used for both onscreen and offscreen VGA bitmaps !! */
38 #define IS_BM_ATTR(attr, idx) ( ( (idx) = (attr) - HiddBitMapAttrBase) < num_Hidd_BitMap_Attrs)
39 #define IS_VGABM_ATTR(attr, idx) ( ( (idx) = (attr) - HiddVGABitMapAB) < num_Hidd_VGABitMap_Attrs)
43 This structure is used as instance data for both the
44 onbitmap and offbitmap classes.
47 struct VGAGfxBitMapData
49 struct vgaHWRec *Regs; /* Registers */
50 unsigned char *VideoData; /* Pointing to video data */
51 unsigned int width; /* Width of bitmap */
52 unsigned int height; /* Height of bitmap */
53 unsigned int bpr; /* Bytes per row */
54 unsigned int disp_width; /* Display width */
55 unsigned int disp_height; /* Display height */
56 int xoffset; /* Logical screen offset */
57 int yoffset;
58 char bpp; /* bits per pixel */
59 BOOL disp; /* !=0 - displayed */
62 struct Box
64 int x1, y1;
65 int x2, y2;
68 VOID bitmap_clear(OOP_Class *, OOP_Object *, struct pHidd_BitMap_Clear *);
69 BOOL bitmap_setcolors(OOP_Class *, OOP_Object *, struct pHidd_BitMap_SetColors *);
70 VOID bitmap_putpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_PutPixel *);
71 HIDDT_Pixel bitmap_getpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_GetPixel *);
72 ULONG bitmap_drawpixel(OOP_Class *, OOP_Object *, struct pHidd_BitMap_DrawPixel *);
74 void vgaRefreshPixel(struct VGAGfxBitMapData *data, unsigned int x, unsigned int y);
75 void vgaRefreshArea(struct VGAGfxBitMapData *, struct Box *);
76 void vgaEraseArea(struct VGAGfxBitMapData *, struct Box *);
78 #endif /* VGAGFX_BITMAP_H */