/** * atk_hyperlink_is_selected_link: * @link_: an #AtkHyperlink * * Determines whether this AtkHyperlink is selected * * Since: 1.4 * * @Deprecated: This method is deprecated since ATK version 1.8. * Please use ATK_STATE_SELECTED to indicate when a hyperlink within a * Hypertext container is selected. * * Returns: True is the AtkHyperlink is selected, False otherwise **/ gboolean atk_hyperlink_is_selected_link (AtkHyperlink *link) { AtkHyperlinkClass *klass; g_return_val_if_fail (ATK_IS_HYPERLINK (link), FALSE); klass = ATK_HYPERLINK_GET_CLASS (link); if (klass->is_selected_link) return (klass->is_selected_link) (link); else return FALSE; }
/** * atk_hyperlink_get_n_anchors: * @link_: an #AtkHyperlink * * Gets the number of anchors associated with this hyperlink. * * Returns: the number of anchors associated with this hyperlink **/ gint atk_hyperlink_get_n_anchors (AtkHyperlink *link) { AtkHyperlinkClass *klass; g_return_val_if_fail (ATK_IS_HYPERLINK (link), 0); klass = ATK_HYPERLINK_GET_CLASS (link); if (klass->get_n_anchors) return (klass->get_n_anchors) (link); else return 0; }
/** * 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; }
/** * atk_hyperlink_get_object: * @link_: an #AtkHyperlink * @i: a (zero-index) integer specifying the desired anchor * * Returns the item associated with this hyperlinks nth anchor. * For instance, the returned #AtkObject will implement #AtkText * if @link_ is a text hyperlink, #AtkImage if @link_ is an image * hyperlink etc. * * Multiple anchors are primarily used by client-side image maps. * * Returns: an #AtkObject associated with this hyperlinks i-th anchor **/ AtkObject* atk_hyperlink_get_object (AtkHyperlink *link, gint i) { AtkHyperlinkClass *klass; g_return_val_if_fail (ATK_IS_HYPERLINK (link), NULL); klass = ATK_HYPERLINK_GET_CLASS (link); if (klass->get_object) return (klass->get_object) (link, i); else return NULL; }
static AtkHyperlink * get_hyperlink_from_servant (PortableServer_Servant servant) { SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant)); g_return_val_if_fail (object != NULL, NULL); if (ATK_IS_HYPERLINK(object->gobj)) { return ATK_HYPERLINK (object->gobj); } else if (ATK_IS_HYPERLINK_IMPL(object->gobj)) { return atk_hyperlink_impl_get_hyperlink (ATK_HYPERLINK_IMPL (object->gobj)); } else return NULL; }