CtkAccessible: CTK+ 3 Reference Manual

## CtkAccessible CtkAccessible — Accessibility support for widgets |

## Functions

void | ctk_accessible_connect_widget_destroyed ()
CtkWidget * | ctk_accessible_get_widget ()
void | ctk_accessible_set_widget ()

## Properties

CtkWidget * | widget | Read / Write

## Types and Values

struct | CtkAccessible

## Object Hierarchy

        GObject
        ╰── AtkObject
            ╰── CtkAccessible

## Includes

    #include <ctk/ctk.h>

## Description

The CtkAccessible class is the base class for accessible implementations for CtkWidget 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 CtkAccessible 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 CtkWidgetClass.

## Functions

### ctk_accessible_connect_widget_destroyed ()

    void
    ctk_accessible_connect_widget_destroyed
                                   (CtkAccessible *accessible);

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

Use `ctk_accessible_set_widget()` and its vfuncs.

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

#### Parameters

accessible | a CtkAccessible |

### ctk_accessible_get_widget ()

    CtkWidget *
    ctk_accessible_get_widget (CtkAccessible *accessible);

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

#### Parameters

accessible | a CtkAccessible |

#### Returns

pointer to the CtkWidget corresponding to the CtkAccessible, or `NULL`.

[nullable][transfer none]

Since: 2.22

### ctk_accessible_set_widget ()

    void
    ctk_accessible_set_widget (CtkAccessible *accessible,
                               CtkWidget *widget);

Sets the CtkWidget corresponding to the CtkAccessible.

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

#### Parameters

accessible | a CtkAccessible |
widget | a CtkWidget or `NULL` to unset. | [allow-none]

Since: 2.22

## Types and Values

### struct CtkAccessible

    struct CtkAccessible;

## Property Details

### The `“widget”` property

      “widget”                   CtkWidget *

The widget referenced by this accessible.

Owner: CtkAccessible

Flags: Read / Write