From ec0ac46aa869143be91b194e400bf700be9fc558 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 20 Jun 2018 15:52:58 +0000 Subject: Move platform specific shortcut code to platform drivers. Tested on Windows and Linux (not tested on MacOS/Android). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_System_Driver.H | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'FL') diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index 5b4f6231f..7a4cc18a7 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -46,12 +46,18 @@ class Fl_Widget; */ class FL_EXPORT Fl_System_Driver { friend class Fl; +public: + struct Keyname { + unsigned int key; + const char* name; + }; protected: // implement once for each platform static Fl_System_Driver *newSystemDriver(); Fl_System_Driver(); - struct Keyname {unsigned int key; const char* name;}; - static Keyname table[]; + // key_table and key_table_size are used in fl_shortcut to translate key names + Keyname *key_table; + int key_table_size; public: virtual ~Fl_System_Driver(); // These flags are useful after calling XParseGeometry(). They indicate which of its arguments -- cgit v1.2.3