M*LIB: non-inlined strings, FuriString primitive (#1795)
* Quicksave 1 * Header stage complete * Source stage complete * Lint & merge fixes * Includes * Documentation step 1 * FBT: output free size considering BT STACK * Documentation step 2 * py lint * Fix music player plugin * unit test stage 1: string allocator, mem, getters, setters, appends, compare, search. * unit test: string equality * unit test: string replace * unit test: string start_with, end_with * unit test: string trim * unit test: utf-8 * Rename * Revert fw_size changes * Simplify CLI backspace handling * Simplify CLI character insert * Merge fixes * Furi: correct filenaming and spelling * Bt: remove furi string include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@ typedef struct {
|
||||
|
||||
TextInputValidatorCallback validator_callback;
|
||||
void* validator_callback_context;
|
||||
string_t validator_text;
|
||||
FuriString* validator_text;
|
||||
bool valadator_message_visible;
|
||||
} TextInputModel;
|
||||
|
||||
@@ -257,7 +257,7 @@ static void text_input_view_draw_callback(Canvas* canvas, void* _model) {
|
||||
canvas_draw_icon(canvas, 10, 14, &I_WarningDolphin_45x42);
|
||||
canvas_draw_rframe(canvas, 8, 8, 112, 50, 3);
|
||||
canvas_draw_rframe(canvas, 9, 9, 110, 48, 2);
|
||||
elements_multiline_text(canvas, 62, 20, string_get_cstr(model->validator_text));
|
||||
elements_multiline_text(canvas, 62, 20, furi_string_get_cstr(model->validator_text));
|
||||
canvas_set_font(canvas, FontKeyboard);
|
||||
}
|
||||
}
|
||||
@@ -447,7 +447,7 @@ TextInput* text_input_alloc() {
|
||||
|
||||
with_view_model(
|
||||
text_input->view, (TextInputModel * model) {
|
||||
string_init(model->validator_text);
|
||||
model->validator_text = furi_string_alloc();
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -460,7 +460,7 @@ void text_input_free(TextInput* text_input) {
|
||||
furi_assert(text_input);
|
||||
with_view_model(
|
||||
text_input->view, (TextInputModel * model) {
|
||||
string_clear(model->validator_text);
|
||||
furi_string_free(model->validator_text);
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -489,7 +489,7 @@ void text_input_reset(TextInput* text_input) {
|
||||
model->callback_context = NULL;
|
||||
model->validator_callback = NULL;
|
||||
model->validator_callback_context = NULL;
|
||||
string_reset(model->validator_text);
|
||||
furi_string_reset(model->validator_text);
|
||||
model->valadator_message_visible = false;
|
||||
return true;
|
||||
});
|
||||
|
Reference in New Issue
Block a user