From 2b85bf81680e2243ef5a5daf85d9eb04321c7278 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 27 Nov 2001 17:44:08 +0000 Subject: Preliminary commit of my MacOS X work. **** THIS CODE COMPILES BUT DOES NOT WORK. **** TODO: fix event handling - getting blank windows, etc. TODO: re-port OpenGL code. TODO: add support for images with alpha. TODO: add support for more then just beeps in fl_beep(). TODO: other stuff I'm sure... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_get_key.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/Fl_get_key.cxx') diff --git a/src/Fl_get_key.cxx b/src/Fl_get_key.cxx index 0a10fd6a3..2065a3654 100644 --- a/src/Fl_get_key.cxx +++ b/src/Fl_get_key.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_get_key.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $" +// "$Id: Fl_get_key.cxx,v 1.5.2.3.2.2 2001/11/27 17:44:06 easysw Exp $" // // Keyboard state routines for the Fast Light Tool Kit (FLTK). // @@ -24,15 +24,17 @@ // #ifdef WIN32 -#include "Fl_get_key_win32.cxx" +# include "Fl_get_key_win32.cxx" +#elif defined(__APPLE__) +# include "Fl_get_key_mac.cxx" #else // Return the current state of a key. This is the X version. I identify // keys (mostly) by the X keysym. So this turns the keysym into a keycode // and looks it up in the X key bit vector, which Fl_x.cxx keeps track of. -#include -#include +# include +# include extern char fl_key_vector[32]; // in Fl_x.cxx @@ -40,13 +42,13 @@ int Fl::event_key(int k) { if (k > FL_Button && k <= FL_Button+8) return Fl::event_state(8<<(k-FL_Button)); int i; -#ifdef __sgi +# ifdef __sgi // get some missing PC keyboard keys: if (k == FL_Meta_L) i = 147; else if (k == FL_Meta_R) i = 148; else if (k == FL_Menu) i = 149; else -#endif +# endif i = XKeysymToKeycode(fl_display, k); return fl_key_vector[i/8] & (1 << (i%8)); } @@ -60,5 +62,5 @@ int Fl::get_key(int k) { #endif // -// End of "$Id: Fl_get_key.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $". +// End of "$Id: Fl_get_key.cxx,v 1.5.2.3.2.2 2001/11/27 17:44:06 easysw Exp $". // -- cgit v1.2.3