Source code of Windows XP (NT5)
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.

101 lines
2.9 KiB

  1. // CommonControls.idl
  2. //
  3. import "oaidl.idl";
  4. import "ocidl.idl";
  5. cpp_quote("#ifdef MIDL_PASS")
  6. typedef DWORD RGBQUAD;
  7. typedef IUnknown* HIMAGELIST;
  8. cpp_quote("typedef struct _IMAGELIST* HIMAGELIST;")
  9. typedef struct
  10. {
  11. DWORD cbSize;
  12. HIMAGELIST himl;
  13. int i;
  14. HDC hdcDst;
  15. int x;
  16. int y;
  17. int cx;
  18. int cy;
  19. int xBitmap; // x offest from the upperleft of bitmap
  20. int yBitmap; // y offset from the upperleft of bitmap
  21. COLORREF rgbBk;
  22. COLORREF rgbFg;
  23. UINT fStyle;
  24. DWORD dwRop;
  25. DWORD fState;
  26. DWORD Frame;
  27. COLORREF crEffect;
  28. } IMAGELISTDRAWPARAMS;
  29. typedef IMAGELISTDRAWPARAMS* LPIMAGELISTDRAWPARAMS;
  30. typedef struct
  31. {
  32. HBITMAP hbmImage;
  33. HBITMAP hbmMask;
  34. int Unused1;
  35. int Unused2;
  36. RECT rcImage;
  37. } IMAGEINFO;
  38. typedef IMAGEINFO* LPIMAGEINFO;
  39. cpp_quote("#endif") // MIDL_PASS
  40. cpp_quote("#define ILIF_ALPHA 0x00000001") // flag returned by GetItemFlags, indicating item has alpha
  41. [
  42. uuid(46EB5926-582E-4017-9FDF-E8998DAA0950),
  43. helpstring("Image List"),
  44. local
  45. ]
  46. interface IImageList : IUnknown
  47. {
  48. HRESULT Add(HBITMAP hbmImage, HBITMAP hbmMask, int* pi);
  49. HRESULT ReplaceIcon(int i, HICON hicon, int* pi);
  50. HRESULT SetOverlayImage(int iImage, int iOverlay);
  51. HRESULT Replace(int i, HBITMAP hbmImage, HBITMAP hbmMask);
  52. HRESULT AddMasked(HBITMAP hbmImage, COLORREF crMask, int* pi);
  53. HRESULT Draw(IMAGELISTDRAWPARAMS* pimldp);
  54. HRESULT Remove(int i);
  55. HRESULT GetIcon(int i, UINT flags, HICON* picon);
  56. HRESULT GetImageInfo(int i, IMAGEINFO* pImageInfo);
  57. HRESULT Copy(int iDst, IUnknown* punkSrc, int iSrc, UINT uFlags);
  58. HRESULT Merge(int i1, IUnknown* punk2, int i2, int dx, int dy, REFIID riid, PVOID* ppv);
  59. HRESULT Clone(REFIID riid, PVOID* ppv);
  60. HRESULT GetImageRect(int i, RECT* prc);
  61. HRESULT GetIconSize(int* cx, int* cy);
  62. HRESULT SetIconSize(int cx, int cy);
  63. HRESULT GetImageCount(int* pi);
  64. HRESULT SetImageCount(UINT uNewCount);
  65. HRESULT SetBkColor(COLORREF clrBk, COLORREF* pclr);
  66. HRESULT GetBkColor(COLORREF* pclr);
  67. HRESULT BeginDrag(int iTrack, int dxHotspot, int dyHotspot);
  68. HRESULT EndDrag();
  69. HRESULT DragEnter(HWND hwndLock, int x, int y);
  70. HRESULT DragLeave(HWND hwndLock);
  71. HRESULT DragMove(int x, int y);
  72. HRESULT SetDragCursorImage(IUnknown* punk, int iDrag, int dxHotspot, int dyHotspot);
  73. HRESULT DragShowNolock(BOOL fShow);
  74. HRESULT GetDragImage(POINT * ppt, POINT * pptHotspot, REFIID riid, PVOID* ppv);
  75. HRESULT GetItemFlags(int i, DWORD *dwFlags);
  76. HRESULT GetOverlayImage(int iOverlay, int* piIndex);
  77. };
  78. [
  79. uuid(BCADA15B-B428-420c-8D28-023590924C9F)
  80. ]
  81. library CommonControlObjects
  82. {
  83. [
  84. uuid(7C476BA2-02B1-48f4-8048-B24619DDC058) // CLSID_ImageList
  85. ]
  86. coclass ImageList
  87. {
  88. interface IImageList;
  89. }
  90. };