src/video/SDL_shape_internals.h
changeset 4814 4f7133445367
child 4817 c68e7490e4cf
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/SDL_shape_internals.h	Thu Jul 29 12:49:17 2010 -0400
     1.3 @@ -0,0 +1,67 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 2010 Eli Gottlieb
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Lesser General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2.1 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Lesser General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Lesser General Public
    1.19 +    License along with this library; if not, write to the Free Software
    1.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 +
    1.22 +    Eli Gottlieb
    1.23 +    eligottlieb@gmail.com
    1.24 +*/
    1.25 +
    1.26 +#ifndef _SDL_shape_internals_h
    1.27 +#define _SDL_shape_internals_h
    1.28 +
    1.29 +#include "SDL_rect.h"
    1.30 +#include "SDL_shape.h"
    1.31 +#include "SDL_surface.h"
    1.32 +
    1.33 +#include "begin_code.h"
    1.34 +/* Set up for C function definitions, even when using C++ */
    1.35 +#ifdef __cplusplus
    1.36 +/* *INDENT-OFF* */
    1.37 +extern "C" {
    1.38 +/* *INDENT-ON* */
    1.39 +#endif
    1.40 +
    1.41 +typedef struct {
    1.42 +	struct SDL_ShapeTree *upleft,*upright,*downleft,*downright;
    1.43 +} SDL_QuadTreeChildren;
    1.44 +
    1.45 +typedef union {
    1.46 +	SDL_QuadTreeChildren children;
    1.47 +	SDL_Rect shape;
    1.48 +} SDL_ShapeUnion;
    1.49 +
    1.50 +typedef enum { QuadShape,TransparentShape,OpaqueShape } SDL_ShapeKind;
    1.51 +
    1.52 +typedef struct {
    1.53 +	SDL_ShapeKind kind;
    1.54 +	SDL_ShapeUnion data;
    1.55 +} SDL_ShapeTree;
    1.56 +
    1.57 +extern void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb,Uint8 value);
    1.58 +extern SDL_ShapeTree* SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape,SDL_bool invert);
    1.59 +extern void SDL_TraverseShapeTree(SDL_ShapeTree *tree,void(*function)(SDL_ShapeTree*,void*),void* closure);
    1.60 +extern void SDL_FreeShapeTree(SDL_ShapeTree** shapeTree);
    1.61 +
    1.62 +/* Ends C function definitions when using C++ */
    1.63 +#ifdef __cplusplus
    1.64 +/* *INDENT-OFF* */
    1.65 +}
    1.66 +/* *INDENT-ON* */
    1.67 +#endif
    1.68 +#include "close_code.h"
    1.69 +
    1.70 +#endif