diff options
| author | Manolo Gouy <Manolo> | 2016-03-31 19:55:03 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-31 19:55:03 +0000 |
| commit | 519673a7761f0e43d926ea5dac43cda305fb089e (patch) | |
| tree | e3d18b6b7916a09c9a224cfea9694641d68cabfe /src/drivers/WinAPI | |
| parent | 5d12ea5ab12d3b911777bb8cbdeb70c3d183267c (diff) | |
Move dnd and character-composition related functions from Fl_System_Driver to Fl_Screen_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/WinAPI')
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 16 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 16 |
4 files changed, 17 insertions, 19 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H index 1bbcb00ee..f874750a7 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H @@ -69,6 +69,8 @@ public: virtual void repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp); virtual int has_timeout(Fl_Timeout_Handler cb, void *argp); virtual void remove_timeout(Fl_Timeout_Handler cb, void *argp); + virtual int dnd(int unused); + virtual int compose(int &del); }; diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index 3c386223a..7cca121db 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -510,7 +510,21 @@ void Fl_WinAPI_Screen_Driver::remove_timeout(Fl_Timeout_Handler cb, void* data) } } - +int Fl_WinAPI_Screen_Driver::compose(int &del) { + unsigned char ascii = (unsigned char)Fl::e_text[0]; + int condition = (Fl::e_state & (FL_ALT | FL_META)) && !(ascii & 128) ; + if (condition) { // this stuff is to be treated as a function key + del = 0; + return 0; + } + del = Fl::compose_state; + Fl::compose_state = 0; + // Only insert non-control characters: + if ( (!Fl::compose_state) && ! (ascii & ~31 && ascii!=127)) { + return 0; + } + return 1; +} // // End of "$Id$". diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index 67684dc07..dd58c5671 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -45,8 +45,6 @@ public: virtual void warning(const char *format, va_list args); virtual void error(const char *format, va_list args); virtual void fatal(const char *format, va_list args); - virtual int compose(int &del); - virtual int dnd(int unused); virtual char *utf2mbcs(const char *s); virtual char *getenv(const char* v); virtual int open(const char* f, int oflags, int pmode); diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx index 13e74914f..9f7693da0 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx @@ -62,22 +62,6 @@ void Fl_WinAPI_System_Driver::fatal(const char *format, va_list args) { ::exit(1); } -int Fl_WinAPI_System_Driver::compose(int &del) { - unsigned char ascii = (unsigned char)Fl::e_text[0]; - int condition = (Fl::e_state & (FL_ALT | FL_META)) && !(ascii & 128) ; - if (condition) { // this stuff is to be treated as a function key - del = 0; - return 0; - } - del = Fl::compose_state; - Fl::compose_state = 0; - // Only insert non-control characters: - if ( (!Fl::compose_state) && ! (ascii & ~31 && ascii!=127)) { - return 0; - } - return 1; -} - char *Fl_WinAPI_System_Driver::utf2mbcs(const char *s) { if (!s) return NULL; size_t l = strlen(s); |
