annotate src/video/cocoa/SDL_cocoashape.h @ 4833:34fb492cefe3

Shaped windows for Cocoa build and testshape runs, but the actual shaping doesn't work. Something, however, is definitely happening, because we get the backgrounds drawn in two different colors.
author egottlieb
date Thu, 05 Aug 2010 01:03:24 -0400
parents 8dabd625079f
children 91f4d4d5c395
rev   line source
4825
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
1 /*
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
3 Copyright (C) 2010 Eli Gottlieb
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
4
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
9
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
13 Lesser General Public License for more details.
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
14
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
18
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
19 Eli Gottlieb
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
20 eligottlieb@gmail.com
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
21 */
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
22
4827
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
23 #include "SDL_config.h"
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
24
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
25 #ifndef _SDL_cocoashape_h
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
26 #define _SDL_cocoashape_h
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
27
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
28 #include "SDL_stdinc.h"
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
29 #include "SDL_video.h"
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
30 #include "SDL_shape.h"
4831
8dabd625079f Building under OS X with command-line tools now works.
egottlieb
parents: 4827
diff changeset
31 #include "../SDL_shape_internals.h"
4827
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
32
4825
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
33 typedef struct {
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
34 NSGraphicsContext* context;
4827
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
35 SDL_bool saved;
4825
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
36
4827
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
37 SDL_ShapeTree* shape;
4825
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
38 } SDL_ShapeData;
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
39
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
40 extern SDL_WindowShaper* Cocoa_CreateShaper(SDL_Window* window);
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
41 extern int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode);
760ab1b145b8 Added SDL_cocoashape.h
Eli Gottlieb <eligottlieb@gmail.com>
parents:
diff changeset
42 extern int Cocoa_ResizeWindowShape(SDL_Window *window);
4827
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
43
5660aac926e9 Got basic, pre-actually-writing-anything Cocoa to build.
egottlieb
parents: 4825
diff changeset
44 #endif