doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
macosx_event.mm File Reference
#import "../../idlib/precompiled.h"
#import "macosx_local.h"
#import "macosx_sys.h"
#import <AppKit/NSCursor.h>
#import <AppKit/NSWindow.h>
#import <AppKit/NSScreen.h>
#import <AppKit/NSApplication.h>
#import <AppKit/NSGraphicsContext.h>
#import <AppKit/NSEvent.h>
#import <Foundation/NSArray.h>
#import <Foundation/NSString.h>
#import <Foundation/NSRunLoop.h>
#import <Carbon/Carbon.h>
#import <ApplicationServices/ApplicationServices.h>
#import <sys/types.h>
#import <sys/time.h>
#import <unistd.h>
#include <pthread.h>

Go to the source code of this file.

Functions

void Sys_InitScanTable (void)
 
void Sys_InitInput (void)
 
void Sys_ShutdownInput (void)
 
void processMouseMovedEvent (NSEvent *mouseMovedEvent)
 
bool OSX_LookupCharacter (unsigned short vkey, unsigned int modifiers, bool keyDownFlag, unsigned char *outChar)
 
void OSX_ProcessKeyEvent (NSEvent *keyEvent, bool keyDownFlag)
 
void sendEventForMaskChangeInFlags (int quakeKey, unsigned int modifierMask, unsigned int oldModifierFlags, unsigned int newModifierFlags)
 
void processFlagsChangedEvent (NSEvent *flagsChangedEvent)
 
void processSystemDefinedEvent (NSEvent *systemDefinedEvent)
 
void processEvent (NSEvent *event)
 
void Posix_PollInput (void)
 
void Sys_PreventMouseMovement (CGPoint point)
 
void Sys_ReenableMouseMovement ()
 
void Sys_LockMouseInInputRect (CGRect rect)
 
void Sys_SetMouseInputRect (CGRect newRect)
 
void IN_ActivateMouse (void)
 
void IN_DeactivateMouse (void)
 
unsigned char Sys_MapCharForKey (int key)
 
unsigned char Sys_GetConsoleKey (bool shifted)
 

Variables

int vkeyToDoom3Key [256]
 
int vkeyToDoom3Key_French [256]
 
int vkeyToDoom3Key_German [256]
 

Function Documentation

void IN_ActivateMouse ( void  )

Definition at line 497 of file macosx_event.mm.

void IN_DeactivateMouse ( void  )

Definition at line 510 of file macosx_event.mm.

bool OSX_LookupCharacter ( unsigned short  vkey,
unsigned int  modifiers,
bool  keyDownFlag,
unsigned char *  outChar 
)
inline

Definition at line 247 of file macosx_event.mm.

void OSX_ProcessKeyEvent ( NSEvent *  keyEvent,
bool  keyDownFlag 
)

Definition at line 275 of file macosx_event.mm.

void Posix_PollInput ( void  )

Definition at line 434 of file macosx_event.mm.

void processEvent ( NSEvent *  event)

Definition at line 379 of file macosx_event.mm.

void processFlagsChangedEvent ( NSEvent *  flagsChangedEvent)

Definition at line 317 of file macosx_event.mm.

void processMouseMovedEvent ( NSEvent *  mouseMovedEvent)

Definition at line 183 of file macosx_event.mm.

void processSystemDefinedEvent ( NSEvent *  systemDefinedEvent)

Definition at line 328 of file macosx_event.mm.

void sendEventForMaskChangeInFlags ( int  quakeKey,
unsigned int  modifierMask,
unsigned int  oldModifierFlags,
unsigned int  newModifierFlags 
)

Definition at line 305 of file macosx_event.mm.

unsigned char Sys_GetConsoleKey ( bool  shifted)

Definition at line 533 of file macosx_event.mm.

void Sys_InitInput ( void  )

Definition at line 157 of file macosx_event.mm.

void Sys_InitScanTable ( void  )

Definition at line 126 of file macosx_event.mm.

void Sys_LockMouseInInputRect ( CGRect  rect)

Definition at line 476 of file macosx_event.mm.

unsigned char Sys_MapCharForKey ( int  key)

Definition at line 524 of file macosx_event.mm.

void Sys_PreventMouseMovement ( CGPoint  point)

Definition at line 448 of file macosx_event.mm.

void Sys_ReenableMouseMovement ( )

Definition at line 464 of file macosx_event.mm.

void Sys_SetMouseInputRect ( CGRect  newRect)

Definition at line 488 of file macosx_event.mm.

void Sys_ShutdownInput ( void  )

Definition at line 169 of file macosx_event.mm.

Variable Documentation

int vkeyToDoom3Key[256]
Initial value:
= {
'a', 's', 'd', 'f', 'h', 'g', 'z', 'x',
'c', 'v', '?', 'b', 'q', 'w', 'e', 'r',
'y', 't', '1', '2', '3', '4', '6', '5',
'=', '9', '7', '-', '8', '0', ']', 'o',
'u', '[', 'i', 'p', K_ENTER, 'l', 'j', '\'',
'k', ';', '\\', ',', '/', 'n', 'm', '.',
K_SHIFT, K_CAPSLOCK, K_ALT, K_CTRL, '?', '?', '?', '?',
'?', K_KP_DEL, '?', K_KP_STAR, '?', K_KP_PLUS, '?', K_KP_NUMLOCK,
'?', '?', '?', K_KP_SLASH, K_KP_ENTER, '?', K_KP_MINUS, '?',
'?', K_PRINT_SCR, '?', K_F14, '?', K_F10, '?', K_F12,
}
Definition: KeyInput.h:78
Definition: KeyInput.h:83
Definition: KeyInput.h:82
Definition: KeyInput.h:88
Definition: KeyInput.h:86
Definition: KeyInput.h:74
Definition: KeyInput.h:85
Definition: KeyInput.h:81
Definition: KeyInput.h:91
Definition: KeyInput.h:90
Definition: KeyInput.h:80
Definition: KeyInput.h:73
Definition: KeyInput.h:94
Definition: KeyInput.h:47
Definition: KeyInput.h:84
Definition: KeyInput.h:87
Definition: KeyInput.h:70
Definition: KeyInput.h:89
Definition: KeyInput.h:95

