Rename fl_compute_macKeyLookUp() to Fl_Darwin_System_Driver::compute_macKeyLookUp()
This commit is contained in:
parent
e8d7eb1e46
commit
6a807716a7
@ -74,7 +74,6 @@ extern "C" {
|
||||
|
||||
// external functions
|
||||
extern void fl_fix_focus();
|
||||
extern unsigned short *fl_compute_macKeyLookUp();
|
||||
extern int fl_send_system_handlers(void *e);
|
||||
|
||||
// forward definition of functions in this file
|
||||
@ -2117,7 +2116,7 @@ static void cocoaKeyboardHandler(NSEvent *theEvent)
|
||||
// printf("%08x %08x %08x\n", keyCode, mods, key);
|
||||
maskedKeyCode = keyCode & 0x7f;
|
||||
mods_to_e_state( mods ); // process modifier keys
|
||||
if (!macKeyLookUp) macKeyLookUp = fl_compute_macKeyLookUp();
|
||||
if (!macKeyLookUp) macKeyLookUp = Fl_Darwin_System_Driver::compute_macKeyLookUp();
|
||||
sym = macKeyLookUp[maskedKeyCode];
|
||||
if (sym < 0xff00) { // a "simple" key
|
||||
// find the result of this key without modifier
|
||||
@ -2492,7 +2491,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
|
||||
if ( tMods )
|
||||
{
|
||||
unsigned short keycode = [theEvent keyCode];
|
||||
if (!macKeyLookUp) macKeyLookUp = fl_compute_macKeyLookUp();
|
||||
if (!macKeyLookUp) macKeyLookUp = Fl_Darwin_System_Driver::compute_macKeyLookUp();
|
||||
Fl::e_keysym = Fl::e_original_keysym = macKeyLookUp[keycode & 0x7f];
|
||||
if ( Fl::e_keysym )
|
||||
sendEvent = ( prevMods<mods ) ? FL_KEYBOARD : FL_KEYUP;
|
||||
|
@ -215,7 +215,7 @@ static const struct {unsigned short vk, fltk;} vktab[] = {
|
||||
};
|
||||
|
||||
// Computes the macKeyLookUp table that transforms a Mac OS virtual keycode into an FLTK keysym
|
||||
unsigned short *fl_compute_macKeyLookUp()
|
||||
unsigned short *Fl_Darwin_System_Driver::compute_macKeyLookUp()
|
||||
{
|
||||
static unsigned short macKeyLookUp[128];
|
||||
memset(macKeyLookUp, 0, sizeof(macKeyLookUp));
|
||||
|
@ -49,6 +49,8 @@ public:
|
||||
virtual int clocale_printf(FILE *output, const char *format, va_list args);
|
||||
static void *get_carbon_function(const char *name);
|
||||
static int calc_mac_os_version(); // computes the fl_mac_os_version global variable
|
||||
static unsigned short *compute_macKeyLookUp();
|
||||
|
||||
// these 2 are in Fl_get_key_mac.cxx
|
||||
virtual int event_key(int k);
|
||||
virtual int get_key(int k);
|
||||
|
Loading…
Reference in New Issue
Block a user