After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668119 - Evaluate AtkText Boundaries and Such
Evaluate AtkText Boundaries and Such
Status: RESOLVED DUPLICATE of bug 705580
Product: atk
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: ATK maintainer(s)
ATK maintainer(s)
Depends on:
Blocks: 638537
 
 
Reported: 2012-01-17 18:32 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2013-12-11 13:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joanmarie Diggs (IRC: joanie) 2012-01-17 18:32:17 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.
Comment 1 Alejandro Piñeiro Iglesias (IRC: infapi00) 2013-12-11 13:09:40 UTC
Resolved when atk_text_get_string_at_offset and AtkTextBoundary was added.

*** This bug has been marked as a duplicate of bug 705580 ***