? Accessibility_Text.idl.new
? Patch.patch
? at-spi-1.6.4-1.patch
? at-spi-1.7.5.tar.gz
? at-spi-1.7.6.tar.gz
? at-spi-1.7.8.tar.gz
? at-spi-document-patches
? at-spi-document-patches.tar
? at-spi-registryleakfix.diff
? at-spi-server-fix.diff
? at-spi-stream-patch.diff
? cspi-spi-text.patch.new
? depcomp
? document-patch-revised.diff
? eog-trace.txt
? gtk-doc.make
? leak-fix-diffs.diff
? leak-fix-final.diff
? leak-fix-next.diff
? leak-fix.diff
? leakfix.diff
? libspi-text.c.patch
? libspi-text.c.patch.new
? linguas.patch
? mingw.patch
? patch.diff
? relation.diff
? roles.diff
? single-bonobo_unknown-loading.patch
? stream0ANCBT
? stream0RCIBT
? stream14CFBT
? stream1BCEBT
? stream1RNEBT
? stream2RFKBT
? stream3EBMBT
? stream3HQJBT
? stream3KJHBT
? stream3LE8AT
? stream3PYLBT
? stream533FBT
? stream53V6AT
? stream9MOQBT
? streamBKOFBT
? streamCKOJBT
? streamELPABT
? streamEY6IBT
? streamFCXIBT
? streamFFR5AT
? streamFHPGBT
? streamFLYOBT
? streamG9NCBT
? streamHP26AT
? streamHZ3NBT
? streamISXMBT
? streamJJAMBT
? streamKCYQBT
? streamKDW9AT
? streamKYWEBT
? streamLCV6AT
? streamLEJHBT
? streamLMZGBT
? streamNAXNBT
? streamNE14AT
? streamOCWFBT
? streamOPQABT
? streamPQ9KBT
? streamPY0LBT
? streamQ1RCBT
? streamQ4SHBT
? streamQL46AT
? streamRBK8AT
? streamRGXCBT
? streamRXHEBT
? streamRXUCBT
? streamT2BABT
? streamTWLLBT
? streamU378AT
? streamU7MMBT
? streamUK4IBT
? streamV108AT
? streamV5AKBT
? streamXQWLBT
? streamZ30IBT
? streamZG4FBT
? streamable.patch
? streamble.patch
? text-enhancements.diff
? this-patch-breaks-stuff.diff
? atk-bridge/bridge-undefined
? docs/reference/cspi/at-spi-cspi.interfaces
? docs/reference/cspi/at-spi-cspi.prerequisites
? docs/reference/cspi/tmpl/at-spi-cspi-unused.sgml
? docs/reference/cspi/tmpl/spi_streamable_content.sgml
? docs/reference/idl/doxygen-output.txt
? docs/reference/idl/doxygen-warnings.txt
? docs/reference/idl/xml
? idl/stream-diff.patch
? libspi/libspi-undefined
? login-helper/Accessibility_LoginHelper-common.c
? login-helper/Accessibility_LoginHelper-imodule.c
? login-helper/Accessibility_LoginHelper-skels.c
? login-helper/Accessibility_LoginHelper-stubs.c
? login-helper/Accessibility_LoginHelper.h
? po/stamp-it
? test/event-listener-test
? test/keypad-test
? test/keysynth-test
? test/login-helper-client-test
? test/login-helper-server-test
? test/screen-review-test
? test/stress-test
? test/window-listener-test
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/at-spi/ChangeLog,v
retrieving revision 1.525
diff -u -r1.525 ChangeLog
--- ChangeLog	10 Jul 2006 19:20:09 -0000	1.525
+++ ChangeLog	12 Jul 2006 14:06:16 -0000
@@ -1,3 +1,25 @@
+2006-07-12  Bill Haneman <billh@gnome.org> modifications to patch from
+2006-07-12  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 methods 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.
+
 2006-06-29  Bill Haneman <bill.haneman@sun.com>
 
 	Added Document interface (see bug #326520), 
Index: cspi/spi-private.h
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi-private.h,v
retrieving revision 1.17
diff -u -r1.17 spi-private.h
--- cspi/spi-private.h	16 Jan 2006 14:16:43 -0000	1.17
+++ cspi/spi-private.h	12 Jul 2006 14:06:16 -0000
@@ -81,9 +81,10 @@
 					       const char  *interface_name);
 AccessibleRole         cspi_role_from_spi_role (Accessibility_Role role);
 void                   cspi_streams_close_all (void);
