include/SDL_test_images.h
changeset 6762 c680e085a5f2
child 6763 9cbd31a3450b
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/include/SDL_test_images.h	Thu Dec 20 08:50:36 2012 -0800
     1.3 @@ -0,0 +1,81 @@
     1.4 +/*
     1.5 +  Simple DirectMedia Layer
     1.6 +  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     1.7 +
     1.8 +  This software is provided 'as-is', without any express or implied
     1.9 +  warranty.  In no event will the authors be held liable for any damages
    1.10 +  arising from the use of this software.
    1.11 +
    1.12 +  Permission is granted to anyone to use this software for any purpose,
    1.13 +  including commercial applications, and to alter it and redistribute it
    1.14 +  freely, subject to the following restrictions:
    1.15 +
    1.16 +  1. The origin of this software must not be misrepresented; you must not
    1.17 +     claim that you wrote the original software. If you use this software
    1.18 +     in a product, an acknowledgment in the product documentation would be
    1.19 +     appreciated but is not required.
    1.20 +  2. Altered source versions must be plainly marked as such, and must not be
    1.21 +     misrepresented as being the original software.
    1.22 +  3. This notice may not be removed or altered from any source distribution.
    1.23 +*/
    1.24 +
    1.25 +/**
    1.26 + *  \file SDL_test_images.h
    1.27 + *  
    1.28 + *  Include file for SDL test framework.
    1.29 + *
    1.30 + *  This code is a part of the SDL2_test library, not the main SDL library.
    1.31 + */
    1.32 +
    1.33 +/* 
    1.34 +
    1.35 + Defines some images for tests.
    1.36 +  
    1.37 +*/
    1.38 +
    1.39 +#ifndef _SDL_test_images_h
    1.40 +#define _SDL_test_images_h
    1.41 +
    1.42 +#include "begin_code.h"
    1.43 +/* Set up for C function definitions, even when using C++ */
    1.44 +#ifdef __cplusplus
    1.45 +/* *INDENT-OFF* */
    1.46 +extern "C" {
    1.47 +/* *INDENT-ON* */
    1.48 +#endif
    1.49 +
    1.50 +
    1.51 +/**
    1.52 + *Type for test images.
    1.53 + */
    1.54 +typedef struct SDLTest_SurfaceImage_s {
    1.55 +  int width;
    1.56 +  int height;
    1.57 +  unsigned int  bytes_per_pixel; /* 3:RGB, 4:RGBA */ 
    1.58 +  const unsigned char pixel_data[];
    1.59 +} SDLTest_SurfaceImage_t;
    1.60 +
    1.61 +/* Test images */
    1.62 +const SDLTest_SurfaceImage_t SDLTest_imageBlit;
    1.63 +const SDLTest_SurfaceImage_t SDLTest_imageBlitColor;
    1.64 +const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha;
    1.65 +const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd;
    1.66 +const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend;
    1.67 +const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod;
    1.68 +const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone;
    1.69 +const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll;
    1.70 +const SDLTest_SurfaceImage_t SDLTest_ImageFace;
    1.71 +const SDLTest_SurfaceImage_t SDLTest_imagePrimitives;
    1.72 +const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend;
    1.73 +
    1.74 +/* Ends C function definitions when using C++ */
    1.75 +#ifdef __cplusplus
    1.76 +/* *INDENT-OFF* */
    1.77 +}
    1.78 +/* *INDENT-ON* */
    1.79 +#endif
    1.80 +#include "close_code.h"
    1.81 +
    1.82 +#endif /* _SDL_test_images_h */
    1.83 +
    1.84 +/* vi: set ts=4 sw=4 expandtab: */