1
0

layout.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef NULLSOFT_PODCAST_PLUGIN_LAYOUT_HEADER
  2. #define NULLSOFT_PODCAST_PLUGIN_LAYOUT_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. typedef struct __LAYOUTITEM
  8. {
  9. HWND hwnd;
  10. LONG x;
  11. LONG y;
  12. LONG cx;
  13. LONG cy;
  14. UINT flags;
  15. RECT rect;
  16. } LAYOUTITEM;
  17. #define LI_GET_R(__li) ((__li).x + (__li).cx)
  18. #define LI_GET_B(__li) ((__li).y + (__li).cy)
  19. #define LI_EXPAND_W(__li, __delta) { (__li).cx += (__delta); }
  20. #define LI_EXPAND_H(__li, __delta) { (__li).cy += (__delta); }
  21. #define LI_SHIFT_L(__li, __delta) { (__li).x += (__delta); }
  22. #define LI_SHIFT_T(__li, __delta) { { (__li).y += (__delta); }
  23. #define LI_SET_L(__li, __val) { (__li).x = (__val); }
  24. #define LI_SET_T(__li, __val) { (__li).y = (__val); }
  25. #define LI_SET_W(__li, __val) { (__li).cx = (__val); }
  26. #define LI_SET_H(__li, __val) { (__li).cy = (__val); }
  27. #define LI_SET_R(__li, __val) { (__li).cx = ((__val) - (__li).x); }
  28. #define LI_SET_B(__li, __val) { (__li).cy = ((__val) - (__li).y); }
  29. BOOL Layout_Initialize(HWND hwnd, const INT *itemList, INT itemCount, LAYOUTITEM *layout);
  30. BOOL Layout_SetVisibilityEx(const RECT *rect, const INT *indexList, INT indexCount, LAYOUTITEM *layout);
  31. BOOL Layout_SetVisibility(const RECT *rect, LAYOUTITEM *layout, INT layoutCount);
  32. BOOL Layout_Perform(HWND hwnd, LAYOUTITEM *layout, INT layoutCount, BOOL fRedraw);
  33. BOOL Layout_GetValidRgn(HRGN validRgn, POINTS parrentOffset, const RECT *validRect, LAYOUTITEM *layout, INT layoutCount);
  34. #endif //NULLSOFT_PODCAST_PLUGIN_LAYOUT_HEADER