clipboard.pas 2.8 KB

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