GNOME Bugzilla – Bug 668119
Evaluate AtkText Boundaries and Such
Last modified: 2013-12-11 13:09:40 UTC
AtkText has a *bunch* of means to get a specified text segment: 1. Methods a. get_text_at_offset(offset, boundary) b. get_text_before_offset(offset, boundary) c. get_text_after_offset(offset, boundary) d. get_text(startOffset, endOffset) 2. Boundaries a. TEXT_BOUNDARY_CHAR b. TEXT_BOUNDARY_WORD_START c. TEXT_BOUNDARY_WORD_END d. TEXT_BOUNDARY_LINE_START e. TEXT_BOUNDARY_LINE_END f. TEXT_BOUNDARY_SENTENCE_START g. TEXT_BOUNDARY_SENTENCE_END That strikes some of us as far more combinations than is really needed. Questions: 1. How often does an AT need to get the previous/next text unit? And on those occasions when it does, is it especially non-performant to get the current unit and then use the offsets returned to get the desired unit? 2. Is TEXT_BOUNDARY_CHAR really needed? After all, if you want the character at offset x, you could do get_text_at_offset(x, x+1). 3. Are the START and END boundaries for each really needed? 4. Having PARAGRAPH would be nice. Is there any reason why we could not? Related: The docs on all of the above are convoluted.
Resolved when atk_text_get_string_at_offset and AtkTextBoundary was added. *** This bug has been marked as a duplicate of bug 705580 ***