mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-17 04:34:44 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev
This commit is contained in:
@@ -695,7 +695,7 @@ static void apply_extra_symbols(TextInputModel* model) {
|
||||
char, get_row(&symbol_keyboard, 0)[get_row_size(&symbol_keyboard, 0) - 4].text, '_');
|
||||
}
|
||||
|
||||
TextInput* text_input_alloc() {
|
||||
TextInput* text_input_alloc(void) {
|
||||
TextInput* text_input = malloc(sizeof(TextInput));
|
||||
text_input->view = view_alloc();
|
||||
view_set_context(text_input->view, text_input);
|
||||
@@ -724,7 +724,7 @@ TextInput* text_input_alloc() {
|
||||
}
|
||||
|
||||
void text_input_free(TextInput* text_input) {
|
||||
furi_assert(text_input);
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
TextInputModel * model,
|
||||
@@ -742,7 +742,7 @@ void text_input_free(TextInput* text_input) {
|
||||
}
|
||||
|
||||
void text_input_reset(TextInput* text_input) {
|
||||
furi_assert(text_input);
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
TextInputModel * model,
|
||||
@@ -769,7 +769,7 @@ void text_input_reset(TextInput* text_input) {
|
||||
}
|
||||
|
||||
View* text_input_get_view(TextInput* text_input) {
|
||||
furi_assert(text_input);
|
||||
furi_check(text_input);
|
||||
return text_input->view;
|
||||
}
|
||||
|
||||
@@ -780,6 +780,7 @@ void text_input_set_result_callback(
|
||||
char* text_buffer,
|
||||
size_t text_buffer_size,
|
||||
bool clear_default_text) {
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
TextInputModel * model,
|
||||
@@ -804,6 +805,7 @@ void text_input_set_result_callback(
|
||||
}
|
||||
|
||||
void text_input_set_minimum_length(TextInput* text_input, size_t minimum_length) {
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
TextInputModel * model,
|
||||
@@ -812,6 +814,7 @@ void text_input_set_minimum_length(TextInput* text_input, size_t minimum_length)
|
||||
}
|
||||
|
||||
void text_input_add_extra_symbol(TextInput* text_input, char symbol) {
|
||||
furi_check(text_input);
|
||||
if(!symbol) return;
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
@@ -829,6 +832,7 @@ void text_input_add_extra_symbol(TextInput* text_input, char symbol) {
|
||||
}
|
||||
|
||||
void text_input_add_illegal_symbols(TextInput* text_input) {
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
TextInputModel * model,
|
||||
@@ -852,6 +856,7 @@ void text_input_set_validator(
|
||||
TextInput* text_input,
|
||||
TextInputValidatorCallback callback,
|
||||
void* callback_context) {
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
TextInputModel * model,
|
||||
@@ -863,6 +868,7 @@ void text_input_set_validator(
|
||||
}
|
||||
|
||||
TextInputValidatorCallback text_input_get_validator_callback(TextInput* text_input) {
|
||||
furi_check(text_input);
|
||||
TextInputValidatorCallback validator_callback = NULL;
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
@@ -873,6 +879,7 @@ TextInputValidatorCallback text_input_get_validator_callback(TextInput* text_inp
|
||||
}
|
||||
|
||||
void* text_input_get_validator_callback_context(TextInput* text_input) {
|
||||
furi_check(text_input);
|
||||
void* validator_callback_context = NULL;
|
||||
with_view_model(
|
||||
text_input->view,
|
||||
@@ -883,6 +890,7 @@ void* text_input_get_validator_callback_context(TextInput* text_input) {
|
||||
}
|
||||
|
||||
void text_input_set_header_text(TextInput* text_input, const char* text) {
|
||||
furi_check(text_input);
|
||||
with_view_model(
|
||||
text_input->view, TextInputModel * model, { model->header = text; }, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user