6 #include <aros/config.h>
7 #include <exec/types.h>
9 #include <proto/exec.h>
10 #include <proto/dos.h>
11 #include <proto/oop.h>
12 #include <proto/utility.h>
14 #include <utility/tagitem.h>
17 #include <hidd/graphics.h>
19 #include "gfxhiddtool.h"
24 #include <aros/debug.h>
26 extern struct Library
*OOPBase
;
27 /***************************************************************/
29 BOOL
ght_OpenLibs(struct ght_OpenLibs
*libsArray
)
34 while(libsArray
[i
].base
)
36 *libsArray
[i
++].base
= NULL
;
41 while(libsArray
[i
].libName
&& ok
)
43 *libsArray
[i
].base
= OpenLibrary(libsArray
[i
].libName
, libsArray
[i
].version
);
44 if(*libsArray
[i
].base
== NULL
)
46 printf("Can't open library '%s' V%li!\n",
58 /***************************************************************/
60 void ght_CloseLibs(struct ght_OpenLibs
*libsArray
)
65 while(libsArray
[i
].base
&& !quit
)
67 if(*libsArray
[i
].base
!= NULL
)
69 CloseLibrary(*libsArray
[i
].base
);
78 /***************************************************************/
80 ULONG
ght_GetAttr(Object
*obj
, ULONG attrID
)
84 GetAttr(obj
, attrID
, &ret
);
87 /***************************************************************/
89 OOP_Object
* NewGC(OOP_Object
*hiddGfx
, ULONG gcType
, struct TagItem
*tagList
)
91 static OOP_MethodID mid
= 0;
92 struct pHidd_Gfx_NewGC p
;
94 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NewGC
);
97 /* p.gcType = gcType;*/
100 return((OOP_Object
*) OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
));
102 /***************************************************************/
104 void DisposeGC(OOP_Object
*hiddGfx
, OOP_Object
*gc
)
106 static OOP_MethodID mid
= 0;
107 struct pHidd_Gfx_DisposeGC p
;
109 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_DisposeGC
);
114 OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
);
116 /***************************************************************/
118 OOP_Object
* NewBitMap(OOP_Object
*hiddGfx
, struct TagItem
*tagList
)
120 static OOP_MethodID mid
= 0;
121 struct pHidd_Gfx_NewBitMap p
;
123 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NewBitMap
);
126 p
.attrList
= tagList
;
128 return((OOP_Object
*) OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
));
130 /***************************************************************/
132 void DisposeBitMap(OOP_Object
*hiddGfx
, OOP_Object
*bitMap
)
134 static OOP_MethodID mid
= 0;
135 struct pHidd_Gfx_DisposeBitMap p
;
137 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_DisposeBitMap
);
142 OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
);
144 /***************************************************************/