AtkHyperlink: ATK - Accessibility Toolkit

## AtkHyperlink AtkHyperlink — An ATK object which encapsulates a link or set of links in a hypertext document. |

## Functions

gchar * | atk_hyperlink_get_uri ()
AtkObject * | atk_hyperlink_get_object ()
gint | atk_hyperlink_get_end_index ()
gint | atk_hyperlink_get_start_index ()
gboolean | atk_hyperlink_is_valid ()
gboolean | atk_hyperlink_is_inline ()
gint | atk_hyperlink_get_n_anchors ()
gboolean | atk_hyperlink_is_selected_link ()

## Properties

gint | end-index | Read
gint | number-of-anchors | Read
gboolean | selected-link | Read
gint | start-index | Read

## Signals

void | link-activated | Run Last

## Types and Values

struct | AtkHyperlink
enum | AtkHyperlinkStateFlags

## Object Hierarchy

        GObject
        ╰── AtkHyperlink

## Implemented Interfaces

AtkHyperlink implements AtkAction.

## Description

An ATK object which encapsulates a link or set of links (for instance in the case of client-side image maps) in a hypertext document. It may implement the AtkAction interface. AtkHyperlink may also be used to refer to inline embedded content, since it allows specification of a start and end offset within the host AtkHypertext object.

## Functions

### atk_hyperlink_get_uri ()

    gchar *
    atk_hyperlink_get_uri (AtkHyperlink *link_,
                           gint i);

Get a the URI associated with the anchor specified by `i` of `link_` .

Multiple anchors are primarily used by client-side image maps.

#### Parameters

link_ | an AtkHyperlink |
i | a (zero-index) integer specifying the desired anchor |

#### Returns

a string specifying the URI

### atk_hyperlink_get_object ()

    AtkObject *
    atk_hyperlink_get_object (AtkHyperlink *link_,
                              gint i);

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.

#### Parameters

link_ | an AtkHyperlink |
i | a (zero-index) integer specifying the desired anchor |

#### Returns

an AtkObject associated with this hyperlinks i-th anchor.

[transfer none]

### atk_hyperlink_get_end_index ()

    gint
    atk_hyperlink_get_end_index (AtkHyperlink *link_);

Gets the index with the hypertext document at which this link ends.

#### Parameters

link_ | an AtkHyperlink |

#### Returns

the index with the hypertext document at which this link ends

### atk_hyperlink_get_start_index ()

    gint
    atk_hyperlink_get_start_index (AtkHyperlink *link_);

Gets the index with the hypertext document at which this link begins.

#### Parameters

link_ | an AtkHyperlink |

#### Returns

the index with the hypertext document at which this link begins

### atk_hyperlink_is_valid ()

    gboolean
    atk_hyperlink_is_valid (AtkHyperlink *link_);

Since the document that a link is associated with may have changed this method returns `TRUE` if the link is still valid (with respect to the document it references) and `FALSE` otherwise.

#### Parameters

link_ | an AtkHyperlink |

#### Returns

whether or not this link is still valid

### atk_hyperlink_is_inline ()

    gboolean
    atk_hyperlink_is_inline (AtkHyperlink *link_);

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`.

#### Parameters

link_ | an AtkHyperlink |

#### Returns

whether or not this link displays its content inline.

### atk_hyperlink_get_n_anchors ()

    gint
    atk_hyperlink_get_n_anchors (AtkHyperlink *link_);

Gets the number of anchors associated with this hyperlink.

#### Parameters

link_ | an AtkHyperlink |

#### Returns

the number of anchors associated with this hyperlink

### atk_hyperlink_is_selected_link ()

    gboolean
    atk_hyperlink_is_selected_link (AtkHyperlink *link_);

`atk_hyperlink_is_selected_link` has been deprecated since version 1.8 and should not be used in newly-written code.

Please use ATK_STATE_FOCUSABLE for all links, and ATK_STATE_FOCUSED for focused links.

Determines whether this AtkHyperlink is selected

#### Parameters

link_ | an AtkHyperlink |

#### Returns

True if the AtkHyperlink is selected, False otherwise

Since: 1.4

## Types and Values

### struct AtkHyperlink

    struct AtkHyperlink;

### enum AtkHyperlinkStateFlags

Describes the type of link

#### Members

ATK_HYPERLINK_IS_INLINE | Link is inline |

## Property Details

### The `“end-index”` property

      “end-index”                gint

The end index of the AtkHyperlink object.

Flags: Read

Allowed values: >= 0

Default value: 0

### The `“number-of-anchors”` property

      “number-of-anchors”        gint

The number of anchors associated with the AtkHyperlink object.

Flags: Read

Allowed values: >= 0

Default value: 0

### The `“selected-link”` property

      “selected-link”            gboolean

Selected link

`AtkHyperlink:selected-link` has been deprecated since version 1.8 and should not be used in newly-written code.

Please use ATK_STATE_FOCUSABLE for all links, and ATK_STATE_FOCUSED for focused links.

Flags: Read

Default value: FALSE

### The `“start-index”` property

      “start-index”              gint

The start index of the AtkHyperlink object.

Flags: Read

Allowed values: >= 0

Default value: 0

## Signal Details

### The `“link-activated”` signal

    void
    user_function (AtkHyperlink *atkhyperlink,
                   gpointer      user_data)

The signal link-activated is emitted when a link is activated.

#### Parameters

atkhyperlink | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last