unleashed-firmware/lib/app-scened-template/view_modules/text_input_vm.cpp
gornekich 23ff6723cf
[FL-2204] Bluetooth forget devices (#967)
* bt: update connection parameters
* bt: set correct connection latency and timeout
* gui popup: add clean method
* furi_hal_bt: add connection parameters request, clear database
* bt: add forget bonded devices API
* bt_settings: add forget bonded devices GUI
* bt: rework pin code show with view port to hide view
* bt: support conn parameters for different profiles
* furi_hal_bt: sync f6 target
* target f6: fix build
* bt: format sources
* furi_hal_bt: update connection parameters
* bt: update connection params, fix GUI
* FuriHal: fix spelling
* Refactoring: rename _clean to _reset

Co-authored-by: あく <alleteam@gmail.com>
2022-01-21 20:32:03 +03:00

31 lines
719 B
C++

#include "text_input_vm.h"
TextInputVM::TextInputVM() {
text_input = text_input_alloc();
}
TextInputVM::~TextInputVM() {
text_input_free(text_input);
}
View* TextInputVM::get_view() {
return text_input_get_view(text_input);
}
void TextInputVM::clean() {
text_input_reset(text_input);
}
void TextInputVM::set_result_callback(
TextInputCallback callback,
void* callback_context,
char* text,
uint8_t max_text_length,
bool clear_default_text) {
text_input_set_result_callback(
text_input, callback, callback_context, text, max_text_length, clear_default_text);
}
void TextInputVM::set_header_text(const char* text) {
text_input_set_header_text(text_input, text);
}