-gboolean              _cspi_exception_throw (CORBA_Environment *ev, char *desc_prefix);
-
+gboolean               cspi_exception_throw (CORBA_Environment *ev, char *desc_prefix);
 
+AccessibleAttributeSet 
+                     *cspi_attribute_set_from_sequence (const Accessibility_AttributeSet *seq);
 #define cspi_return_if_fail(val)		\
 	if (!(val))				\
 		return
Index: cspi/spi.h
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi.h,v
retrieving revision 1.73
diff -u -r1.73 spi.h
--- cspi/spi.h	10 Jul 2006 15:54:20 -0000	1.73
+++ cspi/spi.h	12 Jul 2006 14:06:17 -0000
@@ -1077,6 +1077,14 @@
 			     long int selectionNum,
 			     long int startOffset,
 			     long int endOffset);
+AccessibleAttributeSet *
+AccessibleText_getAttributeRun  (AccessibleText *obj,
+				 long int offset,
+				 long int *startOffset,
+				 long int *endOffset,
+				 long int includeDefaults);
+AccessibleAttributeSet *
+AccessibleText_getDefaultAttributeSet (AccessibleText *obj);
 
 /* AccessibleValue Function Prototypes:  */
 
Index: cspi/spi_text.c
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi_text.c,v
retrieving revision 1.27
diff -u -r1.27 spi_text.c
--- cspi/spi_text.c	27 Mar 2006 18:05:31 -0000	1.27
+++ cspi/spi_text.c	12 Jul 2006 14:06:18 -0000
@@ -912,4 +912,94 @@
 }
 
 
+/**
+ * AccessibleText_getAttributeRun:
+ * @obj: a pointer to the #AccessibleText object to query.
+ * @offset: a long integer indicating the offset from which the attribute
+ *        search is based.
+ * @startOffset: a #long indicating the start of the desired text range.
+ * @endOffset: a #long indicating the first character past the desired range.
+ * @includeDefaults: a #bool if False, the call should only return those 
+ *                 attributes which are explicitly set on the current attribute 
+ *                 run, omitting any attributes which are inherited from the 
+ *                 default values.
+ *
+ *  @Since: AT-SPI 1.7
+ *
+ * Returns: the AttributeSet defined at offset, optionally including the 'default' attributes.
+ **/
 
+AccessibleAttributeSet *
+AccessibleText_getAttributeRun (AccessibleText *obj,
+				long int offset,
+				long int *startOffset,
+				long int *endOffset,
+			        long int includeDefaults){
+
+  CORBA_long retStartOffset, retEndOffset;
+  AccessibleAttributeSet *retval;
+  Accessibility_AttributeSet *attributes;
+
+  if (obj == NULL)
+  {
+       *startOffset = *endOffset = -1;
+       return NULL;
+  }
+
+  attributes = Accessibility_Text_getAttributeRun (CSPI_OBJREF (obj),
+					       offset,
+					       &retStartOffset,
+					       &retEndOffset,
+					       (includeDefaults)? TRUE : FALSE,
+					       cspi_ev ());
+
+  if (!cspi_check_ev ("getAttributeRun"))
+    {
+      *startOffset = *endOffset = -1;
+      retval = NULL;
+    }
+  else 
+  {
+      *startOffset = retStartOffset;
+      *endOffset   = retEndOffset;
+  }
+
+  retval =  cspi_attribute_set_from_sequence (attributes);
+
+  return retval;
+				     
+}
+
+/**
+ * AccessibleText_getDefaultAttributeSet:
+ * @obj: a pointer to the #AccessibleText object to query.
+ *
+ *
+ *  @Since: AT-SPI 1.7
+ *
+ * Returns: an AttributeSet containing the text attributes 
+ * which apply to all text in the object by virtue of the
+ * default settings of the document, view, or user agent; e.g.
+ * those attributes which are implied rather than explicitly 
+ * applied to the text object. For instance, an object whose 
+ * entire text content has been explicitly marked as 'bold' 
+ * will report the 'bold' attribute via getAttributeRun(), 
+ * whereas an object whose text weight is inspecified may 
+ * report the default or implied text weight in the default AttributeSet.
+ *
+ **/
+
+AccessibleAttributeSet *
+AccessibleText_getDefaultAttributeSet (AccessibleText *obj){
+   AccessibleAttributeSet *retval;
+   Accessibility_AttributeSet *attributes;
+
+   cspi_return_val_if_fail (obj != NULL, NULL);
+
+  attributes = Accessibility_Text_getDefaultAttributeSet (CSPI_OBJREF (obj), cspi_ev ());
+  cspi_return_val_if_ev ("getDefaultAttributeSet", NULL);
+  
+  retval = cspi_attribute_set_from_sequence (attributes);
+  retval = NULL;
+  return retval;
+}
Index: idl/Accessibility_Text.idl
===================================================================
RCS file: /cvs/gnome/at-spi/idl/Accessibility_Text.idl,v
retrieving revision 1.11
diff -u -r1.11 Accessibility_Text.idl
--- idl/Accessibility_Text.idl	16 Jan 2006 14:16:43 -0000	1.11
+++ idl/Accessibility_Text.idl	12 Jul 2006 14:06:19 -0000
@@ -385,6 +385,72 @@
 				in TEXT_CLIP_TYPE xClipType, 
 				in TEXT_CLIP_TYPE yClipType);
 
