+2003-12-01 Bill Haneman <billh@gnome.org>
+
+ Fix for bug #118581.
+ * idl/Accessibility_Text.idl:
+ (getDefaultAttributes): New.
+ (unimplemented4): Removed (replaced by above method).
+
+ * libspi/text.c:
+ (impl_getDefaultAttributes): New method.
+ (spi_text_class_init):
+ initialize the get_default_attributes slot in the epv.
+
+ * cspi/spi.h:
+ (AccessibleText_getDefaultAttributes): New prototype.
+
+ * cspi/spi_text.c:
+ (AccessibleText_getDefaultAttributes): New method.
+
2003-11-06 Padraig O'Briain <padraig.obriain@sun.com>
* cspi/spi_accessible.c (cspi_init_relation_type_table): Do not
long int *startOffset,
long int *endOffset);
+char *
+AccessibleText_getDefaultAttributes (AccessibleText *obj);
SPIBoolean
AccessibleText_setCaretOffset (AccessibleText *obj,
}
/**
+ * AccessibleText_getDefaultAttributes:
+ * @obj: a pointer to the #AccessibleText object to query.
+ *
+ * Get the default attributes applied to an #AccessibleText
+ * object.
+ * The text attributes correspond to CSS attributes where possible,
+ * keys and values are delimited from one another via ":", and
+ * the delimiter between key/value pairs is ";". Thus
+ * "font-size:10;foreground-color:0,0,0" would be a valid
+ * return string. The combination of this attribute set and
+ * the attributes reported by #AccessibleText_getAttributes
+ * describes the entire set of text attributes over a range.
+ *
+ * Returns: a text string describing the default attributes
+ * applied to a text object, (exclusive of explicitly-set
+ * attributes), encoded as UTF-8.
+ **/
+char *
+AccessibleText_getDefaultAttributes (AccessibleText *obj)
+{
+ char *retval;
+
+ if (obj == NULL)
+ {
+ return NULL;
+ }
+
+ retval = Accessibility_Text_getDefaultAttributes (CSPI_OBJREF (obj),
+ cspi_ev ());
+
+ if (!cspi_check_ev ("getAttributes"))
+ {
+ retval = NULL;
+ }
+
+ return retval;
+}
+
+/**
* AccessibleText_setCaretOffset:
* @obj: a pointer to the #AccessibleText object on which to operate.
* @newOffset: the offset to which the text caret is to be moved.
</para>
-<!-- ##### TYPEDEF AccessibleEvent ##### -->
+<!-- ##### STRUCT AccessibleEvent ##### -->
<para>
AccessibleEvent is a struct used to encapsulate event information.
</para>
+@type:
+@source:
+@detail1:
+@detail2:
<!-- ##### USER_FUNCTION AccessibleEventListenerCB ##### -->
<para>
@Returns:
-<!-- ##### TYPEDEF AccessibleDeviceEvent ##### -->
+<!-- ##### STRUCT AccessibleDeviceEvent ##### -->
<para>
AccessibleDeviceEvent is a struct which encapsulates a device event.
</para>
+@keyID:
+@keycode:
+@keystring:
+@timestamp:
+@type:
+@modifiers:
+@is_text:
<!-- ##### TYPEDEF AccessibleDeviceEventMask ##### -->
<para>
*/
string getAttributes (in long offset,
out long startOffset, out long endOffset);
+ string getDefaultAttributes ();
void getCharacterExtents (in long offset, out long x, out long y, out long width, out long height, in short coordType);
long getOffsetAtPoint (in long x, in long y, in short coordType);
long getNSelections ();
in short coordType,
in TEXT_CLIP_TYPE xClipType,
in TEXT_CLIP_TYPE yClipType);
+
/**
* unImplemented:
*
void unImplemented ();
void unImplemented2 ();
void unImplemented3 ();
- void unImplemented4 ();
};
};
return rv;
}
+static CORBA_string
+impl_getDefaultAttributes (PortableServer_Servant servant,
+ CORBA_Environment *ev)
+{
+ AtkAttributeSet *set;
+ gint intstart_offset, intend_offset;
+ CORBA_char *rv;
+ AtkText *text = get_text_from_servant (servant);
+
+ g_return_val_if_fail (text != NULL, CORBA_string_dup (""));
+
+ set = atk_text_get_default_attributes (text);
+
+ rv = _string_from_attribute_set (set);
+ atk_attribute_set_free (set);
+ return rv;
+}
static void
impl_getCharacterExtents (PortableServer_Servant servant,
epv->getTextBeforeOffset = impl_getTextBeforeOffset;
epv->_get_caretOffset = impl__get_caretOffset;
epv->getAttributes = impl_getAttributes;
+ epv->getDefaultAttributes = impl_getDefaultAttributes;
epv->getCharacterExtents = impl_getCharacterExtents;
epv->_get_characterCount = impl__get_characterCount;
epv->getOffsetAtPoint = impl_getOffsetAtPoint;