Interface
GtkAccessible
Description [src]
interface Gtk.Accessible : GObject.Object
GtkAccessible
is an interface for describing UI elements for
Assistive Technologies.
Every accessible implementation has:
- a “role”, represented by a value of the
GtkAccessibleRole
enumeration - an “attribute”, represented by a set of
GtkAccessibleState
,GtkAccessibleProperty
andGtkAccessibleRelation
values
The role cannot be changed after instantiating a GtkAccessible
implementation.
The attributes are updated every time a UI element’s state changes in
a way that should be reflected by assistive technologies. For instance,
if a GtkWidget
visibility changes, the GTK_ACCESSIBLE_STATE_HIDDEN
state will also change to reflect the GtkWidget:visible
property.
Every accessible implementation is part of a tree of accessible objects.
Normally, this tree corresponds to the widget tree, but can be customized
by reimplementing the Gtk.AccessibleInterface.get_accessible_parent
,
Gtk.AccessibleInterface.get_first_accessible_child
and
Gtk.AccessibleInterface.get_next_accessible_sibling
virtual functions.
Note that you can not create a top-level accessible object as of now,
which means that you must always have a parent accessible object.
Also note that when an accessible object does not correspond to a widget,
and it has children, whose implementation you don’t control,
it is necessary to ensure the correct shape of the a11y tree
by calling gtk_accessible_set_accessible_parent()
and
updating the sibling by gtk_accessible_update_next_accessible_sibling()
.
Prerequisite
In order to implement Accessible, your type must inherit fromGObject
.
Implementations
- GtkAboutDialog
- GtkActionBar
- GtkAppChooserButton
- GtkAppChooserDialog
- GtkAppChooserWidget
- GtkApplicationWindow
- GtkAspectFrame
- GtkAssistant
- GtkBox
- GtkButton
- GtkCalendar
- GtkCellView
- GtkCenterBox
- GtkCheckButton
- GtkColorButton
- GtkColorChooserDialog
- GtkColorChooserWidget
- GtkColorDialogButton
- GtkColumnView
- GtkComboBox
- GtkComboBoxText
- GtkDialog
- GtkDragIcon
- GtkDrawingArea
- GtkDropDown
- GtkEditableLabel
- GtkEmojiChooser
- GtkEntry
- GtkExpander
- GtkFileChooserDialog
- GtkFileChooserWidget
- GtkFixed
- GtkFlowBox
- GtkFlowBoxChild
- GtkFontButton
- GtkFontChooserDialog
- GtkFontChooserWidget
- GtkFontDialogButton
- GtkFrame
- GtkGLArea
- GtkGraphicsOffload
- GtkGrid
- GtkGridView
- GtkHeaderBar
- GtkIconView
- GtkImage
- GtkInfoBar
- GtkInscription
- GtkLabel
- GtkLevelBar
- GtkLinkButton
- GtkListBase
- GtkListBox
- GtkListBoxRow
- GtkListView
- GtkLockButton
- GtkMediaControls
- GtkMenuButton
- GtkMessageDialog
- GtkNotebook
- GtkOverlay
- GtkPageSetupUnixDialog
- GtkPaned
- GtkPasswordEntry
- GtkPicture
- GtkPopover
- GtkPopoverMenu
- GtkPopoverMenuBar
- GtkPrintUnixDialog
- GtkProgressBar
- GtkRange
- GtkRevealer
- GtkScale
- GtkScaleButton
- GtkScrollbar
- GtkScrolledWindow
- GtkSearchBar
- GtkSearchEntry
- GtkSeparator
- GtkShortcutLabel
- GtkShortcutsGroup
- GtkShortcutsSection
- GtkShortcutsShortcut
- GtkShortcutsWindow
- GtkSpinButton
- GtkSpinner
- GtkStack
- GtkStackPage
- GtkStackSidebar
- GtkStackSwitcher
- GtkStatusbar
- GtkSwitch
- GtkText
- GtkTextView
- GtkToggleButton
- GtkTreeExpander
- GtkTreeView
- GtkVideo
- GtkViewport
- GtkVolumeButton
- GtkWidget
- GtkWindow
- GtkWindowControls
- GtkWindowHandle
Instance methods
gtk_accessible_announce
Requests the user’s screen reader to announce the given message.
since: 4.14
gtk_accessible_get_accessible_parent
Retrieves the accessible parent for an accessible object.
since: 4.10
gtk_accessible_get_at_context
Retrieves the accessible implementation for the given GtkAccessible
.
since: 4.10
gtk_accessible_get_first_accessible_child
Retrieves the first accessible child of an accessible object.
since: 4.10
gtk_accessible_get_next_accessible_sibling
Retrieves the next accessible sibling of an accessible object.
since: 4.10
gtk_accessible_set_accessible_parent
Sets the parent and sibling of an accessible object.
since: 4.10
gtk_accessible_update_next_accessible_sibling
Updates the next accessible sibling of self
.
since: 4.10
gtk_accessible_update_state
Updates a list of accessible states. See the GtkAccessibleState
documentation for the value types of accessible states.
Interface structure
struct GtkAccessibleInterface {
GTypeInterface g_iface;
GtkATContext* (* get_at_context) (
GtkAccessible* self
);
gboolean (* get_platform_state) (
GtkAccessible* self,
GtkAccessiblePlatformState state
);
GtkAccessible* (* get_accessible_parent) (
GtkAccessible* self
);
GtkAccessible* (* get_first_accessible_child) (
GtkAccessible* self
);
GtkAccessible* (* get_next_accessible_sibling) (
GtkAccessible* self
);
gboolean (* get_bounds) (
GtkAccessible* self,
int* x,
int* y,
int* width,
int* height
);
}
The common interface for accessible objects.
Interface members
g_iface |
|
No description available. |
|
get_at_context |
|
Retrieve the platform-specific accessibility context for the accessible implementation. |
|
get_platform_state |
|
Retrieve the accessible state. |
|
get_accessible_parent |
|
No description available. |
|
get_first_accessible_child |
|
No description available. |
|
get_next_accessible_sibling |
|
No description available. |
|
get_bounds |
|
No description available. |
Virtual methods
Gtk.Accessible.get_accessible_parent
Retrieves the accessible parent for an accessible object.
since: 4.10
Gtk.Accessible.get_at_context
Retrieves the accessible implementation for the given GtkAccessible
.
since: 4.10
Gtk.Accessible.get_first_accessible_child
Retrieves the first accessible child of an accessible object.
since: 4.10
Gtk.Accessible.get_next_accessible_sibling
Retrieves the next accessible sibling of an accessible object.
since: 4.10