Mercurial > sdl-ios-xcode
annotate include/SDL_shape.h @ 5216:25ad4a50d34f
OpenGL ES 2.0 rendering LIVES!
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 06 Feb 2011 19:12:55 -0800 |
parents | 0b918c186938 |
children |
rev | line source |
---|---|
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
1 /* |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
3 Copyright (C) 2010 Eli Gottlieb |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
4 |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
9 |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
14 |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
18 |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
19 Eli Gottlieb |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
20 eligottlieb@gmail.com |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
21 */ |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
22 |
4769
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
23 #ifndef _SDL_shape_h |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
24 #define _SDL_shape_h |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
25 |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
26 #include "SDL_stdinc.h" |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
27 #include "SDL_pixels.h" |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
28 #include "SDL_rect.h" |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
29 #include "SDL_surface.h" |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
30 #include "SDL_video.h" |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
31 |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
32 #include "begin_code.h" |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
33 /* Set up for C function definitions, even when using C++ */ |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
34 #ifdef __cplusplus |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
35 /* *INDENT-OFF* */ |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
36 extern "C" { |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
37 /* *INDENT-ON* */ |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
38 #endif |
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
39 |
4779
bb179250fcb3
Doxygen commenting is all finished up.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4778
diff
changeset
|
40 /** \file SDL_shape.h |
bb179250fcb3
Doxygen commenting is all finished up.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4778
diff
changeset
|
41 * |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
42 * Header file for the shaped window API. |
4779
bb179250fcb3
Doxygen commenting is all finished up.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4778
diff
changeset
|
43 */ |
bb179250fcb3
Doxygen commenting is all finished up.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4778
diff
changeset
|
44 |
4801
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
45 #define SDL_NONSHAPEABLE_WINDOW -1 |
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
46 #define SDL_INVALID_SHAPE_ARGUMENT -2 |
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
47 #define SDL_WINDOW_LACKS_SHAPE -3 |
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
48 |
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
49 /** |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
50 * \brief Create a window that can be shaped with the specified position, dimensions, and flags. |
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
51 * |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
52 * \param title The title of the window, in UTF-8 encoding. |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
53 * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
54 * ::SDL_WINDOWPOS_UNDEFINED. |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
55 * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
56 * ::SDL_WINDOWPOS_UNDEFINED. |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
57 * \param w The width of the window. |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
58 * \param h The height of the window. |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
59 * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: |
4767
dc3fd9b7fcbc
I'm actually going to have to alter this proposed API a fair bit, but it's coming along. I want to keep it as orthogonal to the rest of SDL as possible.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4766
diff
changeset
|
60 * ::SDL_WINDOW_OPENGL, ::SDL_WINDOW_INPUT_GRABBED, |
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
61 * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_RESIZABLE, |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
62 * ::SDL_WINDOW_MAXIMIZED, ::SDL_WINDOW_MINIMIZED, |
4767
dc3fd9b7fcbc
I'm actually going to have to alter this proposed API a fair bit, but it's coming along. I want to keep it as orthogonal to the rest of SDL as possible.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4766
diff
changeset
|
63 * ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset. |
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
64 * |
4801
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
65 * \return The window created, or NULL if window creation failed. |
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
66 * |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
67 * \sa SDL_DestroyWindow() |
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
68 */ |
4768
4435e014eacc
Changed API for shaped windows to make it much, much simpler. A shaped window's shape mask is now accessed as a render target, which means we can get at it with blit and draw functions, as well as (most likely) OpenGL.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4767
diff
changeset
|
69 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); |
4766
7b50faf23907
Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff
changeset
|
70 |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
71 /** |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
72 * \brief Return whether the given window is a shaped window. |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
73 * |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
74 * \param window The window to query for being shaped. |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
75 * |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
76 * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
77 * \sa SDL_CreateShapedWindow |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
78 */ |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
79 extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window); |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
80 |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
81 /** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */ |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
82 typedef enum { |
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
83 /** \brief The default mode, a binarized alpha cutoff of 1. */ |
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
84 ShapeModeDefault, |
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
85 /** \brief A binarized alpha cutoff with a given integer value. */ |
4807
c9eb95f29770
Added color-key mode and redid the code to work with it.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4801
diff
changeset
|
86 ShapeModeBinarizeAlpha, |
c9eb95f29770
Added color-key mode and redid the code to work with it.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4801
diff
changeset
|
87 /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */ |
c9eb95f29770
Added color-key mode and redid the code to work with it.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4801
diff
changeset
|
88 ShapeModeReverseBinarizeAlpha, |
c9eb95f29770
Added color-key mode and redid the code to work with it.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4801
diff
changeset
|
89 /** \brief A color key is applied. */ |
c9eb95f29770
Added color-key mode and redid the code to work with it.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4801
diff
changeset
|
90 ShapeModeColorKey |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
91 } WindowShapeMode; |
4846
4f1573996a65
Fixed a bug in X11 shaping that refused to use color-key mode.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4807
diff
changeset
|
92 |
4f1573996a65
Fixed a bug in X11 shaping that refused to use color-key mode.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4807
diff
changeset
|
93 #define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha) |
4f1573996a65
Fixed a bug in X11 shaping that refused to use color-key mode.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4807
diff
changeset
|
94 |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
95 /** \brief A union containing parameters for shaped windows. */ |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
96 typedef union { |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
97 /** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */ |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
98 Uint8 binarizationCutoff; |
4807
c9eb95f29770
Added color-key mode and redid the code to work with it.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4801
diff
changeset
|
99 SDL_Color colorKey; |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
100 } SDL_WindowShapeParams; |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
101 |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
102 /** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */ |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
103 typedef struct SDL_WindowShapeMode { |
4779
bb179250fcb3
Doxygen commenting is all finished up.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4778
diff
changeset
|
104 /** \brief The mode of these window-shape parameters. */ |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
105 WindowShapeMode mode; |
4779
bb179250fcb3
Doxygen commenting is all finished up.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4778
diff
changeset
|
106 /** \brief Window-shape parameters. */ |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
107 SDL_WindowShapeParams parameters; |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
108 } SDL_WindowShapeMode; |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
109 |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
110 /** |
4780
4f915a47b995
Replaced the model of treating a window's shape as a render target with treating a window's shape as a surface passed into an SDL_SetWindowShape() function. I'll send this off to Andreas and Sam and start coding.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4779
diff
changeset
|
111 * \brief Set the shape and parameters of a shaped window. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
112 * |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
113 * \param window The shaped window whose parameters should be set. |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
114 * \param shape A surface encoding the desired shape for the window. |
4849
0b918c186938
Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now!
egottlieb
parents:
4846
diff
changeset
|
115 * \param shape_mode The parameters to set for the shaped window. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
116 * |
4801
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
117 * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on invalid an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW |
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
118 * if the SDL_Window* given does not reference a valid shaped window. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
119 * |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
120 * \sa SDL_WindowShapeMode |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
121 * \sa SDL_GetShapedWindowMode. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
122 */ |
4849
0b918c186938
Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now!
egottlieb
parents:
4846
diff
changeset
|
123 extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
124 |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
125 /** |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
126 * \brief Get the shape parameters of a shaped window. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
127 * |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
128 * \param window The shaped window whose parameters should be retrieved. |
4849
0b918c186938
Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now!
egottlieb
parents:
4846
diff
changeset
|
129 * \param shape_mode An empty shape-mode structure to fill, or NULL to check whether the window has a shape. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
130 * |
4849
0b918c186938
Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now!
egottlieb
parents:
4846
diff
changeset
|
131 * \return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode |
4801
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
132 * data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if |
506a9165491b
Added #define's for error codes returned from SDL shaped-window API.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4782
diff
changeset
|
133 * the SDL_Window* given is a shapeable window currently lacking a shape. |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
134 * |
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
135 * \sa SDL_WindowShapeMode |
4781
fc4c775b468a
Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4780
diff
changeset
|
136 * \sa SDL_SetWindowShape |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
137 */ |
4849
0b918c186938
Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now!
egottlieb
parents:
4846
diff
changeset
|
138 extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode); |
4778
9838d3525a1b
Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4776
diff
changeset
|
139 |
4769
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
140 /* Ends C function definitions when using C++ */ |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
141 #ifdef __cplusplus |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
142 /* *INDENT-OFF* */ |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
143 } |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
144 /* *INDENT-ON* */ |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
145 #endif |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
146 #include "close_code.h" |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
147 |
83f9b95da263
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
4768
diff
changeset
|
148 #endif /* _SDL_shape_h */ |