### Virtual Method

# Gtk AccessibleText get_attributes

since: 4.14

#### Declaration [src]

    gboolean
    get_attributes (
      GtkAccessibleText* self,
      unsigned int offset,
      gsize* n_ranges,
      GtkAccessibleTextRange** ranges,
      char*** attribute_names,
      char*** attribute_values
    )

#### Description [src]

Retrieves the text attributes inside the accessible object.

Each attribute is composed by:

- a range
- a name
- a value

It is left to the implementation to determine the serialization format of the value to a string.

GTK provides support for various text attribute names and values, but implementations of this interface are free to add their own attributes.

If this function returns true, `n_ranges` will be set to a value greater than or equal to one, `ranges` will be set to a newly allocated array of [struct#Gtk.AccessibleTextRange].

Available since: 4.14

#### Parameters

`offset`

  Type: `unsigned int`

  The offset, in characters.

`n_ranges`

  Type: `gsize*`

  The number of attributes.

  The argument will be set by the function.

`ranges`

  Type: An array of `GtkAccessibleTextRange*`

  The ranges of the attributes inside the accessible object.

  The argument will be set by the function.
  The argument can be `NULL`.
  The length of the array is specified in the `n_ranges` argument.
  The caller of the function takes ownership of the data container, but not the data inside it.

`attribute_names`

  Type: An array of `char**`

  The names of the attributes inside the accessible object.

  The argument will be set by the function.
  The argument can be `NULL`.
  The array must be `NULL`-terminated.
  The caller of the function takes ownership of the data, and is responsible for freeing it.
  Each element is a NUL terminated UTF-8 string.

`attribute_values`

  Type: An array of `char**`

  The values of the attributes inside the accessible object.

  The argument will be set by the function.
  The argument can be `NULL`.
  The array must be `NULL`-terminated.
  The caller of the function takes ownership of the data, and is responsible for freeing it.
  Each element is a NUL terminated UTF-8 string.

#### Return value

Type: `gboolean`

True if the accessible object has at least an attribute, and false otherwise.