diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-10-13 01:00:48 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-10-13 01:00:48 +1000 |
commit | 9d3fc8b36cb57fa23c0b838a54a8bc67328f9672 (patch) | |
tree | fee15031006a070adb49279540067e90aa6be934 /src/ginput/ginput_keyboard.h | |
parent | 92b000291826ca78c30f205c104ac330484b82c9 (diff) | |
parent | 10c7471149453cea6686aa6f61ec6dac0525c47b (diff) | |
download | uGFX-9d3fc8b36cb57fa23c0b838a54a8bc67328f9672.tar.gz uGFX-9d3fc8b36cb57fa23c0b838a54a8bc67328f9672.tar.bz2 uGFX-9d3fc8b36cb57fa23c0b838a54a8bc67328f9672.zip |
Merge branch 'master' into Keil
Diffstat (limited to 'src/ginput/ginput_keyboard.h')
-rw-r--r-- | src/ginput/ginput_keyboard.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/ginput/ginput_keyboard.h b/src/ginput/ginput_keyboard.h index 1349092f..40691a0d 100644 --- a/src/ginput/ginput_keyboard.h +++ b/src/ginput/ginput_keyboard.h @@ -164,13 +164,11 @@ typedef struct GEventKeyboard_t { #define GLISTEN_KEYTRANSITIONS 0x0008 // Return transitions to the key state #define GLISTEN_KEYRAW 0x0010 // Return raw scan-codes. This turns off normal character processing. -#endif - -#if GINPUT_NEED_KEYBOARD || defined(__DOXYGEN__) - // All keyboards #define GKEYBOARD_ALL_INSTANCES ((unsigned)-1) +#endif + /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ @@ -188,33 +186,34 @@ extern "C" { */ GSourceHandle ginputGetKeyboard(unsigned instance); - /** - * @brief Get the current keyboard status - * - * @param[in] instance The ID of the keyboard input instance - * @param[in] pkeyboard The keyboard event struct - * - * @return Returns FALSE on an error (eg invalid instance) - */ - bool_t ginputGetKeyboardStatus(unsigned instance, GEventKeyboard *pkeyboard); + #if GINPUT_NEED_KEYBOARD || defined(__DOXYGEN__) - #if !GKEYBOARD_LAYOUT_OFF || defined(__DOXYGEN__) /** - * @brief Set the keyboard layout + * @brief Get the current keyboard status * * @param[in] instance The ID of the keyboard input instance - * @param[in] pLayout The keyboard layout micro-code. Passing NULL defaults to the driver's default layout. + * @param[in] pkeyboard The keyboard event struct * * @return Returns FALSE on an error (eg invalid instance) */ - bool_t ginputSetKeyboardLayout(unsigned instance, const void *pLayout); - #endif + bool_t ginputGetKeyboardStatus(unsigned instance, GEventKeyboard *pkeyboard); + + #if !GKEYBOARD_LAYOUT_OFF || defined(__DOXYGEN__) + /** + * @brief Set the keyboard layout + * + * @param[in] instance The ID of the keyboard input instance + * @param[in] pLayout The keyboard layout micro-code. Passing NULL defaults to the driver's default layout. + * + * @return Returns FALSE on an error (eg invalid instance) + */ + bool_t ginputSetKeyboardLayout(unsigned instance, const void *pLayout); + #endif + #endif /* GINPUT_NEED_KEYBOARD */ #ifdef __cplusplus } #endif -#endif /* GINPUT_NEED_KEYBOARD */ - #endif /* _GINPUT_KEYBOARD_H */ /** @} */ |