Crate atk

source · []
Expand description

Rust ATK bindings

Project site is here.

Rust bindings and wrappers for ATK, part of gtk3-rs.

ATK 2.18 is the lowest supported version for the underlying library.

Minimum supported Rust version

Currently, the minimum supported Rust version is 1.56.0.

Documentation

Using

We recommend using crates from crates.io, as demonstrated here.

If you want to track the bleeding edge, use the git dependency instead:

[dependencies]
atk = { git = "https://github.com/gtk-rs/gtk3-rs.git", package = "atk" }

Avoid mixing versioned and git crates like this:

[dependencies]
atk = "0.13"
atk = { git = "https://github.com/gtk-rs/gtk3-rs.git", package = "atk" }

See Also

License

atk is available under the MIT License, please refer to it.

Re-exports

pub use ffi;
pub use glib;

Modules

Traits intended for blanket imports.

Structs

Action should be implemented by instances of Object classes with which the user can interact directly, i.e. buttons, checkboxes, scrollbars, e.g. components which are not “passive” providers of UI information.

AtkAttribute is a string name/value pair representing a generic attribute. This can be used to expose additional information from an accessible object as a whole (see atk_object_get_attributes()) or an document (see atk_document_get_attributes()). In the case of text attributes (see atk_text_get_default_attributes()), TextAttribute enum defines all the possible text attribute names. You can use TextAttribute::name() to get the string name from the enum value. See also TextAttribute::for_name() and TextAttribute::value() for more information.

Component should be implemented by most if not all UI elements with an actual on-screen presence, i.e. components which can be said to have a screen-coordinate bounding box. Virtually all widgets will need to have Component implementations provided for their corresponding Object class. In short, only UI elements which are not GUI elements will omit this ATK interface.

The AtkDocument interface should be supported by any object whose content is a representation or view of a document. The AtkDocument interface should appear on the toplevel container for the document content; however AtkDocument instances may be nested (i.e. an AtkDocument may be a descendant of another AtkDocument) in those cases where one document contains “embedded content” which can reasonably be considered a document in its own right.

EditableText should be implemented by UI components which contain text which the user can edit, via the Object corresponding to that component (see Object).

This object class is derived from AtkObject. It can be used as a basis for implementing accessible objects for GObjects which are not derived from GtkWidget. One example of its use is in providing an accessible object for GnomeCanvasItem in the GAIL library.

An ATK object which encapsulates a link or set of links (for instance in the case of client-side image maps) in a hypertext document. It may implement the AtkAction interface. AtkHyperlink may also be used to refer to inline embedded content, since it allows specification of a start and end offset within the host AtkHypertext object.

AtkHyperlinkImpl allows AtkObjects to refer to their associated AtkHyperlink instance, if one exists. AtkHyperlinkImpl differs from AtkHyperlink in that AtkHyperlinkImpl is an interface, whereas AtkHyperlink is a object type. The AtkHyperlinkImpl interface allows a client to query an AtkObject for the availability of an associated AtkHyperlink instance, and obtain that instance. It is thus particularly useful in cases where embedded content or inline content within a text object is present, since the embedding text object implements AtkHypertext and the inline/embedded objects are exposed as children which implement AtkHyperlinkImpl, in addition to their being obtainable via AtkHypertext:getLink followed by AtkHyperlink:getObject.

Describes the type of link

An interface used for objects which implement linking between multiple resource or content locations, or multiple ‘markers’ within a single document. A Hypertext instance is associated with one or more Hyperlinks, which are associated with particular offsets within the Hypertext’s included content. While this interface is derived from Text, there is no requirement that Hypertext instances have textual content; they may implement Image as well, and Hyperlinks need not have non-zero text offsets.

Image should be implemented by Object subtypes on behalf of components which display image/pixmap information onscreen, and which provide information (other than just widget borders, etc.) via that image content. For instance, icons, buttons with icons, toolbar elements, and image viewing panes typically should implement Image.

A set of utility functions for thread locking. This interface and all his related methods are deprecated since 2.12.

An AtkNoOpObject is an AtkObject which purports to implement all ATK interfaces. It is the type of AtkObject which is created if an accessible object is requested for an object type for which no factory type is specified.

The AtkObjectFactory which creates an AtkNoOpObject. An instance of this is created by an AtkRegistry if no factory type has not been specified to create an accessible object of a particular type.

