Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoawindow.m @ 4862:7b1d35d98294
Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 22 Aug 2010 13:45:56 -0700 |
parents | 257bdf117af8 d79939f20c45 |
children | 69d9db65f248 |
comparison
equal
deleted
inserted
replaced
4764:102675835e08 | 4862:7b1d35d98294 |
---|---|
26 #include "../../events/SDL_keyboard_c.h" | 26 #include "../../events/SDL_keyboard_c.h" |
27 #include "../../events/SDL_mouse_c.h" | 27 #include "../../events/SDL_mouse_c.h" |
28 #include "../../events/SDL_touch_c.h" | 28 #include "../../events/SDL_touch_c.h" |
29 #include "../../events/SDL_windowevents_c.h" | 29 #include "../../events/SDL_windowevents_c.h" |
30 #include "SDL_cocoavideo.h" | 30 #include "SDL_cocoavideo.h" |
31 #include "SDL_cocoashape.h" | |
31 | 32 |
32 static __inline__ void ConvertNSRect(NSRect *r) | 33 static __inline__ void ConvertNSRect(NSRect *r) |
33 { | 34 { |
34 r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height; | 35 r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height; |
35 } | 36 } |
110 { | 111 { |
111 int w, h; | 112 int w, h; |
112 NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]]; | 113 NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]]; |
113 w = (int)rect.size.width; | 114 w = (int)rect.size.width; |
114 h = (int)rect.size.height; | 115 h = (int)rect.size.height; |
116 Cocoa_ResizeWindowShape(_data->window); | |
115 SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h); | 117 SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h); |
116 } | 118 } |
117 | 119 |
118 - (void)windowDidMiniaturize:(NSNotification *)aNotification | 120 - (void)windowDidMiniaturize:(NSNotification *)aNotification |
119 { | 121 { |