GUI: TextInput keyboard view module API. More...
Go to the source code of this file.
Typedefs | |
typedef struct TextInput | TextInput |
Text input anonymous structure. | |
typedef void(* | TextInputCallback) (void *context) |
typedef bool(* | TextInputValidatorCallback) (const char *text, FuriString *error, void *context) |
Functions | |
TextInput * | text_input_alloc (void) |
Allocate and initialize text input. | |
void | text_input_free (TextInput *text_input) |
Deinitialize and free text input. | |
void | text_input_reset (TextInput *text_input) |
Clean text input view Note: this function does not free memory. | |
View * | text_input_get_view (TextInput *text_input) |
Get text input view. | |
void | text_input_set_result_callback (TextInput *text_input, TextInputCallback callback, void *callback_context, char *text_buffer, size_t text_buffer_size, bool clear_default_text) |
Set text input result callback. | |
void | text_input_set_minimum_length (TextInput *text_input, size_t minimum_length) |
Sets the minimum length of a TextInput. | |
void | text_input_set_validator (TextInput *text_input, TextInputValidatorCallback callback, void *callback_context) |
TextInputValidatorCallback | text_input_get_validator_callback (TextInput *text_input) |
void * | text_input_get_validator_callback_context (TextInput *text_input) |
void | text_input_set_header_text (TextInput *text_input, const char *text) |
Set text input header text. | |
GUI: TextInput keyboard view module API.
TextInput * text_input_alloc | ( | void | ) |
Allocate and initialize text input.
This text input is used to enter string
void text_input_free | ( | TextInput * | text_input | ) |
Deinitialize and free text input.
text_input | TextInput instance |
Get text input view.
text_input | TextInput instance |
void text_input_reset | ( | TextInput * | text_input | ) |
Clean text input view Note: this function does not free memory.
text_input | Text input instance |
void text_input_set_header_text | ( | TextInput * | text_input, |
const char * | text ) |
Set text input header text.
text_input | TextInput instance |
text | text to be shown |
void text_input_set_minimum_length | ( | TextInput * | text_input, |
size_t | minimum_length ) |
Sets the minimum length of a TextInput.
[in] | text_input | TextInput |
[in] | minimum_length | Minimum input length |
void text_input_set_result_callback | ( | TextInput * | text_input, |
TextInputCallback | callback, | ||
void * | callback_context, | ||
char * | text_buffer, | ||
size_t | text_buffer_size, | ||
bool | clear_default_text ) |
Set text input result callback.
text_input | TextInput instance |
callback | callback fn |
callback_context | callback context |
text_buffer | pointer to YOUR text buffer, that we going to modify |
text_buffer_size | YOUR text buffer size in bytes. Max string length will be text_buffer_size-1. |
clear_default_text | clear text from text_buffer on first OK event |