2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
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
;
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.
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 */
55 char bpp
; /* bits per pixel */
56 BOOL disp
; /* !=0 - displayed */
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 */