added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / i386-pc / Drivers / vmwaregfx.hidd / vmwaregfxclass.c
blobf69495241f89b9c861d0e25703ca1970da753a0c
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Class for VMWare.
6 Lang: English.
7 */
9 #define __OOP_NOATTRBASES__
11 #include <proto/exec.h>
12 #include <proto/oop.h>
13 #include <proto/utility.h>
14 #include <aros/symbolsets.h>
15 #include <devices/inputevent.h>
16 #include <exec/alerts.h>
17 #include <exec/memory.h>
18 #include <hardware/custom.h>
19 #include <hidd/hidd.h>
20 #include <hidd/graphics.h>
21 #include <oop/oop.h>
23 #define DEBUG 0
24 #include <aros/debug.h>
26 #include "vmwaregfxclass.h"
27 #include "bitmap.h"
28 #include "hardware.h"
30 #include LC_LIBDEFS_FILE
32 static OOP_AttrBase HiddBitMapAttrBase;
33 static OOP_AttrBase HiddPixFmtAttrBase;
34 static OOP_AttrBase HiddGfxAttrBase;
35 static OOP_AttrBase HiddSyncAttrBase;
36 static OOP_AttrBase HiddVMWareGfxAttrBase;
37 static OOP_AttrBase HiddVMWareGfxBitMapAttrBase;
39 static struct OOP_ABDescr attrbases[] =
41 {IID_Hidd_BitMap, &HiddBitMapAttrBase},
42 {IID_Hidd_VMWareGfxBitMap, &HiddVMWareGfxBitMapAttrBase},
43 {IID_Hidd_VMWareGfx, &HiddVMWareGfxAttrBase},
44 {IID_Hidd_PixFmt, &HiddPixFmtAttrBase},
45 {IID_Hidd_Sync, &HiddSyncAttrBase},
46 {IID_Hidd_Gfx, &HiddGfxAttrBase},
47 {NULL, NULL}
50 STATIC ULONG mask_to_shift(ULONG mask)
52 ULONG i;
54 for (i = 32; mask; i --) {
55 mask >>= 1;
58 if (mask == 32) {
59 i = 0;
62 return i;
65 OOP_Object *VMWareGFX__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *msg) {
66 struct TagItem pftags[] =
68 {aHidd_PixFmt_RedShift, 0}, /* 0 */
69 {aHidd_PixFmt_GreenShift, 0}, /* 1 */
70 {aHidd_PixFmt_BlueShift, 0}, /* 2 */
71 {aHidd_PixFmt_AlphaShift, 0}, /* 3 */
72 {aHidd_PixFmt_RedMask, 0}, /* 4 */
73 {aHidd_PixFmt_GreenMask, 0}, /* 5 */
74 {aHidd_PixFmt_BlueMask, 0}, /* 6 */
75 {aHidd_PixFmt_AlphaMask, 0}, /* 7 */
76 {aHidd_PixFmt_ColorModel, 0}, /* 8 */
77 {aHidd_PixFmt_Depth, 0}, /* 9 */
78 {aHidd_PixFmt_BytesPerPixel,0}, /* 10 */
79 {aHidd_PixFmt_BitsPerPixel, 0}, /* 11 */
80 {aHidd_PixFmt_StdPixFmt, 0}, /* 12 */
81 {aHidd_PixFmt_CLUTShift, 0}, /* 13 */
82 {aHidd_PixFmt_CLUTMask, 0x0f}, /* 14 */
83 {aHidd_PixFmt_BitMapType, 0}, /* 15 */
84 {TAG_DONE, 0UL }
86 struct TagItem sync_mode1[] =
88 {aHidd_Sync_PixelClock, 0},
89 {aHidd_Sync_HDisp, 640},
90 {aHidd_Sync_VDisp, 480},
91 {aHidd_Sync_HSyncStart, 0},
92 {aHidd_Sync_HSyncEnd, 0},
93 {aHidd_Sync_HTotal, 0},
94 {aHidd_Sync_VSyncStart, 0},
95 {aHidd_Sync_VSyncEnd, 0},
96 {aHidd_Sync_VTotal, 0},
97 {TAG_DONE, 0UL}
99 struct TagItem sync_mode2[] =
101 {aHidd_Sync_PixelClock, 0},
102 {aHidd_Sync_HDisp, 800},
103 {aHidd_Sync_VDisp, 600},
104 {aHidd_Sync_HSyncStart, 0},
105 {aHidd_Sync_HSyncEnd, 0},
106 {aHidd_Sync_HTotal, 0},
107 {aHidd_Sync_VSyncStart, 0},
108 {aHidd_Sync_VSyncEnd, 0},
109 {aHidd_Sync_VTotal, 0},
110 {TAG_DONE, 0UL}
112 struct TagItem sync_mode3[] =
114 {aHidd_Sync_PixelClock, 0},
115 {aHidd_Sync_HDisp, 1024},
116 {aHidd_Sync_VDisp, 768},
117 {aHidd_Sync_HSyncStart, 0},
118 {aHidd_Sync_HSyncEnd, 0},
119 {aHidd_Sync_HTotal, 0},
120 {aHidd_Sync_VSyncStart, 0},
121 {aHidd_Sync_VSyncEnd, 0},
122 {aHidd_Sync_VTotal, 0},
123 {TAG_DONE, 0UL}
125 struct TagItem modetags[] =
127 {aHidd_Gfx_PixFmtTags, (IPTR)pftags},
128 {aHidd_Gfx_SyncTags, (IPTR)sync_mode1},
129 {aHidd_Gfx_SyncTags, (IPTR)sync_mode2},
130 {aHidd_Gfx_SyncTags, (IPTR)sync_mode3},
131 {TAG_DONE, 0UL}
133 struct TagItem yourtags[] =
135 {aHidd_Gfx_ModeTags, (IPTR)modetags},
136 {TAG_MORE, 0UL}
138 struct pRoot_New yourmsg;
140 /* set pftags = 0 */
141 if (!XSD(cl)->data.pseudocolor)
143 pftags[0].ti_Data = mask_to_shift(XSD(cl)->data.redmask);
144 pftags[1].ti_Data = mask_to_shift(XSD(cl)->data.greenmask);
145 pftags[2].ti_Data = mask_to_shift(XSD(cl)->data.bluemask);
147 else
149 pftags[0].ti_Data = 0;
150 pftags[1].ti_Data = 0;
151 pftags[2].ti_Data = 0;
153 pftags[3].ti_Data = 0;
154 pftags[4].ti_Data = XSD(cl)->data.redmask;
155 pftags[5].ti_Data = XSD(cl)->data.greenmask;
156 pftags[6].ti_Data = XSD(cl)->data.bluemask;
157 pftags[7].ti_Data = 0;
158 D(bug("[VMWare] New: Masks red=%08x<<%d,green=%08x<<%d,blue%08x<<%d\n",
159 pftags[4].ti_Data, pftags[0].ti_Data,
160 pftags[5].ti_Data, pftags[1].ti_Data,
161 pftags[6].ti_Data, pftags[2].ti_Data));
162 if (XSD(cl)->data.pseudocolor)
163 pftags[8].ti_Data = vHidd_ColorModel_Palette;
164 else
165 pftags[8].ti_Data = vHidd_ColorModel_TrueColor;
166 pftags[9].ti_Data = XSD(cl)->data.depth;
167 pftags[10].ti_Data = XSD(cl)->data.bytesperpixel;
168 pftags[11].ti_Data = XSD(cl)->data.bitsperpixel;
169 pftags[12].ti_Data = vHidd_StdPixFmt_Native;
170 pftags[15].ti_Data = vHidd_BitMapType_Chunky;
171 yourtags[1].ti_Data = (IPTR)msg->attrList;
172 yourmsg.mID = msg->mID;
173 yourmsg.attrList = yourtags;
174 msg = &yourmsg;
175 EnterFunc(bug("VMWareGfx::New()\n"));
176 o = (OOP_Object *)OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
177 if (o)
179 D(bug("Got object from super\n"));
180 XSD(cl)->vmwaregfxhidd = o;
181 XSD(cl)->mouse.shape = NULL;
182 ReturnPtr("VMWareGfx::New", OOP_Object *, o);
184 ReturnPtr("VMWareGfx::New", OOP_Object *, NULL);
187 VOID VMWareGFX__Root__Dispose(OOP_Class *cl, OOP_Object *o, OOP_Msg msg) {
188 if (XSD(cl)->mouse.shape != NULL)
189 FreeVec(XSD(cl)->mouse.shape);
190 OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
193 VOID VMWareGFX__Root__Get(OOP_Class *cl, OOP_Object *o, struct pRoot_Get *msg) {
194 ULONG idx;
195 BOOL found = FALSE;
197 if (IS_GFX_ATTR(msg->attrID, idx))
199 switch (idx)
201 case aoHidd_Gfx_SupportsHWCursor:
202 *msg->storage = (IPTR)TRUE;
203 found = TRUE;
204 break;
207 if (!found)
208 OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
211 OOP_Object *VMWareGFX__Hidd_Gfx__NewBitMap(OOP_Class *cl, OOP_Object *o, struct pHidd_Gfx_NewBitMap *msg) {
212 BOOL displayable;
213 BOOL framebuffer;
214 OOP_Class *classptr = NULL;
215 struct TagItem tags[2];
216 struct pHidd_Gfx_NewBitMap yourmsg;
218 EnterFunc(bug("VMWareGfx::NewBitMap()\n"));
219 displayable = GetTagData(aHidd_BitMap_Displayable, FALSE, msg->attrList);
220 framebuffer = GetTagData(aHidd_BitMap_FrameBuffer, FALSE, msg->attrList);
221 if (framebuffer)
222 classptr = XSD(cl)->onbmclass;
223 else if (displayable)
224 classptr = XSD(cl)->offbmclass;
225 else
227 HIDDT_ModeID modeid;
228 modeid = (HIDDT_ModeID)GetTagData(aHidd_BitMap_ModeID, vHidd_ModeID_Invalid, msg->attrList);
229 if (modeid != vHidd_ModeID_Invalid)
230 classptr = XSD(cl)->offbmclass;
231 else
233 HIDDT_StdPixFmt stdpf;
234 stdpf = (HIDDT_StdPixFmt)GetTagData(aHidd_BitMap_StdPixFmt, vHidd_StdPixFmt_Unknown, msg->attrList);
235 if (stdpf == vHidd_StdPixFmt_Unknown)
237 OOP_Object *friend;
238 friend = (OOP_Object *)GetTagData(aHidd_BitMap_Friend, NULL, msg->attrList);
239 if (friend != NULL)
241 OOP_Object *gfxhidd;
242 OOP_GetAttr(friend, aHidd_BitMap_GfxHidd, (IPTR *)&gfxhidd);
243 if (gfxhidd == o)
245 classptr = XSD(cl)->offbmclass;
251 if (classptr != NULL)
253 tags[0].ti_Tag = aHidd_BitMap_ClassPtr;
254 tags[0].ti_Data = (IPTR)classptr;
255 tags[1].ti_Tag = TAG_MORE;
256 tags[1].ti_Data = (IPTR)msg->attrList;
257 yourmsg.mID = msg->mID;
258 yourmsg.attrList = tags;
259 msg = &yourmsg;
261 ReturnPtr("VMWareGfx::NewBitMap", OOP_Object *, (OOP_Object *)OOP_DoSuperMethod(cl, o, (OOP_Msg)msg));
264 VOID VMWareGFX__Hidd_Gfx__CopyBox(OOP_Class *cl, OOP_Object *o, struct pHidd_Gfx_CopyBox *msg) {
265 UBYTE *src = NULL;
266 UBYTE *dst = NULL;
267 HIDDT_DrawMode mode;
268 struct Box box;
270 EnterFunc(bug("VMWareGfx.BitMap::CopyBox\n"));
271 mode = GC_DRMD(msg->gc);
272 OOP_GetAttr(msg->src, aHidd_VMWareGfxBitMap_Drawable, (IPTR *)&src);
273 OOP_GetAttr(msg->dest, aHidd_VMWareGfxBitMap_Drawable, (IPTR *)&dst);
274 if (((dst == NULL) || (src == NULL))) /* no vmwaregfx bitmap */
276 OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
278 else if (dst == src)
280 struct BitmapData *data;
281 data = OOP_INST_DATA(OOP_OCLASS(msg->src), msg->src);
282 switch (mode)
284 case vHidd_GC_DrawMode_Clear:
285 clearCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
286 break;
287 case vHidd_GC_DrawMode_And:
288 andCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
289 break;
290 case vHidd_GC_DrawMode_AndReverse:
291 andReverseCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
292 break;
293 case vHidd_GC_DrawMode_Copy:
294 copyCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
295 break;
296 case vHidd_GC_DrawMode_AndInverted:
297 andInvertedCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
298 break;
299 case vHidd_GC_DrawMode_NoOp:
300 noOpCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
301 break;
302 case vHidd_GC_DrawMode_Xor:
303 xorCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
304 break;
305 case vHidd_GC_DrawMode_Or:
306 orCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
307 break;
308 case vHidd_GC_DrawMode_Nor:
309 norCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
310 break;
311 case vHidd_GC_DrawMode_Equiv:
312 equivCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
313 break;
314 case vHidd_GC_DrawMode_Invert:
315 invertCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
316 break;
317 case vHidd_GC_DrawMode_OrReverse:
318 orReverseCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
319 break;
320 case vHidd_GC_DrawMode_CopyInverted:
321 copyInvertedCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
322 break;
323 case vHidd_GC_DrawMode_OrInverted:
324 orInvertedCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
325 break;
326 case vHidd_GC_DrawMode_Nand:
327 nandCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
328 break;
329 case vHidd_GC_DrawMode_Set:
330 setCopyVMWareGfx(data->data, msg->srcX, msg->srcY, msg->destX, msg->destY, msg->width, msg->height);
331 break;
332 default:
333 OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
336 else
338 struct BitmapData *srcbd = OOP_INST_DATA(OOP_OCLASS(msg->src), msg->src);
339 struct BitmapData *dstbd = OOP_INST_DATA(OOP_OCLASS(msg->dest), msg->dest);
340 UBYTE *sbuffer;
341 ULONG srestadd;
342 UBYTE *dbuffer;
343 ULONG drestadd;
344 ULONG ycnt = msg->height;
345 ULONG xcnt;
346 LONG offset;
347 /* get src/dest video data start addresses and skip sizes */
348 if (srcbd->VideoData == srcbd->data->vrambase)
350 offset = (msg->srcX*srcbd->bytesperpix)+(msg->srcY*srcbd->data->bytesperline);
351 srestadd = (srcbd->data->bytesperline - (msg->width*srcbd->bytesperpix));
352 displayCursorVMWareGfx(&XSD(cl)->data, 0);
353 XSD(cl)->mouse.visible = 0;
355 else
357 offset = (msg->srcX+(msg->srcY*srcbd->width))*srcbd->bytesperpix;
358 srestadd = (srcbd->width - msg->width)*srcbd->bytesperpix;
360 sbuffer = srcbd->VideoData+offset;
361 if (dstbd->VideoData == dstbd->data->vrambase)
363 offset = (msg->destX*dstbd->bytesperpix)+(msg->destY*dstbd->data->bytesperline);
364 drestadd = (dstbd->data->bytesperline - (msg->width*dstbd->bytesperpix));
365 displayCursorVMWareGfx(&XSD(cl)->data, 0);
366 XSD(cl)->mouse.visible = 0;
368 else
370 offset = (msg->destX+(msg->destY*dstbd->width))*dstbd->bytesperpix;
371 drestadd = (dstbd->width - msg->width)*dstbd->bytesperpix;
373 dbuffer = dstbd->VideoData+offset;
374 switch (mode)
376 case vHidd_GC_DrawMode_Copy:
377 while (ycnt--)
379 ULONG pixel;
380 xcnt = msg->width;
381 while (xcnt)
383 /* get pixel from source */
384 switch (srcbd->bytesperpix)
386 case 1:
387 pixel = (ULONG)*((UBYTE *)sbuffer);
388 sbuffer++;
389 break;
390 case 2:
391 pixel = (ULONG)*((UWORD *)sbuffer);
392 sbuffer += 2;
393 break;
394 case 4:
395 pixel = (ULONG)*((ULONG *)sbuffer);
396 sbuffer += 4;
397 break;
398 default:
399 D(bug("[VMWare] Copy: Unknown number of bytes per pixel (%d) in source!\n",srcbd->bytesperpix));
400 pixel = 0;
401 break;
403 /* write pixel to destination */
404 switch (dstbd->bytesperpix)
406 case 1:
407 *((UBYTE *)dbuffer) = (UBYTE)pixel;
408 dbuffer++;
409 break;
410 case 2:
411 *((UWORD *)dbuffer) = (UWORD)pixel;
412 dbuffer += 2;
413 break;
414 case 4:
415 *((ULONG *)dbuffer) = (ULONG)pixel;
416 dbuffer += 4;
417 break;
418 default:
419 D(bug("[VMWare] Copy: Unknown number of bytes per pixel (%d) in destination!\n",dstbd->bytesperpix));
420 break;
422 xcnt--;
424 sbuffer += srestadd;
425 dbuffer += drestadd;
427 if (dstbd->VideoData == dstbd->data->vrambase)
429 box.x1 = msg->destX;
430 box.y1 = msg->destY;
431 box.x2 = box.x1+msg->width-1;
432 box.y2 = box.y1+msg->height-1;
433 refreshAreaVMWareGfx(dstbd->data, &box);
435 break;
436 default:
437 kprintf("mode = %ld src=%lx dst=%lx\n", mode, src, dst);
438 OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
440 if (XSD(cl)->mouse.visible == 0)
442 displayCursorVMWareGfx(&XSD(cl)->data, 1);
443 XSD(cl)->mouse.visible = 1;
446 ReturnVoid("VMWareGfx.BitMap::CopyBox");
449 BOOL VMWareGFX__Hidd_Gfx__SetCursorShape(OOP_Class *cl, OOP_Object *o, struct pHidd_Gfx_SetCursorShape *msg) {
450 struct VMWareGfx_staticdata *data = XSD(cl);
452 if (msg->shape == NULL)
454 displayCursorVMWareGfx(&XSD(cl)->data, 0);
455 data->mouse.oopshape = NULL;
456 if (data->mouse.shape != NULL)
457 FreeVec(data->mouse.shape);
458 data->mouse.shape = NULL;
459 return TRUE;
461 else
463 OOP_Object *pfmt;
464 OOP_Object *colmap;
465 HIDDT_StdPixFmt pixfmt;
466 HIDDT_Color color;
467 OOP_GetAttr(msg->shape, aHidd_BitMap_Width, &data->mouse.width);
468 OOP_GetAttr(msg->shape, aHidd_BitMap_Height, &data->mouse.height);
469 OOP_GetAttr(msg->shape, aHidd_BitMap_PixFmt, (IPTR *)&pfmt);
470 OOP_GetAttr(pfmt, aHidd_PixFmt_StdPixFmt, &pixfmt);
471 OOP_GetAttr(msg->shape, aHidd_BitMap_ColorMap, (IPTR *)&colmap);
472 data->mouse.oopshape = msg->shape;
473 #if 0
474 data->mouse.shape = cursor_shape;
475 data->mouse.width = 11;
476 data->mouse.height = 11;
477 defineCursorVMWareGfx(&XSD(cl)->data, &data->mouse);
478 return TRUE;
479 #else
480 /* convert shape to vmware needs */
481 if (data->mouse.shape != NULL)
482 FreeVec(data->mouse.shape);
483 data->mouse.shape = AllocVec(SVGA_PIXMAP_SIZE(data->mouse.width, data->mouse.height, data->data.bitsperpixel)*4, MEMF_PUBLIC);
484 if (data->mouse.shape != NULL)
486 LONG xcnt;
487 LONG ycnt;
488 LONG linebytes;
489 LONG bytecnt;
490 LONG pixelbytes;
491 UBYTE *shape;
492 linebytes = SVGA_PIXMAP_SCANLINE_SIZE(data->mouse.width, data->data.bitsperpixel)*4;
493 pixelbytes = (data->data.bitsperpixel+3)/8;
494 shape = data->mouse.shape;
495 for (ycnt=0;ycnt<data->mouse.height;ycnt++)
497 for (xcnt=0;xcnt<data->mouse.width;xcnt++)
499 HIDDT_Pixel pixel;
500 pixel = HIDD_BM_GetPixel(msg->shape, xcnt, ycnt);
501 if (pixfmt == vHidd_StdPixFmt_LUT8)
503 if (HIDD_CM_GetColor(colmap, pixel, &color))
505 pixel =
507 (((color.red <<16)>>mask_to_shift(data->data.redmask)) & data->data.redmask )+
508 (((color.green<<16)>>mask_to_shift(data->data.greenmask)) & data->data.greenmask)+
509 (((color.blue <<16)>>mask_to_shift(data->data.bluemask)) & data->data.bluemask )
513 if (pixelbytes == 1)
515 *((UBYTE *)shape) = (UBYTE)pixel;
516 shape++;
518 else if (pixelbytes == 2)
520 *((UWORD *)shape) = (UWORD)pixel;
521 shape += 2;
523 else if (pixelbytes == 4)
525 *((ULONG *)shape) = (ULONG)pixel;
526 shape += 4;
529 for (bytecnt=linebytes-(data->mouse.width*pixelbytes);bytecnt;bytecnt--)
531 *((UBYTE *)shape) = 0; /* fill up to long boundary */
532 shape++;
535 defineCursorVMWareGfx(&XSD(cl)->data, &data->mouse);
536 return TRUE;
538 #endif
540 return FALSE;
543 BOOL VMWareGFX__Hidd_Gfx__SetCursorPos(OOP_Class *cl, OOP_Object *o, struct pHidd_Gfx_SetCursorPos *msg) {
544 struct Box box;
546 XSD(cl)->mouse.x = msg->x;
547 XSD(cl)->mouse.y = msg->y;
548 if (XSD(cl)->mouse.x<0)
549 XSD(cl)->mouse.x=0;
550 if (XSD(cl)->mouse.y<0)
551 XSD(cl)->mouse.y=0;
552 #warning "check visible width/height"
553 moveCursorVMWareGfx(&XSD(cl)->data, msg->x, msg->y);
554 return TRUE;
557 VOID VMWareGFX__Hidd_Gfx__SetCursorVisible(OOP_Class *cl, OOP_Object *o, struct pHidd_Gfx_SetCursorVisible *msg) {
559 XSD(cl)->mouse.visible = msg->visible;
560 displayCursorVMWareGfx(&XSD(cl)->data, msg->visible ? 1 : 0);
564 static int VMWareGfx_InitStatic(LIBBASETYPEPTR LIBBASE)
566 EnterFunc(bug("VMWareGfx_InitStatic\n"));
568 LIBBASE->vsd.mouse.x=0;
569 LIBBASE->vsd.mouse.y=0;
570 LIBBASE->vsd.mouse.shape = NULL;
572 if (!OOP_ObtainAttrBases(attrbases))
574 D(bug("VMWareGfx_InitStatic attrbases init failed\n"));
575 return FALSE;
578 D(bug("VMWareGfx_InitStatic ok\n"));
580 ReturnInt("VMWareGfx_InitStatic", UNLONG, TRUE);
583 static int VMWareGfx_ExpungeStatic(LIBBASETYPEPTR LIBBASE)
585 EnterFunc(bug("VMWareGfx_ExpungeStatic\n"));
587 OOP_ReleaseAttrBases(attrbases);
588 ReturnInt("VMWareGfx_ExpungeStatic", int, TRUE);
591 ADD2INITLIB(VMWareGfx_InitStatic, 0)
592 ADD2EXPUNGELIB(VMWareGfx_ExpungeStatic, 0)