MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / commitAll

Function commitAll

src/AndroidJNICalls.cpp:245–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243 }
244
245 std::pair<bool, bool> commitAll(CustomEvents::InputTextBoxID tId, const std::shared_ptr<RichText::TextBox>& t, const std::shared_ptr<RichText::TextBox::Cursor>& c) {
246 std::scoped_lock a{textboxMutex};
247
248 if(tId == textboxID) {
249 bool oldTextChanged = textChanged;
250 bool oldCursorChanged = cursorChanged;
251
252 if (textChanged) {
253 t->set_rich_text_data(textBox->get_rich_text_data());
254 textChanged = false;
255 }
256 if (cursorChanged) {
257 *c = *cursor;
258 cursorChanged = false;
259 }
260 return {oldTextChanged, oldCursorChanged};
261 }
262 else
263 return {false, false};
264 }
265
266
267 struct TextInputData {

Calls 2

set_rich_text_dataMethod · 0.80
get_rich_text_dataMethod · 0.80

Tested by

no test coverage detected