From Wikibooks, open books for an open world
Jump to: navigation, search
Navbar for the Aros wikibook
Aros User Docs
Aros User Docs
Aros User FAQs
Aros User Applications
Aros User DOS Shell
Aros Dev Docs
Aros Developer Docs
Porting Software from AmigaOS/SDL
For Zune Beginners
Zune .MUI Classes
For SDL Beginners
Aros Developer BuildSystem
Specific platforms
Aros Intel AMD x86 Installing
Aros x86 Audio/Video Support
Aros x86 Network Support
Aros x86 Complete System HCL
Aros Storage Support IDE SATA etc
Aros Poseidon USB Support
x86-64 Support
Motorola 68k Amiga Support
Linux and FreeBSD Support
Windows Mingw and MacOSX Support
Android Support
Arm Raspberry Pi Support
PPC Power Architecture
Aros Public License


All muimaster library offsets after MUI_MakeObjectA() are incorrect. There should be 4 private entries between MUI_MakeObjectA and MUI_Layout(). NOTE: after MUI_Layout(), not MUI_MakeObjectA(), I was blind this time :) (Bernd Roesch noticed this in 2006, not much has happened..). You can always have multiple .conf files that get used depending on the specific port, or you could modify the build process to preprocess the files before parsing them, or...

This breaks all native m68k MUI custom classes (usually by corrupting the stack or crashing in some graphics library region routines, no wonder my debugging attempts didn't make any sense)

So, whats the solution without breaking all existing ports? Inject 4 fake entries just for the m68k port? and the PPC one too... even better, add an ifdef for AROS pre-ABIv1. I thought .conf files don't support port specific changes? (muimaster.conf needs 4 empty lines after MUI_Layout).

Can you do '#ifdef' in *.conf files?!

And, what about the AROS_LHx() macros that have the offset numbers in them? The offset numbers can be macros themselves. As for .conf files, I don't think you can (Staf?), but you could preprocess them with the normal preprocessor (again, Staf? :) No, but you can specify the conffile option to build_module. You should be able to do something like in the mmakefile.src (untested).

ifeq($(AROS_TARGET_CPU), m68k)
CONFFILE := muimaster_m68k.conf
CONFFILE := muimaster.conf

%build_module ...\

Or this ;-)

ifeq($(AROS_TARGET_CPU), i386)
CONFFILE := muimaster_i386.conf
CONFFILE := muimaster.conf


Object* MUI_NewObjectA(ClassID classid, struct TagItem* tags) (A0, A1)
void MUI_DisposeObject(Object* obj) (A0)

LONG MUI_RequestA(APTR app, APTR win, LONGBITS flags, CONST_STRPTR title, CONST_STRPTR gadgets, CONST_STRPTR format, APTR params) (D0, D1, D2, A0, A1, A2, A3)

APTR MUI_AllocAslRequest(unsigned long reqType, struct TagItem* tagList) (D0, A0)
BOOL MUI_AslRequest(APTR requester, struct TagItem* tagList) (A0, A1)
void MUI_FreeAslRequest(APTR requester) (A0)

LONG MUI_Error() ()
LONG MUI_SetError(LONG num) (D0)

struct IClass* MUI_GetClass(ClassID classid) (A0)
void MUI_FreeClass(Class* cl) (A0)

void MUI_RequestIDCMP(Object* obj, ULONG flags) (A0, D0)
void MUI_RejectIDCMP(Object* obj, ULONG flags) (A0, D0)

void MUI_Redraw(Object* obj, ULONG flags) (A0, D0)

struct MUI_CustomClass* MUI_CreateCustomClass(struct Library* base, ClassID supername, struct MUI_CustomClass* supermcc, ULONG datasize, APTR dispatcher) (A0, A1, A2, D0, A3)
BOOL MUI_DeleteCustomClass(struct MUI_CustomClass* mcc) (A0)

Object* MUI_MakeObjectA(LONG type, IPTR* params) (D0, A0)

BOOL MUI_Layout(Object* obj, LONG left, LONG top, LONG width, LONG height, ULONG flags) (A0, D0, D1, D2, D3, D4)

LONG MUI_ObtainPen(struct MUI_RenderInfo* mri, struct MUI_PenSpec* spec, ULONG flags) (A0, A1, D0)
void MUI_ReleasePen(struct MUI_RenderInfo* mri, LONG pen) (A0, D0)

APTR MUI_AddClipping(struct MUI_RenderInfo* mri, WORD left, WORD top, WORD width, WORD height) (A0, D0, D1, D2, D3)
void MUI_RemoveClipping(struct MUI_RenderInfo* mri, APTR handle) (A0, A1)
APTR MUI_AddClipRegion(struct MUI_RenderInfo* mri, struct Region* r) (A0, A1)
void MUI_RemoveClipRegion(struct MUI_RenderInfo* mri, APTR handle) (A0, A1)

BOOL MUI_BeginRefresh(struct MUI_RenderInfo* mri, ULONG flags) (A0, D0)
void MUI_EndRefresh(struct MUI_RenderInfo* mri, ULONG flags) (A0, D0)