home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / includes / workbench / workbench.i < prev   
Text File  |  1992-09-01  |  5KB  |  167 lines

  1.     IFND    WORKBENCH_WORKBENCH_I
  2. WORKBENCH_WORKBENCH_I    EQU    1
  3. **
  4. **    $Filename: workbench/workbench.i $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 37.2 $
  7. **    $Date: 91/02/01 $
  8. **
  9. **    workbench.library general definitions
  10. **
  11. **    (C) Copyright 1985-1991 Commodore-Amiga, Inc.
  12. **    All Rights Reserved
  13. **
  14.  
  15.     IFND    EXEC_TYPES_I
  16.     INCLUDE    "exec/types.i"
  17.     ENDC
  18.  
  19.     IFND    EXEC_NODES_I
  20.     INCLUDE    "exec/nodes.i"
  21.     ENDC
  22.  
  23.     IFND    EXEC_LISTS_I
  24.     INCLUDE    "exec/lists.i"
  25.     ENDC
  26.  
  27.     IFND    EXEC_TASKS_I
  28.     INCLUDE    "exec/tasks.i"
  29.     ENDC
  30.  
  31.     IFND    INTUITION_INTUITION_I
  32.     INCLUDE    "intuition/intuition.i"
  33.     ENDC
  34.  
  35.  
  36. ; the Workbench object types
  37. WBDISK        EQU    1
  38. WBDRAWER    EQU    2
  39. WBTOOL        EQU    3
  40. WBPROJECT    EQU    4
  41. WBGARBAGE    EQU    5
  42. WBDEVICE    EQU    6
  43. WBKICK        EQU    7
  44. WBAPPICON    EQU    8
  45.  
  46. ; the main workbench object structure
  47.  STRUCTURE DrawerData,0
  48.     STRUCT    dd_NewWindow,nw_SIZE    ; args to open window
  49.     LONG    dd_CurrentX        ; current x coordinate of origin
  50.     LONG    dd_CurrentY        ; current y coordinate of origin
  51.     LABEL    OldDrawerData_SIZEOF    ; pre V36 size
  52. ; the amount of OldDrawerData actually written to disk
  53. OLDDRAWERDATAFILESIZE    EQU (OldDrawerData_SIZEOF)
  54.     ULONG    dd_Flags        ; flags for drawer
  55.     UWORD    dd_ViewModes        ; view mode for drawer
  56.     LABEL    DrawerData_SIZEOF
  57. ; the amount of DrawerData actually written to disk
  58. DRAWERDATAFILESIZE    EQU (DrawerData_SIZEOF)
  59.  
  60.  
  61.  STRUCTURE DiskObject,0
  62.     UWORD    do_Magic        ; a magic num at the start of the file
  63.     UWORD    do_Version        ; a version number, so we can change it
  64.     STRUCT    do_Gadget,gg_SIZEOF    ; a copy of in core gadget
  65.     UBYTE    do_Type
  66.     UBYTE    do_PAD_BYTE        ; Pad it out to the next word boundry
  67.     APTR    do_DefaultTool
  68.     APTR    do_ToolTypes
  69.     LONG    do_CurrentX
  70.     LONG    do_CurrentY
  71.     APTR    do_DrawerData
  72.     APTR    do_ToolWindow        ; only applies to tools
  73.     LONG    do_StackSize        ; only applies to tools
  74.     LABEL    do_SIZEOF
  75.  
  76. WB_DISKMAGIC    EQU    $e310    ; a magic number, not easily impersonated
  77. WB_DISKVERSION    EQU    1    ; our current version number
  78. WB_DISKREVISION    EQU    1    ; out current revision number
  79. ; I only use the lower 8 bits of Gadget.UserData for the revision #
  80. WB_DISKREVISIONMASK    EQU    $ff
  81.  
  82.  STRUCTURE FreeList,0
  83.     WORD    fl_NumFree
  84.     STRUCT    fl_MemList,LH_SIZE
  85.     ; weird name to avoid conflicts with FileLocks
  86.     LABEL    FreeList_SIZEOF
  87.  
  88.  
  89.  
  90. * each message that comes into the WorkBenchPort must have a type field
  91. * in the preceeding short.  These are the defines for this type
  92. *
  93.  
  94. MTYPE_PSTD        EQU    1    ; a "standard Potion" message
  95. MTYPE_TOOLEXIT        EQU    2    ; exit message from our tools
  96. MTYPE_DISKCHANGE    EQU    3    ; dos telling us of a disk change
  97. MTYPE_TIMER        EQU    4    ; we got a timer tick
  98. MTYPE_CLOSEDOWN        EQU    5    ; <unimplemented>
  99. MTYPE_IOPROC        EQU    6    ; <unimplemented>
  100. MTYPE_APPWINDOW        EQU    7    ; msg from an app window
  101. MTYPE_APPICON        EQU    8    ; msg from an app icon
  102. MTYPE_APPMENUITEM    EQU    9    ; msg from an app menuitem
  103. MTYPE_COPYEXIT        EQU    10    ; exit message from copy process
  104. MTYPE_ICONPUT        EQU    11    ; msg from PutDiskObject in icon.library
  105.  
  106. * workbench does different complement modes for its gadgets.
  107. * It supports separate images, complement mode, and backfill mode.
  108. * The first two are identical to intuitions GADGIMAGE and GADGHCOMP.
  109. * backfill is similar to GADGHCOMP, but the region outside of the
  110. * image (which normally would be color three when complemented)
  111. * is flood-filled to color zero.
  112. *
  113. GADGBACKFILL        EQU    $0001
  114.  
  115. * if an icon does not really live anywhere, set its current position
  116. * to here
  117. *
  118. NO_ICON_POSITION    EQU    ($80000000)
  119.  
  120.  
  121. * workbench now is a library.  this is it's name
  122. WORKBENCH_NAME    MACRO
  123.         dc.b        'workbench.library',0
  124.         ds.w        0
  125.         ENDM
  126.  
  127. ; If you find am_Version >= AM_VERSION, you now this structure has
  128. ; at least the fields defined in this version of the include file
  129. AM_VERSION    EQU    1
  130.  
  131.  STRUCTURE AppMessage,0
  132.     STRUCT am_Message,MN_SIZE    ; standard message structure
  133.     UWORD am_Type            ; message type
  134.     ULONG am_UserData        ; application specific
  135.     ULONG am_ID            ; application definable ID
  136.     LONG am_NumArgs            ; # of elements in arglist
  137.     APTR am_ArgList            ; the arguements themselves
  138.     UWORD am_Version        ; will be AM_VERSION
  139.     UWORD am_Class            ; message class
  140.     WORD am_MouseX            ; mouse x position of event
  141.     WORD am_MouseY            ; mount y position of event
  142.     ULONG am_Seconds        ; current system clock time
  143.     ULONG am_Micros            ; current system clock time
  144.     STRUCT am_Reserved,8        ; avoid recompilation
  145.     LABEL AppMessage_SIZEOF
  146.  
  147.  
  148. *
  149. * The following structures are private.  These are just stub
  150. * structures for code compatibility...
  151. *
  152.  STRUCTURE AppWindow,0
  153.     STRUCT aw_PRIVATE,0
  154.     LABEL AppWindow_SIZEOF
  155.  
  156.  STRUCTURE AppIcon,0
  157.      STRUCT ai_PRIVATE,0
  158.     LABEL AppIcon_SIZEOF
  159.  
  160.  STRUCTURE AppMenuItem,0
  161.     STRUCT ami_PRIVATE,0
  162.     LABEL AppMenuItem_SIZEOF
  163.  
  164.  
  165.     ENDC    ; WORKBENCH_WORKBENCH_I
  166.  
  167.