diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-03-25 13:16:27 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-03-25 13:16:27 +0100 |
| commit | 6a807716a7f608109329cfe47b9e6fd9d26e6b45 (patch) | |
| tree | 8e05dc031641aac9939ad8ebaf183eb797661f16 /src | |
| parent | e8d7eb1e4619a16e196851dfb7f2f4f2cde59e8d (diff) | |
Rename fl_compute_macKeyLookUp() to Fl_Darwin_System_Driver::compute_macKeyLookUp()
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 5 | ||||
| -rw-r--r-- | src/Fl_get_key_mac.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/Darwin/Fl_Darwin_System_Driver.H | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 2b2cf23fc..5d32dd1b3 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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; diff --git a/src/Fl_get_key_mac.cxx b/src/Fl_get_key_mac.cxx index 362169c70..6e3ad89c8 100644 --- a/src/Fl_get_key_mac.cxx +++ b/src/Fl_get_key_mac.cxx @@ -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)); diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H index c0e780532..6f1625739 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H @@ -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); |
