🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

  1. /* See COPYING.txt for the full license governing this code. */
  2. /**
  3. * \file SDL_visualtest_screenshot.h
  4. *
  5. * Header for the screenshot API.
  6. */
  7. #include "SDL_visualtest_process.h"
  8. #ifndef SDL_visualtest_screenshot_h_
  9. #define SDL_visualtest_screenshot_h_
  10. /* Set up for C function definitions, even when using C++ */
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. /**
  15. * Takes a screenshot of each window owned by the process \c pinfo and saves
  16. * it in a file \c prefix-i.png where \c prefix is the full path to the file
  17. * along with a prefix given to each screenshot.
  18. *
  19. * \return 1 on success, 0 on failure.
  20. */
  21. int SDLVisualTest_ScreenshotProcess(SDL_ProcessInfo* pinfo, char* prefix);
  22. /**
  23. * Takes a screenshot of the desktop and saves it into the file with path
  24. * \c filename.
  25. *
  26. * \return 1 on success, 0 on failure.
  27. */
  28. int SDLVisualTest_ScreenshotDesktop(char* filename);
  29. /**
  30. * Compare a screenshot taken previously with SUT arguments \c args that is
  31. * located in \c test_dir with a verification image that is located in
  32. * \c verify_dir.
  33. *
  34. * \return -1 on failure, 0 if the images were not equal, 1 if the images are equal
  35. * and 2 if the verification image is not present.
  36. */
  37. int SDLVisualTest_VerifyScreenshots(char* args, char* test_dir, char* verify_dir);
  38. /* Ends C function definitions when using C++ */
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* SDL_visualtest_screenshot_h_ */
  43. /* vi: set ts=4 sw=4 expandtab: */