Module: Atk
- Defined in:
- atk/lib/atk.rb
Overview
Defined Under Namespace
Modules: Action, Component, CoordType, Document, EditableText, HyperlinkImpl, HyperlinkStateFlags, Hypertext, Image, ImplementorIface, KeyEventType, Layer, RelationType, Role, ScrollType, Selection, StateType, StreamableContent, Table, TableCell, Text, TextAttribute, TextBoundary, TextClipType, TextGranularity, Value, ValueType, Version, Window Classes: GObjectAccessible, Hyperlink, Loader, Misc, NoOpObject, NoOpObjectFactory, Object, ObjectFactory, Plug, Registry, Relation, RelationSet, Socket, StateSet, TextRectangle, Util
Constant Summary collapse
- BINARY_AGE =
Like atk_get_binary_age(), but from the headers used at application compile time, rather than from the library linked against at application run time.
23511
- INTERFACE_AGE =
Like atk_get_interface_age(), but from the headers used at application compile time, rather than from the library linked against at application run time.
1
- MAJOR_VERSION =
Like atk_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
2
- MICRO_VERSION =
Like atk_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
1
- MINOR_VERSION =
Like atk_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
35
- VERSION_MIN_REQUIRED =
A macro that should be defined by the user prior to including the atk/atk.h header. The definition should be one of the predefined ATK version macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,…
This macro defines the earliest version of ATK that the package is required to be able to compile against.
If the compiler is configured to warn about the use of deprecated functions, then using functions that were deprecated in version %ATK_VERSION_MIN_REQUIRED or earlier will cause warnings (but using functions deprecated in later releases will not).
2
- LOG_DOMAIN =
"Atk"
Instance Method Summary collapse
-
#add_focus_tracker(focus_tracker) ⇒ Integer
Adds the specified function to the list of functions to be called when an object receives focus.
-
#add_global_event_listener(listener, event_type) ⇒ Integer
Adds the specified function to the list of functions to be called when an ATK event of type event_type occurs.
-
#add_key_event_listener(listener, data) ⇒ Integer
Adds the specified function to the list of functions to be called when a key event occurs.
-
#attribute_set_free(attrib_set) ⇒ nil
Frees the memory used by an Atk::AttributeSet, including all its Atk::Attributes.
-
#binary_age ⇒ Integer
Returns the binary age as passed to libtool when building the ATK library the process is running against.
-
#default_registry ⇒ Atk::Registry
Gets a default implementation of the Atk::ObjectFactory/type registry.
-
#focus_object ⇒ Atk::Object
Gets the currently focused object.
-
#focus_tracker_init(init) ⇒ nil
Specifies the function to be called for focus tracker initialization.
-
#focus_tracker_notify(object) ⇒ nil
Cause the focus tracker functions which have been specified to be executed for the object.
-
#interface_age ⇒ Integer
Returns the interface age as passed to libtool when building the ATK library the process is running against.
-
#major_version ⇒ Integer
Returns the major version number of the ATK library.
-
#micro_version ⇒ Integer
Returns the micro version number of the ATK library.
-
#minor_version ⇒ Integer
Returns the minor version number of the ATK library.
-
#relation_type_for_name(name) ⇒ Atk::RelationType
Get the Atk::RelationType type corresponding to a relation name.
-
#relation_type_get_name(type) ⇒ String
Gets the description string describing the Atk::RelationType type.
-
#relation_type_register(name) ⇒ Atk::RelationType
Associate name with a new Atk::RelationType.
-
#remove_focus_tracker(tracker_id) ⇒ nil
Removes the specified focus tracker from the list of functions to be called when any object receives focus.
-
#remove_global_event_listener(listener_id) ⇒ nil
listener_id is the value returned by #atk_add_global_event_listener when you registered that event listener.
-
#remove_key_event_listener(listener_id) ⇒ nil
listener_id is the value returned by #atk_add_key_event_listener when you registered that event listener.
-
#role_for_name(name) ⇒ Atk::Role
Get the Atk::Role type corresponding to a rolew name.
-
#role_get_localized_name(role) ⇒ String
Gets the localized description string describing the Atk::Role role.
-
#role_get_name(role) ⇒ String
Gets the description string describing the Atk::Role role.
-
#role_register(name) ⇒ Atk::Role
Registers the role specified by name.
-
#root ⇒ Atk::Object
Gets the root accessible container for the current application.
-
#state_type_for_name(name) ⇒ Atk::StateType
Gets the Atk::StateType corresponding to the description string name.
-
#state_type_get_name(type) ⇒ String
Gets the description string describing the Atk::StateType type.
-
#state_type_register(name) ⇒ Atk::StateType
Register a new object state.
-
#text_attribute_for_name(name) ⇒ Atk::TextAttribute
Get the Atk::TextAttribute type corresponding to a text attribute name.
-
#text_attribute_get_name(attr) ⇒ String
Gets the name corresponding to the Atk::TextAttribute.
-
#text_attribute_get_value(attr, index_) ⇒ String
Gets the value for the index of the Atk::TextAttribute should not be freed; nil is returned if there are no values maintained for the attr value.
-
#text_attribute_register(name) ⇒ Atk::TextAttribute
Associate name with a new Atk::TextAttribute.
-
#text_free_ranges(ranges) ⇒ nil
Frees the memory associated with an array of AtkTextRange.
-
#toolkit_name ⇒ String
Gets name string for the GUI toolkit implementing ATK for this application.
-
#toolkit_version ⇒ String
Gets version string for the GUI toolkit implementing ATK for this application.
-
#value_type_get_localized_name(value_type) ⇒ String
Gets the localized description string describing the Atk::ValueType value_type.
-
#value_type_get_name(value_type) ⇒ String
Gets the description string describing the Atk::ValueType value_type.
-
#version ⇒ String
Gets the current version for ATK.
Instance Method Details
#add_focus_tracker(focus_tracker) ⇒ Integer
Adds the specified function to the list of functions to be called when an object receives focus. when an object receives focus.
#add_global_event_listener(listener, event_type) ⇒ Integer
Adds the specified function to the list of functions to be called when an ATK event of type event_type occurs.
The format of event_type is the following:
"ATK:<atk_type>:<atk_event>:<atk_event_detail>
Where “ATK” works as the namespace, <atk_interface> is the name of the ATK type (interface or object), <atk_event> is the name of the signal defined on that interface and <atk_event_detail> is the gsignal detail of that signal. You can find more info about gsignal details here: developer.gnome.org/gobject/stable/gobject-Signals.html
The first three parameters are mandatory. The last one is optional.
For example:
ATK:AtkObject:state-change
ATK:AtkText:text-selection-changed
ATK:AtkText:text-insert:system
Toolkit implementor note: ATK provides a default implementation for this virtual method. ATK implementors are discouraged from reimplementing this method.
Toolkit implementor note: this method is not intended to be used by ATK implementors but by ATK consumers.
ATK consumers note: as this method adds a listener for a given ATK type, that type should be already registered on the GType system before calling this method. A simple way to do that is creating an instance of Atk::NoOpObject. This class implements all ATK interfaces, so creating the instance will register all ATK types as a collateral effect.
#add_key_event_listener(listener, data) ⇒ Integer
Adds the specified function to the list of functions to be called
when a key event occurs. The <b>data</b> element will be passed to the
Atk::KeySnoopFunc (<b>listener</b>) as the <b>func_data</b> param, on notification.
#attribute_set_free(attrib_set) ⇒ nil
Frees the memory used by an Atk::AttributeSet, including all its Atk::Attributes.
#binary_age ⇒ Integer
Returns the binary age as passed to libtool when building the ATK library the process is running against.
#default_registry ⇒ Atk::Registry
Gets a default implementation of the Atk::ObjectFactory/type registry. Note: For most toolkit maintainers, this will be the correct registry for registering new Atk::Object factories. Following a call to this function, maintainers may call atk_registry_set_factory_type() to associate an Atk::ObjectFactory subclass with the GType of objects for whom accessibility information will be provided. Atk::ObjectFactory/type registry
#focus_object ⇒ Atk::Object
Gets the currently focused object. application
#focus_tracker_init(init) ⇒ nil
Specifies the function to be called for focus tracker initialization. This function should be called by an implementation of the ATK interface if any specific work needs to be done to enable focus tracking.
#focus_tracker_notify(object) ⇒ nil
Cause the focus tracker functions which have been specified to be executed for the object.
#interface_age ⇒ Integer
Returns the interface age as passed to libtool when building the ATK library the process is running against.
#major_version ⇒ Integer
Returns the major version number of the ATK library. (e.g. in ATK version 2.7.4 this is 2.)
This function is in the library, so it represents the ATK library your code is running against. In contrast, the #ATK_MAJOR_VERSION macro represents the major version of the ATK headers you have included when compiling your code.
#micro_version ⇒ Integer
Returns the micro version number of the ATK library. (e.g. in ATK version 2.7.4 this is 4.)
This function is in the library, so it represents the ATK library your code is are running against. In contrast, the #ATK_MICRO_VERSION macro represents the micro version of the ATK headers you have included when compiling your code.
#minor_version ⇒ Integer
Returns the minor version number of the ATK library. (e.g. in ATK version 2.7.4 this is 7.)
This function is in the library, so it represents the ATK library your code is are running against. In contrast, the #ATK_MINOR_VERSION macro represents the minor version of the ATK headers you have included when compiling your code.
#relation_type_for_name(name) ⇒ Atk::RelationType
Get the Atk::RelationType type corresponding to a relation name.
#relation_type_get_name(type) ⇒ String
Gets the description string describing the Atk::RelationType type.
#relation_type_register(name) ⇒ Atk::RelationType
Associate name with a new Atk::RelationType
#remove_focus_tracker(tracker_id) ⇒ nil
Removes the specified focus tracker from the list of functions to be called when any object receives focus.
#remove_global_event_listener(listener_id) ⇒ nil
listener_id is the value returned by #atk_add_global_event_listener when you registered that event listener.
Toolkit implementor note: ATK provides a default implementation for this virtual method. ATK implementors are discouraged from reimplementing this method.
Toolkit implementor note: this method is not intended to be used by ATK implementors but by ATK consumers.
Removes the specified event listener
#remove_key_event_listener(listener_id) ⇒ nil
listener_id is the value returned by #atk_add_key_event_listener when you registered that event listener.
Removes the specified event listener.
#role_for_name(name) ⇒ Atk::Role
Get the Atk::Role type corresponding to a rolew name.
#role_get_localized_name(role) ⇒ String
Gets the localized description string describing the Atk::Role role.
#role_get_name(role) ⇒ String
Gets the description string describing the Atk::Role role.
#role_register(name) ⇒ Atk::Role
Registers the role specified by name. name must be a meaningful name. So it should not be empty, or consisting on whitespaces. properly. ATK_ROLE_INVALID in case of error.
#root ⇒ Atk::Object
Gets the root accessible container for the current application. application
#state_type_for_name(name) ⇒ Atk::StateType
Gets the Atk::StateType corresponding to the description string name.
#state_type_get_name(type) ⇒ String
Gets the description string describing the Atk::StateType type.
#state_type_register(name) ⇒ Atk::StateType
Register a new object state.
#text_attribute_for_name(name) ⇒ Atk::TextAttribute
Get the Atk::TextAttribute type corresponding to a text attribute name.
#text_attribute_get_name(attr) ⇒ String
Gets the name corresponding to the Atk::TextAttribute
#text_attribute_get_value(attr, index_) ⇒ String
Gets the value for the index of the Atk::TextAttribute should not be freed; nil is returned if there are no values maintained for the attr value.
#text_attribute_register(name) ⇒ Atk::TextAttribute
Associate name with a new Atk::TextAttribute
#text_free_ranges(ranges) ⇒ nil
Frees the memory associated with an array of AtkTextRange. It is assumed that the array was returned by the function atk_text_get_bounded_ranges and is NULL terminated.
#toolkit_name ⇒ String
Gets name string for the GUI toolkit implementing ATK for this application.
#toolkit_version ⇒ String
Gets version string for the GUI toolkit implementing ATK for this application.
#value_type_get_localized_name(value_type) ⇒ String
Gets the localized description string describing the Atk::ValueType value_type.
#value_type_get_name(value_type) ⇒ String
Gets the description string describing the Atk::ValueType value_type.
#version ⇒ String
Gets the current version for ATK.