(***************************************************************************

     $RCSfile: ClipBoard.mod $
  Description: clipboard.device structure definitions

   Created by: fjc (Frank Copeland)
    $Revision: 3.2 $
      $Author: fjc $
        $Date: 1994/08/08 00:49:51 $

  $VER: clipboard.h 36.5 (2.11.90)
  Includes Release 40.15

  (C) Copyright 1985-1993 Commodore-Amiga, Inc.
      All Rights Reserved

  Oberon-A interface Copyright © 1994, Frank Copeland.
  This file is part of the Oberon-A Interface.
  See Oberon-A.doc for conditions of use and distribution.

***************************************************************************)

MODULE ClipBoard;

(*
** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
** $V- OvflChk       $Z- ZeroVars
*)

IMPORT E := Exec;

CONST

  post *                = E.cmdNonstd+0;
  currentReadId *       = E.cmdNonstd+1;
  currentWriteId *      = E.cmdNonstd+2;
  changeHook *          = E.cmdNonstd+3;

  errObsoleteId *        = 1;

TYPE

  ClipboardUnitPartialPtr * = CPOINTER TO ClipboardUnitPartial;
  ClipboardUnitPartial * = RECORD (E.Node) (* list of units *)
    unitNum * : E.ULONG;                   (* unit number for this unit *)
    (* the remaining unit data is private to the device *)
  END; (* ClipboardUnitPartial *)


TYPE

  IOClipReqPtr * = CPOINTER TO IOClipReq;
  IOClipReq * = RECORD (E.Message)
    device *  : E.DevicePtr;   (* device node pointer *)
    unit *    : ClipboardUnitPartialPtr; (* unit node pointer *)
    command * : E.UWORD;       (* device command *)
    flags *   : E.BSET;        (* including QUICK and SATISFY *)
    error *   : SHORTINT;      (* error or warning num *)
    actual *  : E.ULONG;       (* number of bytes transferred *)
    ioLength *: E.ULONG;       (* number of bytes requested *)
    data *    : E.APTR;        (* either clip stream or post port *)
    offset *  : E.ULONG;       (* offset in clip stream *)
    clipID *  : LONGINT;       (* ordinal clip identifier *)
  END; (* IOClipReq *)

CONST

  primaryClip *    = 0;       (* primary clip unit *)

TYPE

  SatisfyMsgPtr * = CPOINTER TO SatisfyMsg;
  SatisfyMsg * = RECORD (E.Message) (* the length will be 6 *)
    unit *   : E.UWORD;             (* which clip unit this is *)
    clipID * : LONGINT;             (* the clip identifier of the post *)
  END; (* SatisfyMsg *)

TYPE

  ClipHookMsgPtr * = CPOINTER TO ClipHookMsg;
  ClipHookMsg * = RECORD
    type *      : E.ULONG; (* zero for this structure format *)
    changeCmd * : LONGINT; (* command that caused this hook invocation: *)
                           (*   either cmdUpdate or cbdPost *)
    clipID *    : LONGINT; (* the clip identifier of the new data *)
  END; (* ClipHookMsg *)


CONST

  name * = "clipboard.device";


END ClipBoard.
