Mercurial > sdl-ios-xcode
comparison src/video/quartz/SDL_QuartzEvents.m @ 683:5d2f027b3349
Date: Sat, 9 Aug 2003 20:14:06 -0400
From: Darrell Walisser
Subject: Re: Updated projects?
>> Did you get a chance to look at my "Custom Cocoa" demo? I have a few
>> minor patches that enable SDL/Cocoa integration, and a project
>> template.
>
> I didn't yet, but go ahead and send me the patches. :)
>
I updated the patch for current CVS. There are a lot of changes, but I
don't think I've broken anything. This patch also improves the behavior
of window minimize/deminimize.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 10 Aug 2003 07:21:43 +0000 |
parents | abfdc08eb289 |
children | c5b2b6d2d1fe |
comparison
equal
deleted
inserted
replaced
682:8b2b97e466bc | 683:5d2f027b3349 |
---|---|
249 key.mod = KMOD_NONE; | 249 key.mod = KMOD_NONE; |
250 | 250 |
251 SDL_PrivateKeyboard (state, &key); | 251 SDL_PrivateKeyboard (state, &key); |
252 } | 252 } |
253 } | 253 } |
254 | |
255 if (getenv ("SDL_ENABLEAPPEVENTS")) | |
256 [ NSApp sendEvent:event ]; | |
254 } | 257 } |
255 | 258 |
256 static void QZ_DoModifiers (_THIS, unsigned int newMods) { | 259 static void QZ_DoModifiers (_THIS, unsigned int newMods) { |
257 | 260 |
258 const int mapping[] = { SDLK_CAPSLOCK, SDLK_LSHIFT, SDLK_LCTRL, SDLK_LALT, SDLK_LMETA }; | 261 const int mapping[] = { SDLK_CAPSLOCK, SDLK_LSHIFT, SDLK_LCTRL, SDLK_LALT, SDLK_LMETA }; |
462 [ NSApp sendEvent:event ]; \ | 465 [ NSApp sendEvent:event ]; \ |
463 } while(0) | 466 } while(0) |
464 | 467 |
465 type = [ event type ]; | 468 type = [ event type ]; |
466 isForGameWin = (qz_window == [ event window ]); | 469 isForGameWin = (qz_window == [ event window ]); |
467 isInGameWin = (mode_flags & SDL_FULLSCREEN) ? true : NSPointInRect([event locationInWindow], winRect); | 470 isInGameWin = (mode_flags & SDL_FULLSCREEN) ? true : NSPointInRect([event locationInWindow], [ window_view frame ]); |
468 switch (type) { | 471 switch (type) { |
469 case NSLeftMouseDown: | 472 case NSLeftMouseDown: |
470 if ( getenv("SDL_HAS3BUTTONMOUSE") ) { | 473 if ( getenv("SDL_HAS3BUTTONMOUSE") ) { |
471 DO_MOUSE_DOWN (SDL_BUTTON_LEFT); | 474 DO_MOUSE_DOWN (SDL_BUTTON_LEFT); |
472 } else { | 475 } else { |