GNOME Bugzilla – Bug 326540
Enhance Accessibility::Text
Last modified: 2006-07-19 10:23:40 UTC
Enhance Accessibility::Text per http://gnome.org/%7Ebillh/at-spi-new-idl/html/html/ area: atk bridge Some Text methods not marked as new will be deprecated. Target Gnome 2.16 by the end of Jul 2006.
added Text::getAttributeValue to at-spi-1.7.0. More Text changes are anticipated in at-spi 1.8.0.
Should this bug be closed and another targeted for at-spi-1.8.0 be created? What features will be added in the next release?
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Ariel - this one might also be a good one for the 2.16 target. I'd leave EditableText enhancements for 2.17/2.18. If you don't have time, please reassign it to me, no problem.
Ok. For next bugs you reassign I will not answer yes. Only if I can't or don't want it I reassign to you.
Created attachment 68743 [details] [review] Work on text.c and spi_text.c Bill, Here's is work for this bug. I Still have doubt on how to use the flag includeDefaults on impl_getAttributeRun method implementation. If you told me what does it mean I can go and write whatever is needed or maybe is so simple you can do that for me. This patch includes also a fix on spi_private.h that add a prototype and correct another. ariel
Created attachment 68745 [details] [review] cspi bindigs Bill, Here's is work for this bug. I Still have doubt on how to use the flag includeDefaults on impl_getAttributeRun method implementation. If you told me what does it mean I can go and write whatever is needed or maybe is so simple you can do that for me. This patch includes also a fix on spi_private.h that add a prototype and correct another. ariel
Created attachment 68746 [details] [review] Modification to text idl I used this modification to Accessible_Text.c but you prolly want to put it right. Still I attache it here
Created attachment 68747 [details] [review] The Changelog I know. It might be better if I only send a patch but my local tree has work for like 4 different bugs. +2006-07-05 Ariel Rios <arios@us.ibm.com> + + * cspi/bonobo/cspi-bonobo.c: Remove warning adding <cspi/spi-private.h> + + * cspi/spi_text.c: (AccessibleText_getAttributeRun, AccessibleText_getDefaultAttributes): + New bindings for new emthods defined in idl and libspi. + + * cspi/spi.h: (AccessibleText_getAttributeRun, AccessibleText_getDefaultAttributes): + Added prototype functions. + + + * libspi/text.c: (impl_getAttributeRun, + impl_getDefaultAttributeSet): New method implementation + Bug #326520 + (spi_text_class_init): Added previous methods. + + * libspi/spi.h: (impl_getAttributeRun, + impl_getDefaultAttributeSet): Added prototypes + + *libspi/spi-private.h: Corrections. +
Comment on attachment 68746 [details] [review] Modification to text idl Ariel, you removed the comments from the new API. The new methods can't be added without the docs/comments. You are right, patches are better. Please submit changes as patches (preferably a single patch!) in future. Thanks! I'll commit my own version of the new IDL today.
Comment on attachment 68743 [details] [review] Work on text.c and spi_text.c >Index: text.c >=================================================================== >RCS file: /cvs/gnome/at-spi/libspi/text.c,v >retrieving revision 1.24 >diff -u -r1.24 text.c >--- text.c 16 Jan 2006 14:16:44 -0000 1.24 >+++ text.c 10 Jul 2006 19:42:39 -0000 >@@ -27,6 +27,7 @@ > #include <stdio.h> > #include <stdlib.h> > #include <string.h> >+#include <bonobo/bonobo-exception.h> Hmm, not sure including bonobo-exception here is a good idea, given the "deprecation imminent" status. Perhaps we should replace the bonobo_return_... method with something else, below. > #include <atk/atktext.h> > #include <libspi/text.h> > #include <libspi/spi-private.h> >@@ -255,7 +256,7 @@ > } > >+static Accessibility_AttributeSet * >+impl_getAttributeRun (PortableServer_Servant servant, >+ const CORBA_long offset, >+ CORBA_long *startOffset, CORBA_long *endOffset, >+ const CORBA_boolean includeDefaults, >+ CORBA_Environment *ev){ >+ >+ AtkAttributeSet *attributes; >+ gint intstart_offset, intend_offset; >+ Accessibility_AttributeSet *retval; >+ AtkText *text = get_text_from_servant (servant); >+ gint n_attributes = 0; >+ gint i; >+ >+ g_return_val_if_fail (text != NULL, NULL); >+ >+ attributes = atk_text_get_run_attributes (text, offset, >+ &intstart_offset, &intend_offset); If includeDefaults is TRUE, then we should also append the atk_text_get_default_attributes() here, for attribute names that aren't specified in the above set. Otherwise this lookd good.
Comment on attachment 68745 [details] [review] cspi bindigs the patch includes changes to AccessibleTable, which it should not. Ariel, I recommend working on these bugs in separate workspaces.
Created attachment 68808 [details] [review] revised patch for cspi
Created attachment 68816 [details] [review] patch to incorporate all of the above changes for Accessibility::Text enhancements