[FL-2198], [FL-2161] NFC emulation refactoring (#968)
* rfal: add state changed callback * furi_hal_nfc: add NFC-A emulation API * nfc: add emulation logger, refactor scenes * elements: fix text_box element * gui: fix text box module * nfc: remove unnecessary buffers * nfc: introduce emulation callback concept * nfc: format sources * bt settings: fix incorrect scene switch * bt settings: format sources * Debug: fix x2d import for python 3 * Gui: rename method name widget_clear to widget_reset * nfc: add nfca emulation handler * nfc: add global custom events enum * nfc: UID emulation Data -> Log * furi_hal_nfc: fix incorrect timings * u2f, badusb: widget_clear() -> widget_reset() Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
20
applications/gui/modules/text_box.h
Normal file → Executable file
20
applications/gui/modules/text_box.h
Normal file → Executable file
@@ -13,13 +13,17 @@ extern "C" {
|
||||
|
||||
/** TextBox anonymous structure */
|
||||
typedef struct TextBox TextBox;
|
||||
typedef void (*TextBoxExitCallback)(void* context);
|
||||
|
||||
typedef enum {
|
||||
TextBoxFontText,
|
||||
TextBoxFontHex,
|
||||
} TextBoxFont;
|
||||
|
||||
typedef enum {
|
||||
TextBoxFocusStart,
|
||||
TextBoxFocusEnd,
|
||||
} TextBoxFocus;
|
||||
|
||||
/** Allocate and initialize text_box
|
||||
*
|
||||
* @return TextBox instance
|
||||
@@ -60,19 +64,13 @@ void text_box_set_text(TextBox* text_box, const char* text);
|
||||
*/
|
||||
void text_box_set_font(TextBox* text_box, TextBoxFont font);
|
||||
|
||||
/** Set text_box context
|
||||
/** Set TextBox focus
|
||||
* @note Use to display from start or from end
|
||||
*
|
||||
* @param text_box TextBox instance
|
||||
* @param context context pointer
|
||||
* @param focus TextBoxFocus instance
|
||||
*/
|
||||
void text_box_set_context(TextBox* text_box, void* context);
|
||||
|
||||
/** Set exit callback
|
||||
*
|
||||
* @param text_box TextBox instance
|
||||
* @param callback TextBoxExitCallback callback pointer
|
||||
*/
|
||||
void text_box_set_exit_callback(TextBox* text_box, TextBoxExitCallback callback);
|
||||
void text_box_set_focus(TextBox* text_box, TextBoxFocus focus);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user