]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/private/keyboard.h
Rename wxCharCode{MSWToWX,WXToMSW}() and move them to a separate header.
[wxWidgets.git] / include / wx / msw / private / keyboard.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/private/keyboard.h
3 // Purpose: Helper keyboard-related functions.
4 // Author: Vadim Zeitlin
5 // Created: 2010-09-09
6 // RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
7 // Copyright: (c) 2010 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_MSW_PRIVATE_KEYBOARD_H_
12 #define _WX_MSW_PRIVATE_KEYBOARD_H_
13
14 #include "wx/defs.h"
15
16 namespace wxMSWKeyboard
17 {
18
19 // ----------------------------------------------------------------------------
20 // Functions for translating between MSW virtual keys codes and wx key codes
21 //
22 // These functions are currently implemented in src/msw/window.cpp.
23 // ----------------------------------------------------------------------------
24
25 // Translate MSW virtual key code to wx key code. lParam is used to distinguish
26 // between numpad and extended version of the keys, extended is assumed by
27 // default if lParam == 0.
28 WXDLLIMPEXP_CORE int VKToWX(WXWORD vk, WXLPARAM lParam = 0);
29
30 // Translate wxKeyCode enum element (passed as int for compatibility reasons)
31 // to MSW virtual key code. isExtended is set to true if the key corresponds to
32 // a non-numpad version of a key that exists both on numpad and outside it.
33 WXDLLIMPEXP_CORE WXWORD WXToVK(int id, bool *isExtended = NULL);
34
35 } // namespace wxMSWKeyboard
36
37 #endif // _WX_MSW_PRIVATE_KEYBOARD_H_