clipboard.pas 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. <www.genesi.lu>
  4. clipboard.device interface unit for MorphOS/PowerPC
  5. Based on work of Nils Sjoholm member of the Amiga RTL
  6. development team.
  7. MorphOS port was done on a free Pegasos II/G4 machine
  8. provided by Genesi S.a.r.l. <www.genesi.lu>
  9. See the file COPYING.FPC, included in this distribution,
  10. for details about the copyright.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. **********************************************************************}
  15. {$PACKRECORDS 2}
  16. unit clipboard;
  17. interface
  18. uses exec;
  19. const
  20. CBD_POST = CMD_NONSTD + 0;
  21. CBD_CURRENTREADID = CMD_NONSTD + 1;
  22. CBD_CURRENTWRITEID = CMD_NONSTD + 2;
  23. CBD_CHANGEHOOK = CMD_NONSTD + 3;
  24. CBERR_OBSOLETEID = 1;
  25. type
  26. pClipboardUnitPartial = ^tClipboardUnitPartial;
  27. tClipboardUnitPartial = record
  28. cu_Node : tNode; { list of units }
  29. cu_UnitNum : DWord; { unit number for this unit }
  30. { the remaining unit data is private to the device }
  31. end;
  32. pIOClipReq = ^tIOClipReq;
  33. tIOClipReq = record
  34. io_Message : tMessage;
  35. io_Device : pDevice; { device node pointer }
  36. io_Unit : pClipboardUnitPartial; { unit (driver private) }
  37. io_Command : Word; { device command }
  38. io_Flags : Byte; { including QUICK and SATISFY }
  39. io_Error : Shortint; { error or warning num }
  40. io_Actual : DWord; { number of bytes transferred }
  41. io_Length : DWord; { number of bytes requested }
  42. io_Data : PChar; { either clip stream or post port }
  43. io_Offset : DWord; { offset in clip stream }
  44. io_ClipID : Longint; { ordinal clip identifier }
  45. end;
  46. const
  47. PRIMARY_CLIP = 0; { primary clip unit }
  48. type
  49. pSatisfyMsg = ^tSatisfyMsg;
  50. tSatisfyMsg = record
  51. sm_Msg : tMessage; { the length will be 6 }
  52. sm_Unit : Word; { which clip unit this is }
  53. sm_ClipID : Longint; { the clip identifier of the post }
  54. end;
  55. pClipHookMsg = ^tClipHookMsg;
  56. tClipHookMsg = record
  57. chm_Type : DWord; { zero for this structure format }
  58. chm_ChangeCmd, { command that caused this hook invocation: }
  59. { either CMD_UPDATE OR CBD_POST }
  60. chm_ClipID : Longint; { the clip identifier of the new data }
  61. END;
  62. implementation
  63. end.