2 Copyright © 2003-2011, 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/alib.h>
18 #include <proto/exec.h>
19 #include <proto/dos.h>
20 #include <proto/intuition.h>
21 #include <proto/muimaster.h>
22 #include <proto/utility.h>
24 /*** Instance data **********************************************************/
33 /*** Methods ****************************************************************/
34 #define MUIM_Test_Dummy (TAG_USER | 0x42)
38 Class
*CLASS
, Object
*self
, struct opSet
*message
41 struct Test_DATA
*data
= NULL
;
43 self
= (Object
*) DoSuperMethodA(CLASS
, self
, (Msg
) message
);
44 if (self
== NULL
) goto error
;
46 data
= INST_DATA(CLASS
, self
);
59 IPTR Test__MUIM_Test_Dummy
61 Class
*CLASS
, Object
*self
, Msg message
64 struct Test_DATA
*data
= INST_DATA(CLASS
, self
);
67 Need to do *something* so that the compiler doesn't optimize away
68 this function call completely...
70 data
->td_Dummy1
+= data
->td_Dummy2
;
76 /*** Dispatcher *************************************************************/
77 BOOPSI_DISPATCHER(IPTR
, Test_Dispatcher
, CLASS
, self
, message
)
79 switch (message
->MethodID
)
81 case OM_NEW
: return (IPTR
) Test__OM_NEW(CLASS
, self
, (struct opSet
*) message
);
82 case MUIM_Test_Dummy
: return Test__MUIM_Test_Dummy(CLASS
, self
, message
);
83 default: return DoSuperMethodA(CLASS
, self
, message
);
90 /*** Setup ******************************************************************/
91 struct MUI_CustomClass
*Test_CLASS
;
93 BOOL
Test_Initialize()
95 Test_CLASS
= MUI_CreateCustomClass
97 NULL
, MUIC_Notify
, NULL
,
98 sizeof(struct Test_DATA
), Test_Dispatcher
101 if (Test_CLASS
!= NULL
) return TRUE
;
105 void Test_Deinitialize()
107 MUI_DeleteCustomClass(Test_CLASS
);
110 #define TestObject BOOPSIOBJMACRO_START(Test_CLASS->mcc_Class)