1 {
2     This file is part of the Free Pascal run time library.
3     Copyright (c) 2016 by Free Pascal development team
4 
5     clipboard device functions for Amiga OS 4.x
6 
7     See the file COPYING.FPC, included in this distribution,
8     for details about the copyright.
9 
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 
14  **********************************************************************}
15 unit clipboard;
16 {$PACKRECORDS 2}
17 interface
18 
19 uses
20   exec;
21 
22 const
23   CBD_POST           = CMD_NONSTD + 0;
24   CBD_CURRENTREADID  = CMD_NONSTD + 1;
25   CBD_CURRENTWRITEID = CMD_NONSTD + 2;
26   CBD_CHANGEHOOK     = CMD_NONSTD + 3;
27 
28   CBERR_OBSOLETEID   = 1;
29 
30 type
31   PClipboardUnitPartial = ^TClipboardUnitPartial;
32   TClipboardUnitPartial = record
33     cu_Node: TNode;       // list of units
34     cu_UnitNum: LongWord; // unit number for this unit
35     // the remaining unit data is private to the device
36   end;
37 
38 
39   PIOClipReq = ^TIOClipReq;
40   TIOClipReq = record
41     io_Message: TMessage;
42     io_Device: PDevice;             // device node pointer
43     io_Unit: PClipboardUnitPartial; // unit (driver private)
44     io_Command: Word;               // device command
45     io_Flags: Byte;                 // including QUICK and SATISFY
46     io_Error: Shortint;             // error or warning num
47     io_Actual: LongWord;            // number of bytes transferred
48     io_Length: LongWord;            // number of bytes requested
49     io_Data: STRPTR;                // either clip stream or post port
50     io_Offset: LongWord;            // offset in clip stream
51     io_ClipID: Longint;             // ordinal clip identifier
52   end;
53 
54 const
55   PRIMARY_CLIP = 0; // primary clip unit
56 
57 type
58   PSatisfyMsg = ^TSatisfyMsg;
59   TSatisfyMsg = record
60     sm_Msg: TMessage;   // the length will be 6
61     sm_Unit: Word;      // which clip unit this is
62     sm_ClipID: Longint; // the clip identifier of the post
63   end;
64 
65   PClipHookMsg = ^TClipHookMsg;
66   TClipHookMsg = record
67     chm_Type: LongWord;     // zero for this structure format
68     chm_ChangeCmd: LongInt; // command that caused this hook invocation: either CMD_UPDATE OR CBD_POST
69     chm_ClipID : Longint;   // the clip identifier of the new data
70   end;
71 
72 implementation
73 
74 end.
75