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