summaryrefslogtreecommitdiff
path: root/atk
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2002-11-14 17:50:57 +0000
committerBill Haneman <billh@src.gnome.org>2002-11-14 17:50:57 +0000
commit67c8aa711b95f37794d2e288cd6b76546af95aa6 (patch)
treee020b22e0cdd78d3ecc412dec853a1362591c2f2 /atk
parente4eec41aff125c93aa3a488bb514c9df82aed6b4 (diff)
downloadatk-67c8aa711b95f37794d2e288cd6b76546af95aa6.tar.gz
Revved to 1.1.2, added ATK_RELATION_EMBEDS/EMBEDDED_BY,
atk_hyperlink_is_inline.
Diffstat (limited to 'atk')
-rwxr-xr-xatk/atkhyperlink.c26
-rwxr-xr-xatk/atkhyperlink.h22
-rwxr-xr-xatk/atkobject.c1
-rwxr-xr-xatk/atkrelationtype.h11
4 files changed, 56 insertions, 4 deletions
diff --git a/atk/atkhyperlink.c b/atk/atkhyperlink.c
index 569a33f..90f4ff4 100755
--- a/atk/atkhyperlink.c
+++ b/atk/atkhyperlink.c
@@ -199,6 +199,32 @@ atk_hyperlink_is_valid (AtkHyperlink *link)
}
/**
+ * 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 &lt;src&gt; 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;
+}
+
+/**
* atk_hyperlink_get_n_anchors:
* @link_: an #AtkHyperlink
*
diff --git a/atk/atkhyperlink.h b/atk/atkhyperlink.h
index 15d804f..a0c6025 100755
--- a/atk/atkhyperlink.h
+++ b/atk/atkhyperlink.h
@@ -32,6 +32,17 @@ extern "C" {
* It implements the AtkAction interface.
*/
+/**
+ *AtkHyperlinkStateFlags
+ *@ATK_HYPERLINK_IS_INLINE: Link is inline
+ *
+ *Describes the type of link
+ **/
+typedef enum
+{
+ ATK_HYPERLINK_IS_INLINE = 1 << 0
+} AtkHyperlinkStateFlags;
+
#define ATK_TYPE_HYPERLINK (atk_hyperlink_get_type ())
#define ATK_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_HYPERLINK, AtkHyperlink))
#define ATK_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_HYPERLINK, AtkHyperlinkClass))
@@ -85,10 +96,17 @@ struct _AtkHyperlinkClass
*/
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);
@@ -105,6 +123,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_);
diff --git a/atk/atkobject.c b/atk/atkobject.c
index 14e36ca..3b51ab6 100755
--- a/atk/atkobject.c
+++ b/atk/atkobject.c
@@ -1516,7 +1516,6 @@ atk_object_remove_relationship (AtkObject *object,
if (atk_relation_get_relation_type (relation) == relationship)
{
GPtrArray *array;
- gint j;
array = atk_relation_get_target (relation);
diff --git a/atk/atkrelationtype.h b/atk/atkrelationtype.h
index 798d7c7..b58d685 100755
--- a/atk/atkrelationtype.h
+++ b/atk/atkrelationtype.h
@@ -37,7 +37,12 @@ extern "C" {
* 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 @@ typedef enum
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;