_s_d_l__visualtest__screenshot_8h.tex (4652B)
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 8int \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 10int \hyperlink{_s_d_l__visualtest__screenshot_8h_a812c545e97db11a756145d43b3a8e5ee}{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop} (char $\ast$filename) 11\item 12int \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 15 16\subsection{Detailed Description} 17Header for the screenshot A\-P\-I. 18 19\subsection{Function Documentation} 20\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}} 21\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}} 22\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Desktop ( 23\begin{DoxyParamCaption} 24\item[{char $\ast$}]{filename} 25\end{DoxyParamCaption} 26)}}\label{_s_d_l__visualtest__screenshot_8h_a812c545e97db11a756145d43b3a8e5ee} 27Takes a screenshot of the desktop and saves it into the file with path {\ttfamily filename}. 28 29\begin{DoxyReturn}{Returns} 301 on success, 0 on failure. 31\end{DoxyReturn} 32\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}} 33\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}} 34\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Screenshot\-Process ( 35\begin{DoxyParamCaption} 36\item[{{\bf S\-D\-L\-\_\-\-Process\-Info} $\ast$}]{pinfo, } 37\item[{char $\ast$}]{prefix} 38\end{DoxyParamCaption} 39)}}\label{_s_d_l__visualtest__screenshot_8h_aefe6b7dbca1fbfb7aef081545c3ca66d} 40Takes 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. 41 42\begin{DoxyReturn}{Returns} 431 on success, 0 on failure. 44\end{DoxyReturn} 45\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}} 46\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}} 47\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Verify\-Screenshots ( 48\begin{DoxyParamCaption} 49\item[{char $\ast$}]{args, } 50\item[{char $\ast$}]{test\-\_\-dir, } 51\item[{char $\ast$}]{verify\-\_\-dir} 52\end{DoxyParamCaption} 53)}}\label{_s_d_l__visualtest__screenshot_8h_ac7b5335651144961676abc2116c38299} 54Compare 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}. 55 56\begin{DoxyReturn}{Returns} 57-\/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. 58\end{DoxyReturn}