wip prep commit in lieu of gfx subsystem update changes, part 2.
[AROS.git] / rom / hidds / gfx / gfx_hwclass.c
blobe2e707b28950ea4190987f6201c8a72656742110
1 /*
2 Copyright (C) 2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "gfx_debug.h"
8 #include <oop/oop.h>
9 #include <utility/tagitem.h>
11 #include "gfx_intern.h"
13 OOP_Object *GFXHW__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *msg)
15 bug("[HWGfx] csd @ 0x%p\n", CSD(cl));
17 if (!CSD(cl)->gfxhwinstance)
19 struct TagItem new_tags[] =
21 {aHW_ClassName, (IPTR)"Display Hardware"},
22 {TAG_DONE , 0 }
24 struct pRoot_New new_msg =
26 .mID = msg->mID,
27 .attrList = new_tags
30 bug("[HWGfx] Instantiating...\n");
31 CSD(cl)->gfxhwinstance = (OOP_Object *)OOP_DoSuperMethod(cl, o, &new_msg.mID);
34 bug("[HWGfx] returning 0x%p\n", CSD(cl)->gfxhwinstance);
36 return CSD(cl)->gfxhwinstance;
39 VOID GFXHW__Root__Dispose(OOP_Class *cl, OOP_Object *o, OOP_Msg msg)
41 /* We are singletone. Cannot dispose. */