Re: [g-a-devel]Re: ATK patch to add support for embedded text
- From: Bill Haneman <bill haneman sun com>
- To: "Padraig O'Briain" <Padraig Obriain sun com>
- Cc: padraig obriain sun com, gnome-accessibility-devel gnome org
- Subject: Re: [g-a-devel]Re: ATK patch to add support for embedded text
- Date: 14 Nov 2002 11:59:26 +0000
On Thu, 2002-11-14 at 11:40, Padraig O'Briain wrote:
> Bill,
>
> The patch does not compile.
D'OH! (sound of tearing hair)
Fixed patch attached. I am working on adding stuff to atk/tests now, to
sanity check the API.
-Bill
? atk-patch-nov14.diff
? atk-patch.diff
? stamp-h
? stamp-h.in
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/atk/ChangeLog,v
retrieving revision 1.219
diff -u -r1.219 ChangeLog
--- ChangeLog 13 Nov 2002 17:09:03 -0000 1.219
+++ ChangeLog 14 Nov 2002 12:02:09 -0000
@@ -1,3 +1,21 @@
+2002-11-14 Bill Haneman <bill haneman sun com>
+
+ * atk/atkrelationtype.h:
+ (ATK_RELATION_EMBEDS, ATK_RELATION_EMBEDDED_BY):
+ New relations to handle content embedding, for instance
+ text that embeds or flows around images.
+ * atk/atkhyperlink.h:
+ (atk_hyperlink_is_inline):
+ New API, returns whether a hyperlink's content is
+ partially displayed inline; useful for small images
+ emedded in text, and for HTML <src> elements.
+ (AtkHyperlinkClass->link_state):
+ New virtualized method, used to implement various
+ state query API such as atk_hyperlink_is_inline().
+ * atk/atkhyperlink.c:
+ (atk_hyperlink_is_inline):
+ New method.
+
2002-11-13 Padraig O'Briain <padraig obriain sun com>
* atk/atkobject.[ch]: Add signal active-descendant-changed
Index: atk/atkhyperlink.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atkhyperlink.c,v
retrieving revision 1.10
diff -u -r1.10 atkhyperlink.c
--- atk/atkhyperlink.c 8 Nov 2002 18:53:55 -0000 1.10
+++ atk/atkhyperlink.c 14 Nov 2002 12:02:09 -0000
@@ -28,6 +28,8 @@
static gpointer parent_class = NULL;
+static guint ATK_HYPERLINK_IS_INLINE = 1<<0;
+
GType
atk_hyperlink_get_type (void)
{
@@ -194,6 +196,32 @@
klass = ATK_HYPERLINK_GET_CLASS (link);
if (klass->is_valid)
return (klass->is_valid) (link);
+ else
+ return FALSE;
+}
+
+/**
+ * atk_hyperlink_is_inline:
+ * @link_: an #AtkHyperlink
+ *
+ * Indicates whether the link currently displays some or all of its
+ * content inline. Ordinary HTML links will usually return
+ * %FALSE, but an inline <src> HTML element will return
+ * %TRUE.
+a *
+ * Returns: whether or not this link displays its content inline.
+ *
+ **/
+gboolean
+atk_hyperlink_is_inline (AtkHyperlink *link)
+{
+ AtkHyperlinkClass *klass;
+
+ g_return_val_if_fail (ATK_IS_HYPERLINK (link), FALSE);
+
+ klass = ATK_HYPERLINK_GET_CLASS (link);
+ if (klass->link_state)
+ return (klass->link_state (link) & ATK_HYPERLINK_IS_INLINE);
else
return FALSE;
}
Index: atk/atkhyperlink.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkhyperlink.h,v
retrieving revision 1.7
diff -u -r1.7 atkhyperlink.h
--- atk/atkhyperlink.h 8 Nov 2002 18:53:55 -0000 1.7
+++ atk/atkhyperlink.h 14 Nov 2002 12:02:09 -0000
@@ -85,10 +85,17 @@
*/
gint (* get_n_anchors) (AtkHyperlink *link_);
+ /*
+ * Returns a set of bitflags which encode state information.
+ * Used by non-virtualized state query methods, not intended,
+ * for direct client use. It is virtualized, but clients should use
+ * atk_hyperlink_is_inline (), etc.
+ */
+ guint (* link_state) (AtkHyperlink *link_);
+
AtkFunction pad1;
AtkFunction pad2;
AtkFunction pad3;
- AtkFunction pad4;
};
GType atk_hyperlink_get_type (void);
@@ -104,6 +111,8 @@
gint atk_hyperlink_get_start_index (AtkHyperlink *link_);
gboolean atk_hyperlink_is_valid (AtkHyperlink *link_);
+
+gboolean atk_hyperlink_is_inline (AtkHyperlink *link_);
gint atk_hyperlink_get_n_anchors (AtkHyperlink *link_);
Index: atk/atkrelationtype.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkrelationtype.h,v
retrieving revision 1.1
diff -u -r1.1 atkrelationtype.h
--- atk/atkrelationtype.h 30 Oct 2002 09:42:27 -0000 1.1
+++ atk/atkrelationtype.h 14 Nov 2002 12:02:10 -0000
@@ -37,7 +37,12 @@
* AtkObject in a sequential way, (for instance text-flow).
* ATK_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
* another AtkObject in a sequential way, (for instance text-flow).
- * ATK_RELATION_SUBWINDOW_OF: [not sure about this one, ask peter]
+ * ATK_RELATION_SUBWINDOW_OF: [not sure about this one, ask Peter]
+ * ATK_RELATION_EMBEDS: Indicates that the object visually embeds
+ * another object's content, i.e. this object's content flows around
+ * another's content.
+ * ATK_RELATION_EMBEDDED_BY: Inverse of %ATK_RELATION_EMBEDS, indicates that
+ * this object's content is visualy embedded in another object.
* ATK_RELATION_LAST_DEFINED:
*
*Describes the type of the relation
@@ -53,7 +58,9 @@
ATK_RELATION_NODE_CHILD_OF,
ATK_RELATION_FLOWS_TO,
ATK_RELATION_FLOWS_FROM,
- ATK_RELATION_SUBWINDOW_OF, /* not sure about this one, ask Peter */
+ ATK_RELATION_SUBWINDOW_OF,
+ ATK_RELATION_EMBEDS,
+ ATK_RELATION_EMBEDDED_BY,
ATK_RELATION_LAST_DEFINED
} AtkRelationType;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]