skinexport.cpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #include "./skinExport.h"
  2. #include "./skinning.h"
  3. #include "./colors.h"
  4. #include "./ml_rating.h"
  5. extern HMLIMGLST hmlilRating;
  6. EXTERN_C _declspec(dllexport) BOOL MlSkinWindow(HWND hwndToSkin, UINT style)
  7. {
  8. return SkinWindow(hwndToSkin, style);
  9. }
  10. EXTERN_C _declspec(dllexport) BOOL MlSkinWindowEx(HWND hwndToSkin, INT type, UINT style)
  11. {
  12. return SkinWindowEx(hwndToSkin, type, style);
  13. }
  14. EXTERN_C _declspec(dllexport) BOOL MlUnskinWindow(HWND hwndToUnskin)
  15. {
  16. return UnskinWindow(hwndToUnskin);
  17. }
  18. EXTERN_C _declspec(dllexport) BOOL MlTrackSkinnedPopupMenuEx(HMENU hmenu, UINT fuFlags, INT x, INT y, HWND hwnd, LPTPMPARAMS lptpm,
  19. HMLIMGLST hmlil, INT width, UINT skinStyle, MENUCUSTOMIZEPROC customProc, ULONG_PTR customParam)
  20. {
  21. return TrackSkinnedPopupMenuEx(hmenu, fuFlags, x, y, hwnd, lptpm, hmlil, width, skinStyle, customProc, customParam);
  22. }
  23. EXTERN_C _declspec(dllexport) BOOL MlIsSkinnedPopupEnabled(void)
  24. {
  25. return IsSkinnedPopupEnabled(FALSE);
  26. }
  27. EXTERN_C _declspec(dllexport) BOOL MlEnableSkinnedPopup(BOOL fEnable)
  28. {
  29. return EnableSkinnedPopup(fEnable);
  30. }
  31. EXTERN_C _declspec(dllexport) BOOL MlGetSkinColor(UINT uObject, UINT uPart, UINT uState, COLORREF *pColor)
  32. {
  33. return SUCCEEDED(MLGetSkinColor(uObject, uPart, uState, pColor));
  34. }
  35. EXTERN_C _declspec(dllexport) void MlResetSkinColor(void)
  36. {
  37. ResetColors(FALSE);
  38. }
  39. EXTERN_C _declspec(dllexport) HANDLE MlInitSkinnedPopupHook(HWND hwndOwner, HMLIMGLST hmlil, INT width, UINT skinStyle, MENUCUSTOMIZEPROC customProc, ULONG_PTR customParam)
  40. {
  41. return InitSkinnedPopupHook(hwndOwner, hmlil, width, skinStyle, customProc, customParam);
  42. }
  43. EXTERN_C _declspec(dllexport) void MlRemoveSkinnedPopupHook(HANDLE hPopupHook)
  44. {
  45. RemoveSkinnedPopupHook(hPopupHook);
  46. }
  47. EXTERN_C _declspec(dllexport) BOOL MlRatingDraw(HDC hdc, INT maxValue, INT value, INT trackingVal, HMLIMGLST hmlil, INT index, RECT *prc, UINT fStyle)
  48. {
  49. if (NULL == hmlil) hmlil = hmlilRating;
  50. return MLRatingI_Draw(hdc, maxValue, value, trackingVal, hmlil, index, prc, fStyle);
  51. }
  52. EXTERN_C _declspec(dllexport) LONG MlRatingHitTest(POINT pt, INT maxValue, HMLIMGLST hmlil, RECT *prc, UINT fStyle)
  53. {
  54. if (NULL == hmlil) hmlil = hmlilRating;
  55. return MLRatingI_HitTest(pt, maxValue, hmlil, prc, fStyle);
  56. }
  57. EXTERN_C _declspec(dllexport) BOOL MlRatingCalcMinRect(INT maxValue, HMLIMGLST hmlil, RECT *prc)
  58. {
  59. if (NULL == hmlil) hmlil = hmlilRating;
  60. return MLRatingI_CalcMinRect(maxValue, hmlil, prc);
  61. }