clipboard.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /**
  2. * WinPR: Windows Portable Runtime
  3. * Clipboard Functions
  4. *
  5. * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. #ifndef WINPR_CLIPBOARD_PRIVATE_H
  20. #define WINPR_CLIPBOARD_PRIVATE_H
  21. #include <winpr/clipboard.h>
  22. #include <winpr/collections.h>
  23. typedef struct _wClipboardFormat wClipboardFormat;
  24. typedef struct _wClipboardSynthesizer wClipboardSynthesizer;
  25. struct _wClipboardFormat
  26. {
  27. UINT32 formatId;
  28. char* formatName;
  29. UINT32 numSynthesizers;
  30. wClipboardSynthesizer* synthesizers;
  31. };
  32. struct _wClipboardSynthesizer
  33. {
  34. UINT32 syntheticId;
  35. CLIPBOARD_SYNTHESIZE_FN pfnSynthesize;
  36. };
  37. struct _wClipboard
  38. {
  39. UINT64 ownerId;
  40. /* clipboard formats */
  41. UINT32 numFormats;
  42. UINT32 maxFormats;
  43. UINT32 nextFormatId;
  44. wClipboardFormat* formats;
  45. /* clipboard data */
  46. UINT32 size;
  47. void* data;
  48. UINT32 formatId;
  49. UINT32 sequenceNumber;
  50. /* clipboard file handling */
  51. wArrayList* localFiles;
  52. UINT32 fileListSequenceNumber;
  53. wClipboardDelegate delegate;
  54. CRITICAL_SECTION lock;
  55. };
  56. BOOL ClipboardInitSynthesizers(wClipboard* clipboard);
  57. #endif /* WINPR_CLIPBOARD_PRIVATE_H */