home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / M2V11-1.LHA / modula / amiga / Clipboard.def < prev    next >
Encoding:
Text File  |  1993-11-01  |  2.0 KB  |  58 lines

  1. DEFINITION FOR C MODULE Clipboard ;
  2.  
  3. FROM SYSTEM    IMPORT STRING, SHORTSET ;
  4. FROM Exec    IMPORT CMD_NONSTD, Message, DevicePtr, Node ;
  5.  
  6. CONST
  7.   CBD_POST        = CMD_NONSTD+0 ;
  8.   CBD_CURRENTREADID    = CMD_NONSTD+1 ;
  9.   CBD_CURRENTWRITEID    = CMD_NONSTD+2 ;
  10.   CBD_CHANGEHOOK    = CMD_NONSTD+3 ;
  11.  
  12.   CBERR_OBSOLETEID = 1 ;
  13.  
  14. TYPE
  15.   ClipboardUnitPartialPtr = POINTER TO ClipboardUnitPartial ;
  16.   IOClipReqPtr          = POINTER TO IOClipReq ;
  17.   SatisfyMsgPtr          = POINTER TO SatisfyMsg ;
  18.   ClipHookMsgPtr      = POINTER TO ClipHookMsg ;
  19.  
  20.   ClipboardUnitPartial = RECORD
  21.     cu_Node    : Node    ; (* list of units        *)
  22.     cu_UnitNum : LONGINT ; (* unit number for this unit *)
  23.     (* the remaining unit data is private to the device *)
  24.   END ;
  25.  
  26.   IOClipReq = RECORD
  27.     io_Message : Message ;
  28.     io_Device  : DevicePtr ;           (* device node pointer          *)
  29.     io_Unit    : ClipboardUnitPartialPtr ; (* unit node pointer              *)
  30.     io_Command : CARDINAL ;           (* device command              *)
  31.     io_Flags   : SHORTSET ;           (* including QUICK and SATISFY     *)
  32.     io_Error   : SHORTINT ;           (* error or warning num          *)
  33.     io_Actual  : LONGINT  ;           (* number of bytes transferred     *)
  34.     io_Length  : LONGINT  ;           (* number of bytes requested          *)
  35.     io_Data    : STRING   ;           (* either clip stream or post port *)
  36.     io_Offset  : LONGINT  ;           (* offset in clip stream          *)
  37.     io_ClipID  : LONGINT  ;           (* ordinal clip identifier          *)
  38.   END ;
  39.  
  40. CONST
  41.   PRIMARY_CLIP = 0 ;    (* primary clip unit *)
  42.  
  43. TYPE
  44.   SatisfyMsg = RECORD
  45.     sm_Msg    : Message  ; (* the length will be 6          *)
  46.     sm_Unit   : CARDINAL ; (* which clip unit this is          *)
  47.     sm_ClipID : LONGINT  ; (* the clip identifier of the post *)
  48.   END ;
  49.  
  50.   ClipHookMsg = RECORD
  51.     chm_Type      : LONGINT ; (* zero for this structure format             *)
  52.     chm_ChangeCmd : LONGINT ; (* command that caused this hook invocation:   *)
  53.                   (*   either CMD_UPDATE or CBD_POST         *)
  54.     chm_ClipID      : LONGINT ; (* the clip identifier of the new data         *)
  55.   END ;
  56.  
  57. END Clipboard.
  58.