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
;
183 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_GetMode
);
189 p
.pixFmtPtr
= pixFmtPtr
;
191 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
195 /***************************************************************/
196 HIDDT_ModeID
HIDD_Gfx_NextModeID(OOP_Object
*obj
, HIDDT_ModeID modeID
, OOP_Object
**syncPtr
, OOP_Object
**pixFmtPtr
)
199 struct pHidd_Gfx_NextModeID p
, *msg
= &p
;
201 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NextModeID
);
207 p
.pixFmtPtr
= pixFmtPtr
;
209 return (HIDDT_ModeID
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
213 /***************************************************************/
215 BOOL
HIDD_Gfx_SetCursorShape(OOP_Object
*obj
, OOP_Object
*shape
)
218 struct pHidd_Gfx_SetCursorShape p
, *msg
= &p
;
220 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetCursorShape
);
225 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
229 /***************************************************************/
231 BOOL
HIDD_Gfx_SetCursorPos(OOP_Object
*obj
, LONG x
, LONG y
)
234 struct pHidd_Gfx_SetCursorPos p
, *msg
= &p
;
236 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetCursorPos
);
243 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
247 /***************************************************************/
249 VOID
HIDD_Gfx_SetCursorVisible(OOP_Object
*obj
, BOOL visible
)
252 struct pHidd_Gfx_SetCursorVisible p
, *msg
= &p
;
254 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetCursorVisible
);
260 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
266 /***************************************************************/
268 BOOL
HIDD_Gfx_SetMode(OOP_Object
*obj
, HIDDT_ModeID modeID
)
271 struct pHidd_Gfx_SetMode p
, *msg
= &p
;
273 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_SetMode
);
279 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
284 /***************************************************************/
286 OOP_Object
*HIDD_Gfx_Show(OOP_Object
*obj
, OOP_Object
*bitMap
, ULONG flags
)
289 struct pHidd_Gfx_Show p
, *msg
= &p
;
291 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_Show
);
298 return (OOP_Object
*)OOP_DoMethod(obj
, (OOP_Msg
) msg
);
302 /***************************************************************/
303 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
)
306 struct pHidd_Gfx_CopyBox p
, *msg
= &p
;
308 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_Gfx_CopyBox
);
321 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
325 /***************************************************************/
327 BOOL
HIDD_BM_SetColors (OOP_Object
*obj
, HIDDT_Color
*colors
, ULONG firstColor
, ULONG numColors
)
330 struct pHidd_BitMap_SetColors p
, *msg
= &p
;
332 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_SetColors
);
336 p
.firstColor
= firstColor
;
337 p
.numColors
= numColors
;
339 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
343 /***************************************************************/
345 ULONG
HIDD_BM_PutPixel(OOP_Object
*obj
, WORD x
, WORD y
, HIDDT_Pixel val
)
348 struct pHidd_BitMap_PutPixel p
, *msg
= &p
;
350 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutPixel
);
357 return(OOP_DoMethod(obj
, (OOP_Msg
) msg
));
359 /***************************************************************/
361 ULONG
HIDD_BM_DrawPixel(OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
)
364 struct pHidd_BitMap_DrawPixel p
, *msg
= &p
;
366 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawPixel
);
373 return(OOP_DoMethod(obj
, (OOP_Msg
) msg
));
375 /***************************************************************/
377 HIDDT_Pixel
HIDD_BM_GetPixel(OOP_Object
*obj
, WORD x
, WORD y
)
380 struct pHidd_BitMap_GetPixel p
, *msg
= &p
;
382 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetPixel
);
388 return(OOP_DoMethod(obj
, (OOP_Msg
) msg
));
390 /***************************************************************/
392 VOID
HIDD_BM_DrawLine(OOP_Object
*obj
, OOP_Object
*gc
, WORD x1
, WORD y1
, WORD x2
, WORD y2
)
395 struct pHidd_BitMap_DrawLine p
, *msg
= &p
;
397 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawLine
);
406 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
408 /***************************************************************/
411 VOID
HIDD_BM_DrawRect (OOP_Object
*obj
, OOP_Object
*gc
, WORD minX
, WORD minY
, WORD maxX
, WORD maxY
)
414 struct pHidd_BitMap_DrawRect p
, *msg
= &p
;
416 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawRect
);
425 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
427 /***************************************************************/
429 VOID
HIDD_BM_FillRect (OOP_Object
*obj
, OOP_Object
*gc
, WORD minX
, WORD minY
, WORD maxX
, WORD maxY
)
432 struct pHidd_BitMap_DrawRect p
, *msg
= &p
;
434 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillRect
);
443 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
445 /***************************************************************/
447 VOID
HIDD_BM_DrawEllipse (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, WORD rx
, WORD ry
)
450 struct pHidd_BitMap_DrawEllipse p
, *msg
= &p
;
452 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawEllipse
);
461 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
463 /***************************************************************/
465 VOID
HIDD_BM_FillEllipse (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, WORD ry
, WORD rx
)
468 struct pHidd_BitMap_DrawEllipse p
, *msg
= &p
;
470 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillEllipse
);
479 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
481 /***************************************************************/
483 VOID
HIDD_BM_DrawPolygon (OOP_Object
*obj
, OOP_Object
*gc
, UWORD n
, WORD
*coords
)
486 struct pHidd_BitMap_DrawPolygon p
, *msg
= &p
;
488 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawPolygon
);
495 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
497 /***************************************************************/
499 VOID
HIDD_BM_FillPolygon (OOP_Object
*obj
, OOP_Object
*gc
, UWORD n
, WORD
*coords
)
502 struct pHidd_BitMap_DrawPolygon p
, *msg
= &p
;
504 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillPolygon
);
511 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
513 /***************************************************************/
515 VOID
HIDD_BM_DrawText (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, STRPTR text
, UWORD length
)
518 struct pHidd_BitMap_DrawText p
, *msg
= &p
;
520 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_DrawText
);
529 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
531 /***************************************************************/
533 VOID
HIDD_BM_FillText (OOP_Object
*obj
, OOP_Object
*gc
, WORD x
, WORD y
, STRPTR text
, UWORD length
)
536 struct pHidd_BitMap_DrawText p
, *msg
= &p
;
538 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillText
);
547 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
549 /***************************************************************/
551 VOID
HIDD_BM_Clear (OOP_Object
*obj
, OOP_Object
*gc
)
554 struct pHidd_BitMap_Clear p
, *msg
= &p
;
556 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_Clear
);
561 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
564 /***************************************************************/
566 VOID
HIDD_BM_GetImage (OOP_Object
*obj
570 , WORD width
, WORD height
571 , HIDDT_StdPixFmt pixFmt
)
574 struct pHidd_BitMap_GetImage p
, *msg
= &p
;
576 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetImage
);
590 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
593 /***************************************************************/
595 VOID
HIDD_BM_PutImage (OOP_Object
*obj
600 , WORD width
, WORD height
601 , HIDDT_StdPixFmt pixFmt
)
604 struct pHidd_BitMap_PutImage p
, *msg
= &p
;
606 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutImage
);
618 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
621 /***************************************************************/
623 VOID
HIDD_BM_PutAlphaImage (OOP_Object
*obj
628 , WORD width
, WORD height
)
631 struct pHidd_BitMap_PutAlphaImage p
, *msg
= &p
;
633 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutAlphaImage
);
644 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
647 /***************************************************************/
649 VOID
HIDD_BM_PutTemplate (OOP_Object
*obj
655 , WORD width
, WORD height
656 , BOOL inverttemplate
)
659 struct pHidd_BitMap_PutTemplate p
, *msg
= &p
;
661 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutTemplate
);
665 p
.template = template;
672 p
.inverttemplate
= inverttemplate
;
674 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
677 /***************************************************************/
679 VOID
HIDD_BM_PutAlphaTemplate (OOP_Object
*obj
684 , WORD width
, WORD height
688 struct pHidd_BitMap_PutAlphaTemplate p
, *msg
= &p
;
690 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutAlphaTemplate
);
700 p
.invertalpha
= invertalpha
;
702 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
705 /***************************************************************/
707 VOID
HIDD_BM_PutPattern(OOP_Object
*obj
, OOP_Object
*gc
, UBYTE
*pattern
,
708 WORD patternsrcx
, WORD patternsrcy
, WORD patternheight
,
709 WORD patterndepth
, HIDDT_PixelLUT
*patternlut
,
710 BOOL invertpattern
, UBYTE
*mask
, ULONG maskmodulo
,
711 WORD masksrcx
, WORD x
, WORD y
, WORD width
, WORD height
)
714 struct pHidd_BitMap_PutPattern p
, *msg
= &p
;
716 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutPattern
);
721 p
.patternsrcx
= patternsrcx
;
722 p
.patternsrcy
= patternsrcy
;
723 p
.patternheight
= patternheight
;
724 p
.patterndepth
= patterndepth
;
725 p
.patternlut
= patternlut
;
726 p
.invertpattern
= invertpattern
;
728 p
.maskmodulo
= maskmodulo
;
729 p
.masksrcx
= masksrcx
;
735 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
738 /***************************************************************/
740 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
)
743 struct pHidd_BitMap_BlitColorExpansion p
, *msg
= &p
;
745 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_BlitColorExpansion
);
749 p
.srcBitMap
= srcBitMap
;
757 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
760 /***************************************************************/
762 HIDDT_Pixel
HIDD_BM_MapColor(OOP_Object
*obj
, HIDDT_Color
*color
)
765 struct pHidd_BitMap_MapColor p
, *msg
= &p
;
767 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_MapColor
);
773 return OOP_DoMethod(obj
, (OOP_Msg
)msg
);
776 /***************************************************************/
778 VOID
HIDD_BM_UnmapPixel(OOP_Object
*obj
, HIDDT_Pixel pixel
, HIDDT_Color
*color
)
781 struct pHidd_BitMap_UnmapPixel p
, *msg
= &p
;
783 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_UnmapPixel
);
789 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
793 /***************************************************************/
795 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
)
798 struct pHidd_BitMap_PutImageLUT p
, *msg
= &p
;
800 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutImageLUT
);
812 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
815 /***************************************************************/
817 VOID
HIDD_BM_PutTranspImageLUT (OOP_Object
*obj
, OOP_Object
*gc
, UBYTE
*pixels
,
818 ULONG modulo
, WORD x
, WORD y
, WORD width
, WORD height
,
819 HIDDT_PixelLUT
*pixlut
, UBYTE transparent
)
822 struct pHidd_BitMap_PutTranspImageLUT p
, *msg
= &p
;
824 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutTranspImageLUT
);
835 p
.transparent
= transparent
;
837 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
841 /***************************************************************/
843 VOID
HIDD_BM_GetImageLUT (OOP_Object
*obj
, UBYTE
*pixels
, ULONG modulo
, WORD x
, WORD y
, WORD width
, WORD height
, HIDDT_PixelLUT
*pixlut
)
846 struct pHidd_BitMap_GetImageLUT p
, *msg
= &p
;
848 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetImageLUT
);
859 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
863 ULONG
HIDD_BM_BytesPerLine(OOP_Object
*obj
, HIDDT_StdPixFmt pixFmt
, ULONG width
)
866 struct pHidd_BitMap_BytesPerLine p
, *msg
= &p
;
868 if (!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_BytesPerLine
);
874 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
878 /***************************************************************/
881 VOID
HIDD_BM_ConvertPixels (OOP_Object
*obj
883 , HIDDT_PixelFormat
*srcPixFmt
886 , HIDDT_PixelFormat
*dstPixFmt
888 , ULONG width
, ULONG height
889 , HIDDT_PixelLUT
*pixlut
893 struct pHidd_BitMap_ConvertPixels p
, *msg
= &p
;
895 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_ConvertPixels
);
898 p
.srcPixFmt
= srcPixFmt
;
899 p
.srcPixels
= srcPixels
;
904 p
.dstPixFmt
= dstPixFmt
;
913 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
916 VOID
HIDD_BM_FillMemRect8 (OOP_Object
*obj
927 struct pHidd_BitMap_FillMemRect8 p
, *msg
= &p
;
929 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect8
);
940 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
943 VOID
HIDD_BM_FillMemRect16(OOP_Object
*obj
954 struct pHidd_BitMap_FillMemRect16 p
, *msg
= &p
;
956 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect16
);
967 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
970 VOID
HIDD_BM_FillMemRect24 (OOP_Object
*obj
981 struct pHidd_BitMap_FillMemRect24 p
, *msg
= &p
;
983 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect24
);
994 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
997 VOID
HIDD_BM_FillMemRect32 (OOP_Object
*obj
1008 struct pHidd_BitMap_FillMemRect32 p
, *msg
= &p
;
1010 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_FillMemRect32
);
1021 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1025 VOID
HIDD_BM_InvertMemRect(OOP_Object
*obj
1035 struct pHidd_BitMap_InvertMemRect p
, *msg
= &p
;
1037 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_InvertMemRect
);
1047 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1051 VOID
HIDD_BM_CopyMemBox8(OOP_Object
*obj
1064 struct pHidd_BitMap_CopyMemBox8 p
, *msg
= &p
;
1066 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox8
);
1080 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1083 VOID
HIDD_BM_CopyMemBox16(OOP_Object
*obj
1096 struct pHidd_BitMap_CopyMemBox16 p
, *msg
= &p
;
1098 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox16
);
1112 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1115 VOID
HIDD_BM_CopyMemBox24(OOP_Object
*obj
1128 struct pHidd_BitMap_CopyMemBox24 p
, *msg
= &p
;
1130 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox24
);
1144 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1147 VOID
HIDD_BM_CopyMemBox32(OOP_Object
*obj
1160 struct pHidd_BitMap_CopyMemBox32 p
, *msg
= &p
;
1162 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyMemBox32
);
1176 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1179 VOID
HIDD_BM_CopyLUTMemBox16(OOP_Object
*obj
1190 , HIDDT_PixelLUT
*pixlut
)
1193 struct pHidd_BitMap_CopyLUTMemBox16 p
, *msg
= &p
;
1195 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyLUTMemBox16
);
1210 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1213 VOID
HIDD_BM_CopyLUTMemBox24(OOP_Object
*obj
1224 , HIDDT_PixelLUT
*pixlut
)
1227 struct pHidd_BitMap_CopyLUTMemBox24 p
, *msg
= &p
;
1229 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyLUTMemBox24
);
1244 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1247 VOID
HIDD_BM_CopyLUTMemBox32(OOP_Object
*obj
1258 , HIDDT_PixelLUT
*pixlut
)
1261 struct pHidd_BitMap_CopyLUTMemBox32 p
, *msg
= &p
;
1263 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_CopyLUTMemBox32
);
1278 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1281 VOID
HIDD_BM_PutMem32Image8(OOP_Object
*obj
,
1292 struct pHidd_BitMap_PutMem32Image8 p
, *msg
= &p
;
1294 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMem32Image8
);
1306 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1309 VOID
HIDD_BM_PutMem32Image16(OOP_Object
*obj
,
1320 struct pHidd_BitMap_PutMem32Image16 p
, *msg
= &p
;
1322 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMem32Image16
);
1334 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1337 VOID
HIDD_BM_PutMem32Image24(OOP_Object
*obj
,
1348 struct pHidd_BitMap_PutMem32Image24 p
, *msg
= &p
;
1350 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMem32Image24
);
1362 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1365 VOID
HIDD_BM_GetMem32Image8(OOP_Object
*obj
,
1376 struct pHidd_BitMap_GetMem32Image8 p
, *msg
= &p
;
1378 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetMem32Image8
);
1390 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1393 VOID
HIDD_BM_GetMem32Image16(OOP_Object
*obj
,
1404 struct pHidd_BitMap_GetMem32Image16 p
, *msg
= &p
;
1406 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetMem32Image16
);
1418 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1421 VOID
HIDD_BM_GetMem32Image24(OOP_Object
*obj
,
1432 struct pHidd_BitMap_GetMem32Image24 p
, *msg
= &p
;
1434 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_GetMem32Image24
);
1446 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1449 VOID
HIDD_BM_PutMemTemplate8 (OOP_Object
*obj
,
1460 BOOL inverttemplate
)
1463 struct pHidd_BitMap_PutMemTemplate8 p
, *msg
= &p
;
1465 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate8
);
1469 p
.template = template;
1478 p
.inverttemplate
= inverttemplate
;
1480 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1483 VOID
HIDD_BM_PutMemTemplate16(OOP_Object
*obj
,
1494 BOOL inverttemplate
)
1497 struct pHidd_BitMap_PutMemTemplate16 p
, *msg
= &p
;
1499 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate16
);
1503 p
.template = template;
1512 p
.inverttemplate
= inverttemplate
;
1514 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1517 VOID
HIDD_BM_PutMemTemplate24(OOP_Object
*obj
,
1528 BOOL inverttemplate
)
1531 struct pHidd_BitMap_PutMemTemplate24 p
, *msg
= &p
;
1533 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate24
);
1537 p
.template = template;
1546 p
.inverttemplate
= inverttemplate
;
1548 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1551 VOID
HIDD_BM_PutMemTemplate32(OOP_Object
*obj
,
1562 BOOL inverttemplate
)
1565 struct pHidd_BitMap_PutMemTemplate32 p
, *msg
= &p
;
1567 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemTemplate32
);
1571 p
.template = template;
1580 p
.inverttemplate
= inverttemplate
;
1582 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1585 VOID
HIDD_BM_PutMemPattern8 (OOP_Object
*obj
,
1592 HIDDT_PixelLUT
*patternlut
,
1605 struct pHidd_BitMap_PutMemPattern8 p
, *msg
= &p
;
1607 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern8
);
1611 p
.pattern
= pattern
;
1612 p
.patternsrcx
= patternsrcx
;
1613 p
.patternsrcy
= patternsrcy
;
1614 p
.patternheight
= patternheight
;
1615 p
.patterndepth
= patterndepth
;
1616 p
.patternlut
= patternlut
;
1617 p
.invertpattern
= invertpattern
;
1619 p
.maskmodulo
= maskmodulo
;
1620 p
.masksrcx
= masksrcx
;
1628 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1631 VOID
HIDD_BM_PutMemPattern16 (OOP_Object
*obj
,
1638 HIDDT_PixelLUT
*patternlut
,
1651 struct pHidd_BitMap_PutMemPattern16 p
, *msg
= &p
;
1653 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern16
);
1657 p
.pattern
= pattern
;
1658 p
.patternsrcx
= patternsrcx
;
1659 p
.patternsrcy
= patternsrcy
;
1660 p
.patternheight
= patternheight
;
1661 p
.patterndepth
= patterndepth
;
1662 p
.patternlut
= patternlut
;
1663 p
.invertpattern
= invertpattern
;
1665 p
.maskmodulo
= maskmodulo
;
1666 p
.masksrcx
= masksrcx
;
1674 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1677 VOID
HIDD_BM_PutMemPattern24 (OOP_Object
*obj
,
1684 HIDDT_PixelLUT
*patternlut
,
1697 struct pHidd_BitMap_PutMemPattern24 p
, *msg
= &p
;
1699 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern24
);
1703 p
.pattern
= pattern
;
1704 p
.patternsrcx
= patternsrcx
;
1705 p
.patternsrcy
= patternsrcy
;
1706 p
.patternheight
= patternheight
;
1707 p
.patterndepth
= patterndepth
;
1708 p
.patternlut
= patternlut
;
1709 p
.invertpattern
= invertpattern
;
1711 p
.maskmodulo
= maskmodulo
;
1712 p
.masksrcx
= masksrcx
;
1720 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1723 VOID
HIDD_BM_PutMemPattern32 (OOP_Object
*obj
,
1730 HIDDT_PixelLUT
*patternlut
,
1743 struct pHidd_BitMap_PutMemPattern32 p
, *msg
= &p
;
1745 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_PutMemPattern32
);
1749 p
.pattern
= pattern
;
1750 p
.patternsrcx
= patternsrcx
;
1751 p
.patternsrcy
= patternsrcy
;
1752 p
.patternheight
= patternheight
;
1753 p
.patterndepth
= patterndepth
;
1754 p
.patternlut
= patternlut
;
1755 p
.invertpattern
= invertpattern
;
1757 p
.maskmodulo
= maskmodulo
;
1758 p
.masksrcx
= masksrcx
;
1766 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1769 OOP_Object
* HIDD_BM_SetColorMap(OOP_Object
*obj
, OOP_Object
*colorMap
)
1772 struct pHidd_BitMap_SetColorMap p
, *msg
= &p
;
1774 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_SetColorMap
);
1777 p
.colorMap
= colorMap
;
1779 return (OOP_Object
*)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1783 BOOL
HIDD_BM_ObtainDirectAccess(OOP_Object
*obj
1784 , UBYTE
**addressReturn
1785 , ULONG
*widthReturn
1786 , ULONG
*heightReturn
1787 , ULONG
*bankSizeReturn
1788 , ULONG
*memSizeReturn
)
1791 struct pHidd_BitMap_ObtainDirectAccess p
, *msg
= &p
;
1793 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_ObtainDirectAccess
);
1796 p
.addressReturn
= addressReturn
;
1797 p
.widthReturn
= widthReturn
;
1798 p
.heightReturn
= heightReturn
;
1799 p
.bankSizeReturn
= bankSizeReturn
;
1800 p
.memSizeReturn
= memSizeReturn
;
1802 /* Clear this by default */
1803 *addressReturn
= NULL
;
1805 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1808 VOID
HIDD_BM_ReleaseDirectAccess(OOP_Object
*obj
)
1811 struct pHidd_BitMap_ReleaseDirectAccess p
, *msg
= &p
;
1813 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_ReleaseDirectAccess
);
1817 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1822 VOID
HIDD_BM_BitMapScale(OOP_Object
*obj
, OOP_Object
*src
, OOP_Object
*dest
, struct BitScaleArgs
* bsa
, OOP_Object
*gc
)
1825 struct pHidd_BitMap_BitMapScale p
, *msg
= &p
;
1827 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_BitMapScale
);
1835 OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1838 HIDDT_RGBConversionFunction
HIDD_BM_SetRGBConversionFunction(OOP_Object
*obj
, HIDDT_StdPixFmt srcPixFmt
, HIDDT_StdPixFmt dstPixFmt
,
1839 HIDDT_RGBConversionFunction function
)
1842 struct pHidd_BitMap_SetRGBConversionFunction p
, *msg
= &p
;
1844 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_BitMap
, moHidd_BitMap_SetRGBConversionFunction
);
1847 p
.srcPixFmt
= srcPixFmt
;
1848 p
.dstPixFmt
= dstPixFmt
;
1849 p
.function
= function
;
1851 return (HIDDT_RGBConversionFunction
) OOP_DoMethod(obj
, (OOP_Msg
) msg
);
1854 /********* GC *****************************************/
1855 VOID
HIDD_GC_SetClipRect(OOP_Object
*obj
, LONG x1
, LONG y1
, LONG x2
, LONG y2
)
1858 struct pHidd_GC_SetClipRect p
, *msg
= &p
;
1860 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_GC
, moHidd_GC_SetClipRect
);
1868 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1872 VOID
HIDD_GC_UnsetClipRect(OOP_Object
*obj
)
1875 struct pHidd_GC_UnsetClipRect p
, *msg
= &p
;
1877 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_GC
, moHidd_GC_UnsetClipRect
);
1881 OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1884 /********* PlanarBM **********************************/
1885 BOOL
HIDD_PlanarBM_SetBitMap(OOP_Object
*obj
, struct BitMap
*bitMap
)
1888 struct pHidd_PlanarBM_SetBitMap p
, *msg
= &p
;
1890 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_PlanarBM
, moHidd_PlanarBM_SetBitMap
);
1895 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1899 /********* ColorMap *********************************/
1901 BOOL
HIDD_CM_SetColors(OOP_Object
*obj
, HIDDT_Color
*colors
, ULONG firstColor
, ULONG numColors
, OOP_Object
*pixFmt
)
1904 struct pHidd_ColorMap_SetColors p
, *msg
= &p
;
1906 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_ColorMap
, moHidd_ColorMap_SetColors
);
1910 p
.firstColor
= firstColor
;
1911 p
.numColors
= numColors
;
1914 return OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1917 HIDDT_Pixel
HIDD_CM_GetPixel(OOP_Object
*obj
, ULONG pixelNo
) /* Starts at 0 */
1920 struct pHidd_ColorMap_GetPixel p
, *msg
= &p
;
1922 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_ColorMap
, moHidd_ColorMap_GetPixel
);
1925 p
.pixelNo
= pixelNo
;
1927 return (HIDDT_Pixel
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);
1931 BOOL
HIDD_CM_GetColor(OOP_Object
*obj
, ULONG colorNo
, HIDDT_Color
*colorReturn
) /* Starts at 0 */
1934 struct pHidd_ColorMap_GetColor p
, *msg
= &p
;
1936 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_ColorMap
, moHidd_ColorMap_GetColor
);
1939 p
.colorNo
= colorNo
;
1940 p
.colorReturn
= colorReturn
;
1942 return (BOOL
)OOP_DoMethod(obj
, (OOP_Msg
)msg
);