clipboard.pas 2.4 KB

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