You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /**************************************************************************
  2. Copyright (c) 2002 by Salvador E. Tropea (SET)
  3. Covered by the GPL license.
  4. Description:
  5. OS independent clipboard system class. Uses to access the OS clipboard.
  6. ***************************************************************************/
  7. class TScreen;
  8. class TVDOSClipboard;
  9. class TVWin32Clipboard;
  10. class TVX11Clipboard;
  11. class TVOSClipboard
  12. {
  13. public:
  14. TVOSClipboard() {};
  15. ~TVOSClipboard() { if (destroy) destroy(); };
  16. static int (*copy)(int id, const char *buffer, unsigned len);
  17. static char *(*paste)(int id, unsigned &length);
  18. static const
  19. char *getName() { return name; };
  20. static int isAvailable() { return available; };
  21. static const
  22. char *getError();
  23. static void clearError() { error=0; };
  24. protected:
  25. static void (*destroy)();
  26. static const char *name;
  27. static int available;
  28. static int error;
  29. static int errors;
  30. static const char **nameErrors;
  31. friend class TScreen;
  32. friend class TVDOSClipboard;
  33. friend class TVX11Clipboard;
  34. friend class TVWin32Clipboard;
  35. };