Functions
The following functions are available globally.
-
Adds the specified function to the list of functions to be called when an object receives focus.
add_focus_tracker is deprecated: Focus tracking has been dropped as a feature to be implemented by ATK itself. If you need focus tracking on your implementation, subscribe to the #AtkObject::state-change “focused” signal.
Declaration
Swift
@available(*, deprecated) @inlinable public func add(focusTracker: @escaping AtkEventListener) -> Int
-
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: http://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
AtkNoOpObject
. This class implements all ATK interfaces, so creating the instance will register all ATK types as a collateral effect.Declaration
Swift
@inlinable public func addGlobalEvent(listener: @escaping GSignalEmissionHook, eventType: UnsafePointer<gchar>!) -> Int
-
Adds the specified function to the list of functions to be called when a key event occurs. The
data
element will be passed to theAtkKeySnoopFunc
(listener
) as thefunc_data
param, on notification.Declaration
Swift
@inlinable public func addKeyEvent(listener: AtkKeySnoopFunc?, data: gpointer? = nil) -> Int
-
Frees the memory used by an
AtkAttributeSet
, including all itsAtkAttributes
.Declaration
Swift
@inlinable public func attributeSetFree(attribSet: UnsafeMutablePointer<AtkAttributeSet>!)
-
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_init is deprecated: Focus tracking has been dropped as a feature to be implemented by ATK itself.
Declaration
Swift
@available(*, deprecated) @inlinable public func focusTrackerInit(init: @escaping AtkEventListenerInit)
-
Cause the focus tracker functions which have been specified to be executed for the object.
focus_tracker_notify is deprecated: Focus tracking has been dropped as a feature to be implemented by ATK itself. As #AtkObject::focus-event was deprecated in favor of a #AtkObject::state-change signal, in order to notify a focus change on your implementation, you can use atk_object_notify_state_change() instead.
Declaration
Swift
@available(*, deprecated) @inlinable public func focusTrackerNotify<ObjectT>(object: ObjectT) where ObjectT : ObjectProtocol
-
Returns the binary age as passed to libtool when building the ATK library the process is running against.
Declaration
Swift
@inlinable public func getBinaryAge() -> Int
-
Gets a default implementation of the
AtkObjectFactory
/type registry. Note: For most toolkit maintainers, this will be the correct registry for registering newAtkObject
factories. Following a call to this function, maintainers may callatk_registry_set_factory_type()
to associate anAtkObjectFactory
subclass with the GType of objects for whom accessibility information will be provided.Declaration
Swift
@inlinable public func getDefaultRegistry() -> Atk.RegistryRef!
-
Gets the currently focused object.
Declaration
Swift
@inlinable public func getFocusObject() -> Atk.ObjectRef!
-
Returns the interface age as passed to libtool when building the ATK library the process is running against.
Declaration
Swift
@inlinable public func getInterfaceAge() -> Int
-
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.Declaration
Swift
@inlinable public func getMajorVersion() -> Int
-
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.Declaration
Swift
@inlinable public func getMicroVersion() -> Int
-
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.Declaration
Swift
@inlinable public func getMinorVersion() -> Int
-
Gets the root accessible container for the current application.
Declaration
Swift
@inlinable public func getRoot() -> Atk.ObjectRef!
-
Gets name string for the GUI toolkit implementing ATK for this application.
Declaration
Swift
@inlinable public func getToolkitName() -> String!
-
Gets version string for the GUI toolkit implementing ATK for this application.
Declaration
Swift
@inlinable public func getToolkitVersion() -> String!
-
Gets the current version for ATK.
Declaration
Swift
@inlinable public func getVersion() -> String!
-
Get the
AtkRelationType
type corresponding to a relation name.Declaration
Swift
@inlinable public func relationTypeFor(name: UnsafePointer<gchar>!) -> AtkRelationType
-
Gets the description string describing the
AtkRelationType
type
.Declaration
Swift
@inlinable public func relationTypeGetName(type: AtkRelationType) -> String!
-
Associate
name
with a newAtkRelationType
Declaration
Swift
@inlinable public func relationTypeRegister(name: UnsafePointer<gchar>!) -> AtkRelationType
-
Removes the specified focus tracker from the list of functions to be called when any object receives focus.
remove_focus_tracker is deprecated: Focus tracking has been dropped as a feature to be implemented by ATK itself. If you need focus tracking on your implementation, subscribe to the #AtkObject::state-change “focused” signal.
Declaration
Swift
@available(*, deprecated) @inlinable public func removeFocusTracker(trackerId: Int)
-
listener_id
is the value returned byatk_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
Declaration
Swift
@inlinable public func removeGlobalEventListener(listenerId: Int)
-
listener_id
is the value returned byatk_add_key_event_listener
when you registered that event listener.Removes the specified event listener.
Declaration
Swift
@inlinable public func removeKeyEventListener(listenerId: Int)
-
Get the
AtkRole
type corresponding to a rolew name.Declaration
Swift
@inlinable public func roleFor(name: UnsafePointer<gchar>!) -> AtkRole
-
Gets the localized description string describing the
AtkRole
role
.Declaration
Swift
@inlinable public func roleGetLocalizedName(role: AtkRole) -> String!
-
Gets the description string describing the
AtkRole
role
.Declaration
Swift
@inlinable public func roleGetName(role: AtkRole) -> String!
-
Registers the role specified by
name
.name
must be a meaningful name. So it should not be empty, or consisting on whitespaces.role_register is deprecated: Since 2.12. If your application/toolkit doesn’t find a suitable role for a specific object defined at #AtkRole, please submit a bug in order to add a new role to the specification.
Declaration
Swift
@available(*, deprecated) @inlinable public func roleRegister(name: UnsafePointer<gchar>!) -> AtkRole
-
Gets the
AtkStateType
corresponding to the description stringname
.Declaration
Swift
@inlinable public func stateTypeFor(name: UnsafePointer<gchar>!) -> AtkStateType
-
Gets the description string describing the
AtkStateType
type
.Declaration
Swift
@inlinable public func stateTypeGetName(type: AtkStateType) -> String!
-
Register a new object state.
Declaration
Swift
@inlinable public func stateTypeRegister(name: UnsafePointer<gchar>!) -> AtkStateType
-
Get the
AtkTextAttribute
type corresponding to a text attribute name.Declaration
Swift
@inlinable public func textAttributeFor(name: UnsafePointer<gchar>!) -> AtkTextAttribute
-
Gets the name corresponding to the
AtkTextAttribute
Declaration
Swift
@inlinable public func textAttributeGetName(attr: AtkTextAttribute) -> String!
-
Gets the value for the index of the
AtkTextAttribute
Declaration
Swift
@inlinable public func textAttributeGetValue(attr: AtkTextAttribute, index: Int) -> String!
-
Associate
name
with a newAtkTextAttribute
Declaration
Swift
@inlinable public func textAttributeRegister(name: UnsafePointer<gchar>!) -> AtkTextAttribute
-
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.
Declaration
Swift
@inlinable public func textFree(ranges: UnsafeMutablePointer<UnsafeMutablePointer<AtkTextRange>?>!)
-
Gets the localized description string describing the
AtkValueType
value_type
.Declaration
Swift
@inlinable public func valueTypeGetLocalizedName(valueType: AtkValueType) -> String!
-
Gets the description string describing the
AtkValueType
value_type
.Declaration
Swift
@inlinable public func valueTypeGetName(valueType: AtkValueType) -> String!