Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoawindow.m @ 4811:d79939f20c45
Working on Cocoa implementation.
author | Eli Gottlieb <eligottlieb@gmail.com> |
---|---|
date | Mon, 26 Jul 2010 21:48:53 -0400 |
parents | 6512cba48440 |
children | 7b1d35d98294 |
comparison
equal
deleted
inserted
replaced
4810:7a602fd2121f | 4811:d79939f20c45 |
---|---|
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_windowevents_c.h" | 28 #include "../../events/SDL_windowevents_c.h" |
29 | 29 |
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 } |
109 { | 110 { |
110 int w, h; | 111 int w, h; |
111 NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]]; | 112 NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]]; |
112 w = (int)rect.size.width; | 113 w = (int)rect.size.width; |
113 h = (int)rect.size.height; | 114 h = (int)rect.size.height; |
115 Cocoa_ResizeWindowShape(_data->window); | |
114 SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h); | 116 SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h); |
115 } | 117 } |
116 | 118 |
117 - (void)windowDidMiniaturize:(NSNotification *)aNotification | 119 - (void)windowDidMiniaturize:(NSNotification *)aNotification |
118 { | 120 { |