pub trait AccessibleExt: IsA<Accessible> + 'static {
Show 15 methods
// Provided methods
fn announce(&self, message: &str, priority: AccessibleAnnouncementPriority) { ... }
fn accessible_parent(&self) -> Option<Accessible> { ... }
fn accessible_role(&self) -> AccessibleRole { ... }
fn at_context(&self) -> ATContext { ... }
fn bounds(&self) -> Option<(i32, i32, i32, i32)> { ... }
fn first_accessible_child(&self) -> Option<Accessible> { ... }
fn next_accessible_sibling(&self) -> Option<Accessible> { ... }
fn platform_state(&self, state: AccessiblePlatformState) -> bool { ... }
fn reset_property(&self, property: AccessibleProperty) { ... }
fn reset_relation(&self, relation: AccessibleRelation) { ... }
fn reset_state(&self, state: AccessibleState) { ... }
fn set_accessible_parent(
&self,
parent: Option<&impl IsA<Accessible>>,
next_sibling: Option<&impl IsA<Accessible>>,
) { ... }
fn update_next_accessible_sibling(
&self,
new_sibling: Option<&impl IsA<Accessible>>,
) { ... }
fn set_accessible_role(&self, accessible_role: AccessibleRole) { ... }
fn connect_accessible_role_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Trait containing all Accessible
methods.
§Implementors
AboutDialog
, AccessibleRange
, AccessibleText
, Accessible
, ActionBar
, AppChooserButton
, AppChooserDialog
, AppChooserWidget
, ApplicationWindow
, AspectFrame
, Assistant
, Box
, Button
, Calendar
, CellView
, CenterBox
, CheckButton
, ColorButton
, ColorChooserDialog
, ColorChooserWidget
, ColorDialogButton
, ColumnView
, ComboBoxText
, ComboBox
, Dialog
, DragIcon
, DrawingArea
, DropDown
, EditableLabel
, EmojiChooser
, Entry
, Expander
, FileChooserDialog
, FileChooserWidget
, Fixed
, FlowBoxChild
, FlowBox
, FontButton
, FontChooserDialog
, FontChooserWidget
, FontDialogButton
, Frame
, GLArea
, GraphicsOffload
, GridView
, Grid
, HeaderBar
, IconView
, Image
, InfoBar
, Inscription
, Label
, LevelBar
, LinkButton
, ListBase
, ListBoxRow
, ListBox
, ListView
, LockButton
, MediaControls
, MenuButton
, MessageDialog
, Notebook
, Overlay
, PageSetupUnixDialog
, Paned
, PasswordEntry
, Picture
, PopoverMenuBar
, PopoverMenu
, Popover
, PrintUnixDialog
, ProgressBar
, Range
, Revealer
, ScaleButton
, Scale
, Scrollbar
, ScrolledWindow
, SearchBar
, SearchEntry
, Separator
, ShortcutLabel
, ShortcutsGroup
, ShortcutsSection
, ShortcutsShortcut
, ShortcutsWindow
, SpinButton
, Spinner
, StackPage
, StackSidebar
, StackSwitcher
, Stack
, Statusbar
, Switch
, TextView
, Text
, ToggleButton
, TreeExpander
, TreeView
, Video
, Viewport
, VolumeButton
, Widget
, WindowControls
, WindowHandle
, Window
Provided Methods§
Sourcefn announce(&self, message: &str, priority: AccessibleAnnouncementPriority)
Available on crate feature v4_14
only.
fn announce(&self, message: &str, priority: AccessibleAnnouncementPriority)
v4_14
only.Requests the user’s screen reader to announce the given message.
This kind of notification is useful for messages that either have only a visual representation or that are not exposed visually at all, e.g. a notification about a successful operation.
Also, by using this API, you can ensure that the message does not interrupts the user’s current screen reader output.
§message
the string to announce
§priority
the priority of the announcement
Sourcefn accessible_parent(&self) -> Option<Accessible>
Available on crate feature v4_10
only.
fn accessible_parent(&self) -> Option<Accessible>
v4_10
only.Retrieves the accessible parent for an accessible object.
This function returns NULL
for top level widgets.
§Returns
the accessible parent
Sourcefn accessible_role(&self) -> AccessibleRole
fn accessible_role(&self) -> AccessibleRole
Sourcefn at_context(&self) -> ATContext
Available on crate feature v4_10
only.
fn at_context(&self) -> ATContext
v4_10
only.Retrieves the accessible implementation for the given Accessible
.
§Returns
the accessible implementation object
Sourcefn bounds(&self) -> Option<(i32, i32, i32, i32)>
Available on crate feature v4_10
only.
fn bounds(&self) -> Option<(i32, i32, i32, i32)>
v4_10
only.Queries the coordinates and dimensions of this accessible
This functionality can be overridden by Accessible
implementations, e.g. to get the bounds from an ignored
child widget.
§Returns
true if the bounds are valid, and false otherwise
§x
the x coordinate of the top left corner of the accessible
§y
the y coordinate of the top left corner of the widget
§width
the width of the accessible object
§height
the height of the accessible object
Sourcefn first_accessible_child(&self) -> Option<Accessible>
Available on crate feature v4_10
only.
fn first_accessible_child(&self) -> Option<Accessible>
v4_10
only.Sourcefn next_accessible_sibling(&self) -> Option<Accessible>
Available on crate feature v4_10
only.
fn next_accessible_sibling(&self) -> Option<Accessible>
v4_10
only.Sourcefn platform_state(&self, state: AccessiblePlatformState) -> bool
Available on crate feature v4_10
only.
fn platform_state(&self, state: AccessiblePlatformState) -> bool
v4_10
only.Query a platform state, such as focus.
See gtk_accessible_platform_changed().
This functionality can be overridden by Accessible
implementations, e.g. to get platform state from an ignored
child widget, as is the case for Text
wrappers.
§state
platform state to query
§Returns
the value of @state for the accessible
Sourcefn reset_property(&self, property: AccessibleProperty)
fn reset_property(&self, property: AccessibleProperty)
Sourcefn reset_relation(&self, relation: AccessibleRelation)
fn reset_relation(&self, relation: AccessibleRelation)
Sourcefn reset_state(&self, state: AccessibleState)
fn reset_state(&self, state: AccessibleState)
Sourcefn set_accessible_parent(
&self,
parent: Option<&impl IsA<Accessible>>,
next_sibling: Option<&impl IsA<Accessible>>,
)
Available on crate feature v4_10
only.
fn set_accessible_parent( &self, parent: Option<&impl IsA<Accessible>>, next_sibling: Option<&impl IsA<Accessible>>, )
v4_10
only.Sets the parent and sibling of an accessible object.
This function is meant to be used by accessible implementations that are
not part of the widget hierarchy, and but act as a logical bridge between
widgets. For instance, if a widget creates an object that holds metadata
for each child, and you want that object to implement the Accessible
interface, you will use this function to ensure that the parent of each
child widget is the metadata object, and the parent of each metadata
object is the container widget.
§parent
the parent accessible object
§next_sibling
the sibling accessible object
Sourcefn update_next_accessible_sibling(
&self,
new_sibling: Option<&impl IsA<Accessible>>,
)
Available on crate feature v4_10
only.
fn update_next_accessible_sibling( &self, new_sibling: Option<&impl IsA<Accessible>>, )
v4_10
only.Updates the next accessible sibling of @self.
That might be useful when a new child of a custom Accessible
is created, and it needs to be linked to a previous child.
§new_sibling
the new next accessible sibling to set
Sourcefn set_accessible_role(&self, accessible_role: AccessibleRole)
fn set_accessible_role(&self, accessible_role: AccessibleRole)
The accessible role of the given Accessible
implementation.
The accessible role cannot be changed once set.
fn connect_accessible_role_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.