testnative.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. Copyright (C) 1997-2022 Sam Lantinga <[email protected]>
  3. This software is provided 'as-is', without any express or implied
  4. warranty. In no event will the authors be held liable for any damages
  5. arising from the use of this software.
  6. Permission is granted to anyone to use this software for any purpose,
  7. including commercial applications, and to alter it and redistribute it
  8. freely.
  9. */
  10. /* Definitions for platform dependent windowing functions to test SDL
  11. integration with native windows
  12. */
  13. #include <SDL3/SDL.h>
  14. typedef struct
  15. {
  16. const char *tag;
  17. void *(*CreateNativeWindow)(int w, int h);
  18. void (*DestroyNativeWindow)(void *window);
  19. } NativeWindowFactory;
  20. #ifdef SDL_VIDEO_DRIVER_WINDOWS
  21. #define TEST_NATIVE_WINDOWS
  22. extern NativeWindowFactory WindowsWindowFactory;
  23. #endif
  24. #ifdef SDL_VIDEO_DRIVER_X11
  25. #define TEST_NATIVE_X11
  26. extern NativeWindowFactory X11WindowFactory;
  27. #endif
  28. #ifdef SDL_VIDEO_DRIVER_COCOA
  29. #define TEST_NATIVE_COCOA
  30. extern NativeWindowFactory CocoaWindowFactory;
  31. #endif