diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-08-17 00:18:54 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-08-17 00:18:54 +1000 |
commit | 3fea02324831eba1773f45b1dc6d0bf2a0c8326d (patch) | |
tree | 21b3741388871035e9dcef8e024bbeb6c08a7c7a /src/ginput | |
parent | 058a873e9e425207db8b99be083e87cf956b9827 (diff) | |
download | uGFX-3fea02324831eba1773f45b1dc6d0bf2a0c8326d.tar.gz uGFX-3fea02324831eba1773f45b1dc6d0bf2a0c8326d.tar.bz2 uGFX-3fea02324831eba1773f45b1dc6d0bf2a0c8326d.zip |
Add some keyboard widget support
Diffstat (limited to 'src/ginput')
-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 */ /** @} */ |