comparison src/video/cocoa/SDL_cocoawindow.m @ 4900:69d9db65f248

Merged the Windows custom window system hooks into the union used by X11. Added Cocoa custom window system hooks
author Sam Lantinga <slouken@libsdl.org>
date Mon, 27 Sep 2010 01:24:05 -0700
parents 7b1d35d98294
children 50d0bff24d81
comparison
equal deleted inserted replaced
4899:5d529386db73 4900:69d9db65f248
702 } 702 }
703 703
704 SDL_bool 704 SDL_bool
705 Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) 705 Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
706 { 706 {
707 //NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow; 707 NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
708 708
709 if (info->version.major <= SDL_MAJOR_VERSION) { 709 if (info->version.major <= SDL_MAJOR_VERSION) {
710 //info->window = nswindow; 710 info->subsystem = SDL_SYSWM_COCOA;
711 info->info.cocoa.window = nswindow;
711 return SDL_TRUE; 712 return SDL_TRUE;
712 } else { 713 } else {
713 SDL_SetError("Application not compiled with SDL %d.%d\n", 714 SDL_SetError("Application not compiled with SDL %d.%d\n",
714 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); 715 SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
715 return SDL_FALSE; 716 return SDL_FALSE;