Mercurial > sdl-ios-xcode
comparison src/video/SDL_shape_internals.h @ 4814:4f7133445367
Added the header to the repo. Oops.
author | Eli Gottlieb <eligottlieb@gmail.com> |
---|---|
date | Thu, 29 Jul 2010 12:49:17 -0400 |
parents | |
children | c68e7490e4cf |
comparison
equal
deleted
inserted
replaced
4813:5b4c7d7d8953 | 4814:4f7133445367 |
---|---|
1 /* | |
2 SDL - Simple DirectMedia Layer | |
3 Copyright (C) 2010 Eli Gottlieb | |
4 | |
5 This library is free software; you can redistribute it and/or | |
6 modify it under the terms of the GNU Lesser General Public | |
7 License as published by the Free Software Foundation; either | |
8 version 2.1 of the License, or (at your option) any later version. | |
9 | |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 Lesser General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU Lesser General Public | |
16 License along with this library; if not, write to the Free Software | |
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | |
19 Eli Gottlieb | |
20 eligottlieb@gmail.com | |
21 */ | |
22 | |
23 #ifndef _SDL_shape_internals_h | |
24 #define _SDL_shape_internals_h | |
25 | |
26 #include "SDL_rect.h" | |
27 #include "SDL_shape.h" | |
28 #include "SDL_surface.h" | |
29 | |
30 #include "begin_code.h" | |
31 /* Set up for C function definitions, even when using C++ */ | |
32 #ifdef __cplusplus | |
33 /* *INDENT-OFF* */ | |
34 extern "C" { | |
35 /* *INDENT-ON* */ | |
36 #endif | |
37 | |
38 typedef struct { | |
39 struct SDL_ShapeTree *upleft,*upright,*downleft,*downright; | |
40 } SDL_QuadTreeChildren; | |
41 | |
42 typedef union { | |
43 SDL_QuadTreeChildren children; | |
44 SDL_Rect shape; | |
45 } SDL_ShapeUnion; | |
46 | |
47 typedef enum { QuadShape,TransparentShape,OpaqueShape } SDL_ShapeKind; | |
48 | |
49 typedef struct { | |
50 SDL_ShapeKind kind; | |
51 SDL_ShapeUnion data; | |
52 } SDL_ShapeTree; | |
53 | |
54 extern void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb,Uint8 value); | |
55 extern SDL_ShapeTree* SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape,SDL_bool invert); | |
56 extern void SDL_TraverseShapeTree(SDL_ShapeTree *tree,void(*function)(SDL_ShapeTree*,void*),void* closure); | |
57 extern void SDL_FreeShapeTree(SDL_ShapeTree** shapeTree); | |
58 | |
59 /* Ends C function definitions when using C++ */ | |
60 #ifdef __cplusplus | |
61 /* *INDENT-OFF* */ | |
62 } | |
63 /* *INDENT-ON* */ | |
64 #endif | |
65 #include "close_code.h" | |
66 | |
67 #endif |