home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Assembler / CODEXASSEMBLERDEVSYSV1.1.DMS / in.adf / include / workbench / workbenchbase.i < prev   
Encoding:
Text File  |  1988-09-19  |  4.2 KB  |  176 lines

  1.  
  2.  
  3. *********************************************************************
  4. *
  5. * workbenchbase.i
  6. *
  7. * $Header: workbenchbase.i,v 31.4 85/09/04 01:02:46 neil Exp $
  8. *
  9. * $Locker:  $
  10. *
  11. *********************************************************************
  12.  
  13.     IFND    EXEC_TYPES_I
  14.     INCLUDE    "exec/types.i"
  15.     ENDC    !EXEC_TYPES_I
  16.  
  17.     IFND    EXEC_LISTS_I
  18.     INCLUDE    "exec/lists.i"
  19.     ENDC    !EXEC_LISTS_I
  20.  
  21.     IFND    EXEC_PORTS_I
  22.     INCLUDE    "exec/ports.i"
  23.     ENDC    !EXEC_PORTS_I
  24.  
  25.     IFND    EXEC_LIBRARIES_I
  26.     INCLUDE    "exec/libraries.i"
  27.     ENDC    !EXEC_LIBRARIES_I
  28.  
  29.     IFND    LIBRARIES_DOS_I
  30.     INCLUDE    "libraries/dos.i"
  31.     ENDC    !LIBRARIES_DOS_I
  32.  
  33.     IFND    GRAPHICS_RASTPORT_I
  34.     INCLUDE    "graphics/rastport.i"
  35.     ENDC    !GRAPHICS_RASTPORT_I
  36.  
  37.     IFND    DEVICES_TIMER_I
  38.     INCLUDE    "devices/timer.i"
  39.     ENDC    !DEVICES_TIMER_I
  40.  
  41.     IFND    INTUITION_INTUITION_I
  42.     INCLUDE    "intuition/intuition.i"
  43.     ENDC    !INTUITION_INTUITION_I
  44.  
  45. ; a pointer to the workbenchbase is kept in A5
  46. WBBASE    EQUR    A5
  47.  
  48. WBBUFSIZE    EQU    260
  49. PKT_LENGTH      EQU    10      ; allow five arguments
  50.  
  51. ; sendpkt uses this structure
  52.  STRUCTURE SendPacket,0
  53.     UWORD       sp_Type        ; for ioloop
  54.     STRUCT    sp_Message,MN_SIZE
  55.     UWORD       sp_pad
  56.     STRUCT      sp_Data,PKT_LENGTH*4
  57.     LABEL    SendPacket_SIZEOF
  58.  
  59.  
  60.  
  61.  STRUCTURE WorkbenchBase,0
  62.     STRUCT    wb_Library,LIB_SIZE
  63.  
  64.     ; the work bench status flags
  65.     UWORD    wb_Flags
  66.  
  67.     ; our three major lists.  Every object is on the master list.
  68.     ; The highlighted (selected) icons are on the select list.
  69.     ; all disks that we have "active" are on the active list.
  70.     STRUCT     wb_MasterList,LH_SIZE
  71.     STRUCT     wb_SelectList,LH_SIZE
  72.     STRUCT     wb_ActiveDisks,LH_SIZE
  73.     STRUCT     wb_UtilityList,LH_SIZE
  74.  
  75.     ; two string buffers to save us from allocating memory
  76.     ; THESE TWO BUFFERS MUST BE LONGWORD ALLIGNED
  77.     STRUCT    wb_Buf0,WBBUFSIZE
  78.     STRUCT    wb_Buf1,WBBUFSIZE
  79.     STRUCT    wb_SendPacket,SendPacket_SIZEOF
  80.  
  81.     ; longword allign this stuff
  82.     BYTE    wb_UpdateNestCnt
  83.     BYTE    wb_DiskIONestCnt
  84.  
  85.     ; all of our library bases
  86.     APTR    wb_SysBase
  87.     APTR    wb_GfxBase
  88.     APTR    wb_IntuitionBase
  89.     APTR    wb_IconBase
  90.     APTR    wb_DOSBase
  91.     APTR    wb_MathBase
  92.     APTR    wb_LayersBase
  93.     APTR    wb_TimerBase
  94.  
  95.     ; we really want the device list, but it changes too often
  96.     APTR    wb_DosInfo
  97.  
  98.     ; a pointer to a timer request, so we can free it later
  99.     APTR    wb_TimerRequest
  100.  
  101.     ; the mouse position of the last select press
  102.     UWORD    wb_XOffset
  103.     UWORD    wb_YOffset
  104.  
  105.     ; the base of the workbench object tree
  106.     APTR    wb_RootObject
  107.  
  108.     ; some current pointers -- some of these should be deleted
  109.     APTR    wb_CurrentGadget
  110.     APTR    wb_CurrentWindow
  111.     APTR    wb_CurrentObject
  112.  
  113.     ; alternate pointer images
  114.     APTR    wb_SelectPointer
  115.     APTR    wb_WaitPointer
  116.  
  117.     ; misc stuff
  118.     APTR    wb_MenuStrip
  119.     APTR    wb_CurrentError
  120.     ULONG    wb_LastFreeMem
  121.     APTR    wb_TextFont
  122.     APTR    wb_CoCurrent
  123.  
  124.     ; images must be in chip memory
  125.     STRUCT    wb_GadgetImage,ig_SIZEOF*4
  126.     STRUCT    wb_GadgetData,2*4*8
  127.  
  128.     ; two message ports -- one for intuition, and one for all reasonable
  129.     ; applications that let you allocate your messages yourself....
  130.     STRUCT    wb_WorkbenchPort,MP_SIZE
  131.     STRUCT    wb_IntuiPort,MP_SIZE
  132.  
  133.     ; the last time we saw a key-down
  134.     STRUCT    wb_Tick,TV_SIZE
  135.  
  136.     ; the screen title
  137.     STRUCT    wb_ScreenTitle,60
  138.  
  139.     ; what we need to paint text
  140.     STRUCT    wb_TextRast,rp_SIZEOF
  141.  
  142.     ; the argument that we were initialized with
  143.     ULONG        wb_Argument
  144.  
  145.     ; the workbench task
  146.     ULONG    wb_Task
  147.  
  148.     LABEL    wb_SIZEOF
  149.  
  150.  
  151.     ; flags in wb_Flags
  152.     BITDEF    WB,Shifted,15        ; the shift key is down
  153.     BITDEF    WB,Dragging,14        ; not used??
  154.     BITDEF    WB,DoubleClick,13    ; we just double clicked
  155.     BITDEF    WB,SpecialGadget,12    ; last gadget was special
  156.     BITDEF    WB,InputTrashed,11    ; Don't believe SELECTUP
  157.     BITDEF    WB,ErrorDisplayed,10    ; ErrorTitle is up
  158.     BITDEF    WB,NameChanged,9    ; NameChange win is up
  159.     BITDEF    WB,Closed,8        ; all windows closed
  160.     BITDEF    WB,KPrintfOK,7        ; OK to send kprintfs to serial port
  161.  
  162.     ; wb_Argument bits
  163.     BITDEF    WBARG,DEBUGON,1        ; turn on debugging menus
  164.  
  165.  STRUCTURE    ActiveDisk,0
  166.     STRUCT    ad_Node,LN_SIZE
  167.     UBYTE    ad_Active
  168.     UBYTE    ad_pad
  169.     APTR    ad_Handler
  170.     APTR    ad_Name
  171.     APTR    ad_Object
  172.     BPTR     ad_Volume
  173.     STRUCT    ad_Info,id_SIZEOF
  174.     STRUCT    ad_CreateTime,ds_SIZEOF
  175.     LABEL    ad_SIZEOF
  176.