+    /** 
+     * Query a particular text object for the text attributes defined at a given offset, 
+     * obtaining the start and end of the "attribute run" over which these attributes are currently 
+     * invariant.  Text attributes are those presentational, typographic, or semantic attributes or 
+     * qualitites which apply to a range of text specifyable by starting and ending offsets.  
+     * Attributes relevant to localization should be provided in 
+     * accordance with the w3c "Internationalization and Localization Markup Requirements", 
+     * http://www.w3.org/TR/2005/WD-itsreq-20051122/
+     * Other text attributes should choose their names and value semantics in accordance with relevant
+     * standards such as CSS level 2 (http://www.w3.org/TR/1998/REC-CSS2-19980512), 
+     * XHTML 1.0 (http://www.w3.org/TR/2002/REC-xhtml1-20020801), and
+     * WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/).  Those attributes from the aforementioned
+     * specifications and recommendations which do not concern typographic, presentational, or 
+     * semantic aspects of text should be exposed via the more general Accessible::getAttributes() API
+     * (if at all).
+     *
+     * For example, CSS attributes which should be exposed on text (either as default attributes, or 
+     * as explicitly-set attributes when non-default values are specified in the content view) include
+     * the Font attributes (i.e. "css2:font-weight", "css2:font-style"), 
+     * the "css2:color" and "css2:background-color" attributes, and "css2:text-decoration" attribute. 
+     * 
+     * If includeDefaults is TRUE, then this AttributeSet should include the default
+     * attributes as well as those which are explicitly assigned to the attribute run in question.
+     * startOffset and endOffset will be back-filled to indicate the start and end of the attribute run
+     * which contains 'offset' - an attribute run is a contiguous section of text whose attributes are
+     * homogeneous.
+     * @param offset the offset of the character whose attributes will be reported.
+     * @param startOffset backfilled with the starting offset of the character range over which all
+     *                    text attributes match those of \c offset, i.e. the start of the homogeneous
+     *                    attribute run including \c offset.
+     * @param endOffset backfilled with the offset of the first character past the character range over which all
+     *                    text attributes match those of \c offset, i.e. the character immediately after 
+     *                    the homogeneous attribute run including \c offset.
+     * @param includeDefaults if False, the call should only return those attributes which are
+     * explicitly set on the current attribute run, omitting any attributes which are inherited from 
+     * the default values.  See also Text::getDefaultAttributes.
+     *
+     * @note Clients seeking annotations or properties of a more general nature, which 
+     * are not specific to the onscreen textual content of objects and cannot logically be applied
+     * to specific character offset ranges,
+     * should use Accessible::getAttributes instead.
+     * The attributes returned by Text::getAttributeRun (with or without 'default attributes'), 
+     * are distinct from the properties/attributes returned by Accessible::getAttributes.
+     * 
+     * @see Accessible::getAttributes
+     *
+     * @returns the AttributeSet defined at offset, optionally including the 'default' attributes. 
+     *
+     * @since AT-SPI 1.7.0
+     **/
+    AttributeSet getAttributeRun (in long offset,
+				  out long startOffset, 
+				  out long endOffset,
+				  in boolean includeDefaults);
+      /** 
+       * Return an ::AttributeSet containing the text attributes which apply to all text in the object
+       * by virtue of the default settings of the document, view, or user agent; e.g. those
+       * attributes which are implied rather than explicitly applied to the text object.
+       * For instance, an object whose entire text content has been explicitly marked as 'bold' will
+       * report the 'bold' attribute via getAttributeRun(), whereas an object whose text weight is
+       * inspecified may report the default or implied text weight in the default AttributeSet.
+       * 
+       * @since AT-SPI 1.7.0
+       **/
+    AttributeSet getDefaultAttributeSet ();
+
     /** \cond
      * unImplemented:
      *
@@ -392,8 +458,6 @@
      */
     void unImplemented ();
     void unImplemented2 ();
