Win32Minimal.cpp 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright (C) 2009-present, 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), "Alignment mismatch of the Windows.h type and AnKi's fake one");
  12. #define ANKI_T_OFFSETOF(type, member) static_assert(offsetof(::type, member) == offsetof(anki::type, member), "See file");
  13. ANKI_T_STRUCT(CRITICAL_SECTION)
  14. ANKI_T_STRUCT(SRWLOCK)
  15. ANKI_T_STRUCT(CONDITION_VARIABLE)
  16. ANKI_T_STRUCT(SHFILEOPSTRUCTA)
  17. ANKI_T_STRUCT(SECURITY_ATTRIBUTES)
  18. ANKI_T_STRUCT(WIN32_FIND_DATAA)
  19. ANKI_T_OFFSETOF(WIN32_FIND_DATAA, cAlternateFileName)
  20. ANKI_T_STRUCT(LARGE_INTEGER)
  21. ANKI_T_STRUCT(COORD)
  22. ANKI_T_STRUCT(CONSOLE_SCREEN_BUFFER_INFO)
  23. ANKI_T_STRUCT(SYSTEM_INFO)
  24. ANKI_T_STRUCT(FILETIME)
  25. ANKI_T_STRUCT(SMALL_RECT)