_s_d_l__visualtest__screenshot_8h.tex 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. \hypertarget{_s_d_l__visualtest__screenshot_8h}{\section{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-screenshot.h File Reference}
  2. \label{_s_d_l__visualtest__screenshot_8h}\index{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h@{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h}}
  3. }
  4. {\ttfamily \#include \char`\"{}S\-D\-L\-\_\-visualtest\-\_\-process.\-h\char`\"{}}\\*
  5. \subsection*{Functions}
  6. \begin{DoxyCompactItemize}
  7. \item
  8. int \hyperlink{_s_d_l__visualtest__screenshot_8h_aefe6b7dbca1fbfb7aef081545c3ca66d}{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process} (\hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} $\ast$pinfo, char $\ast$prefix)
  9. \item
  10. int \hyperlink{_s_d_l__visualtest__screenshot_8h_a812c545e97db11a756145d43b3a8e5ee}{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop} (char $\ast$filename)
  11. \item
  12. int \hyperlink{_s_d_l__visualtest__screenshot_8h_ac7b5335651144961676abc2116c38299}{S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots} (char $\ast$args, char $\ast$test\-\_\-dir, char $\ast$verify\-\_\-dir)
  13. \end{DoxyCompactItemize}
  14. \subsection{Detailed Description}
  15. Header for the screenshot A\-P\-I.
  16. \subsection{Function Documentation}
  17. \hypertarget{_s_d_l__visualtest__screenshot_8h_a812c545e97db11a756145d43b3a8e5ee}{\index{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h@{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h}!S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop@{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop}}
  18. \index{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop@{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop}!SDL_visualtest_screenshot.h@{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h}}
  19. \subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop (
  20. \begin{DoxyParamCaption}
  21. \item[{char $\ast$}]{filename}
  22. \end{DoxyParamCaption}
  23. )}}\label{_s_d_l__visualtest__screenshot_8h_a812c545e97db11a756145d43b3a8e5ee}
  24. Takes a screenshot of the desktop and saves it into the file with path {\ttfamily filename}.
  25. \begin{DoxyReturn}{Returns}
  26. 1 on success, 0 on failure.
  27. \end{DoxyReturn}
  28. \hypertarget{_s_d_l__visualtest__screenshot_8h_aefe6b7dbca1fbfb7aef081545c3ca66d}{\index{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h@{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h}!S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process@{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process}}
  29. \index{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process@{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process}!SDL_visualtest_screenshot.h@{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h}}
  30. \subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process (
  31. \begin{DoxyParamCaption}
  32. \item[{{\bf S\-D\-L\-\_\-\-Process\-Info} $\ast$}]{pinfo, }
  33. \item[{char $\ast$}]{prefix}
  34. \end{DoxyParamCaption}
  35. )}}\label{_s_d_l__visualtest__screenshot_8h_aefe6b7dbca1fbfb7aef081545c3ca66d}
  36. Takes a screenshot of each window owned by the process {\ttfamily pinfo} and saves it in a file {\ttfamily prefix-\/i.\-png} where {\ttfamily prefix} is the full path to the file along with a prefix given to each screenshot.
  37. \begin{DoxyReturn}{Returns}
  38. 1 on success, 0 on failure.
  39. \end{DoxyReturn}
  40. \hypertarget{_s_d_l__visualtest__screenshot_8h_ac7b5335651144961676abc2116c38299}{\index{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h@{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h}!S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots@{S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots}}
  41. \index{S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots@{S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots}!SDL_visualtest_screenshot.h@{S\-D\-L\-\_\-visualtest\-\_\-screenshot.\-h}}
  42. \subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots (
  43. \begin{DoxyParamCaption}
  44. \item[{char $\ast$}]{args, }
  45. \item[{char $\ast$}]{test\-\_\-dir, }
  46. \item[{char $\ast$}]{verify\-\_\-dir}
  47. \end{DoxyParamCaption}
  48. )}}\label{_s_d_l__visualtest__screenshot_8h_ac7b5335651144961676abc2116c38299}
  49. Compare a screenshot taken previously with S\-U\-T arguments {\ttfamily args} that is located in {\ttfamily test\-\_\-dir} with a verification image that is located in {\ttfamily verify\-\_\-dir}.
  50. \begin{DoxyReturn}{Returns}
  51. -\/1 on failure, 0 if the images were not equal, 1 if the images are equal and 2 if the verification image is not present.
  52. \end{DoxyReturn}