annotate src/video/SDL_shape.c @ 4781:fc4c775b468a

Added Andreas's fixes to the header and stub file for SDL_shape.
author Eli Gottlieb <eligottlieb@gmail.com>
date Mon, 21 Jun 2010 23:08:10 -0400
parents 4f915a47b995
children b6930aefd008
rev   line source
4765
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
1 /*
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
3 Copyright (C) 2010 Eli Gottlieb
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
4
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
9
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
13 Lesser General Public License for more details.
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
14
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
18
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
19 Eli Gottlieb
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
20 eligottlieb@gmail.com
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
21 */
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: 4766
diff changeset
22 #include "SDL_config.h"
4776
29dcad9c58b3 Removed and added back SDL_shape.{c,h} wholesale. Will this get them tracked properly?
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4775
diff changeset
23
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: 4766
diff changeset
24 #include "SDL.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: 4766
diff changeset
25 #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: 4766
diff changeset
26 #include "SDL_sysvideo.h"
4765
5ff305de5834 Added stub files, working on sample program SDLeyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
27 #include "SDL_shape.h"
4766
7b50faf23907 Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4765
diff changeset
28
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: 4766
diff changeset
29 SDL_Window* 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: 4765
diff changeset
30 return NULL;
7b50faf23907 Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4765
diff changeset
31 }
7b50faf23907 Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4765
diff changeset
32
4781
fc4c775b468a Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4780
diff changeset
33 SDL_bool SDL_IsShapedWindow(const SDL_Window *window) {
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: 4766
diff changeset
34 return SDL_FALSE;
4766
7b50faf23907 Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4765
diff changeset
35 }
7b50faf23907 Moved SDL_shape.h, and building out the API as needed by SDL_Eyes.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4765
diff changeset
36
4781
fc4c775b468a Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4780
diff changeset
37 int SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode) {
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
38 if(window == NULL || !SDL_WindowIsShaped(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
39 return -2;
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: 4778
diff changeset
40 if(shape == NULL)
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: 4778
diff changeset
41 return -1;
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
42 return -3;
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
43 }
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
44
4781
fc4c775b468a Added Andreas's fixes to the header and stub file for SDL_shape.
Eli Gottlieb <eligottlieb@gmail.com>
parents: 4780
diff changeset
45 int SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shapeMode) {
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
46 if(shapeMode == NULL)
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
47 return -1;
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
48 if(window == NULL || !SDL_WindowIsShaped(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
49 return -2;
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
50 return -3;
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
51 }