2 * Amiga Generic Set - set of libraries and includes to ease sw development for all Amiga platforms
3 * Copyright (C) 2001-2011 Tomasz Wiszkowski Tomasz.Wiszkowski at gmail.com.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef _GENERIC_MUICUSTOMCLASS_H_
21 #define _GENERIC_MUICUSTOMCLASS_H_
23 #include "GenericMUI.h"
25 #include <intuition/classusr.h>
26 #include "Registers.h"
27 #include "LibrarySpool.h"
29 #include <libclass/intuition.h>
30 #include <libraries/mui.h>
35 * it is best to create the object that derives from the GenericOOP class
36 * simply replace DoMtd() with your own method to get the desired effect
41 class MUICustomClass
: public GenericMUI
44 virtual GenericOOP
*createObject(IClass
*cls
) = 0;
47 void *getDispatcher();
48 virtual unsigned long dispatch(IClass
*cls
, Object
* obj
, unsigned long *msg
);
51 MUI_CustomClass
*pMUIClass
;
55 MUICustomClass(const char *parent
);
56 virtual ~MUICustomClass();
57 Object
*Create(unsigned long lTag1
, ...);
60 #if defined (__AROS__)
61 AROS_UFP4(static IPTR
, FDispatchCaller
,
62 AROS_UFPA(struct IClass
*, pClass
, A0
),
63 AROS_UFPA(Object
*, pObject
, A2
),
64 AROS_UFPA(unsigned long *, pMessage
, A1
),
65 AROS_UFPA(APTR
, data
, A6
));
66 #elif defined (__AMIGAOS4__)
67 static unsigned long FDispatchCaller(IClass
*pClass
, Object
* pObject
, unsigned long *pMessage
);
68 #elif defined (__MORPHOS__)
69 static unsigned long FDispatchCallerFunc();
70 static const unsigned long FDispatchCaller
[2];
71 #elif defined (__mc68000)
72 static unsigned long FDispatchCaller();