Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoashape.m @ 4810:7a602fd2121f
OK, it appears that dramatic hacks are not necessary to make Cocoa work...
author | Eli Gottlieb <eligottlieb@gmail.com> |
---|---|
date | Mon, 26 Jul 2010 20:41:45 -0400 |
parents | 329708ffe2a7 |
children | d79939f20c45 |
comparison
equal
deleted
inserted
replaced
4809:329708ffe2a7 | 4810:7a602fd2121f |
---|---|
19 Eli Gottlieb | 19 Eli Gottlieb |
20 eligottlieb@gmail.com | 20 eligottlieb@gmail.com |
21 */ | 21 */ |
22 | 22 |
23 #include "SDL_shape.h" | 23 #include "SDL_shape.h" |
24 #include "SDL_cocoashape.h" | |
24 | 25 |
25 /* Functions implementing shaped windows for Cocoa will be implemented when the API is decided on. */ | 26 SDL_WindowShaper* Cocoa_CreateShaper(SDL_Window* window) { |
27 SDL_WindowData* data = (SDL_WindowData*)window->driverdata; | |
28 [data->nswindow setAlpha:1.0]; | |
29 [data->nswindow setOpaque:YES]; | |
30 SDL_Shaper* result = result = malloc(sizeof(SDL_WindowShaper)); | |
31 result->window = window; | |
32 result->mode.mode = ShapeModeDefault; | |
33 result->mode.parameters.binarizationCutoff = 1; | |
34 result->usershownflag = 0; | |
35 window->shaper = result; | |
36 int resized_properly = Cocoa_ResizeWindowShape(window); | |
37 assert(resized_properly == 0); | |
38 return result; | |
39 } | |
40 | |
41 extern int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); | |
42 extern int Cocoa_ResizeWindowShape(SDL_Window *window); |