Hello Mathias > extern ULONG HookEntry( struct Hook *hookPtr, Object *obj, APTR message > );
> I let the DoSuperNew function because it may be useful for people, as > this function is not in the amiga.lib from SAS/C. Just for information and especially for MUI programming, which lives with hooks. There is a new way of very easy defining Hooks, Library functions (for classes), Interrupts, Handler,... without getting trouble when changing the compiler, the target OS or even the target cpu (68K<->PPC). Just take a look onto the official source forge page for those headers. http://cvs.sourceforge.net/viewcvs.py/sditools/sditools/headers To define a simple NList hook for example you do this: (Taken from MMKeyboard source) #include <SDI_hook.h> /************************************************************************ Some MUI DisplayHook Magic /*********************************************************************** HOOKPROTO(MUIDisplayKeChVendor, ULONG, Object *obj, struct NList_DisplayMessage *ndm) { struct Vendor *vendor; if( (vendor = (APTR) ndm->entry) ) { ndm->preparses[0] = MUIX_LEFT; ndm->strings[0] = &vendor->Name[0]; /* setup title * } else { ndm->preparses[0] = MUIX_WHITECENTER; ndm->strings[0] = Locale_GetString( MSG_LV_Vendor ); } return(0); } MakeHook(MUIDisplayKeChVendor_hook, MUIDisplayKeChVendor); By referring to &MUIDisplayKeChVendor_hook you have the hook structure. There is no need to think about the used OS, the used CPU or the current compiler. It's as easy for interrupt, lib functions, handlers, ... Take a look on this stuff. I promise it will speedup developing a lot. I someone is updating the mui builder I would suggest to create those macros in by default. Guido Mersmann http://www.geit.de ------------------------ Yahoo! Groups Sponsor --------------------~--> Has someone you know been affected by illness or disease? Network for Good is THE place to support health awareness efforts! http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/16uqlB/TM --------------------------------------------------------------------~-> Visit http://www.amiga.dk/tumult for MUI-related information, especially about MUI custom classes. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/MUI/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
