MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / keyboardAddTextArea

Method keyboardAddTextArea

Tactility/Source/service/gui/Keyboard.cpp:52–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void GuiService::keyboardAddTextArea(lv_obj_t* textarea) {
53 lock();
54
55 if (isStarted) {
56 check(lvgl::lock(0), "lvgl should already be locked before calling this method");
57
58 if (softwareKeyboardIsEnabled()) {
59 lv_obj_add_event_cb(textarea, show_keyboard, LV_EVENT_FOCUSED, nullptr);
60 lv_obj_add_event_cb(textarea, hide_keyboard, LV_EVENT_DEFOCUSED, nullptr);
61 lv_obj_add_event_cb(textarea, hide_keyboard, LV_EVENT_READY, nullptr);
62
63 // lv_obj_t auto-remove themselves from the group when they are destroyed (last checked in LVGL 8.3)
64 lv_group_add_obj(keyboardGroup, textarea);
65
66 lvgl::software_keyboard_activate(keyboardGroup);
67 }
68
69 lvgl::unlock();
70 }
71
72 unlock();
73}
74
75} // namespace

Callers 1

Calls 4

lockFunction · 0.50
checkFunction · 0.50
unlockFunction · 0.50

Tested by

no test coverage detected