home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Developer CD v1.2
/
amidev_cd_12.iso
/
devcon
/
milan_1991
/
devcon91.3
/
debug
/
debugger
/
s
/
wack
/
intuition.macros
< prev
next >
Wrap
Text File
|
1992-09-01
|
19KB
|
476 lines
;intuition.macros V1.10
;INTUITION IntuitionBase structure
(macro IntuitionBase
(Node (@l (+ (@l 4) 17a))) ;ExecBase.LibList
(while (and (!= (strcmp (@l ln_Name) "intuition.library") 0)
(!= (@l ln_Succ) 0))
(Node (@l ln_Succ)))
(addsymbol ib_LibNode ln_Succ)
(addsymbol ib_ViewLord (+ ib_LibNode 22))
(addsymbol ib_ActiveWindow (+ ib_ViewLord 12))
(addsymbol ib_ActiveScreen (+ ib_ActiveWindow 4))
(addsymbol ib_FirstScreen (+ ib_ActiveScreen 4))
(addsymbol ib_Flags (+ ib_FirstScreen 4))
(addsymbol ib_MouseY (+ ib_Flags 4))
(addsymbol ib_MouseX (+ ib_MouseY 2))
(addsymbol ib_Seconds (+ ib_MouseX 2))
(addsymbol ib_Micros (+ ib_Seconds 4))
(addsymbol ib_MinXMouse (+ ib_Micros 4))
(addsymbol ib_MaxXMouse (+ ib_MinXMouse 2))
(addsymbol ib_MinYMouse (+ ib_MaxXMouse 2))
(addsymbol ib_MaxYMouse (+ ib_MinYMouse 2))
(addsymbol ib_StartSecs (+ ib_MaxYMouse 2))
(addsymbol ib_StartMicros (+ ib_StartSecs 4))
(addsymbol ib_SysBase (+ ib_StartMicros 4))
(addsymbol ib_GfxBase (+ ib_SysBase 4))
(addsymbol ib_LayersBase (+ ib_GfxBase 4))
(addsymbol ib_ConsoleDevice (+ ib_LayersBase 4))
(addsymbol ib_APointer (+ ib_ConsoleDevice 4))
(addsymbol ib_APtrHeight (+ ib_APointer 4))
(addsymbol ib_APtrWidth (+ ib_APtrHeight 1))
(addsymbol ib_AXOffset (+ ib_APtrWidth 1))
(addsymbol ib_AYOffset (+ ib_AXOffset 1))
(addsymbol ib_MenuDrawn (+ ib_AYOffset 1))
(addsymbol ib_MenuSelected (+ ib_MenuDrawn 2))
(addsymbol ib_OptionList (+ ib_MenuSelected 2))
(addsymbol ib_MenuRPort (+ ib_OptionList 2))
(addsymbol ib_MenuTmpRas (+ ib_MenuRPort 64))
(addsymbol ib_ItemCRect (+ ib_MenuTmpRas 8))
(addsymbol ib_SubCRect (+ ib_ItemCRect 24))
(addsymbol ib_IBitMap (+ ib_SubCRect 24))
(addsymbol ib_SBitMap (+ ib_IBitMap 28))
(addsymbol ib_InputRequest (+ ib_SBitMap 28))
(addsymbol ib_InputInterrupt (+ ib_InputRequest 30))
(addsymbol ib_EventKey (+ ib_InputInterrupt 16))
(addsymbol ib_IEvents (+ ib_EventKey 4))
(addsymbol ib_EventCount (+ ib_IEvents 4))
(addsymbol ib_IEBuffer (+ ib_EventCount 2))
(addsymbol ib_ActiveGadget (+ ib_IEBuffer 58))
(addsymbol ib_ActivePInfo (+ ib_ActiveGadget 4))
(addsymbol ib_ActiveImage (+ ib_ActivePInfo 4))
(addsymbol ib_GadgetEnv (+ ib_ActiveImage 4))
(addsymbol ib_GadgetInfo (+ ib_GadgetEnv 2a))
(addsymbol ib_KnobOffset (+ ib_GadgetInfo 24))
(addsymbol ib_getOKWindow (+ ib_KnobOffset 4))
(addsymbol ib_getOKMessage (+ ib_getOKWindow 4))
(addsymbol ib_setWExcept (+ ib_getOKMessage 4))
(addsymbol ib_GadgetReturn (+ ib_setWExcept 2))
(addsymbol ib_StateReturn (+ ib_GadgetReturn 2))
(addsymbol ib_RP (+ ib_StateReturn 2))
(addsymbol ib_ITmpRas (+ ib_RP 4))
(addsymbol ib_OldClipRegion (+ ib_ITmpRas 8))
(addsymbol ib_OldScroll (+ ib_OldClipRegion 4))
(addsymbol ib_IFrame (+ ib_OldScroll 4))
(addsymbol ib_hthick (+ ib_IFrame 8))
(addsymbol ib_vthick (+ ib_hthick 2))
(addsymbol ib_frameChange (+ ib_vthick 2))
(addsymbol ib_sizeDrag (+ ib_frameChange 4))
(addsymbol ib_FirstPt (+ ib_sizeDrag 4))
(addsymbol ib_OldPt (+ ib_FirstPt 4))
(addsymbol ib_SysGadgets (+ ib_OldPt 4))
(addsymbol ib_CheckImage (+ ib_SysGadgets 40))
(addsymbol ib_AmigaIcon (+ ib_CheckImage 8))
(addsymbol ib_apattern (+ ib_AmigaIcon 8))
(addsymbol ib_bpattern (+ ib_apattern 10))
(addsymbol ib_IPointer (+ ib_bpattern 8))
(addsymbol ib_IPtrHeight (+ ib_IPointer 4))
(addsymbol ib_IPtrWidth (+ ib_IPtrHeight 1))
(addsymbol ib_IXOffset (+ ib_IPtrWidth 1))
(addsymbol ib_IYOffset (+ ib_IXOffset 1))
(addsymbol ib_DoubleSeconds (+ ib_IYOffset 1))
(addsymbol ib_DoubleMicros (+ ib_DoubleSeconds 4))
(addsymbol ib_WBorLeft (+ ib_DoubleMicros 4))
(addsymbol ib_WBorTop (+ ib_WBorLeft 2))
(addsymbol ib_WBorRight (+ ib_WBorTop 2))
(addsymbol ib_WBorBottom (+ ib_WBorRight 2))
(addsymbol ib_BarVBorder (+ ib_WBorBottom 2))
(addsymbol ib_BarHBorder (+ ib_BarVBorder 2))
(addsymbol ib_MenuVBorder (+ ib_BarHBorder 2))
(addsymbol ib_MenuHBorder (+ ib_MenuVBorder 2))
(addsymbol ib_color0 (+ ib_MenuHBorder 2))
(addsymbol ib_color1 (+ ib_color0 2))
(addsymbol ib_color2 (+ ib_color1 2))
(addsymbol ib_color3 (+ ib_color2 2))
(addsymbol ib_color17 (+ ib_color3 2))
(addsymbol ib_color18 (+ ib_color17 2))
(addsymbol ib_color19 (+ ib_color18 2))
(addsymbol ib_SysFont (+ ib_color19 2))
(addsymbol ib_Preferences (+ ib_SysFont 8))
(addsymbol ib_Echoes (+ ib_Preferences 4))
(addsymbol ib_ViewInitX (+ ib_Echoes 4))
(addsymbol ib_ViewInitY (+ ib_ViewInitX 2))
(addsymbol ib_CursorDX (+ ib_ViewInitY 2))
(addsymbol ib_CursorDY (+ ib_CursorDX 2))
(addsymbol ib_KeyMap (+ ib_CursorDY 2))
(addsymbol ib_MouseYMinimum (+ ib_KeyMap 4))
(addsymbol ib_ErrorX (+ ib_MouseYMinimum 2))
(addsymbol ib_ErrorY (+ ib_ErrorX 2))
(addsymbol ib_IOExcess (+ ib_ErrorY 2))
(addsymbol ib_HoldMinYMouse (+ ib_IOExcess 28))
(addsymbol ib_WBPort (+ ib_HoldMinYMouse 2))
(addsymbol ib_iqd_FNKUHDPort (+ ib_WBPort 4))
(addsymbol ib_WBMessage (+ ib_iqd_FNKUHDPort 4))
(addsymbol ib_HitScreen (+ ib_WBMessage 34))
(addsymbol ib_SimpleSprite (+ ib_HitScreen 4))
(addsymbol ib_AttachedSSprite (+ ib_SimpleSprite 4))
(addsymbol ib_GotSprite1 (+ ib_AttachedSSprite 4))
(addsymbol ib_SemaphoreList (+ ib_GotSprite1 2))
(addsymbol ib_ISemaphore (+ ib_SemaphoreList e))
(addsymbol ib_MaxDisplayHeight (+ ib_ISemaphore 142))
(addsymbol ib_MaxDisplayRow (+ ib_MaxDisplayHeight 2))
(addsymbol ib_MaxDisplayWidth (+ ib_MaxDisplayRow 2))
(addsymbol ib_Reserved (+ ib_MaxDisplayWidth 2))
)
;INTUITION Screen structure
(macro Screen
(if (!= (nargs) 0)
(addsymbol s_NextScreen (arg 1))
(addsymbol s_NextScreen (current)))
(addsymbol s_FirstWindow (+ s_NextScreen 4))
(addsymbol s_LeftEdge (+ s_FirstWindow 4))
(addsymbol s_TopEdge (+ s_LeftEdge 2))
(addsymbol s_Width (+ s_TopEdge 2))
(addsymbol s_Height (+ s_Width 2))
(addsymbol s_MouseY (+ s_Height 2))
(addsymbol s_MouseX (+ s_MouseY 2))
(addsymbol s_Flags (+ s_MouseX 2))
(addsymbol s_Title (+ s_Flags 2))
(addsymbol s_DefaultTitle (+ s_Title 4))
(addsymbol s_BarHeight (+ s_DefaultTitle 4))
(addsymbol s_BarVBorder (+ s_BarHeight 1))
(addsymbol s_BarHBorder (+ s_BarVBorder 1))
(addsymbol s_MenuVBorder (+ s_BarHBorder 1))
(addsymbol s_MenuHBorder (+ s_MenuVBorder 1))
(addsymbol s_WBorTop (+ s_MenuHBorder 1))
(addsymbol s_WBorLeft (+ s_WBorTop 1))
(addsymbol s_WBorRight (+ s_WBorLeft 1))
(addsymbol s_WBorBottom (+ s_WBorRight 1))
(addsymbol s_Font (+ s_WBorBottom 2))
(addsymbol s_ViewPort (+ s_Font 4))
(addsymbol s_RastPort (+ s_ViewPort 28))
(addsymbol s_BitMap (+ s_RastPort 64))
(addsymbol s_LayerInfo (+ s_BitMap 28))
(addsymbol s_FirstGadget (+ s_LayerInfo 66))
(addsymbol s_DetailPen (+ s_FirstGadget 4))
(addsymbol s_BlockPen (+ s_DetailPen 1))
(addsymbol s_SaveColor0 (+ s_BlockPen 1))
(addsymbol s_BarLayer (+ s_SaveColor0 2))
(addsymbol s_ExtData (+ s_BarLayer 4))
(addsymbol s_UserData (+ s_ExtData 4))
)
;INTUITION Window structure
(macro Window
(if (!= (nargs) 0)
(addsymbol w_NextWindow (arg 1))
(addsymbol w_NextWindow (current)))
(addsymbol w_LeftEdge (+ w_NextWindow 4))
(addsymbol w_TopEdge (+ w_LeftEdge 2))
(addsymbol w_Width (+ w_TopEdge 2))
(addsymbol w_Height (+ w_Width 2))
(addsymbol w_MouseY (+ w_Height 2))
(addsymbol w_MouseX (+ w_MouseY 2))
(addsymbol w_MinWidth (+ w_MouseX 2))
(addsymbol w_MinHeight (+ w_MinWidth 2))
(addsymbol w_MaxWidth (+ w_MinHeight 2))
(addsymbol w_MaxHeight (+ w_MaxWidth 2))
(addsymbol w_Flags (+ w_MaxHeight 2))
(addsymbol w_MenuStrip (+ w_Flags 4))
(addsymbol w_Title (+ w_MenuStrip 4))
(addsymbol w_FirstRequest (+ w_Title 4))
(addsymbol w_DMRequest (+ w_FirstRequest 4))
(addsymbol w_ReqCount (+ w_DMRequest 4))
(addsymbol w_WScreen (+ w_ReqCount 2))
(addsymbol w_RPort (+ w_WScreen 4))
(addsymbol w_BorderLeft (+ w_RPort 4))
(addsymbol w_BorderTop (+ w_BorderLeft 1))
(addsymbol w_BorderRight (+ w_BorderTop 1))
(addsymbol w_BorderBottom (+ w_BorderRight 1))
(addsymbol w_BorderRPort (+ w_BorderBottom 1))
(addsymbol w_FirstGadget (+ w_BorderRPort 4))
(addsymbol w_Parent (+ w_FirstGadget 4))
(addsymbol w_Descendant (+ w_Parent 4))
(addsymbol w_Pointer (+ w_Descendant 4))
(addsymbol w_PtrHeight (+ w_Pointer 4))
(addsymbol w_PtrWidth (+ w_PtrHeight 1))
(addsymbol w_XOffset (+ w_PtrWidth 1))
(addsymbol w_YOffset (+ w_XOffset 1))
(addsymbol w_IDCMPFlags (+ w_YOffset 1))
(addsymbol w_UserPort (+ w_IDCMPFlags 4))
(addsymbol w_WindowPort (+ w_UserPort 4))
(addsymbol w_MessageKey (+ w_WindowPort 4))
(addsymbol w_DetailPen (+ w_MessageKey 4))
(addsymbol w_BlockPen (+ w_DetailPen 1))
(addsymbol w_CheckMark (+ w_BlockPen 1))
(addsymbol w_ScreenTitle (+ w_CheckMark 4))
(addsymbol w_GZZMouseX (+ w_ScreenTitle 4))
(addsymbol w_GZZMouseY (+ w_GZZMouseX 2))
(addsymbol w_GZZWidth (+ w_GZZMouseY 2))
(addsymbol w_GZZHeight (+ w_GZZWidth 2))
(addsymbol w_ExtData (+ w_GZZHeight 2))
(addsymbol w_UserData (+ w_ExtData 4))
(addsymbol w_WLayer (+ w_UserData 4))
(addsymbol w_IFont (+ w_WLayer 4))
)
;INTUITION Menu structure
(macro Menu
(if (!= (nargs) 0)
(addsymbol m_NextMenu (arg 1))
(addsymbol m_NextMenu (current)))
(addsymbol m_LeftEdge (+ m_NextMenu 4))
(addsymbol m_TopEdge (+ m_LeftEdge 2))
(addsymbol m_Width (+ m_TopEdge 2))
(addsymbol m_Height (+ m_Width 2))
(addsymbol m_Flags (+ m_Height 2))
(addsymbol m_MenuName (+ m_Flags 2))
(addsymbol m_FirstItem (+ m_MenuName 4))
(addsymbol m_JazzX (+ m_FirstItem 4))
(addsymbol m_JazzY (+ m_JazzX 2))
(addsymbol m_BeatX (+ m_JazzY 2))
(addsymbol m_BeatY (+ m_BeatX 2))
)
;INTUITION MenuItem structure
(macro MenuItem
(if (!= (nargs) 0)
(addsymbol mi_NextItem (arg 1))
(addsymbol mi_NextItem (current)))
(addsymbol mi_LeftEdge (+ mi_NextItem 4))
(addsymbol mi_TopEdge (+ mi_LeftEdge 2))
(addsymbol mi_Width (+ mi_TopEdge 2))
(addsymbol mi_Height (+ mi_Width 2))
(addsymbol mi_Flags (+ mi_Height 2))
(addsymbol mi_MutualExclude (+ mi_Flags 2))
(addsymbol mi_ItemFill (+ mi_MutualExclude 4))
(addsymbol mi_SelectFill (+ mi_ItemFill 4))
(addsymbol mi_Command (+ mi_SelectFill 4))
(addsymbol mi_SubItem (+ mi_Command 1))
(addsymbol mi_NextSelect (+ mi_SubItem 4))
)
;INTUITION Gadget structure
(macro Gadget
(if (!= (nargs) 0)
(addsymbol g_NextGadget (arg 1))
(addsymbol g_NextGadget (current)))
(addsymbol g_LeftEdge (+ g_NextGadget 4))
(addsymbol g_TopEdge (+ g_LeftEdge 2))
(addsymbol g_Width (+ g_TopEdge 2))
(addsymbol g_Height (+ g_Width 2))
(addsymbol g_Flags (+ g_Height 2))
(addsymbol g_Activation (+ g_Flags 2))
(addsymbol g_GadgetType (+ g_Activation 2))
(addsymbol g_GadgetRender (+ g_GadgetType 2))
(addsymbol g_SelectRender (+ g_GadgetRender 4))
(addsymbol g_GadgetText (+ g_SelectRender 4))
(addsymbol g_MutualExclude (+ g_GadgetText 4))
(addsymbol g_SpecialInfo (+ g_MutualExclude 4))
(addsymbol g_GadgetID (+ g_SpecialInfo 4))
(addsymbol g_UserData (+ g_GadgetID 2))
)
;INTUITION IntuiText structure
(macro IntuiText
(if (!= (nargs) 0)
(addsymbol it_FrontPen (arg 1))
(addsymbol it_FrontPen (current)))
(addsymbol it_BackPen (+ it_FrontPen 1))
(addsymbol it_DrawMode (+ it_BackPen 1))
(addsymbol it_LeftEdge (+ it_DrawMode 2))
(addsymbol it_TopEdge (+ it_LeftEdge 2))
(addsymbol it_ITextFont (+ it_TopEdge 2))
(addsymbol it_IText (+ it_ITextFont 4))
(addsymbol it_NextText (+ it_IText 4))
)
;INTUITION Image structure
(macro Image
(if (!= (nargs) 0)
(addsymbol i_LeftEdge (arg 1))
(addsymbol i_LeftEdge (current)))
(addsymbol i_TopEdge (+ i_LeftEdge 2))
(addsymbol i_Width (+ i_TopEdge 2))
(addsymbol i_Height (+ i_Width 2))
(addsymbol i_Depth (+ i_Height 2))
(addsymbol i_ImageData (+ i_Depth 2))
(addsymbol i_PlanePick (+ i_ImageData 4))
(addsymbol i_PlaneOnOff (+ i_PlanePick 1))
(addsymbol i_NextImage (+ i_PlaneOnOff 1))
)
;show some important IntuitionBase members
(macro ibase
(IntuitionBase)
(print "IntuitionBase at %8lx Flags: $%08lx\n"
ib_LibNode (@l ib_Flags))
(print "setWExcept: $%04lx GadgetReturn: $%04lx StateReturn: $%04lx\n"
(@ ib_setWExcept) (@ ib_GadgetReturn) (@ ib_StateReturn))
(print "SemaphoreList at %8lx\n\n" ib_SemaphoreList)
(print "Mouse X/Y %ld/%ld\n" (@ ib_MouseX) (@ ib_MouseY))
(print " Minimum X/Y %ld/%ld Maximum X/Y %ld/%ld\n"
(@ ib_MinXMouse) (@ ib_MinYMouse) (@ ib_MaxXMouse) (@ ib_MaxYMouse))
(print "ActivePointer at %8lx\n" (@l ib_APointer))
(print " Width/Height %ld, %ld AX/YOffset %d, %d\n\n"
(@b ib_APtrWidth) (@b ib_APtrHeight) (@b ib_AXOffset) (@b ib_AYOffset))
(print "View at %8lx FirstScreen at %8lx\n"
ib_ViewLord (@l ib_FirstScreen))
(print "ActiveScreen at %8lx ActiveWindow at %8lx\n\n"
(@l ib_ActiveScreen) (@l ib_ActiveWindow))
(print "ActiveGadget at %8lx\n" (@l ib_ActiveGadget))
(print "ActivePInfo at %8lx ActiveImage at %8lx\n"
(@l ib_ActivePInfo) (@l ib_ActiveImage))
(print "GadgetEnv at %8lx GadgetInfo at %8lx\n\n"
ib_GadgetEnv ib_GadgetInfo)
(print "MenuDrawn: $%04lx MenuSelected: $%04lx\n"
(@ ib_MenuDrawn) (@ ib_MenuSelected))
(print "MenuRPort at %8lx\n" ib_MenuRPort)
(print "ItemCRect at %8lx SubCRect at %8lx\n"
ib_ItemCRect ib_SubCRect)
(print "IBitMap at %8lx SBitMap at %8lx\n"
ib_IBitMap ib_SBitMap)
)
;format given address or current frame as a Screen structure
(macro screen
(if (!= (nargs) 0)
(Screen (arg 1))
(Screen (current)))
(print "Screen %8lx\n" s_NextScreen)
(print "Flags: $%04lx, NextScreen at %8lx, FirstWindow at %8lx\n"
(@ s_Flags) (@l s_NextScreen) (@l s_FirstWindow))
(print "LayerInfo at %8lx, ViewPort at %8lx\n" s_LayerInfo s_ViewPort)
)
;format given address or current frame as a Window structure
(macro window
(if (!= (nargs) 0)
(Window (arg 1))
(Window (current)))
(print "Window '%s' at %8lx\n" (@l w_Title) w_NextWindow)
(print "Left/Top/Width/Height: %ld/%ld/%ld/%ld\n"
(@ w_LeftEdge) (@ w_TopEdge) (@ w_Width) (@ w_Height))
(print "Minimum Width/Height: %ld/%ld\n" (@ w_MinWidth) (@ w_MinHeight))
(print "Maximum Width/Height: %ld/%ld\n" (@ w_MaxWidth) (@ w_MaxHeight))
(print "Title %8lx, NextWindow at %8lx\n"
(@l w_Title) (@l w_NextWindow))
(print "WScreen at %8lx, RPort at %8lx, WLayer at %8lx\n"
(@l w_WScreen) (@l w_RPort) (@l w_WLayer))
(print "Flags: $%08lx, Mouse X/Y: %ld/%ld\n"
(@l w_Flags) (@ w_MouseX) (@ w_MouseY))
(print "ReqCount: %4lx, FirstRequest at %8lx, DMRequest at %8lx\n"
(@ w_ReqCount) (@l w_FirstRequest) (@l w_DMRequest))
(print "Parent at %8lx, Descendant at %8lx\n"
(@l w_Parent) (@l w_Descendant))
(print "IDCMPFlags: $%08lx, IDCMP user port at %8lx\n"
(@l w_IDCMPFlags) (@l w_UserPort))
(print "MenuStrip at %8lx, FirstGadget at %8lx\n"
(@l w_MenuStrip) (@l w_FirstGadget))
(print "Border Left/Top/Right/Bottom: %ld/%ld/%ld/%ld\n" (@b w_BorderLeft)
(@b w_BorderTop) (@b w_BorderRight) (@b w_BorderBottom))
(print "BorderRPort at %8lx\n" (@l w_BorderRPort))
)
;format given address or current frame as a Menu structure
(macro menu
(if (!= (nargs) 0)
(Menu (arg 1))
(Menu (current)))
(print "Menu '%s' at %8lx\n" (@l m_MenuName) m_NextMenu)
(print "NextMenu at %8lx\n" (@l m_NextMenu))
(print "Left/Top/Width/Height: %ld/%ld/%ld/%ld\n"
(@ m_LeftEdge) (@ m_TopEdge) (@ m_Width) (@ m_Height ))
(print "Flags: %04lx\n" (@ m_Flags))
(print "MenuName at %8lx\n" (@l m_MenuName))
(print "FirstItem at %8lx\n" (@l m_FirstItem))
(print "JazzX/Y: %ld/%ld, BeatX/Y: %ld/%ld\n"
(@ m_JazzX) (@ m_JazzY) (@ m_BeatX) (@ m_BeatY))
)
;format given address or current frame as a linked list of Menu structures
(macro menus
(for (if (!= (nargs) 0) (menu (arg 1)) (menu))
(!= (@l m_NextMenu) 0) ((print "\n") menu (@l m_NextMenu)))
)
;format given address or current frame as a MenuItem structure
(macro menuitem
(if (!= (nargs) 0)
(MenuItem (arg 1))
(MenuItem (current)))
(print "MenuItem at %8lx\n" mi_NextItem)
(print "NextItem at %8lx, SubItem at %8lx\n"
(@l mi_NextItem) (@l mi_SubItem))
(print "Left/Top/Width/Height: %ld/%ld/%ld/%ld\n"
(@ mi_LeftEdge) (@ mi_TopEdge) (@ mi_Width) (@ mi_Height ))
(print "Flags: %04lx, MutualExclude: %8lx\n"
(@ mi_Flags) (@l mi_MutualExclude))
(print "ItemFill: %8lx, SelectFill: %8lx\n"
(@l mi_ItemFill) (@l mi_SelectFill))
)
;format given address or current frame as a linked list of MenuItem structures
(macro menuitems
(for (if (!= (nargs) 0) (menuitem (arg 1)) (menuitem))
(!= (@l mi_NextItem) 0) ((print "\n") menuitem (@l mi_NextItem)))
)
;format given address or current frame as a Gadget structure
(macro gadget
(if (!= (nargs) 0)
(Gadget (arg 1))
(Gadget (current)))
(print "Gadget at %8lx, ID: %04lx\n" g_NextGadget (@ g_GadgetID))
(print "NextGadget at %8lx\n" (@l g_NextGadget))
(print "Left/Top/Width/Height: %ld/%ld/%ld/%ld\n"
(@ g_LeftEdge) (@ g_TopEdge) (@ g_Width) (@ g_Height))
(print "Flags: %04lx, Activation: %04lx, GadgetType: %04lx\n"
(@ g_Flags) (@ g_Activation) (@ g_GadgetType))
(print "GadgetRender %8lx, SelectRender %8lx\n"
(@l g_GadgetRender) (@l g_SelectRender))
(print "SpecialInfo at %8lx\n" (@l g_SpecialInfo))
(print "UserData at %8lx\n" (@l g_UserData))
)
;format given address or current frame as a linked list of Gadget structures
(macro gadgets
(for (if (!= (nargs) 0) (gadget (arg 1)) (gadget))
(!= (@l g_NextGadget) 0) ((print "\n") gadget (@l g_NextGadget)))
)
;format given address or current frame as an IntuiText structure
(macro itext
(if (!= (nargs) 0)
(IntuiText (arg 1))
(IntuiText (current)))
(print "IntuiText '%s' at %8lx\n" (@l it_IText) it_FrontPen)
(print "LeftEdge: %ld, TopEdge: %ld\n" (@ it_LeftEdge) (@ it_TopEdge))
(print "FrontPen: %02lx, BackPen: %02lx, DrawMode: %02lx\n"
(@b it_FrontPen) (@b it_BackPen) (@b it_DrawMode))
(print "Next Text at: %8lx\n" (@l it_NextText))
)
;format given address or current frame as an Image structure
(macro image
(if (!= (nargs) 0)
(Image (arg 1))
(Image (current)))
(print "Image at %8lx\n" i_LeftEdge)
(print "Left/Top/Width/Height: %ld/%ld/%ld/%ld\n"
(@ i_LeftEdge) (@ i_TopEdge) (@ i_Width) (@ i_Height ))
(print "Depth: %ld, ImageData at %8lx\n" (@ i_Depth) (@l i_ImageData))
(print "PlanePick: %ld, PlaneOnOff: %ld\n"
(@b i_PlanePick) (@b i_PlaneOnOff))
(print "Next Image at: %8lx\n" (@l i_NextImage))
)