## GtkAccessible GtkAccessible — Accessibility support for widgets |

## Synopsis

    #include <gtk/gtk.h>

    struct              GtkAccessible;
    void                gtk_accessible_connect_widget_destroyed
                                                            (GtkAccessible *accessible);
    GtkWidget *         gtk_accessible_get_widget           (GtkAccessible *accessible);
    void                gtk_accessible_set_widget           (GtkAccessible *accessible,
                                                             GtkWidget *widget);

## Object Hierarchy

      GObject
       +----AtkObject
             +----GtkAccessible

## Properties

      "widget"                   GtkWidget*            : Read / Write

## Description

The GtkAccessible class is the base class for accessible implementations for GtkWidget subclasses. It is a thin wrapper around AtkObject, which adds facilities for associating a widget with its accessible object.

An accessible implementation for a third-party widget should derive from GtkAccessible and implement the suitable interfaces from ATK, such as AtkText or AtkSelection. To establish the connection between the widget class and its corresponding acccessible implementation, override the get_accessible vfunc in GtkWidgetClass.

## Details

### struct GtkAccessible

    struct GtkAccessible;

### gtk_accessible_connect_widget_destroyed ()

    void                gtk_accessible_connect_widget_destroyed
                                                            (GtkAccessible *accessible);

### Warning

`gtk_accessible_connect_widget_destroyed` has been deprecated since version 3.4 and should not be used in newly-written code. Use `gtk_accessible_set_widget()` and its vfuncs.

This function specifies the callback function to be called when the widget corresponding to a GtkAccessible is destroyed.

`accessible` : | a GtkAccessible

### gtk_accessible_get_widget ()

    GtkWidget *         gtk_accessible_get_widget           (GtkAccessible *accessible);

Gets the GtkWidget corresponding to the GtkAccessible. The returned widget does not have a reference added, so you do not need to unref it.

`accessible` : | a GtkAccessible
Returns : | pointer to the GtkWidget corresponding to the GtkAccessible, or `NULL`. [transfer none]

Since 2.22

### gtk_accessible_set_widget ()

    void                gtk_accessible_set_widget           (GtkAccessible *accessible,
                                                             GtkWidget *widget);

Sets the GtkWidget corresponding to the GtkAccessible.

### Note

`accessible` will not hold a reference to `widget`. It is the caller's responsibility to ensure that when `widget` is destroyed, the widget is unset by calling this function again with `widget` set to `NULL`.

`accessible` : | a GtkAccessible
`widget` : | a GtkWidget or `NULL` to unset. [allow-none]

Since 2.22

## Property Details

### The `"widget"` property

      "widget"                   GtkWidget*            : Read / Write

The widget referenced by this accessible.