Win32Minimal.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. /// @file
  6. /// This file is mainly used to test that Windows.h works with our own minimal version of it.
  7. #include <AnKi/Util/Win32Minimal.h>
  8. #include <Windows.h>
  9. #define ANKI_T_STRUCT(type) \
  10. static_assert(sizeof(::type) == sizeof(anki::type), "Sizeof mismatch of the Windows.h type and AnKi's fake one"); \
  11. static_assert(alignof(::type) == alignof(anki::type), \
  12. "Alignment mismatch of the Windows.h type and AnKi's fake one");
  13. #define ANKI_T_OFFSETOF(type, member) \
  14. static_assert(offsetof(::type, member) == offsetof(anki::type, member), "See file");
  15. ANKI_T_STRUCT(CRITICAL_SECTION)
  16. ANKI_T_STRUCT(SRWLOCK)
  17. ANKI_T_STRUCT(CONDITION_VARIABLE)
  18. ANKI_T_STRUCT(SHFILEOPSTRUCTA)
  19. ANKI_T_STRUCT(SECURITY_ATTRIBUTES)
  20. ANKI_T_STRUCT(WIN32_FIND_DATAA)
  21. ANKI_T_OFFSETOF(WIN32_FIND_DATAA, cAlternateFileName)
  22. ANKI_T_STRUCT(LARGE_INTEGER)
  23. ANKI_T_STRUCT(COORD)
  24. ANKI_T_STRUCT(CONSOLE_SCREEN_BUFFER_INFO)
  25. ANKI_T_STRUCT(SYSTEM_INFO)
  26. ANKI_T_STRUCT(FILETIME)
  27. ANKI_T_STRUCT(SMALL_RECT)