comparison src/video/quartz/SDL_QuartzEvents.m @ 1338:604d73db6802

Removed uses of stdlib.h and string.h
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 09:29:18 +0000
parents 8eb191652834
children c71e05b4dc2e
comparison
equal deleted inserted replaced
1337:c687f06c7473 1338:604d73db6802
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 #include "SDL_stdlib.h"
23 #include "SDL_QuartzVideo.h" 24 #include "SDL_QuartzVideo.h"
24 25
25 #include <stdlib.h> // For getenv()
26 #include <IOKit/IOMessage.h> // For wake from sleep detection 26 #include <IOKit/IOMessage.h> // For wake from sleep detection
27 #include <IOKit/pwr_mgt/IOPMLib.h> // For wake from sleep detection 27 #include <IOKit/pwr_mgt/IOPMLib.h> // For wake from sleep detection
28 #include "SDL_QuartzKeys.h" 28 #include "SDL_QuartzKeys.h"
29 29
30 /* 30 /*
293 293
294 SDL_PrivateKeyboard (state, &key); 294 SDL_PrivateKeyboard (state, &key);
295 } 295 }
296 } 296 }
297 297
298 if (getenv ("SDL_ENABLEAPPEVENTS")) 298 if (SDL_getenv ("SDL_ENABLEAPPEVENTS"))
299 [ NSApp sendEvent:event ]; 299 [ NSApp sendEvent:event ];
300 } 300 }
301 301
302 /* This is the original behavior, before support was added for 302 /* This is the original behavior, before support was added for
303 * differentiating between left and right versions of the keys. 303 * differentiating between left and right versions of the keys.
771 771
772 QZ_DoModifiers(this, [ event modifierFlags ] ); 772 QZ_DoModifiers(this, [ event modifierFlags ] );
773 773
774 switch (type) { 774 switch (type) {
775 case NSLeftMouseDown: 775 case NSLeftMouseDown:
776 if ( getenv("SDL_HAS3BUTTONMOUSE") ) { 776 if ( SDL_getenv("SDL_HAS3BUTTONMOUSE") ) {
777 DO_MOUSE_DOWN (SDL_BUTTON_LEFT); 777 DO_MOUSE_DOWN (SDL_BUTTON_LEFT);
778 } else { 778 } else {
779 if ( NSCommandKeyMask & current_mods ) { 779 if ( NSCommandKeyMask & current_mods ) {
780 last_virtual_button = SDL_BUTTON_RIGHT; 780 last_virtual_button = SDL_BUTTON_RIGHT;
781 DO_MOUSE_DOWN (SDL_BUTTON_RIGHT); 781 DO_MOUSE_DOWN (SDL_BUTTON_RIGHT);