home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 454.lha / Din_v1.0 / Include / libraries / din.i < prev   
Encoding:
Text File  |  1990-12-06  |  4.4 KB  |  175 lines

  1.     IFND LIBRARIES_DIN_I
  2. LIBRARIES_DIN_I SET 1
  3. **
  4. **  $Filename: libraries/din.i $
  5. **  $Release: 1.0 revision 3 $
  6. **  $Revision: 3 $
  7. **  $Date: 10 Nov 90 $
  8. **
  9. **    Data INterface specifications
  10. **
  11. **  © Copyright 1990 Jorrit Tyberghein.
  12. **    All Right 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_SEMAPHORES_I
  28.     INCLUDE "exec/semaphores.i"
  29.     ENDC
  30.  
  31.     IFND GRAPHICS_GFX_I
  32.     INCLUDE "graphics/gfx.i"
  33.     ENDC
  34.  
  35.  
  36. DINNAME     macro
  37.         dc.b    "din.library",0
  38.         endm
  39. DINVERSION    equ    36
  40. DINREVISION    equ    3
  41.  
  42.  *
  43.  * DinBase. This structure is completely private. Don't depend on
  44.  * anything in this structure.
  45.  * You may read the ObjectList to supply the user with a DinObject
  46.  * directory, but make sure that you use LockDinBase before you
  47.  * start reading.
  48.  *
  49.   STRUCTURE DinBase,LIB_SIZE
  50.     UBYTE    din_Flags
  51.     UBYTE    din_pad0
  52.     STRUCT    din_ObjectList,LH_SIZE
  53.     STRUCT    din_Lock,SS_SIZE
  54.     ULONG    din_SegList
  55.     LABEL    din_SIZE
  56.  
  57.  
  58.  *
  59.  * The DinObject. ALL fields in this structure are private, unless stated
  60.  * otherwise. Private fields are subject to changes in future versions.
  61.  * Do NOT depend on the size of this structure.
  62.  * It is safer that you ask for a copy of this structure with InfoDinObject
  63.  *
  64.   STRUCTURE DinObject,LN_SIZE
  65.     UWORD    do_Type        * READ ONLY. see below
  66.     ULONG    do_Flags    * READ ONLY. see below
  67.     APTR    do_PhysObject    * READ ONLY. Pointer to physical object
  68.                 * corresponding with this DinObject.
  69.     ULONG    do_Size        * READ ONLY. Size of PhysObject
  70.     APTR    do_Owner    * READ ONLY. NULL means no owner
  71.     STRUCT    do_Lock,SS_SIZE
  72.     STRUCT    do_rwLock,SS_SIZE
  73.     STRUCT    do_delLock,SS_SIZE
  74.     STRUCT    do_LinkList,LH_SIZE
  75.     LABEL    do_SIZE        * Private !!!
  76.  
  77.  *
  78.  * Copy of the DinObject structure obtained by InfoDinObject.
  79.  * Do NOT depend on the size of this structure, use FreeInfoDinObject to free it.
  80.  *
  81.   STRUCTURE IDinObject,LN_SIZE
  82.     UWORD    ido_Type
  83.     ULONG    ido_Flags
  84.     APTR    ido_PhysObject
  85.     ULONG    ido_Size
  86.     APTR    ido_Owner
  87.     LABEL    ido_SIZE
  88.  
  89.  *
  90.  * DinObject types.
  91.  *
  92. OBJECTDUMMY    equ    0    * For a dummy object
  93. OBJECTLIST    equ    1    * Not implemented yet
  94. OBJECTTEXT    equ    2    * DinObject represents a number of text lines
  95. OBJECTDATA    equ    3    * Binary data, no interpretation
  96. OBJECTIMAGE    equ    4    * Graphical object
  97. OBJECTSAMPLE    equ    5    * Sound sample object, not implemented yet
  98. OBJECTACK    equ    6    * Acknowledgement object
  99.  
  100.  *
  101.  * Flags for DinObject
  102.  *
  103. OB_READONLY    equ    1    * Object is readonly. Only the owner can write
  104.                 * on it
  105. OB_DISABLED    equ    2    * This object is not available for use. All links
  106.                 * will fail
  107. OB_READY    equ    4    * Object is ready to use. All links will succeed
  108.                 * and previous waiting links will be activated
  109. OB_DUMMY    equ    8    * Private
  110. OB_DELETED    equ    16    * Object is deleted
  111.  
  112.  
  113.  *
  114.  * The Link structure. ALL fields in this structure are private, unless stated
  115.  * otherwise.
  116.  * Do NOT depend on the size of this structure.
  117.  *
  118.   STRUCTURE DinLink,LN_SIZE
  119.     APTR    dl_Ob        * READ ONLY
  120.     ULONG    dl_Flags    * READ ONLY. see below
  121.     APTR    dl_Task
  122.     BYTE    dl_SigBit    * READ ONLY. Use this to wait for notify signals
  123.     UBYTE    dl_pad0
  124.     LABEL    dl_SIZE        * Private !!!
  125.  
  126.  *
  127.  * DinLink flags
  128.  *
  129. LNK_READY    equ    1    * Private
  130. LNK_WAITING4OB    equ    2    * If set the object does not exist yet
  131. LNK_NOTIFYBITS    equ    124
  132. LNK_KILLED    equ    4    * When a signal arrives, you must test this flag
  133.                 * to see if the object is removed.
  134. LNK_CHANGE    equ    8    * When a signal arrives, you can test this flag
  135.                 * to see if the object has changed
  136. LNK_NEW        equ    16    * Our object has just arrived
  137. LNK_ENABLE    equ    32    * The object is enabled
  138. LNK_DISABLE    equ    64    * The object is disabled
  139.  
  140.  *
  141.  * Physical object for one line of text. This structure is used in ObjectText
  142.  *
  143.   STRUCTURE ObjectLine,0
  144.     APTR    ol_Next        * Pointer to next line
  145.     UBYTE    ol_FirstByte    * First byte of string, other bytes follow.
  146.                 * String is NULL-terminated.
  147.     LABEL    ol_SIZE
  148.  
  149.  *
  150.  * The physical text object. This structure is public
  151.  *
  152.   STRUCTURE ObjectText,0
  153.     ULONG    ot_Lines    * The number of lines in this object
  154.     APTR    ot_FirstLine    * Pointer to the first line of text
  155.     LABEL    ot_SIZE
  156.  
  157.  *
  158.  * Physical object for simple data.
  159.  *
  160.   STRUCTURE ObjectData,0
  161.     ULONG    od_Size        * Size of data
  162.     APTR    od_Data        * Pointer to data
  163.     LABEL    od_SIZE
  164.  
  165.  *
  166.  * Physical object for a graphical image. This structure is public
  167.  *
  168.   STRUCTURE ObjectImage,0
  169.     APTR    oi_rp            * RastPort for your image
  170.     STRUCT    oi_Rect,ra_SIZEOF    * This rectangle defines a rectangle in the
  171.                     * RastPort for your image
  172.     LABEL    oi_SIZE
  173.  
  174.     ENDC
  175.