visualtest/include/SDL_visualtest_screenshot.h
author David Ludwig <dludwig@pobox.com>
Wed, 25 Dec 2013 21:39:48 -0500
changeset 8563 c0e68f3b6bbb
parent 7924 fcb86d323770
child 11382 2c50e79b19e0
permissions -rw-r--r--
WinRT: compiled the d3d11 renderer's shaders into SDL itself

Previously, the shaders would get compiled separately, the output of which would need to be packaged into the app. This change should make SDL's dll be the only binary needed to include SDL in a WinRT app.
     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 
     8 #include "SDL_visualtest_process.h"
     9 
    10 #ifndef _SDL_visualtest_screenshot_h
    11 #define _SDL_visualtest_screenshot_h
    12 
    13 /* Set up for C function definitions, even when using C++ */
    14 #ifdef __cplusplus
    15 extern "C" {
    16 #endif
    17 
    18 /**
    19  * Takes a screenshot of each window owned by the process \c pinfo and saves 
    20  * it in a file \c prefix-i.png where \c prefix is the full path to the file 
    21  * along with a prefix given to each screenshot.
    22  *
    23  * \return 1 on success, 0 on failure.
    24  */
    25 int SDLVisualTest_ScreenshotProcess(SDL_ProcessInfo* pinfo, char* prefix);
    26 
    27 /**
    28  * Takes a screenshot of the desktop and saves it into the file with path
    29  * \c filename.
    30  *
    31  * \return 1 on success, 0 on failure.
    32  */
    33 int SDLVisualTest_ScreenshotDesktop(char* filename);
    34 
    35 /**
    36  * Compare a screenshot taken previously with SUT arguments \c args that is
    37  * located in \c test_dir with a verification image that is located in 
    38  * \c verify_dir.
    39  *
    40  * \return -1 on failure, 0 if the images were not equal, 1 if the images are equal
    41  *         and 2 if the verification image is not present.
    42  */
    43 int SDLVisualTest_VerifyScreenshots(char* args, char* test_dir, char* verify_dir);
    44 
    45 /* Ends C function definitions when using C++ */
    46 #ifdef __cplusplus
    47 }
    48 #endif
    49 
    50 #endif /* _SDL_visualtest_screenshot_h */