home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol11n15.zip / WINCLIP.H < prev   
C/C++ Source or Header  |  1991-12-17  |  2KB  |  68 lines

  1. /* WINCLIP.H -- DOS access to Windows Clipboard (Enhanced mode) */
  2.  
  3. #ifdef METAWARE
  4. #define far _far
  5. #endif
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11. /* higher-level functions */
  12.  
  13. int WindowsClipboard(void);
  14. int Clipserv(void);
  15. int PutClipStrLen(char *str, unsigned len);
  16. int PutClipString(char *str);
  17. char *GetClipString(void);
  18. void FreeClipString(char *str);
  19.  
  20. /**********************************************************************/
  21.  
  22. /* lower-level functions */
  23.  
  24. typedef enum { 
  25.     CF_TEXT=1, CF_BITMAP=2, CF_METAFILEPICT=3, CF_SYLK=4,
  26.     CF_DIF=5, CF_TIFF=6, CF_OEMTEXT=7
  27.     } CF_FORMAT;
  28.  
  29. #pragma pack(1)
  30.  
  31. typedef struct {
  32.     int                 bmType;
  33.     int                 bmWidth;
  34.     int                 bmHeight;
  35.     int                 bmWidthBytes;
  36.     unsigned char       bmPlanes;
  37.     unsigned char       bmBitsPixel;
  38.     unsigned char far * bmBits;
  39.     unsigned            bmWidDim;
  40.     unsigned            bmHigDim;
  41.     unsigned char       BitmapData[1];
  42.     } BITMAP;
  43.  
  44. typedef struct {
  45.     int                 mm;
  46.     int                 xExt;
  47.     int                 yExt;
  48.     unsigned char       MetaFilePictData[1];
  49.   } METAFILEPICT;
  50.  
  51. unsigned long CompactClipboard(unsigned long size);
  52. unsigned CloseClipboard(void);
  53. unsigned EmptyClipboard(void);
  54. unsigned char far *GetClipboardData(CF_FORMAT format, 
  55.     unsigned char far *buf);
  56. unsigned long GetClipboardDataSize(CF_FORMAT format);
  57. unsigned GetDeviceCaps(unsigned index);
  58. unsigned IdentifyWinOldApVersion(void);
  59. unsigned OpenClipboard(void);
  60. unsigned SetClipboardData(CF_FORMAT format, unsigned char far *buf, 
  61.     unsigned long size);
  62. void Yield(void);
  63.  
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67.  
  68.