Text Attribute API revisions
- From: Bill Haneman <Bill Haneman Sun COM>
- To: gnome-accessibility-list gnome org
- Subject: Text Attribute API revisions
- Date: Mon, 28 May 2001 18:45:13 +0100 (BST)
Brian and I talked about ATK text attribute interfaces and recent discussion on the
list about attribute runs.
We came up with the following proposals for the API:
gchar *
atk_text_get_text_(at,before.after)_offset ( AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
gint *startOffset,
gint *endOffset);
[Note the addition of two "out" parameters startOffset and endOffset: they will
provide the offset range of the returned character string, for convenience.]
AtkAttributeSet *
atk_text_get_attribute_bounds (text, offset, &startOffset, &endOffset);
This will return a set of attributes that apply to the character at the current
offset, and also indicate the starting and ending offsets of the substring over
which these attributes are invariant.
Typically the attribute run bounds returned by the above function will be compared
with those returned by the atk_text_get_text_at_...() methods, in case the AT needs
to segment the returned character string into attribute runs: alternatively the
segmentation could be done by calling atk_text_get_text() with the appropriate
offsets.
We propose that AtkAttributeSet be implemented as string-based name-value pairs, and
that we standardize as much as possible the names of "keys" and their common values.
The returned strings can then be localized for use by AT clients.
regards,
-Bill
------
Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]