This class is the primary class for accessibility support via the Accessibility ToolKit (ATK). Objects which are instances of Object (or instances of AtkObject-derived types) are queried for properties which relate basic (and generic) properties of a UI component such as name and description. Instances of Object may also be queried as to whether they implement other ATK interfaces (e.g. Action, Component, etc.), as appropriate to the role which a given UI component plays in a user interface.

This class is the base object class for a factory used to create an accessible object for a specific GType. The function RegistryExt::set_factory_type() is normally called to store in the registry the factory type to be used to create an accessible of a particular GType.

Range are used on Value, in order to represent the full range of a given component (for example an slider or a range control), or to define each individual subrange this full range is splitted if available. See Value documentation for further details.

A data structure for holding a rectangle. Those coordinates are relative to the component top-level parent.

The AtkRegistry is normally used to create appropriate ATK “peers” for user interface components. Application developers usually need only interact with the AtkRegistry by associating appropriate ATK implementation classes with GObject classes via the atk_registry_set_factory_type call, passing the appropriate GType for application custom widget classes.

An AtkRelation describes a relation between an object and one or more other objects. The actual relations that an object has with other objects are defined as an AtkRelationSet, which is a set of AtkRelations.

The AtkRelationSet held by an object establishes its relationships with objects beyond the normal “parent/child” hierarchical relationships that all user interface objects have. AtkRelationSets establish whether objects are labelled or controlled by other components, share group membership with other components (for instance within a radio-button group), or share content which “flows” between them, among other types of possible relationships.

Selection should be implemented by UI components with children which are exposed by atk_object_ref_child and atk_object_get_n_children, if the use of the parent UI component ordinarily involves selection of one or more of the objects corresponding to those Object children - for example, selectable lists.

Together with Plug, Socket provides the ability to embed accessibles from one process into another in a fashion that is transparent to assistive technologies. Socket works as the container of Plug, embedding it using the method AtkSocketExt::embed(). Any accessible contained in the Plug will appear to the assistive technologies as being inside the application that created the Socket.

An AtkStateSet is a read-only representation of the full set of AtkStates that apply to an object at a given time. This set is not meant to be modified, but rather created when AtkObjectExt::ref_state_set() is called.

An interface whereby an object allows its backing content to be streamed to clients. Typical implementors would be images or icons, HTML content, or multimedia display/rendering widgets.

Table should be implemented by components which present elements ordered via rows and columns. It may also be used to present tree-structured information if the nodes of the trees can be said to contain multiple “columns”. Individual elements of an Table are typically referred to as “cells”. Those cells should implement the interface TableCell, but Atk doesn’t require them to be direct children of the current Table. They can be grand-children, grand-grand-children etc. Table provides the API needed to get a individual cell based on the row and column numbers.

Being Table a component which present elements ordered via rows and columns, an TableCell is the interface which each of those elements, so “cells” should implement.

Text should be implemented by AtkObjects on behalf of widgets that have text content which is either attributed or otherwise non-trivial. AtkObjects whose text content is simple, unattributed, and very brief may expose that content via atk_object_get_name instead; however if the text is editable, multi-line, typically longer than three or four words, attributed, selectable, or if the object already uses the ‘name’ ATK property for other information, the Text interface should be used to expose the text content. In the case of editable text content, EditableText (a subtype of the Text interface) should be implemented instead.

A structure used to describe a text range.

A structure used to store a rectangle used by AtkText.

A set of ATK utility functions which are used to support event registration of various types, and obtaining the ‘root’ accessible of a process and information about the current ATK implementation and toolkit version.

Value should be implemented for components which either display a value from a bounded range, or which allow the user to specify a value from a bounded range, or both. For instance, most sliders and range controls, as well as dials, should have Object representations which implement Value on the component’s behalf. AtKValues may be read-only, in which case attempts to alter the value return would fail.

Window should be implemented by the UI elements that represent a top-level window, such as the main window of an application or dialog.

Enums

Specifies how xy coordinates are to be interpreted. Used by functions such as ComponentExt::position() and TextExt::character_extents()

Describes the layer of a component

Describes the type of the relation

Describes the role of an object

Specifies where an object should be placed on the screen when using scroll_to.

The possible types of states of an object

Describes the text attributes supported

Text boundary types used for specifying boundaries for regions of text. This enumeration is deprecated since 2.9.4 and should not be used. Use AtkTextGranularity with atk_text_get_string_at_offset instead.

Describes the type of clipping required.

Text granularity types used for specifying the granularity of the region of text we are interested in.

Default types for a given value. Those are defined in order to easily get localized strings to describe a given value or a given subrange, using localized_name().

Type Definitions