visualtest/include/SDL_visualtest_random_variator.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.
icculus@7924
     1
/* See COPYING.txt for the full license governing this code. */
icculus@7924
     2
/**
icculus@7924
     3
 * \file SDL_visualtest_random_variator.h
icculus@7924
     4
 *
icculus@7924
     5
 * Header for the random variator.
icculus@7924
     6
 */
icculus@7924
     7
icculus@7924
     8
#include "SDL_visualtest_harness_argparser.h"
icculus@7924
     9
#include "SDL_visualtest_variator_common.h"
icculus@7924
    10
icculus@7924
    11
#ifndef _SDL_visualtest_random_variator_h
icculus@7924
    12
#define _SDL_visualtest_random_variator_h
icculus@7924
    13
icculus@7924
    14
/* Set up for C function definitions, even when using C++ */
icculus@7924
    15
#ifdef __cplusplus
icculus@7924
    16
extern "C" {
icculus@7924
    17
#endif
icculus@7924
    18
icculus@7924
    19
/**
icculus@7924
    20
 * Struct for the variator that randomly generates variations of command line
icculus@7924
    21
 * arguments to the SUT.
icculus@7924
    22
 */
icculus@7924
    23
typedef struct SDLVisualTest_RandomVariator
icculus@7924
    24
{
icculus@7924
    25
    /*! The current variation. */
icculus@7924
    26
    SDLVisualTest_Variation variation;
icculus@7924
    27
    /*! Configuration object for the SUT that the variator is running for. */
icculus@7924
    28
    SDLVisualTest_SUTConfig config;
icculus@7924
    29
    /*! Buffer to store the arguments string built from the variation */
icculus@7924
    30
    char buffer[MAX_SUT_ARGS_LEN];
icculus@7924
    31
} SDLVisualTest_RandomVariator;
icculus@7924
    32
icculus@7924
    33
/**
icculus@7924
    34
 * Initializes the variator.
icculus@7924
    35
 *
icculus@7924
    36
 * \return 1 on success, 0 on failure
icculus@7924
    37
 */
icculus@7924
    38
int SDLVisualTest_InitRandomVariator(SDLVisualTest_RandomVariator* variator,
icculus@7924
    39
                                     SDLVisualTest_SUTConfig* config, Uint64 seed);
icculus@7924
    40
icculus@7924
    41
/**
icculus@7924
    42
 * Generates a new random variation.
icculus@7924
    43
 *
icculus@7924
    44
 * \return The arguments string representing the random variation on success, and
icculus@7924
    45
 *         NULL on failure. The pointer returned should not be freed.
icculus@7924
    46
 */
icculus@7924
    47
char* SDLVisualTest_GetNextRandomVariation(SDLVisualTest_RandomVariator* variator);
icculus@7924
    48
icculus@7924
    49
/**
icculus@7924
    50
 * Frees any resources associated with the variator.
icculus@7924
    51
 */
icculus@7924
    52
void SDLVisualTest_FreeRandomVariator(SDLVisualTest_RandomVariator* variator);
icculus@7924
    53
icculus@7924
    54
/* Ends C function definitions when using C++ */
icculus@7924
    55
#ifdef __cplusplus
icculus@7924
    56
}
icculus@7924
    57
#endif
icculus@7924
    58
icculus@7924
    59
#endif /* _SDL_visualtest_random_variator_h */