commoncontrols.idl 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. cpp_quote("/**")
  2. cpp_quote(" * This file is part of the mingw-w64 runtime package.")
  3. cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.")
  4. cpp_quote(" */")
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. cpp_quote("#include <winapifamily.h>")
  8. cpp_quote("")
  9. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  10. cpp_quote("#ifndef WINCOMMCTRLAPI")
  11. cpp_quote("#ifndef _COMCTL32_")
  12. cpp_quote("#define WINCOMMCTRLAPI DECLSPEC_IMPORT")
  13. cpp_quote("#else")
  14. cpp_quote("#define WINCOMMCTRLAPI")
  15. cpp_quote("#endif")
  16. cpp_quote("#endif")
  17. cpp_quote("")
  18. cpp_quote("#ifdef __WIDL__")
  19. typedef DWORD RGBQUAD;
  20. typedef IUnknown *HIMAGELIST;
  21. cpp_quote("typedef struct _IMAGELIST *HIMAGELIST;")
  22. typedef struct _IMAGELISTDRAWPARAMS {
  23. DWORD cbSize;
  24. HIMAGELIST himl;
  25. int i;
  26. HDC hdcDst;
  27. int x;
  28. int y;
  29. int cx;
  30. int cy;
  31. int xBitmap;
  32. int yBitmap;
  33. COLORREF rgbBk;
  34. COLORREF rgbFg;
  35. UINT fStyle;
  36. DWORD dwRop;
  37. DWORD fState;
  38. DWORD Frame;
  39. COLORREF crEffect;
  40. } IMAGELISTDRAWPARAMS;
  41. typedef IMAGELISTDRAWPARAMS *LPIMAGELISTDRAWPARAMS;
  42. typedef struct tagIMAGEINFO {
  43. HBITMAP hbmImage;
  44. HBITMAP hbmMask;
  45. int Unused1;
  46. int Unused2;
  47. RECT rcImage;
  48. } IMAGEINFO;
  49. typedef IMAGEINFO *LPIMAGEINFO;
  50. cpp_quote("#endif")
  51. cpp_quote("")
  52. cpp_quote("#define ILIF_ALPHA 0x1")
  53. cpp_quote("#define ILIF_LOWQUALITY 0x2")
  54. cpp_quote("")
  55. cpp_quote("#define ILDRF_IMAGELOWQUALITY 0x1")
  56. cpp_quote("#define ILDRF_OVERLAYLOWQUALITY 0x10")
  57. cpp_quote("")
  58. cpp_quote("#define ILR_DEFAULT 0x0")
  59. cpp_quote("#define ILR_HORIZONTAL_LEFT 0x0")
  60. cpp_quote("#define ILR_HORIZONTAL_CENTER 0x1")
  61. cpp_quote("#define ILR_HORIZONTAL_RIGHT 0x2")
  62. cpp_quote("#define ILR_VERTICAL_TOP 0x0")
  63. cpp_quote("#define ILR_VERTICAL_CENTER 0x10")
  64. cpp_quote("#define ILR_VERTICAL_BOTTOM 0x20")
  65. cpp_quote("#define ILR_SCALE_CLIP 0x0")
  66. cpp_quote("#define ILR_SCALE_ASPECTRATIO 0x100")
  67. cpp_quote("")
  68. cpp_quote("#define ILGOS_ALWAYS 0x0")
  69. cpp_quote("#define ILGOS_FROMSTANDBY 0x1")
  70. cpp_quote("")
  71. cpp_quote("#define ILFIP_ALWAYS 0x0")
  72. cpp_quote("#define ILFIP_FROMSTANDBY 0x1")
  73. cpp_quote("")
  74. cpp_quote("#define ILDI_PURGE 0x1")
  75. cpp_quote("#define ILDI_STANDBY 0x2")
  76. cpp_quote("#define ILDI_RESETACCESS 0x4")
  77. cpp_quote("#define ILDI_QUERYACCESS 0x8")
  78. cpp_quote("")
  79. cpp_quote("#if NTDDI_VERSION >= 0x06000000")
  80. cpp_quote("WINCOMMCTRLAPI HRESULT WINAPI ImageList_CoCreateInstance (REFCLSID rclsid, const IUnknown *punkOuter, REFIID riid, void **ppv);")
  81. cpp_quote("#endif")
  82. typedef struct tagIMAGELISTSTATS {
  83. DWORD cbSize;
  84. int cAlloc;
  85. int cUsed;
  86. int cStandby;
  87. } IMAGELISTSTATS;
  88. [local, uuid (46eb5926-582e-4017-9fdf-E8998DAA0950)]
  89. interface IImageList : IUnknown {
  90. HRESULT Add ([in] HBITMAP hbmImage,[in, unique] HBITMAP hbmMask,[out] int *pi);
  91. HRESULT ReplaceIcon (int i,[in] HICON hicon,[out] int *pi);
  92. HRESULT SetOverlayImage (int iImage, int iOverlay);
  93. HRESULT Replace (int i,[in] HBITMAP hbmImage,[in, unique] HBITMAP hbmMask);
  94. HRESULT AddMasked ([in] HBITMAP hbmImage, COLORREF crMask,[out] int *pi);
  95. HRESULT Draw ([in] IMAGELISTDRAWPARAMS *pimldp);
  96. HRESULT Remove (int i);
  97. HRESULT GetIcon (int i, UINT flags,[out] HICON *picon);
  98. HRESULT GetImageInfo (int i,[out] IMAGEINFO *pImageInfo);
  99. HRESULT Copy (int iDst,[in] IUnknown *punkSrc, int iSrc, UINT uFlags);
  100. HRESULT Merge (int i1,[in] IUnknown *punk2, int i2, int dx, int dy, REFIID riid,[out, iid_is (riid)] void **ppv);
  101. HRESULT Clone (REFIID riid,[out, iid_is (riid)] void **ppv);
  102. HRESULT GetImageRect (int i,[out] RECT *prc);
  103. HRESULT GetIconSize ([out] int *cx,[out] int *cy);
  104. HRESULT SetIconSize (int cx, int cy);
  105. HRESULT GetImageCount ([out] int *pi);
  106. HRESULT SetImageCount (UINT uNewCount);
  107. HRESULT SetBkColor (COLORREF clrBk,[out] COLORREF *pclr);
  108. HRESULT GetBkColor ([out] COLORREF *pclr);
  109. HRESULT BeginDrag (int iTrack, int dxHotspot, int dyHotspot);
  110. HRESULT EndDrag ();
  111. HRESULT DragEnter ([in, unique] HWND hwndLock, int x, int y);
  112. HRESULT DragLeave ([in, unique] HWND hwndLock);
  113. HRESULT DragMove (int x, int y);
  114. HRESULT SetDragCursorImage ([in] IUnknown *punk, int iDrag, int dxHotspot, int dyHotspot);
  115. HRESULT DragShowNolock (WINBOOL fShow);
  116. HRESULT GetDragImage ([out] POINT *ppt,[out] POINT *pptHotspot, REFIID riid,[out, iid_is (riid)] void **ppv);
  117. HRESULT GetItemFlags (int i,[out] DWORD *dwFlags);
  118. HRESULT GetOverlayImage (int iOverlay,[out] int *piIndex);
  119. };
  120. [local, uuid (192b9d83-50fc-457b-90a0-2b82a8b5dae1)]
  121. interface IImageList2 : IImageList {
  122. HRESULT Resize (int cxNewIconSize, int cyNewIconSize);
  123. HRESULT GetOriginalSize ([in] int iImage,[in] DWORD dwFlags,[out] int *pcx,[out] int *pcy);
  124. HRESULT SetOriginalSize ([in] int iImage,[in] int cx,[in] int cy);
  125. HRESULT SetCallback ([in, unique] IUnknown *punk);
  126. HRESULT GetCallback ([in] REFIID riid,[out, iid_is (riid)] void **ppv);
  127. HRESULT ForceImagePresent ([in] int iImage, DWORD dwFlags);
  128. HRESULT DiscardImages ([in] int iFirstImage,[in] int iLastImage,[in] DWORD dwFlags);
  129. HRESULT PreloadImages ([in] IMAGELISTDRAWPARAMS *pimldp);
  130. HRESULT GetStatistics ([in, out] IMAGELISTSTATS *pils);
  131. HRESULT Initialize ([in] int cx,[in] int cy,[in] UINT flags,[in] int cInitial,[in] int cGrow);
  132. HRESULT Replace2 ([in] int i,[in] HBITMAP hbmImage,[in, unique] HBITMAP hbmMask,[in, unique] IUnknown *punk,[in] DWORD dwFlags);
  133. HRESULT ReplaceFromImageList ([in] int i,[in] IImageList *pil,[in] int iSrc,[in, unique] IUnknown *punk,[in] DWORD dwFlags);
  134. };
  135. [uuid (BCADA15B-B428-420c-8d28-023590924c9f)]
  136. library CommonControlObjects {
  137. [uuid (7c476ba2-02b1-48f4-8048-B24619DDC058)]
  138. coclass ImageList {
  139. interface IImageList;
  140. interface IImageList2;
  141. }
  142. };
  143. cpp_quote("#endif")