2 Copyright © 2003, The AROS Development Team. All rights reserved.
6 #define MUIMASTER_YES_INLINE_STDARG
13 #include <exec/types.h>
14 #include <utility/tagitem.h>
15 #include <libraries/mui.h>
17 #include <proto/exec.h>
18 #include <proto/dos.h>
19 #include <proto/intuition.h>
20 #include <proto/muimaster.h>
21 #include <proto/utility.h>
23 /*** Instance data **********************************************************/
32 /*** Methods ****************************************************************/
33 #define MUIM_Test_Dummy (TAG_USER | 0x42)
37 Class
*CLASS
, Object
*self
, struct opSet
*message
40 struct Test_DATA
*data
= NULL
;
42 self
= (Object
*) DoSuperMethodA(CLASS
, self
, (Msg
) message
);
43 if (self
== NULL
) goto error
;
45 data
= INST_DATA(CLASS
, self
);
58 IPTR Test__MUIM_Test_Dummy
60 Class
*CLASS
, Object
*self
, Msg message
63 struct Test_DATA
*data
= INST_DATA(CLASS
, self
);
66 Need to do *something* so that the compiler doesn't optimize away
67 this function call completely...
69 data
->td_Dummy1
+= data
->td_Dummy2
;
75 /*** Dispatcher *************************************************************/
76 BOOPSI_DISPATCHER(IPTR
, Test_Dispatcher
, CLASS
, self
, message
)
78 switch (message
->MethodID
)
80 case OM_NEW
: return (IPTR
) Test__OM_NEW(CLASS
, self
, (struct opSet
*) message
);
81 case MUIM_Test_Dummy
: return Test__MUIM_Test_Dummy(CLASS
, self
, message
);
82 default: return DoSuperMethodA(CLASS
, self
, message
);
89 /*** Setup ******************************************************************/
90 struct MUI_CustomClass
*Test_CLASS
;
92 BOOL
Test_Initialize()
94 Test_CLASS
= MUI_CreateCustomClass
96 NULL
, MUIC_Notify
, NULL
,
97 sizeof(struct Test_DATA
), Test_Dispatcher
100 if (Test_CLASS
!= NULL
) return TRUE
;
104 void Test_Deinitialize()
106 MUI_DeleteCustomClass(Test_CLASS
);
109 #define TestObject BOOPSIOBJMACRO_START(Test_CLASS->mcc_Class)