X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3bf7524f394af039efe196a186f7969cbabcc19..2654f7e423bb773ca52c8b465c6ec9abfa398e45:/include/wx/utils.h diff --git a/include/wx/utils.h b/include/wx/utils.h index abbbad94f2..41577006b3 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -16,7 +16,14 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__) +// Some older compilers (such as EMX) cannot handle +// #pragma interface/implementation correctly, iff +// #pragma implementation is used in _two_ translation +// units (as created by e.g. event.cpp compiled for +// libwx_base and event.cpp compiled for libwx_gui_core). +// So we must not use those pragmas for those compilers in +// such files. #pragma interface "utils.h" #endif @@ -90,6 +97,16 @@ WXDLLIMPEXP_BASE wxString wxGetDataDir(); #if wxUSE_GUI +#if defined(__WXMSW__) || defined(__WXMAC__) + // Get the state of a key (true if pressed, false if not) + // This is generally most useful getting the state of + // Caps Lock, Num Lock and Scroll Lock... + + // Note - There is a X11/GTK version which will be here + // soon + WXDLLEXPORT bool wxGetKeyState(wxKeyCode key); +#endif + // Don't synthesize KeyUp events holding down a key and producing // KeyDown events with autorepeat. On by default and always on // in wxMSW.