2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
11 #include <aros/config.h>
12 #include <exec/types.h>
14 #include <proto/exec.h>
15 #include <proto/dos.h>
16 #include <proto/oop.h>
17 #include <proto/utility.h>
19 #include <utility/tagitem.h>
22 #include <hidd/graphics.h>
24 #include "gfxhiddtool.h"
29 #include <aros/debug.h>
31 extern struct Library
*OOPBase
;
32 /***************************************************************/
34 BOOL
ght_OpenLibs(struct ght_OpenLibs
*libsArray
)
39 while(libsArray
[i
].base
)
41 *libsArray
[i
++].base
= NULL
;
46 while(libsArray
[i
].libName
&& ok
)
48 *libsArray
[i
].base
= OpenLibrary(libsArray
[i
].libName
, libsArray
[i
].version
);
49 if(*libsArray
[i
].base
== NULL
)
51 printf("Can't open library '%s' V%li!\n",
63 /***************************************************************/
65 void ght_CloseLibs(struct ght_OpenLibs
*libsArray
)
70 while(libsArray
[i
].base
&& !quit
)
72 if(*libsArray
[i
].base
!= NULL
)
74 CloseLibrary(*libsArray
[i
].base
);
83 /***************************************************************/
85 ULONG
ght_GetAttr(Object
*obj
, ULONG attrID
)
89 GetAttr(obj
, attrID
, &ret
);
92 /***************************************************************/
94 OOP_Object
* NewGC(OOP_Object
*hiddGfx
, ULONG gcType
, struct TagItem
*tagList
)
96 static OOP_MethodID mid
= 0;
97 struct pHidd_Gfx_NewGC p
;
99 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NewGC
);
102 /* p.gcType = gcType;*/
103 p
.attrList
= tagList
;
105 return((OOP_Object
*) OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
));
107 /***************************************************************/
109 void DisposeGC(OOP_Object
*hiddGfx
, OOP_Object
*gc
)
111 static OOP_MethodID mid
= 0;
112 struct pHidd_Gfx_DisposeGC p
;
114 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_DisposeGC
);
119 OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
);
121 /***************************************************************/
123 OOP_Object
* NewBitMap(OOP_Object
*hiddGfx
, struct TagItem
*tagList
)
125 static OOP_MethodID mid
= 0;
126 struct pHidd_Gfx_NewBitMap p
;
128 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_NewBitMap
);
131 p
.attrList
= tagList
;
133 return((OOP_Object
*) OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
));
135 /***************************************************************/
137 void DisposeBitMap(OOP_Object
*hiddGfx
, OOP_Object
*bitMap
)
139 static OOP_MethodID mid
= 0;
140 struct pHidd_Gfx_DisposeBitMap p
;
142 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Gfx
, moHidd_Gfx_DisposeBitMap
);
147 OOP_DoMethod(hiddGfx
, (OOP_Msg
) &p
);
149 /***************************************************************/