Definition at line 62 of file macosx_event.mm.

int vkeyToDoom3Key_French[256]
Initial value:
= {
'q', 's', 'd', 'f', 'h', 'g', 'w', 'x',
'c', 'v', '?', 'b', 'a', 'z', 'e', 'r',
'y', 't', '1', '2', '3', '4', '6', '5',
'-', '9', '7', ')', '8', '0', '$', 'o',
'u', '^', 'i', 'p', K_ENTER, 'l', 'j', 'ù' 'k', 'm', 0x60, ';', '=', 'n', ',', ':', K_TAB, K_SPACE, '<', K_BACKSPACE, '?', K_ESCAPE, '?', K_COMMAND, K_SHIFT, K_CAPSLOCK, K_ALT, K_CTRL, '?', '?', '?', '?', '?', K_KP_DEL, '?', K_KP_STAR, '?', K_KP_PLUS, '?', K_KP_NUMLOCK, '?', '?', '?', K_KP_SLASH, K_KP_ENTER, '?', K_KP_MINUS, '?', '?', K_KP_EQUALS, K_KP_INS, K_KP_END, K_KP_DOWNARROW, K_KP_PGDN, K_KP_LEFTARROW, K_KP_5, K_KP_RIGHTARROW, K_KP_HOME, '?', K_KP_UPARROW, K_KP_PGUP, '?', '?', '?', K_F5, K_F6, K_F7, K_F3, K_F8, K_F9, '?', K_F11, '?', K_PRINT_SCR, '?', K_F14, '?', K_F10, '?', K_F12, '?', K_F15, K_INS, K_HOME, K_PGUP, K_DEL, K_F4, K_END, K_F2, K_PGDN, K_F1, K_LEFTARROW, K_RIGHTARROW, K_DOWNARROW, K_UPARROW, K_POWER },
'k', 'm', 0x60, ';', '=', 'n', ',', ':',
K_SHIFT, K_CAPSLOCK, K_ALT, K_CTRL, '?', '?', '?', '?',
'?', K_KP_DEL, '?', K_KP_STAR, '?', K_KP_PLUS, '?', K_KP_NUMLOCK,
'?', '?', '?', K_KP_SLASH, K_KP_ENTER, '?', K_KP_MINUS, '?',
'?', K_PRINT_SCR, '?', K_F14, '?', K_F10, '?', K_F12,
}
Definition: KeyInput.h:78
Definition: KeyInput.h:83
Definition: KeyInput.h:82
Definition: KeyInput.h:88
Definition: KeyInput.h:86
Definition: KeyInput.h:74
Definition: KeyInput.h:85
Definition: KeyInput.h:81
Definition: KeyInput.h:91
Definition: KeyInput.h:90
Definition: KeyInput.h:80
Definition: KeyInput.h:73
Definition: KeyInput.h:94
Definition: KeyInput.h:47
Definition: KeyInput.h:84
Definition: KeyInput.h:87
Definition: KeyInput.h:70
Definition: KeyInput.h:89
Definition: KeyInput.h:95

Definition at line 81 of file macosx_event.mm.

int vkeyToDoom3Key_German[256]
Initial value:
= {
'a', 's', 'd', 'f', 'h', 'g', 'y', 'x',
'c', 'v', '?', 'b', 'q', 'w', 'e', 'r',
'z', 't', '1', '2', '3', '4', '6', '5',
'«', '9', '7', '-', '8', '0', '+', 'o',
'u', '[', 'i', 'p', K_ENTER, 'l', 'j', '\'',
'k', ';', '#', ',', '-', 'n', 'm', '.',
K_SHIFT, K_CAPSLOCK, K_ALT, K_CTRL, '?', '?', '?', '?',
'?', K_KP_DEL, '?', K_KP_STAR, '?', K_KP_PLUS, '?', K_KP_NUMLOCK,
'?', '?', '?', K_KP_SLASH, K_KP_ENTER, '?', K_KP_MINUS, '?',
'?', K_PRINT_SCR, '?', K_F14, '?', K_F10, '?', K_F12,
}
Definition: KeyInput.h:78
Definition: KeyInput.h:83
Definition: KeyInput.h:82
Definition: KeyInput.h:88
Definition: KeyInput.h:86
Definition: KeyInput.h:74
Definition: KeyInput.h:85
Definition: KeyInput.h:81
Definition: KeyInput.h:91
Definition: KeyInput.h:90
Definition: KeyInput.h:80
Definition: KeyInput.h:73
Definition: KeyInput.h:94
Definition: KeyInput.h:47
Definition: KeyInput.h:84
Definition: KeyInput.h:87
Definition: KeyInput.h:70
Definition: KeyInput.h:89
Definition: KeyInput.h:95

Definition at line 100 of file macosx_event.mm.