kkaempf@rmi.UUCP (Klaus Kaempf) (02/13/88)
In article <896@ur-tut.UUCP> dpvc@ur-tut.UUCP (Davide P. Cervone) writes: > In article <4419@garfield.UUCP> > john13@garfield.UUCP (John Russell) writes: >> Right now it ought to be easily possible to determine >> which icons are selected by examining the gadget list of >> the Workbench backdrop window. This might require >> dragging icons onto the main WB window from inside their >> subdirectories though. > Nice idea, John, but unfortunately, WB does not use > standard gadgets. If you look at the WB backdrop window's > gadget list, you'll see it's NULL (use SB or something). I DO NOT RECOMMEND THAT YOU USE THE FOLLOWING PIECES OF INFORMATION FOR ANYTHING ELSE BUT EDUCATIONAL PURPOSES! USING IT IN ANY "REAL" PROGRAM IS EVEN WORSE THAN USING INTIUTION_PRIVATE AND IS THEREFORE STRONGLY DISCOURAGED!!! I won't cover this issue in detail, so if you do not understand it: FORGET THIS ARTICLE! Still got your Amiga Developers Package (uh, that's old!)? Or the MCC Macro Assembler? Check ":include/workbench" then. #define INTUITIONPRIVATE /* ... */ if(ib->WBPort != NULL) { offset = (ULONG)&wb->wb_IntuiPort - (ULONG)wb; wb = (struct WorkbenchBase *)((ULONG)ib->WBPort - offset); /* ... or use "offsetof()" if you've got one ... */ } Interesting members: The "Lists" and the "Pointers". This should be enough. If you understand it: Use it wisely to improve your knowledge of the system. Matt, please forgive me. I could have saved you some hassle when you had these workbench-problems writing your DOS-handler (have a look at the "ActiveDisk" structure), but back then I couldn't convince myself on releasing this dangerous little gem. Commodore: Please modify both IntuitionBase and WorkbenchBase in the next release!!! Break every program using undocumented features!!! !ralph Ralph Babel, Falkenweg 3, D-6204 Taunusstein, FRGermany