2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Stubs for graphics, bitmap, gc and colormap hidd class
13 #include <aros/config.h>
14 #include <exec/types.h>
15 #include <exec/libraries.h>
17 #include <proto/oop.h>
19 #include <utility/tagitem.h>
22 #include <hidd/graphics.h>
24 #include "graphics_intern.h"
29 #include <aros/debug.h>
32 #define OOPBase ((struct Library *)OOP_OCLASS(obj)->OOPBasePtr)
34 #ifndef AROS_CREATE_ROM
35 # define STATIC_MID static OOP_MethodID mid
37 # define STATIC_MID OOP_MethodID mid = 0
40 /* A small utility function for using varargs when setting attrs */
42 #warning OOP_SetAttrsTags is defined in inline/oop.h
44 #ifndef OOP_SetAttrsTags
45 IPTR
OOP_SetAttrsTags(OOP_Object
*obj
, IPTR tag1
, ...)
47 AROS_SLOWSTACKTAGS_PRE(tag1
)
48 retval
= OOP_SetAttrs(obj
, AROS_SLOWSTACKTAGS_ARG(tag1
));
49 AROS_SLOWSTACKTAGS_POST
54 /***************************************************************/
56 OOP_Object
* HIDD_Gfx_NewGC(OOP_Object
*obj
, struct TagItem
*tagList
)
59 struct pHidd_Gfx_NewGC p
, *msg
= &p
;
61 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NewGC
);
66 return((OOP_Object
*) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
68 /***************************************************************/
70 void HIDD_Gfx_DisposeGC(OOP_Object
*obj
, OOP_Object
*gc
)
73 struct pHidd_Gfx_DisposeGC p
, *msg
= &p
;
75 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_DisposeGC
);
80 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
82 /***************************************************************/
84 OOP_Object
* HIDD_Gfx_NewBitMap(OOP_Object
*obj
, struct TagItem
*tagList
)
87 struct pHidd_Gfx_NewBitMap p
, *msg
= &p
;
89 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NewBitMap
);
94 return((OOP_Object
*) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
96 /***************************************************************/
98 void HIDD_Gfx_DisposeBitMap(OOP_Object
*obj
, OOP_Object
*bitMap
)
101 struct pHidd_Gfx_DisposeBitMap p
, *msg
= &p
;
103 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_DisposeBitMap
);
108 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
111 /***************************************************************/
113 HIDDT_ModeID
* HIDD_Gfx_QueryModeIDs(OOP_Object
*obj
, struct TagItem
*queryTags
)
116 struct pHidd_Gfx_QueryModeIDs p
, *msg
= &p
;
118 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_QueryModeIDs
);
121 p
.queryTags
= queryTags
;
123 return (HIDDT_ModeID
*)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
125 /***************************************************************/
127 VOID
HIDD_Gfx_ReleaseModeIDs(OOP_Object
*obj
, HIDDT_ModeID
*modeIDs
)
130 struct pHidd_Gfx_ReleaseModeIDs p
, *msg
= &p
;
132 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_ReleaseModeIDs
);
137 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
141 /***************************************************************/
142 OOP_Object
* HIDD_Gfx_GetPixFmt (OOP_Object
*obj
, HIDDT_StdPixFmt stdPixFmt
)
145 struct pHidd_Gfx_GetPixFmt p
, *msg
= &p
;
148 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_GetPixFmt
);
152 p
.stdPixFmt
= stdPixFmt
;
154 return (OOP_Object
*)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
157 /***************************************************************/
159 BOOL
HIDD_Gfx_CheckMode(OOP_Object
*obj
, HIDDT_ModeID modeID
, OOP_Object
*sync
, OOP_Object
*pixFmt
)
162 struct pHidd_Gfx_CheckMode p
, *msg
= &p
;
165 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_CheckMode
);
173 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
177 /***************************************************************/
178 BOOL
HIDD_Gfx_GetMode(OOP_Object
*obj
, HIDDT_ModeID modeID
, OOP_Object
**syncPtr
, OOP_Object
**pixFmtPtr
)
181 struct pHidd_Gfx_GetMode p
, *msg
= &p
;
184 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_GetMode
);
190 p
.pixFmtPtr
= pixFmtPtr
;
192 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
196 /***************************************************************/
197 HIDDT_ModeID
HIDD_Gfx_NextModeID(OOP_Object
*obj
, HIDDT_ModeID modeID
, OOP_Object
**syncPtr
, OOP_Object
**pixFmtPtr
)
200 struct pHidd_Gfx_NextModeID p
, *msg
= &p
;
202 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NextModeID
);
208 p
.pixFmtPtr
= pixFmtPtr
;
210 return (HIDDT_ModeID
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
214 /***************************************************************/
216 BOOL
HIDD_Gfx_SetCursorShape(OOP_Object
*obj
, OOP_Object
*shape
)
219 struct pHidd_Gfx_SetCursorShape p
, *msg
= &p
;
221 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetCursorShape
);
226 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
230 /***************************************************************/
232 BOOL
HIDD_Gfx_SetCursorPos(OOP_Object
*obj
, LONG x
, LONG y
)
235 struct pHidd_Gfx_SetCursorPos p
, *msg
= &p
;
237 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetCursorPos
);
244 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
248 /***************************************************************/
250 VOID
HIDD_Gfx_SetCursorVisible(OOP_Object
*obj
, BOOL visible
)
253 struct pHidd_Gfx_SetCursorVisible p
, *msg
= &p
;
255 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetCursorVisible
);
261 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
267 /***************************************************************/
269 BOOL
HIDD_Gfx_SetMode(OOP_Object
*obj
, HIDDT_ModeID modeID
)
272 struct pHidd_Gfx_SetMode p
, *msg
= &p
;
274 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetMode
);
280 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
285 /***************************************************************/
287 OOP_Object
*HIDD_Gfx_Show(OOP_Object
*obj
, OOP_Object
*bitMap
, ULONG flags
)
290 struct pHidd_Gfx_Show p
, *msg
= &p
;
292 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_Show
);
299 return (OOP_Object
*)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
303 /***************************************************************/
304 VOID
HIDD_Gfx_CopyBox(OOP_Object
*obj
, OOP_Object
*src
, WORD srcX
, WORD srcY
, OOP_Object
*dest
, WORD destX
, WORD destY
, UWORD width
, UWORD height
, OOP_Object
*gc
)
307 struct pHidd_Gfx_CopyBox p
, *msg
= &p
;
309 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_Gfx_CopyBox
);
322 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
326 /***************************************************************/
328 BOOL
HIDD_BM_SetColors (OOP_Object
*obj
, HIDDT_Color
*colors
, ULONG firstColor
, ULONG numColors
)
331 struct pHidd_BitMap_SetColors p
, *msg
= &p
;
333 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_SetColors
);
337 p
.firstColor
= firstColor
;
338 p
.numColors
= numColors
;
340 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
344 /***************************************************************/
346 ULONG
HIDD_BM_PutPixel(OOP_Object
*obj
, WORD x
, WORD y
, ULONG val
)
349 struct pHidd_BitMap_PutPixel p
, *msg
= &p
;
351 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutPixel
);
358 return(OOP_DoMethod(obj
, (OOP_Msg
) msg
));
360 /***************************************************************/
362 ULONG
HIDD_BM_DrawPixel(OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
)
365 struct pHidd_BitMap_DrawPixel p
, *msg
= &p
;
367 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawPixel
);
374 return(OOP_DoMethod(obj
, (OOP_Msg
) msg
));
376 /***************************************************************/
378 ULONG
HIDD_BM_GetPixel(OOP_Object
*obj
, WORD x
, WORD y
)
381 struct pHidd_BitMap_GetPixel p
, *msg
= &p
;
383 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetPixel
);
389 return(OOP_DoMethod(obj
, (OOP_Msg
) msg
));
391 /***************************************************************/
393 VOID
HIDD_BM_DrawLine(OOP_Object
*obj
, OOP_Object
*gc
, WORD x1
, WORD y1
, WORD x2
, WORD y2
)
396 struct pHidd_BitMap_DrawLine p
, *msg
= &p
;
398 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawLine
);
407 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
409 /***************************************************************/
412 VOID
HIDD_BM_DrawRect (OOP_Object
*obj
, OOP_Object
*gc
, WORD minX
, WORD minY
, WORD maxX
, WORD maxY
)
415 struct pHidd_BitMap_DrawRect p
, *msg
= &p
;
417 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawRect
);
426 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
428 /***************************************************************/
430 VOID
HIDD_BM_FillRect (OOP_Object
*obj
, OOP_Object
*gc
, WORD minX
, WORD minY
, WORD maxX
, WORD maxY
)
433 struct pHidd_BitMap_DrawRect p
, *msg
= &p
;
435 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillRect
);
444 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
446 /***************************************************************/
448 VOID
HIDD_BM_DrawEllipse (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, WORD rx
, WORD ry
)
451 struct pHidd_BitMap_DrawEllipse p
, *msg
= &p
;
453 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawEllipse
);
462 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
464 /***************************************************************/
466 VOID
HIDD_BM_FillEllipse (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, WORD ry
, WORD rx
)
469 struct pHidd_BitMap_DrawEllipse p
, *msg
= &p
;
471 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillEllipse
);
480 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
482 /***************************************************************/
484 VOID
HIDD_BM_DrawPolygon (OOP_Object
*obj
, OOP_Object
*gc
, UWORD n
, WORD
*coords
)
487 struct pHidd_BitMap_DrawPolygon p
, *msg
= &p
;
489 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawPolygon
);
496 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
498 /***************************************************************/
500 VOID
HIDD_BM_FillPolygon (OOP_Object
*obj
, OOP_Object
*gc
, UWORD n
, WORD
*coords
)
503 struct pHidd_BitMap_DrawPolygon p
, *msg
= &p
;
505 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillPolygon
);
512 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
514 /***************************************************************/
516 VOID
HIDD_BM_DrawText (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, STRPTR text
, UWORD length
)
519 struct pHidd_BitMap_DrawText p
, *msg
= &p
;
521 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawText
);
530 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
532 /***************************************************************/
534 VOID
HIDD_BM_FillText (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, STRPTR text
, UWORD length
)
537 struct pHidd_BitMap_DrawText p
, *msg
= &p
;
539 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillText
);
548 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
550 /***************************************************************/
552 VOID
HIDD_BM_Clear (OOP_Object
*obj
, OOP_Object
*gc
)
555 struct pHidd_BitMap_Clear p
, *msg
= &p
;
557 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_Clear
);
562 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
565 /***************************************************************/
567 VOID
HIDD_BM_GetImage (OOP_Object
*obj
571 , WORD width
, WORD height
572 , HIDDT_StdPixFmt pixFmt
)
575 struct pHidd_BitMap_GetImage p
, *msg
= &p
;
577 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetImage
);
591 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
594 /***************************************************************/
596 VOID
HIDD_BM_PutImage (OOP_Object
*obj
601 , WORD width
, WORD height
602 , HIDDT_StdPixFmt pixFmt
)
605 struct pHidd_BitMap_PutImage p
, *msg
= &p
;
607 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutImage
);
619 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
622 /***************************************************************/
624 VOID
HIDD_BM_PutAlphaImage (OOP_Object
*obj
629 , WORD width
, WORD height
)
632 struct pHidd_BitMap_PutAlphaImage p
, *msg
= &p
;
634 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutAlphaImage
);
645 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
648 /***************************************************************/
650 VOID
HIDD_BM_PutTemplate (OOP_Object
*obj
656 , WORD width
, WORD height
657 , BOOL inverttemplate
)
660 struct pHidd_BitMap_PutTemplate p
, *msg
= &p
;
662 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutTemplate
);
666 p
.template = template;
673 p
.inverttemplate
= inverttemplate
;
675 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
678 /***************************************************************/
680 VOID
HIDD_BM_PutAlphaTemplate (OOP_Object
*obj
685 , WORD width
, WORD height
689 struct pHidd_BitMap_PutAlphaTemplate p
, *msg
= &p
;
691 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutAlphaTemplate
);
701 p
.invertalpha
= invertalpha
;
703 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
706 /***************************************************************/
708 VOID
HIDD_BM_PutPattern(OOP_Object
*obj
, OOP_Object
*gc
, UBYTE
*pattern
,
709 WORD patternsrcx
, WORD patternsrcy
, WORD patternheight
,
710 WORD patterndepth
, HIDDT_PixelLUT
*patternlut
,
711 BOOL invertpattern
, UBYTE
*mask
, ULONG maskmodulo
,
712 WORD masksrcx
, WORD x
, WORD y
, WORD width
, WORD height
)
715 struct pHidd_BitMap_PutPattern p
, *msg
= &p
;
717 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutPattern
);
722 p
.patternsrcx
= patternsrcx
;
723 p
.patternsrcy
= patternsrcy
;
724 p
.patternheight
= patternheight
;
725 p
.patterndepth
= patterndepth
;
726 p
.patternlut
= patternlut
;
727 p
.invertpattern
= invertpattern
;
729 p
.maskmodulo
= maskmodulo
;
730 p
.masksrcx
= masksrcx
;
736 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
739 /***************************************************************/
741 VOID
HIDD_BM_BlitColorExpansion (OOP_Object
*obj
, OOP_Object
*gc
, OOP_Object
*srcBitMap
, WORD srcX
, WORD srcY
, WORD destX
, WORD destY
, UWORD width
, UWORD height
)
744 struct pHidd_BitMap_BlitColorExpansion p
, *msg
= &p
;
746 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_BlitColorExpansion
);
750 p
.srcBitMap
= srcBitMap
;
758 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
761 /***************************************************************/
763 HIDDT_Pixel
HIDD_BM_MapColor(OOP_Object
*obj
, HIDDT_Color
*color
)
766 struct pHidd_BitMap_MapColor p
, *msg
= &p
;
768 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_MapColor
);
774 return OOP_DoMethod(obj
, (OOP_Msg
)msg
);
777 /***************************************************************/
779 VOID
HIDD_BM_UnmapPixel(OOP_Object
*obj
, HIDDT_Pixel pixel
, HIDDT_Color
*color
)
782 struct pHidd_BitMap_UnmapPixel p
, *msg
= &p
;
784 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_UnmapPixel
);
790 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
794 /***************************************************************/
796 VOID
HIDD_BM_PutImageLUT (OOP_Object
*obj
, OOP_Object
*gc
, UBYTE
*pixels
, ULONG modulo
, WORD x
, WORD y
, WORD width
, WORD height
, HIDDT_PixelLUT
*pixlut
)
799 struct pHidd_BitMap_PutImageLUT p
, *msg
= &p
;
801 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutImageLUT
);
813 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
816 /***************************************************************/
818 VOID
HIDD_BM_PutTranspImageLUT (OOP_Object
*obj
, OOP_Object
*gc
, UBYTE
*pixels
,
819 ULONG modulo
, WORD x
, WORD y
, WORD width
, WORD height
,
820 HIDDT_PixelLUT
*pixlut
, UBYTE transparent
)
823 struct pHidd_BitMap_PutTranspImageLUT p
, *msg
= &p
;
825 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutTranspImageLUT
);
836 p
.transparent
= transparent
;
838 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
842 /***************************************************************/
844 VOID
HIDD_BM_GetImageLUT (OOP_Object
*obj
, UBYTE
*pixels
, ULONG modulo
, WORD x
, WORD y
, WORD width
, WORD height
, HIDDT_PixelLUT
*pixlut
)
847 struct pHidd_BitMap_GetImageLUT p
, *msg
= &p
;
849 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetImageLUT
);
860 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
864 ULONG
HIDD_BM_BytesPerLine(OOP_Object
*obj
, HIDDT_StdPixFmt pixFmt
, ULONG width
)
867 struct pHidd_BitMap_BytesPerLine p
, *msg
= &p
;
869 if (!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_BytesPerLine
);
875 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
879 /***************************************************************/
882 VOID
HIDD_BM_ConvertPixels (OOP_Object
*obj
884 , HIDDT_PixelFormat
*srcPixFmt
887 , HIDDT_PixelFormat
*dstPixFmt
889 , ULONG width
, ULONG height
890 , HIDDT_PixelLUT
*pixlut
894 struct pHidd_BitMap_ConvertPixels p
, *msg
= &p
;
896 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_ConvertPixels
);
899 p
.srcPixFmt
= srcPixFmt
;
900 p
.srcPixels
= srcPixels
;
905 p
.dstPixFmt
= dstPixFmt
;
914 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
917 VOID
HIDD_BM_FillMemRect8 (OOP_Object
*obj
928 struct pHidd_BitMap_FillMemRect8 p
, *msg
= &p
;
930 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect8
);
941 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
944 VOID
HIDD_BM_FillMemRect16(OOP_Object
*obj
955 struct pHidd_BitMap_FillMemRect16 p
, *msg
= &p
;
957 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect16
);
968 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
971 VOID
HIDD_BM_FillMemRect24 (OOP_Object
*obj
982 struct pHidd_BitMap_FillMemRect24 p
, *msg
= &p
;
984 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect24
);
995 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
998 VOID
HIDD_BM_FillMemRect32 (OOP_Object
*obj
1009 struct pHidd_BitMap_FillMemRect32 p
, *msg
= &p
;
1011 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect32
);
1022 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1026 VOID
HIDD_BM_InvertMemRect(OOP_Object
*obj
1036 struct pHidd_BitMap_InvertMemRect p
, *msg
= &p
;
1038 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_InvertMemRect
);
1048 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1052 VOID
HIDD_BM_CopyMemBox8(OOP_Object
*obj
1065 struct pHidd_BitMap_CopyMemBox8 p
, *msg
= &p
;
1067 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox8
);
1081 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1084 VOID
HIDD_BM_CopyMemBox16(OOP_Object
*obj
1097 struct pHidd_BitMap_CopyMemBox16 p
, *msg
= &p
;
1099 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox16
);
1113 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1116 VOID
HIDD_BM_CopyMemBox24(OOP_Object
*obj
1129 struct pHidd_BitMap_CopyMemBox24 p
, *msg
= &p
;
1131 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox24
);
1145 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1148 VOID
HIDD_BM_CopyMemBox32(OOP_Object
*obj
1161 struct pHidd_BitMap_CopyMemBox32 p
, *msg
= &p
;
1163 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox32
);
1177 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1180 VOID
HIDD_BM_CopyLUTMemBox16(OOP_Object
*obj
1191 , HIDDT_PixelLUT
*pixlut
)
1194 struct pHidd_BitMap_CopyLUTMemBox16 p
, *msg
= &p
;
1196 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyLUTMemBox16
);
1211 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1214 VOID
HIDD_BM_CopyLUTMemBox24(OOP_Object
*obj
1225 , HIDDT_PixelLUT
*pixlut
)
1228 struct pHidd_BitMap_CopyLUTMemBox24 p
, *msg
= &p
;
1230 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyLUTMemBox24
);
1245 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1248 VOID
HIDD_BM_CopyLUTMemBox32(OOP_Object
*obj
1259 , HIDDT_PixelLUT
*pixlut
)
1262 struct pHidd_BitMap_CopyLUTMemBox32 p
, *msg
= &p
;
1264 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyLUTMemBox32
);
1279 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1282 VOID
HIDD_BM_PutMem32Image8(OOP_Object
*obj
,
1293 struct pHidd_BitMap_PutMem32Image8 p
, *msg
= &p
;
1295 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMem32Image8
);
1307 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1310 VOID
HIDD_BM_PutMem32Image16(OOP_Object
*obj
,
1321 struct pHidd_BitMap_PutMem32Image16 p
, *msg
= &p
;
1323 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMem32Image16
);
1335 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1338 VOID
HIDD_BM_PutMem32Image24(OOP_Object
*obj
,
1349 struct pHidd_BitMap_PutMem32Image24 p
, *msg
= &p
;
1351 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMem32Image24
);
1363 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1366 VOID
HIDD_BM_GetMem32Image8(OOP_Object
*obj
,
1377 struct pHidd_BitMap_GetMem32Image8 p
, *msg
= &p
;
1379 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetMem32Image8
);
1391 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1394 VOID
HIDD_BM_GetMem32Image16(OOP_Object
*obj
,
1405 struct pHidd_BitMap_GetMem32Image16 p
, *msg
= &p
;
1407 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetMem32Image16
);
1419 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1422 VOID
HIDD_BM_GetMem32Image24(OOP_Object
*obj
,
1433 struct pHidd_BitMap_GetMem32Image24 p
, *msg
= &p
;
1435 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetMem32Image24
);
1447 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1450 VOID
HIDD_BM_PutMemTemplate8 (OOP_Object
*obj
,
1461 BOOL inverttemplate
)
1464 struct pHidd_BitMap_PutMemTemplate8 p
, *msg
= &p
;
1466 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate8
);
1470 p
.template = template;
1479 p
.inverttemplate
= inverttemplate
;
1481 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1484 VOID
HIDD_BM_PutMemTemplate16(OOP_Object
*obj
,
1495 BOOL inverttemplate
)
1498 struct pHidd_BitMap_PutMemTemplate16 p
, *msg
= &p
;
1500 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate16
);
1504 p
.template = template;
1513 p
.inverttemplate
= inverttemplate
;
1515 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1518 VOID
HIDD_BM_PutMemTemplate24(OOP_Object
*obj
,
1529 BOOL inverttemplate
)
1532 struct pHidd_BitMap_PutMemTemplate24 p
, *msg
= &p
;
1534 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate24
);
1538 p
.template = template;
1547 p
.inverttemplate
= inverttemplate
;
1549 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1552 VOID
HIDD_BM_PutMemTemplate32(OOP_Object
*obj
,
1563 BOOL inverttemplate
)
1566 struct pHidd_BitMap_PutMemTemplate32 p
, *msg
= &p
;
1568 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate32
);
1572 p
.template = template;
1581 p
.inverttemplate
= inverttemplate
;
1583 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1586 VOID
HIDD_BM_PutMemPattern8 (OOP_Object
*obj
,
1593 HIDDT_PixelLUT
*patternlut
,
1606 struct pHidd_BitMap_PutMemPattern8 p
, *msg
= &p
;
1608 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern8
);
1612 p
.pattern
= pattern
;
1613 p
.patternsrcx
= patternsrcx
;
1614 p
.patternsrcy
= patternsrcy
;
1615 p
.patternheight
= patternheight
;
1616 p
.patterndepth
= patterndepth
;
1617 p
.patternlut
= patternlut
;
1618 p
.invertpattern
= invertpattern
;
1620 p
.maskmodulo
= maskmodulo
;
1621 p
.masksrcx
= masksrcx
;
1629 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1632 VOID
HIDD_BM_PutMemPattern16 (OOP_Object
*obj
,
1639 HIDDT_PixelLUT
*patternlut
,
1652 struct pHidd_BitMap_PutMemPattern16 p
, *msg
= &p
;
1654 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern16
);
1658 p
.pattern
= pattern
;
1659 p
.patternsrcx
= patternsrcx
;
1660 p
.patternsrcy
= patternsrcy
;
1661 p
.patternheight
= patternheight
;
1662 p
.patterndepth
= patterndepth
;
1663 p
.patternlut
= patternlut
;
1664 p
.invertpattern
= invertpattern
;
1666 p
.maskmodulo
= maskmodulo
;
1667 p
.masksrcx
= masksrcx
;
1675 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1678 VOID
HIDD_BM_PutMemPattern24 (OOP_Object
*obj
,
1685 HIDDT_PixelLUT
*patternlut
,
1698 struct pHidd_BitMap_PutMemPattern24 p
, *msg
= &p
;
1700 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern24
);
1704 p
.pattern
= pattern
;
1705 p
.patternsrcx
= patternsrcx
;
1706 p
.patternsrcy
= patternsrcy
;
1707 p
.patternheight
= patternheight
;
1708 p
.patterndepth
= patterndepth
;
1709 p
.patternlut
= patternlut
;
1710 p
.invertpattern
= invertpattern
;
1712 p
.maskmodulo
= maskmodulo
;
1713 p
.masksrcx
= masksrcx
;
1721 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1724 VOID
HIDD_BM_PutMemPattern32 (OOP_Object
*obj
,
1731 HIDDT_PixelLUT
*patternlut
,
1744 struct pHidd_BitMap_PutMemPattern32 p
, *msg
= &p
;
1746 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern32
);
1750 p
.pattern
= pattern
;
1751 p
.patternsrcx
= patternsrcx
;
1752 p
.patternsrcy
= patternsrcy
;
1753 p
.patternheight
= patternheight
;
1754 p
.patterndepth
= patterndepth
;
1755 p
.patternlut
= patternlut
;
1756 p
.invertpattern
= invertpattern
;
1758 p
.maskmodulo
= maskmodulo
;
1759 p
.masksrcx
= masksrcx
;
1767 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1770 OOP_Object
* HIDD_BM_SetColorMap(OOP_Object
*obj
, OOP_Object
*colorMap
)
1773 struct pHidd_BitMap_SetColorMap p
, *msg
= &p
;
1775 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_SetColorMap
);
1778 p
.colorMap
= colorMap
;
1780 return (OOP_Object
*)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1784 BOOL
HIDD_BM_ObtainDirectAccess(OOP_Object
*obj
1785 , UBYTE
**addressReturn
1786 , ULONG
*widthReturn
1787 , ULONG
*heightReturn
1788 , ULONG
*bankSizeReturn
1789 , ULONG
*memSizeReturn
)
1792 struct pHidd_BitMap_ObtainDirectAccess p
, *msg
= &p
;
1794 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_ObtainDirectAccess
);
1797 p
.addressReturn
= addressReturn
;
1798 p
.widthReturn
= widthReturn
;
1799 p
.heightReturn
= heightReturn
;
1800 p
.bankSizeReturn
= bankSizeReturn
;
1801 p
.memSizeReturn
= memSizeReturn
;
1803 /* Clear this by default */
1804 *addressReturn
= NULL
;
1806 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1809 VOID
HIDD_BM_ReleaseDirectAccess(OOP_Object
*obj
)
1812 struct pHidd_BitMap_ReleaseDirectAccess p
, *msg
= &p
;
1814 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_ReleaseDirectAccess
);
1818 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1823 VOID
HIDD_BM_BitMapScale(OOP_Object
*obj
, OOP_Object
*src
, OOP_Object
*dest
, struct BitScaleArgs
* bsa
, OOP_Object
*gc
)
1826 struct pHidd_BitMap_BitMapScale p
, *msg
= &p
;
1828 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_BitMapScale
);
1836 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1839 HIDDT_RGBConversionFunction
HIDD_BM_SetRGBConversionFunction(OOP_Object
*obj
, HIDDT_StdPixFmt srcPixFmt
, HIDDT_StdPixFmt dstPixFmt
,
1840 HIDDT_RGBConversionFunction function
)
1843 struct pHidd_BitMap_SetRGBConversionFunction p
, *msg
= &p
;
1845 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_SetRGBConversionFunction
);
1848 p
.srcPixFmt
= srcPixFmt
;
1849 p
.dstPixFmt
= dstPixFmt
;
1850 p
.function
= function
;
1852 return (HIDDT_RGBConversionFunction
) OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1855 /********* GC *****************************************/
1856 VOID
HIDD_GC_SetClipRect(OOP_Object
*obj
, LONG x1
, LONG y1
, LONG x2
, LONG y2
)
1859 struct pHidd_GC_SetClipRect p
, *msg
= &p
;
1861 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_GC
, moHidd_GC_SetClipRect
);
1869 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1873 VOID
HIDD_GC_UnsetClipRect(OOP_Object
*obj
)
1876 struct pHidd_GC_UnsetClipRect p
, *msg
= &p
;
1878 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_GC
, moHidd_GC_UnsetClipRect
);
1882 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1885 /********* PlanarBM **********************************/
1886 BOOL
HIDD_PlanarBM_SetBitMap(OOP_Object
*obj
, struct BitMap
*bitMap
)
1889 struct pHidd_PlanarBM_SetBitMap p
, *msg
= &p
;
1891 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_PlanarBM
, moHidd_PlanarBM_SetBitMap
);
1896 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1900 /********* ColorMap *********************************/
1902 BOOL
HIDD_CM_SetColors(OOP_Object
*obj
, HIDDT_Color
*colors
, ULONG firstColor
, ULONG numColors
, OOP_Object
*pixFmt
)
1905 struct pHidd_ColorMap_SetColors p
, *msg
= &p
;
1907 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_ColorMap
, moHidd_ColorMap_SetColors
);
1911 p
.firstColor
= firstColor
;
1912 p
.numColors
= numColors
;
1915 return OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1918 HIDDT_Pixel
HIDD_CM_GetPixel(OOP_Object
*obj
, ULONG pixelNo
) /* Starts at 0 */
1921 struct pHidd_ColorMap_GetPixel p
, *msg
= &p
;
1923 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_ColorMap
, moHidd_ColorMap_GetPixel
);
1926 p
.pixelNo
= pixelNo
;
1928 return (HIDDT_Pixel
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1932 BOOL
HIDD_CM_GetColor(OOP_Object
*obj
, ULONG colorNo
, HIDDT_Color
*colorReturn
) /* Starts at 0 */
1935 struct pHidd_ColorMap_GetColor p
, *msg
= &p
;
1937 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_ColorMap
, moHidd_ColorMap_GetColor
);
1940 p
.colorNo
= colorNo
;
1941 p
.colorReturn
= colorReturn
;
1943 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);