-    void unImplemented3 ();
-    void unImplemented4 ();
     /** \endcond **/
   };
 };
Index: libspi/text.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/text.c,v
retrieving revision 1.24
diff -u -r1.24 text.c
--- libspi/text.c	16 Jan 2006 14:16:44 -0000	1.24
+++ libspi/text.c	12 Jul 2006 14:06:20 -0000
@@ -126,7 +126,7 @@
 }
 
 
-CORBA_string
+static CORBA_string
 impl_getTextAfterOffset (PortableServer_Servant servant,
 			 const CORBA_long offset,
 			 const
@@ -598,7 +598,7 @@
     return FALSE;
 }
 
-Accessibility_Text_RangeList *
+static Accessibility_Text_RangeList *
 impl_getBoundedRanges(PortableServer_Servant servant,
 		      const CORBA_long x,
 		      const CORBA_long y,
@@ -671,6 +671,94 @@
 }
 
 
+
+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, *default_attributes = NULL;
+     gint intstart_offset, intend_offset;
+     Accessibility_AttributeSet *retval = NULL;
+     AtkText *text = get_text_from_servant (servant);
+     gint n_attributes = 0, total_attributes = 0, n_default_attributes = 0;
+     gint i, j;
+     
+     g_return_val_if_fail (text != NULL, NULL);
+
+     attributes = atk_text_get_run_attributes (text, offset,
+					       &intstart_offset, &intend_offset);
+
+     if (attributes) total_attributes = n_attributes = g_slist_length (attributes);
+     if (includeDefaults)
+     {
+	 default_attributes = atk_text_get_default_attributes (text);
+	 if (default_attributes)
+	     n_default_attributes = g_slist_length (default_attributes);
+	 total_attributes += n_default_attributes;
+     }
+
+     *startOffset = intstart_offset;
+     *endOffset = intend_offset; 
+
+     if (total_attributes)
+     {
+	 retval = CORBA_sequence_CORBA_string__alloc ();
+	 retval->_length = retval->_maximum = total_attributes;
+	 retval->_buffer = CORBA_sequence_CORBA_string_allocbuf (total_attributes);
+	 CORBA_sequence_set_release (retval, CORBA_TRUE);
+	 
+	 for (i = 0; i < n_attributes; ++i)
+	 {
+	     retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (attributes, i));
+	 }
+	 
+	 for (j = 0; j < n_default_attributes; ++i, ++j)
+	 {
+	     retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (default_attributes, j));
+	 }
+	 
+	 atk_attribute_set_free (attributes);
+	 if (default_attributes)
+	     atk_attribute_set_free (default_attributes);
+     }
+     return retval;
+}
+
+static Accessibility_AttributeSet *
+impl_getDefaultAttributeSet (PortableServer_Servant servant,
+			     CORBA_Environment *ev){
+     AtkAttributeSet *attributes;
+     Accessibility_AttributeSet *retval = NULL;
+     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_default_attributes (text);
+     
+     if (attributes) 
+     {
+	 n_attributes = g_slist_length (attributes);
+
+	 retval = CORBA_sequence_CORBA_string__alloc ();
+	 retval->_length = retval->_maximum = n_attributes;
+	 retval->_buffer = CORBA_sequence_CORBA_string_allocbuf (n_attributes);
+	 CORBA_sequence_set_release (retval, CORBA_TRUE);
+	 
+	 for (i = 0; i < n_attributes; ++i)
+	 {
+	     retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (attributes, i));
+	 }
+	 atk_attribute_set_free (attributes);
+     }     
+     return retval;       
+}
+
+
 static void
 spi_text_class_init (SpiTextClass *klass)
 {
@@ -698,6 +786,8 @@
   epv->getRangeExtents = impl_getRangeExtents;
   epv->getBoundedRanges = impl_getBoundedRanges;
   epv->getAttributeValue = impl_getAttributeValue;
+  epv->getAttributeRun = impl_getAttributeRun;
+  epv->getDefaultAttributeSet = impl_getDefaultAttributeSet;
 }
 
 static void
