atk

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
const BINARY_AGE = 25210

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.

View Source
const INTERFACE_AGE = 1

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.

View Source
const MAJOR_VERSION = 2

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.

View Source
const MICRO_VERSION = 0

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.

View Source
const MINOR_VERSION = 52

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.

View Source
const VERSION_MIN_REQUIRED = 2

VERSION_MIN_REQUIRED: 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).

Variables

View Source
var (
	GTypeCoordType           = coreglib.Type(C.atk_coord_type_get_type())
	GTypeKeyEventType        = coreglib.Type(C.atk_key_event_type_get_type())
	GTypeLayer               = coreglib.Type(C.atk_layer_get_type())
	GTypeLive                = coreglib.Type(C.atk_live_get_type())
	GTypeRelationType        = coreglib.Type(C.atk_relation_type_get_type())
	GTypeRole                = coreglib.Type(C.atk_role_get_type())
	GTypeScrollType          = coreglib.Type(C.atk_scroll_type_get_type())
	GTypeStateType           = coreglib.Type(C.atk_state_type_get_type())
	GTypeTextAttribute       = coreglib.Type(C.atk_text_attribute_get_type())
	GTypeTextBoundary        = coreglib.Type(C.atk_text_boundary_get_type())
	GTypeTextClipType        = coreglib.Type(C.atk_text_clip_type_get_type())
	GTypeTextGranularity     = coreglib.Type(C.atk_text_granularity_get_type())
	GTypeValueType           = coreglib.Type(C.atk_value_type_get_type())
	GTypeHyperlinkStateFlags = coreglib.Type(C.atk_hyperlink_state_flags_get_type())
	GTypeAction              = coreglib.Type(C.atk_action_get_type())
	GTypeComponent           = coreglib.Type(C.atk_component_get_type())
	GTypeDocument            = coreglib.Type(C.atk_document_get_type())
	GTypeEditableText        = coreglib.Type(C.atk_editable_text_get_type())
	GTypeHyperlinkImpl       = coreglib.Type(C.atk_hyperlink_impl_get_type())
	GTypeHypertext           = coreglib.Type(C.atk_hypertext_get_type())
	GTypeImage               = coreglib.Type(C.atk_image_get_type())
	GTypeImplementorIface    = coreglib.Type(C.atk_implementor_get_type())
	GTypeSelection           = coreglib.Type(C.atk_selection_get_type())
	GTypeStreamableContent   = coreglib.Type(C.atk_streamable_content_get_type())
	GTypeTable               = coreglib.Type(C.atk_table_get_type())
	GTypeTableCell           = coreglib.Type(C.atk_table_cell_get_type())
	GTypeText                = coreglib.Type(C.atk_text_get_type())
	GTypeValue               = coreglib.Type(C.atk_value_get_type())
	GTypeWindow              = coreglib.Type(C.atk_window_get_type())
	GTypeGObjectAccessible   = coreglib.Type(C.atk_gobject_accessible_get_type())
	GTypeHyperlink           = coreglib.Type(C.atk_hyperlink_get_type())
	GTypeMisc                = coreglib.Type(C.atk_misc_get_type())
	GTypeNoOpObject          = coreglib.Type(C.atk_no_op_object_get_type())
	GTypeNoOpObjectFactory   = coreglib.Type(C.atk_no_op_object_factory_get_type())
	GTypeAtkObject           = coreglib.Type(C.atk_object_get_type())
	GTypeObjectFactory       = coreglib.Type(C.atk_object_factory_get_type())
	GTypePlug                = coreglib.Type(C.atk_plug_get_type())
	GTypeRegistry            = coreglib.Type(C.atk_registry_get_type())
	GTypeRelation            = coreglib.Type(C.atk_relation_get_type())
	GTypeRelationSet         = coreglib.Type(C.atk_relation_set_get_type())
	GTypeSocket              = coreglib.Type(C.atk_socket_get_type())
	GTypeStateSet            = coreglib.Type(C.atk_state_set_get_type())
	GTypeUtil                = coreglib.Type(C.atk_util_get_type())
	GTypeRange               = coreglib.Type(C.atk_range_get_type())
	GTypeRectangle           = coreglib.Type(C.atk_rectangle_get_type())
	GTypeTextRange           = coreglib.Type(C.atk_text_range_get_type())
)

GType values.

Functions

func FocusTrackerNotify deprecated

func FocusTrackerNotify(object *AtkObject)

FocusTrackerNotify: cause the focus tracker functions which have been specified to be executed for the object.

Deprecated: Focus tracking has been dropped as a feature to be implemented by ATK itself. As Object::focus-event was deprecated in favor of a Object::state-change signal, in order to notify a focus change on your implementation, you can use atk_object_notify_state_change() instead.

The function takes the following parameters:

  • object: Object.

func GetBinaryAge

func GetBinaryAge() uint

GetBinaryAge returns the binary age as passed to libtool when building the ATK library the process is running against.

The function returns the following values:

  • guint: binary age of the ATK library.

func GetInterfaceAge

func GetInterfaceAge() uint

GetInterfaceAge returns the interface age as passed to libtool when building the ATK library the process is running against.

The function returns the following values:

  • guint: interface age of the ATK library.

func GetMajorVersion

func GetMajorVersion() uint

GetMajorVersion 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 K_MAJOR_VERSION macro represents the major version of the ATK headers you have included when compiling your code.

The function returns the following values:

  • guint: major version number of the ATK library.

func GetMicroVersion

func GetMicroVersion() uint

GetMicroVersion 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 K_MICRO_VERSION macro represents the micro version of the ATK headers you have included when compiling your code.

The function returns the following values:

  • guint: micro version number of the ATK library.

func GetMinorVersion

func GetMinorVersion() uint

GetMinorVersion 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 K_MINOR_VERSION macro represents the minor version of the ATK headers you have included when compiling your code.

The function returns the following values:

  • guint: minor version number of the ATK library.

func GetToolkitName

func GetToolkitName() string

GetToolkitName gets name string for the GUI toolkit implementing ATK for this application.

The function returns the following values:

  • utf8: name string for the GUI toolkit implementing ATK for this application.

func GetToolkitVersion

func GetToolkitVersion() string

GetToolkitVersion gets version string for the GUI toolkit implementing ATK for this application.

The function returns the following values:

  • utf8: version string for the GUI toolkit implementing ATK for this application.

func GetVersion

func GetVersion() string

GetVersion gets the current version for ATK.

The function returns the following values:

  • utf8: version string for ATK.

func RelationTypeGetName

func RelationTypeGetName(typ RelationType) string

RelationTypeGetName gets the description string describing the RelationType type.

The function takes the following parameters:

  • typ whose name is required.

The function returns the following values:

  • utf8: string describing the AtkRelationType.

func RemoveFocusTracker deprecated

func RemoveFocusTracker(trackerId uint)

RemoveFocusTracker removes the specified focus tracker from the list of functions to be called when any object receives focus.

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 Object::state-change "focused" signal.

The function takes the following parameters:

  • trackerId: id of the focus tracker to remove.

func RemoveGlobalEventListener

func RemoveGlobalEventListener(listenerId uint)

RemoveGlobalEventListener: 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.

The function takes the following parameters:

  • listenerId: id of the event listener to remove.

func RemoveKeyEventListener

func RemoveKeyEventListener(listenerId uint)

RemoveKeyEventListener: listener_id is the value returned by #atk_add_key_event_listener when you registered that event listener.

Removes the specified event listener.

The function takes the following parameters:

  • listenerId: id of the event listener to remove.

func RoleGetLocalizedName

func RoleGetLocalizedName(role Role) string

RoleGetLocalizedName gets the localized description string describing the Role role.

The function takes the following parameters:

  • role whose localized name is required.

The function returns the following values:

  • utf8: localized string describing the AtkRole.

func RoleGetName

func RoleGetName(role Role) string

RoleGetName gets the description string describing the Role role.

The function takes the following parameters:

  • role whose name is required.

The function returns the following values:

  • utf8: string describing the AtkRole.

func StateTypeGetName

func StateTypeGetName(typ StateType) string

StateTypeGetName gets the description string describing the StateType type.

The function takes the following parameters:

  • typ whose name is required.

The function returns the following values:

  • utf8: string describing the AtkStateType.

func TextAttributeGetName

func TextAttributeGetName(attr TextAttribute) string

TextAttributeGetName gets the name corresponding to the TextAttribute.

The function takes the following parameters:

  • attr whose name is required.

The function returns the following values:

  • utf8: string containing the name; this string should not be freed.

func TextAttributeGetValue

func TextAttributeGetValue(attr TextAttribute, index_ int) string

TextAttributeGetValue gets the value for the index of the TextAttribute.

The function takes the following parameters:

  • attr for which a value is required.
  • index_: index of the required value.

The function returns the following values:

  • utf8 (optional): string containing the value; this string should not be freed; NULL is returned if there are no values maintained for the attr value.

func ValueTypeGetLocalizedName

func ValueTypeGetLocalizedName(valueType ValueType) string

ValueTypeGetLocalizedName gets the localized description string describing the ValueType value_type.

The function takes the following parameters:

  • valueType whose localized name is required.

The function returns the following values:

  • utf8: localized string describing the ValueType.

func ValueTypeGetName

func ValueTypeGetName(valueType ValueType) string

ValueTypeGetName gets the description string describing the ValueType value_type.

The function takes the following parameters:

  • valueType whose name is required.

The function returns the following values:

  • utf8: string describing the ValueType.

Types

type Action

type Action struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Action: ATK interface provided by UI components which the user can activate/interact with.

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.

Exceptions: when the user interaction is already covered by another appropriate interface such as EditableText (insert/delete text, etc.) or Value (set value) then these actions should not be exposed by Action as well.

Though most UI interactions on components should be invocable via keyboard as well as mouse, there will generally be a close mapping between "mouse actions" that are possible on a component and the AtkActions. Where mouse and keyboard actions are redundant in effect, Action should expose only one action rather than exposing redundant actions if possible. By convention we have been using "mouse centric" terminology for Action names.

Action wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Action) Description

func (action *Action) Description(i int) string

Description returns a description of the specified action of the object.

The function takes the following parameters:

  • i: action index corresponding to the action to be performed.

The function returns the following values:

  • utf8 (optional): description string, or NULL if action does not implement this interface.

func (*Action) DoAction

func (action *Action) DoAction(i int) bool

DoAction: perform the specified action on the object.

The function takes the following parameters:

  • i: action index corresponding to the action to be performed.

The function returns the following values:

  • ok: TRUE if success, FALSE otherwise.

func (*Action) Keybinding

func (action *Action) Keybinding(i int) string

Keybinding gets the keybinding which can be used to activate this action, if one exists. The string returned should contain localized, human-readable, key sequences as they would appear when displayed on screen. It must be in the format "mnemonic;sequence;shortcut".

- The mnemonic key activates the object if it is presently enabled onscreen. This typically corresponds to the underlined letter within the widget. Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for a button.

- The sequence is the full list of keys which invoke the action even if the relevant element is not currently shown on screen. For instance, for a menu item the sequence is the keybindings used to open the parent menus before invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a traditional "New..." menu item.

- The shortcut, if it exists, will invoke the same action without showing the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a traditional "New..." menu item.

Example: For a traditional "New..." menu item, the expected return value would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N" for the German locale. If, hypothetically, this menu item lacked a mnemonic, it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.

The function takes the following parameters:

  • i: action index corresponding to the action to be performed.

The function returns the following values:

  • utf8 (optional): keybinding which can be used to activate this action, or NULL if there is no keybinding for this action.

func (*Action) LocalizedName

func (action *Action) LocalizedName(i int) string

LocalizedName returns the localized name of the specified action of the object.

The function takes the following parameters:

  • i: action index corresponding to the action to be performed.

The function returns the following values:

  • utf8 (optional): name string, or NULL if action does not implement this interface.

func (*Action) NActions

func (action *Action) NActions() int

NActions gets the number of accessible actions available on the object. If there are more than one, the first one is considered the "default" action of the object.

The function returns the following values:

  • gint: the number of actions, or 0 if action does not implement this interface.

func (*Action) Name

func (action *Action) Name(i int) string

Name returns a non-localized string naming the specified action of the object. This name is generally not descriptive of the end result of the action, but instead names the 'interaction type' which the object supports. By convention, the above strings should be used to represent the actions which correspond to the common point-and-click interaction techniques of the same name: i.e. "click", "press", "release", "drag", "drop", "popup", etc. The "popup" action should be used to pop up a context menu for the object, if one exists.

For technical reasons, some toolkits cannot guarantee that the reported action is actually 'bound' to a nontrivial user event; i.e. the result of some actions via atk_action_do_action() may be NIL.

The function takes the following parameters:

  • i: action index corresponding to the action to be performed.

The function returns the following values:

  • utf8 (optional): name string, or NULL if action does not implement this interface.

func (*Action) SetDescription

func (action *Action) SetDescription(i int, desc string) bool

SetDescription sets a description of the specified action of the object.

The function takes the following parameters:

  • i: action index corresponding to the action to be performed.
  • desc: description to be assigned to this action.

The function returns the following values:

  • ok: gboolean representing if the description was successfully set;.

type ActionIface added in v0.0.5

type ActionIface struct {
	// contains filtered or unexported fields
}

ActionIface interface should be supported by any object that can perform one or more actions. The interface provides the standard mechanism for an assistive technology to determine what those actions are as well as tell the object to perform them. Any object that can be manipulated should support this interface.

An instance of this type is always passed by reference.

type Actioner

type Actioner interface {
	coreglib.Objector

	// DoAction: perform the specified action on the object.
	DoAction(i int) bool
	// Description returns a description of the specified action of the object.
	Description(i int) string
	// Keybinding gets the keybinding which can be used to activate this action,
	// if one exists.
	Keybinding(i int) string
	// LocalizedName returns the localized name of the specified action of the
	// object.
	LocalizedName(i int) string
	// NActions gets the number of accessible actions available on the object.
	NActions() int
	// Name returns a non-localized string naming the specified action of the
	// object.
	Name(i int) string
	// SetDescription sets a description of the specified action of the object.
	SetDescription(i int, desc string) bool
}

Actioner describes Action's interface methods.

type AtkObject added in v0.0.5

type AtkObject struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

AtkObject: base object class for the Accessibility Toolkit API.

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.

All UI components in an application which provide useful information or services to the user must provide corresponding Object instances on request (in GTK+, for instance, usually on a call to #gtk_widget_get_accessible ()), either via ATK support built into the toolkit for the widget class or ancestor class, or in the case of custom widgets, if the inherited Object implementation is insufficient, via instances of a new Object subclass.

See atkobjectfactory, atkregistry. (GTK+ users see also Accessible).

func GObjectAccessibleForObject

func GObjectAccessibleForObject(obj *coreglib.Object) *AtkObject

GObjectAccessibleForObject gets the accessible object for the specified obj.

The function takes the following parameters:

  • obj: #GObject.

The function returns the following values:

  • object which is the accessible object for the obj.

func GetFocusObject

func GetFocusObject() *AtkObject

GetFocusObject gets the currently focused object.

The function returns the following values:

  • object: currently focused object for the current application.

func GetRoot

func GetRoot() *AtkObject

GetRoot gets the root accessible container for the current application.

The function returns the following values:

  • object: root accessible container for the current application.

func (*AtkObject) AccessibleID added in v0.0.5

func (accessible *AtkObject) AccessibleID() string

AccessibleID gets the accessible id of the accessible.

The function returns the following values:

  • utf8: character string representing the accessible id of the object, or NULL if no such string was set.

func (*AtkObject) AddRelationship added in v0.0.5

func (object *AtkObject) AddRelationship(relationship RelationType, target *AtkObject) bool

AddRelationship adds a relationship of the specified type with the specified target.

The function takes the following parameters:

  • relationship of the relation.
  • target which is to be the target of the relation.

The function returns the following values:

  • ok: TRUE if the relationship is added.

func (*AtkObject) ConnectActiveDescendantChanged added in v0.0.5

func (object *AtkObject) ConnectActiveDescendantChanged(f func(arg1 *AtkObject)) coreglib.SignalHandle

ConnectActiveDescendantChanged: "active-descendant-changed" signal is emitted by an object which has the state ATK_STATE_MANAGES_DESCENDANTS when the focus object in the object changes. For instance, a table will emit the signal when the cell in the table which has focus changes.

func (*AtkObject) ConnectAnnouncement added in v0.3.0

func (object *AtkObject) ConnectAnnouncement(f func(arg1 string)) coreglib.SignalHandle

ConnectAnnouncement: "announcement" signal can be emitted to pass an announcement on to be read by a screen reader.

Depcrecated (2.50): Use AtkObject::notification instead.

func (*AtkObject) ConnectAttributeChanged added in v0.3.0

func (object *AtkObject) ConnectAttributeChanged(f func(arg1, arg2 string)) coreglib.SignalHandle

ConnectAttributeChanged: "attribute-changed" signal should be emitted when one of an object's attributes changes.

func (*AtkObject) ConnectChildrenChanged added in v0.0.5

func (object *AtkObject) ConnectChildrenChanged(f func(arg1 uint, arg2 *AtkObject)) coreglib.SignalHandle

ConnectChildrenChanged: signal "children-changed" is emitted when a child is added or removed from an object. It supports two details: "add" and "remove".

func (*AtkObject) ConnectFocusEvent added in v0.0.5

func (object *AtkObject) ConnectFocusEvent(f func(arg1 bool)) coreglib.SignalHandle

ConnectFocusEvent: signal "focus-event" is emitted when an object gained or lost focus.

func (*AtkObject) ConnectNotification added in v0.3.0

func (object *AtkObject) ConnectNotification(f func(arg1 string, arg2 int)) coreglib.SignalHandle

ConnectNotification: "notification" signal can be emitted to pass an announcement on to be read by a screen reader.

func (*AtkObject) ConnectPropertyChange added in v0.0.5

func (object *AtkObject) ConnectPropertyChange(f func(arg1 *PropertyValues)) coreglib.SignalHandle

ConnectPropertyChange: signal "property-change" is emitted when an object's property value changes. arg1 contains an PropertyValues with the name and the new value of the property whose value has changed. Note that, as with GObject notify, getting this signal does not guarantee that the value of the property has actually changed; it may also be emitted when the setter of the property is called to reinstate the previous value.

Toolkit implementor note: ATK implementors should use g_object_notify() to emit property-changed notifications. Object::property-changed is needed by the implementation of atk_add_global_event_listener() because GObject notify doesn't support emission hooks.

func (*AtkObject) ConnectStateChange added in v0.0.5

func (object *AtkObject) ConnectStateChange(f func(arg1 string, arg2 bool)) coreglib.SignalHandle

ConnectStateChange: "state-change" signal is emitted when an object's state changes. The detail value identifies the state type which has changed.

func (*AtkObject) ConnectVisibleDataChanged added in v0.0.5

func (object *AtkObject) ConnectVisibleDataChanged(f func()) coreglib.SignalHandle

ConnectVisibleDataChanged: "visible-data-changed" signal is emitted when the visual appearance of the object changed.

func (*AtkObject) Description added in v0.0.5

func (accessible *AtkObject) Description() string

Description gets the accessible description of the accessible.

The function returns the following values:

  • utf8: character string representing the accessible description of the accessible.

func (*AtkObject) HelpText added in v0.3.0

func (accessible *AtkObject) HelpText() string

HelpText gets the help text associated with the accessible.

The function returns the following values:

  • utf8: character string representing the help text or the object, or NULL if no such string was set.

func (*AtkObject) IndexInParent added in v0.0.5

func (accessible *AtkObject) IndexInParent() int

IndexInParent gets the 0-based index of this accessible in its parent; returns -1 if the accessible does not have an accessible parent.

The function returns the following values:

  • gint: integer which is the index of the accessible in its parent.

func (*AtkObject) Initialize added in v0.0.5

func (accessible *AtkObject) Initialize(data unsafe.Pointer)

Initialize: this function is called when implementing subclasses of Object. It does initialization required for the new object. It is intended that this function should called only in the ..._new() functions used to create an instance of a subclass of Object.

The function takes the following parameters:

  • data (optional) which identifies the object for which the AtkObject was created.

func (*AtkObject) Layer deprecated added in v0.0.5

func (accessible *AtkObject) Layer() Layer

Layer gets the layer of the accessible.

Deprecated: Use atk_component_get_layer instead.

The function returns the following values:

  • layer which is the layer of the accessible.

func (*AtkObject) MDIZOrder deprecated added in v0.0.5

func (accessible *AtkObject) MDIZOrder() int

MDIZOrder gets the zorder of the accessible. The value G_MININT will be returned if the layer of the accessible is not ATK_LAYER_MDI.

Deprecated: Use atk_component_get_mdi_zorder instead.

The function returns the following values:

  • gint which is the zorder of the accessible, i.e. the depth at which the component is shown in relation to other components in the same container.

func (*AtkObject) NAccessibleChildren added in v0.0.5

func (accessible *AtkObject) NAccessibleChildren() int

NAccessibleChildren gets the number of accessible children of the accessible.

The function returns the following values:

  • gint: integer representing the number of accessible children of the accessible.

func (*AtkObject) Name added in v0.0.5

func (accessible *AtkObject) Name() string

Name gets the accessible name of the accessible.

The function returns the following values:

  • utf8: character string representing the accessible name of the object.

func (*AtkObject) NotifyStateChange added in v0.0.5

func (accessible *AtkObject) NotifyStateChange(state State, value bool)

NotifyStateChange emits a state-change signal for the specified state.

Note that as a general rule when the state of an existing object changes, emitting a notification is expected.

The function takes the following parameters:

  • state whose state is changed.
  • value: gboolean which indicates whether the state is being set on or off.

func (*AtkObject) ObjectLocale added in v0.0.5

func (accessible *AtkObject) ObjectLocale() string

ObjectLocale gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale of accessible.

The function returns the following values:

  • utf8: UTF-8 string indicating the POSIX-style LC_MESSAGES locale of accessible.

func (*AtkObject) Parent added in v0.0.5

func (accessible *AtkObject) Parent() *AtkObject

Parent gets the accessible parent of the accessible. By default this is the one assigned with atk_object_set_parent(), but it is assumed that ATK implementors have ways to get the parent of the object without the need of assigning it manually with atk_object_set_parent(), and will return it with this method.

If you are only interested on the parent assigned with atk_object_set_parent(), use atk_object_peek_parent().

The function returns the following values:

  • object representing the accessible parent of the accessible.

func (*AtkObject) PeekParent added in v0.0.5

func (accessible *AtkObject) PeekParent() *AtkObject

PeekParent gets the accessible parent of the accessible, if it has been manually assigned with atk_object_set_parent. Otherwise, this function returns NULL.

This method is intended as an utility for ATK implementors, and not to be exposed to accessible tools. See atk_object_get_parent() for further reference.

The function returns the following values:

  • object representing the accessible parent of the accessible if assigned.

func (*AtkObject) RefAccessibleChild added in v0.0.5

func (accessible *AtkObject) RefAccessibleChild(i int) *AtkObject

RefAccessibleChild gets a reference to the specified accessible child of the object. The accessible children are 0-based so the first accessible child is at index 0, the second at index 1 and so on.

The function takes the following parameters:

  • i: gint representing the position of the child, starting from 0.

The function returns the following values:

  • object representing the specified accessible child of the accessible.

func (*AtkObject) RefRelationSet added in v0.0.5

func (accessible *AtkObject) RefRelationSet() *RelationSet

RefRelationSet gets the RelationSet associated with the object.

The function returns the following values:

  • relationSet representing the relation set of the object.

func (*AtkObject) RefStateSet added in v0.0.5

func (accessible *AtkObject) RefStateSet() *StateSet

RefStateSet gets a reference to the state set of the accessible; the caller must unreference it when it is no longer needed.

The function returns the following values:

  • stateSet: reference to an StateSet which is the state set of the accessible.

func (*AtkObject) RemovePropertyChangeHandler deprecated added in v0.0.5

func (accessible *AtkObject) RemovePropertyChangeHandler(handlerId uint)

RemovePropertyChangeHandler removes a property change handler.

Deprecated: See atk_object_connect_property_change_handler().

The function takes the following parameters:

  • handlerId: guint which identifies the handler to be removed.

func (*AtkObject) RemoveRelationship added in v0.0.5

func (object *AtkObject) RemoveRelationship(relationship RelationType, target *AtkObject) bool

RemoveRelationship removes a relationship of the specified type with the specified target.

The function takes the following parameters:

  • relationship of the relation.
  • target which is the target of the relation to be removed.

The function returns the following values:

  • ok: TRUE if the relationship is removed.

func (*AtkObject) Role added in v0.0.5

func (accessible *AtkObject) Role() Role

Role gets the role of the accessible.

The function returns the following values:

  • role which is the role of the accessible.

func (*AtkObject) SetAccessibleID added in v0.0.5

func (accessible *AtkObject) SetAccessibleID(id string)

SetAccessibleID sets the accessible ID of the accessible. This is not meant to be presented to the user, but to be an ID which is stable over application development. Typically, this is the gtkbuilder ID. Such an ID will be available for instance to identify a given well-known accessible object for tailored screen reading, or for automatic regression testing.

The function takes the following parameters:

  • id: character string to be set as the accessible id.

func (*AtkObject) SetDescription added in v0.0.5

func (accessible *AtkObject) SetDescription(description string)

SetDescription sets the accessible description of the accessible. You can't set the description to NULL. This is reserved for the initial value. In this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to a empty value you can use "".

The function takes the following parameters:

  • description: character string to be set as the accessible description.

func (*AtkObject) SetHelpText added in v0.3.0

func (accessible *AtkObject) SetHelpText(helpText string)

SetHelpText sets the help text associated with the accessible. This can be used to expose context-sensitive information to help a user understand how to interact with the object.

The function takes the following parameters:

  • helpText: character string to be set as the accessible's help text.

func (*AtkObject) SetName added in v0.0.5

func (accessible *AtkObject) SetName(name string)

SetName sets the accessible name of the accessible. You can't set the name to NULL. This is reserved for the initial value. In this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to a empty value you can use "".

The function takes the following parameters:

  • name: character string to be set as the accessible name.

func (*AtkObject) SetParent added in v0.0.5

func (accessible *AtkObject) SetParent(parent *AtkObject)

SetParent sets the accessible parent of the accessible. parent can be NULL.

The function takes the following parameters:

  • parent to be set as the accessible parent.

func (*AtkObject) SetRole added in v0.0.5

func (accessible *AtkObject) SetRole(role Role)

SetRole sets the role of the accessible.

The function takes the following parameters:

  • role to be set as the role.

type AtkObjectOverrides added in v0.0.5

type AtkObjectOverrides struct {
	ActiveDescendantChanged func(child *unsafe.Pointer)
	// The function takes the following parameters:
	//
	//   - changeIndex
	//   - changedChild (optional)
	ChildrenChanged func(changeIndex uint, changedChild unsafe.Pointer)
	// FocusEvent: signal handler which is executed when there is a focus event
	// for an object. This virtual function is deprecated since 2.9.4 and it
	// should not be overriden. Use the Object::state-change "focused" signal
	// instead.
	FocusEvent func(focusIn bool)
	// Description gets the accessible description of the accessible.
	//
	// The function returns the following values:
	//
	//   - utf8: character string representing the accessible description of the
	//     accessible.
	Description func() string
	// IndexInParent gets the 0-based index of this accessible in its parent;
	// returns -1 if the accessible does not have an accessible parent.
	//
	// The function returns the following values:
	//
	//   - gint: integer which is the index of the accessible in its parent.
	IndexInParent func() int
	// Layer gets the layer of the accessible.
	//
	// Deprecated: Use atk_component_get_layer instead.
	//
	// The function returns the following values:
	//
	//   - layer which is the layer of the accessible.
	Layer func() Layer
	// MDIZOrder gets the zorder of the accessible. The value G_MININT will be
	// returned if the layer of the accessible is not ATK_LAYER_MDI.
	//
	// Deprecated: Use atk_component_get_mdi_zorder instead.
	//
	// The function returns the following values:
	//
	//   - gint which is the zorder of the accessible, i.e. the depth at which
	//     the component is shown in relation to other components in the same
	//     container.
	MDIZOrder func() int
	NChildren func() int
	// Name gets the accessible name of the accessible.
	//
	// The function returns the following values:
	//
	//   - utf8: character string representing the accessible name of the
	//     object.
	Name func() string
	// ObjectLocale gets a UTF-8 string indicating the POSIX-style LC_MESSAGES
	// locale of accessible.
	//
	// The function returns the following values:
	//
	//   - utf8: UTF-8 string indicating the POSIX-style LC_MESSAGES locale of
	//     accessible.
	ObjectLocale func() string
	// Parent gets the accessible parent of the accessible. By default this is
	// the one assigned with atk_object_set_parent(), but it is assumed that ATK
	// implementors have ways to get the parent of the object without the need
	// of assigning it manually with atk_object_set_parent(), and will return it
	// with this method.
	//
	// If you are only interested on the parent assigned with
	// atk_object_set_parent(), use atk_object_peek_parent().
	//
	// The function returns the following values:
	//
	//   - object representing the accessible parent of the accessible.
	Parent func() *AtkObject
	// Role gets the role of the accessible.
	//
	// The function returns the following values:
	//
	//   - role which is the role of the accessible.
	Role func() Role
	// Initialize: this function is called when implementing subclasses of
	// Object. It does initialization required for the new object. It is
	// intended that this function should called only in the ..._new() functions
	// used to create an instance of a subclass of Object.
	//
	// The function takes the following parameters:
	//
	//   - data (optional) which identifies the object for which the AtkObject
	//     was created.
	Initialize     func(data unsafe.Pointer)
	PropertyChange func(values *PropertyValues)
	// RefRelationSet gets the RelationSet associated with the object.
	//
	// The function returns the following values:
	//
	//   - relationSet representing the relation set of the object.
	RefRelationSet func() *RelationSet
	// RefStateSet gets a reference to the state set of the accessible;
	// the caller must unreference it when it is no longer needed.
	//
	// The function returns the following values:
	//
	//   - stateSet: reference to an StateSet which is the state set of the
	//     accessible.
	RefStateSet func() *StateSet
	// RemovePropertyChangeHandler removes a property change handler.
	//
	// Deprecated: See atk_object_connect_property_change_handler().
	//
	// The function takes the following parameters:
	//
	//   - handlerId: guint which identifies the handler to be removed.
	RemovePropertyChangeHandler func(handlerId uint)
	// SetDescription sets the accessible description of the accessible.
	// You can't set the description to NULL. This is reserved for the initial
	// value. In this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to
	// set the name to a empty value you can use "".
	//
	// The function takes the following parameters:
	//
	//   - description: character string to be set as the accessible
	//     description.
	SetDescription func(description string)
	// SetName sets the accessible name of the accessible. You can't set the
	// name to NULL. This is reserved for the initial value. In this aspect NULL
	// is similar to ATK_ROLE_UNKNOWN. If you want to set the name to a empty
	// value you can use "".
	//
	// The function takes the following parameters:
	//
	//   - name: character string to be set as the accessible name.
	SetName func(name string)
	// SetParent sets the accessible parent of the accessible. parent can be
	// NULL.
	//
	// The function takes the following parameters:
	//
	//   - parent to be set as the accessible parent.
	SetParent func(parent *AtkObject)
	// SetRole sets the role of the accessible.
	//
	// The function takes the following parameters:
	//
	//   - role to be set as the role.
	SetRole func(role Role)
	// The function takes the following parameters:
	//
	//   - name
	//   - stateSet
	StateChange        func(name string, stateSet bool)
	VisibleDataChanged func()
}

AtkObjectOverrides contains methods that are overridable.

type Attribute

type Attribute struct {
	// contains filtered or unexported fields
}

Attribute 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 atk_text_attribute_get_name() to get the string name from the enum value. See also atk_text_attribute_for_name() and atk_text_attribute_get_value() for more information.

A string name/value pair representing a generic attribute.

An instance of this type is always passed by reference.

func (*Attribute) Name

func (a *Attribute) Name() string

Name: attribute name.

func (*Attribute) Value

func (a *Attribute) Value() string

Value: value of the attribute, represented as a string.

type AttributeSet

type AttributeSet = coreglib.SList

AttributeSet: this is a singly-linked list (a List) of Attribute. It is used by atk_text_get_run_attributes(), atk_text_get_default_attributes(), atk_editable_text_set_run_attributes(), atk_document_get_attributes() and atk_object_get_attributes().

type Component

type Component struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Component: ATK interface provided by UI components which occupy a physical area on the screen. which the user can activate/interact with.

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.

A possible exception might be textual information with a transparent background, in which case text glyph bounding box information is provided by Text.

Component wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Component) Alpha

func (component *Component) Alpha() float64

Alpha returns the alpha value (i.e. the opacity) for this component, on a scale from 0 (fully transparent) to 1.0 (fully opaque).

The function returns the following values:

  • gdouble: alpha value from 0 to 1.0, inclusive.

func (*Component) ConnectBoundsChanged

func (component *Component) ConnectBoundsChanged(f func(arg1 *Rectangle)) coreglib.SignalHandle

ConnectBoundsChanged: 'bounds-changed" signal is emitted when the position or size of the component changes.

func (*Component) Contains

func (component *Component) Contains(x, y int, coordType CoordType) bool

Contains checks whether the specified point is within the extent of the component.

Toolkit implementor note: ATK provides a default implementation for this virtual method. In general there are little reason to re-implement it.

The function takes the following parameters:

  • x coordinate.
  • y coordinate.
  • coordType specifies whether the coordinates are relative to the screen or to the components top level window.

The function returns the following values:

  • ok: TRUE or FALSE indicating whether the specified point is within the extent of the component or not.

func (*Component) Extents

func (component *Component) Extents(coordType CoordType) (x, y, width, height int)

Extents gets the rectangle which gives the extent of the component.

If the extent can not be obtained (e.g. a non-embedded plug or missing support), all of x, y, width, height are set to -1.

The function takes the following parameters:

  • coordType specifies whether the coordinates are relative to the screen or to the components top level window.

The function returns the following values:

  • x (optional) address of #gint to put x coordinate.
  • y (optional) address of #gint to put y coordinate.
  • width (optional) address of #gint to put width.
  • height (optional) address of #gint to put height.

func (*Component) GrabFocus

func (component *Component) GrabFocus() bool

GrabFocus grabs focus for this component.

The function returns the following values:

  • ok: TRUE if successful, FALSE otherwise.

func (*Component) Layer

func (component *Component) Layer() Layer

Layer gets the layer of the component.

The function returns the following values:

  • layer which is the layer of the component.

func (*Component) MDIZOrder

func (component *Component) MDIZOrder() int

MDIZOrder gets the zorder of the component. The value G_MININT will be returned if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.

The function returns the following values:

  • gint which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container.

func (*Component) Position deprecated

func (component *Component) Position(coordType CoordType) (x, y int)

Position gets the position of component in the form of a point specifying component's top-left corner.

If the position can not be obtained (e.g. a non-embedded plug or missing support), x and y are set to -1.

Deprecated: Since 2.12. Use atk_component_get_extents() instead.

The function takes the following parameters:

  • coordType specifies whether the coordinates are relative to the screen or to the components top level window.

The function returns the following values:

  • x (optional) address of #gint to put x coordinate position.
  • y (optional) address of #gint to put y coordinate position.

func (*Component) RefAccessibleAtPoint

func (component *Component) RefAccessibleAtPoint(x, y int, coordType CoordType) *AtkObject

RefAccessibleAtPoint gets a reference to the accessible child, if one exists, at the coordinate point specified by x and y.

The function takes the following parameters:

  • x coordinate.
  • y coordinate.
  • coordType specifies whether the coordinates are relative to the screen or to the components top level window.

The function returns the following values:

  • object (optional): reference to the accessible child, if one exists.

func (*Component) RemoveFocusHandler deprecated

func (component *Component) RemoveFocusHandler(handlerId uint)

RemoveFocusHandler: remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out).

Deprecated: If you need to track when an object gains or lose the focus, use the Object::state-change "focused" notification instead.

The function takes the following parameters:

  • handlerId: handler id of the focus handler to be removed from component.

func (*Component) ScrollTo

func (component *Component) ScrollTo(typ ScrollType) bool

ScrollTo makes component visible on the screen by scrolling all necessary parents.

Contrary to atk_component_set_position, this does not actually move component in its parent, this only makes the parents scroll so that the object shows up on the screen, given its current position within the parents.

The function takes the following parameters:

  • typ: specify where the object should be made visible.

The function returns the following values:

  • ok: whether scrolling was successful.

func (*Component) ScrollToPoint

func (component *Component) ScrollToPoint(coords CoordType, x, y int) bool

ScrollToPoint: move the top-left of component to a given position of the screen by scrolling all necessary parents.

The function takes the following parameters:

  • coords: specify whether coordinates are relative to the screen or to the parent object.
  • x: x-position where to scroll to.
  • y: y-position where to scroll to.

The function returns the following values:

  • ok: whether scrolling was successful.

func (*Component) SetExtents

func (component *Component) SetExtents(x, y, width, height int, coordType CoordType) bool

SetExtents sets the extents of component.

The function takes the following parameters:

  • x coordinate.
  • y coordinate.
  • width to set for component.
  • height to set for component.
  • coordType specifies whether the coordinates are relative to the screen or to the components top level window.

The function returns the following values:

  • ok: TRUE or FALSE whether the extents were set or not.

func (*Component) SetPosition

func (component *Component) SetPosition(x, y int, coordType CoordType) bool

SetPosition sets the position of component.

Contrary to atk_component_scroll_to, this does not trigger any scrolling, this just moves component in its parent.

The function takes the following parameters:

  • x coordinate.
  • y coordinate.
  • coordType specifies whether the coordinates are relative to the screen or to the component's top level window.

The function returns the following values:

  • ok: TRUE or FALSE whether or not the position was set or not.

func (*Component) SetSize

func (component *Component) SetSize(width, height int) bool

SetSize: set the size of the component in terms of width and height.

The function takes the following parameters:

  • width to set for component.
  • height to set for component.

The function returns the following values:

  • ok: TRUE or FALSE whether the size was set or not.

func (*Component) Size deprecated

func (component *Component) Size() (width, height int)

Size gets the size of the component in terms of width and height.

If the size can not be obtained (e.g. a non-embedded plug or missing support), width and height are set to -1.

Deprecated: Since 2.12. Use atk_component_get_extents() instead.

The function returns the following values:

  • width (optional) address of #gint to put width of component.
  • height (optional) address of #gint to put height of component.

type ComponentIface added in v0.0.5

type ComponentIface struct {
	// contains filtered or unexported fields
}

ComponentIface: atkComponent interface should be supported by any object that is rendered on the screen. The interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of an object.

An instance of this type is always passed by reference.

type Componenter

type Componenter interface {
	coreglib.Objector

	// Contains checks whether the specified point is within the extent of the
	// component.
	Contains(x, y int, coordType CoordType) bool
	// Alpha returns the alpha value (i.e.
	Alpha() float64
	// Extents gets the rectangle which gives the extent of the component.
	Extents(coordType CoordType) (x, y, width, height int)
	// Layer gets the layer of the component.
	Layer() Layer
	// MDIZOrder gets the zorder of the component.
	MDIZOrder() int
	// Position gets the position of component in the form of a point specifying
	// component's top-left corner.
	Position(coordType CoordType) (x, y int)
	// Size gets the size of the component in terms of width and height.
	Size() (width, height int)
	// GrabFocus grabs focus for this component.
	GrabFocus() bool
	// RefAccessibleAtPoint gets a reference to the accessible child, if one
	// exists, at the coordinate point specified by x and y.
	RefAccessibleAtPoint(x, y int, coordType CoordType) *AtkObject
	// RemoveFocusHandler: remove the handler specified by handler_id from the
	// list of functions to be executed when this object receives focus events
	// (in or out).
	RemoveFocusHandler(handlerId uint)
	// ScrollTo makes component visible on the screen by scrolling all necessary
	// parents.
	ScrollTo(typ ScrollType) bool
	// ScrollToPoint: move the top-left of component to a given position of the
	// screen by scrolling all necessary parents.
	ScrollToPoint(coords CoordType, x, y int) bool
	// SetExtents sets the extents of component.
	SetExtents(x, y, width, height int, coordType CoordType) bool
	// SetPosition sets the position of component.
	SetPosition(x, y int, coordType CoordType) bool
	// SetSize: set the size of the component in terms of width and height.
	SetSize(width, height int) bool

	// Bounds-changed: 'bounds-changed" signal is emitted when the position or
	// size of the component changes.
	ConnectBoundsChanged(func(arg1 *Rectangle)) coreglib.SignalHandle
}

Componenter describes Component's interface methods.

type CoordType

type CoordType C.gint

CoordType specifies how xy coordinates are to be interpreted. Used by functions such as atk_component_get_position() and atk_text_get_character_extents().

const (
	// XYScreen specifies xy coordinates relative to the screen.
	XYScreen CoordType = iota
	// XYWindow specifies xy coordinates relative to the widget's top-level
	// window.
	XYWindow
	// XYParent specifies xy coordinates relative to the widget's immediate
	// parent. Since: 2.30.
	XYParent
)

func (CoordType) String

func (c CoordType) String() string

String returns the name in string for CoordType.

type Document

type Document struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Document: ATK interface which represents the toplevel container for document content.

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.

Document wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Document) AttributeValue

func (document *Document) AttributeValue(attributeName string) string

AttributeValue retrieves the value of the given attribute_name inside document.

The function takes the following parameters:

  • attributeName: character string representing the name of the attribute whose value is being queried.

The function returns the following values:

  • utf8 (optional): string value associated with the named attribute for this document, or NULL if a value for attribute_name has not been specified for this document.

func (*Document) ConnectDocumentAttributeChanged added in v0.3.0

func (document *Document) ConnectDocumentAttributeChanged(f func(arg1, arg2 string)) coreglib.SignalHandle

ConnectDocumentAttributeChanged: "document-attribute-changed" signal should be emitted when there is a change to one of the document attributes returned by atk_document_get_attributes.

func (*Document) ConnectLoadComplete

func (document *Document) ConnectLoadComplete(f func()) coreglib.SignalHandle

ConnectLoadComplete: 'load-complete' signal is emitted when a pending load of a static document has completed. This signal is to be expected by ATK clients if and when AtkDocument implementors expose ATK_STATE_BUSY. If the state of an AtkObject which implements AtkDocument does not include ATK_STATE_BUSY, it should be safe for clients to assume that the AtkDocument's static contents are fully loaded into the container. (Dynamic document contents should be exposed via other signals.).

func (*Document) ConnectLoadStopped

func (document *Document) ConnectLoadStopped(f func()) coreglib.SignalHandle

ConnectLoadStopped: 'load-stopped' signal is emitted when a pending load of document contents is cancelled, paused, or otherwise interrupted by the user or application logic. It should not however be emitted while waiting for a resource (for instance while blocking on a file or network read) unless a user-significant timeout has occurred.

func (*Document) ConnectPageChanged

func (document *Document) ConnectPageChanged(f func(pageNumber int)) coreglib.SignalHandle

ConnectPageChanged: 'page-changed' signal is emitted when the current page of a document changes, e.g. pressing page up/down in a document viewer.

func (*Document) ConnectReload

func (document *Document) ConnectReload(f func()) coreglib.SignalHandle

ConnectReload: 'reload' signal is emitted when the contents of a document is refreshed from its source. Once 'reload' has been emitted, a matching 'load-complete' or 'load-stopped' signal should follow, which clients may await before interrogating ATK for the latest document content.

func (*Document) CurrentPageNumber

func (document *Document) CurrentPageNumber() int

CurrentPageNumber retrieves the current page number inside document.

The function returns the following values:

  • gint: current page number inside document, or -1 if not implemented, not know by the implementor, or irrelevant.

func (*Document) Document deprecated

func (document *Document) Document() unsafe.Pointer

Document gets a gpointer that points to an instance of the DOM. It is up to the caller to check atk_document_get_type to determine how to cast this pointer.

Deprecated: Since 2.12. document is already a representation of the document. Use it directly, or one of its children, as an instance of the DOM.

The function returns the following values:

  • gpointer (optional) that points to an instance of the DOM.

func (*Document) DocumentType deprecated

func (document *Document) DocumentType() string

DocumentType gets a string indicating the document type.

Deprecated: Since 2.12. Please use atk_document_get_attributes() to ask for the document type if it applies.

The function returns the following values:

  • utf8: string indicating the document type.

func (*Document) Locale deprecated

func (document *Document) Locale() string

Locale gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale of the content of this document instance. Individual text substrings or images within this document may have a different locale, see atk_text_get_attributes and atk_image_get_image_locale.

Deprecated: Please use atk_object_get_object_locale() instead.

The function returns the following values:

  • utf8: UTF-8 string indicating the POSIX-style LC_MESSAGES locale of the document content as a whole, or NULL if the document content does not specify a locale.

func (*Document) PageCount

func (document *Document) PageCount() int

PageCount retrieves the total number of pages inside document.

The function returns the following values:

  • gint: total page count of document, or -1 if not implemented, not know by the implementor or irrelevant.

func (*Document) SetAttributeValue

func (document *Document) SetAttributeValue(attributeName, attributeValue string) bool

SetAttributeValue sets the value for the given attribute_name inside document.

The function takes the following parameters:

  • attributeName: character string representing the name of the attribute whose value is being set.
  • attributeValue: string value to be associated with attribute_name.

The function returns the following values:

  • ok: TRUE if attribute_value is successfully associated with attribute_name for this document, and FALSE if if the document does not allow the attribute to be modified.

type DocumentIface added in v0.0.5

type DocumentIface struct {
	// contains filtered or unexported fields
}

DocumentIface: instance of this type is always passed by reference.

type Documenter

type Documenter interface {
	coreglib.Objector

	// AttributeValue retrieves the value of the given attribute_name inside
	// document.
	AttributeValue(attributeName string) string
	// CurrentPageNumber retrieves the current page number inside document.
	CurrentPageNumber() int
	// Document gets a gpointer that points to an instance of the DOM.
	Document() unsafe.Pointer
	// DocumentType gets a string indicating the document type.
	DocumentType() string
	// Locale gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale
	// of the content of this document instance.
	Locale() string
	// PageCount retrieves the total number of pages inside document.
	PageCount() int
	// SetAttributeValue sets the value for the given attribute_name inside
	// document.
	SetAttributeValue(attributeName, attributeValue string) bool

	// Document-attribute-changed: "document-attribute-changed" signal should be
	// emitted when there is a change to one of the document attributes returned
	// by atk_document_get_attributes.
	ConnectDocumentAttributeChanged(func(arg1, arg2 string)) coreglib.SignalHandle
	// Load-complete: 'load-complete' signal is emitted when a pending load of a
	// static document has completed.
	ConnectLoadComplete(func()) coreglib.SignalHandle
	// Load-stopped: 'load-stopped' signal is emitted when a pending load of
	// document contents is cancelled, paused, or otherwise interrupted by the
	// user or application logic.
	ConnectLoadStopped(func()) coreglib.SignalHandle
	// Page-changed: 'page-changed' signal is emitted when the current page of a
	// document changes, e.g.
	ConnectPageChanged(func(pageNumber int)) coreglib.SignalHandle
	// Reload: 'reload' signal is emitted when the contents of a document is
	// refreshed from its source.
	ConnectReload(func()) coreglib.SignalHandle
}

Documenter describes Document's interface methods.

type EditableText

type EditableText struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

EditableText: ATK interface implemented by components containing user-editable text content.

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

EditableText is a subclass of Text, and as such, an object which implements EditableText is by definition an Text implementor as well.

See atktext.

EditableText wraps an interface. This means the user can get the underlying type by calling Cast().

func (*EditableText) CopyText

func (text *EditableText) CopyText(startPos, endPos int)

CopyText: copy text from start_pos up to, but not including end_pos to the clipboard.

The function takes the following parameters:

  • startPos: start position.
  • endPos: end position.

func (*EditableText) CutText

func (text *EditableText) CutText(startPos, endPos int)

CutText: copy text from start_pos up to, but not including end_pos to the clipboard and then delete from the widget.

The function takes the following parameters:

  • startPos: start position.
  • endPos: end position.

func (*EditableText) DeleteText

func (text *EditableText) DeleteText(startPos, endPos int)

DeleteText: delete text start_pos up to, but not including end_pos.

The function takes the following parameters:

  • startPos: start position.
  • endPos: end position.

func (*EditableText) InsertText

func (text *EditableText) InsertText(str string, position *int)

InsertText: insert text at a given position.

The function takes the following parameters:

  • str: text to insert.
  • position: caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.

func (*EditableText) PasteText

func (text *EditableText) PasteText(position int)

PasteText: paste text from clipboard to specified position.

The function takes the following parameters:

  • position to paste.

func (*EditableText) SetTextContents

func (text *EditableText) SetTextContents(str string)

SetTextContents: set text contents of text.

The function takes the following parameters:

  • str: string to set for text contents of text.

type EditableTextIface added in v0.0.5

type EditableTextIface struct {
	// contains filtered or unexported fields
}

EditableTextIface: instance of this type is always passed by reference.

type EditableTexter

type EditableTexter interface {
	coreglib.Objector

	// CopyText: copy text from start_pos up to, but not including end_pos to
	// the clipboard.
	CopyText(startPos, endPos int)
	// CutText: copy text from start_pos up to, but not including end_pos to the
	// clipboard and then delete from the widget.
	CutText(startPos, endPos int)
	// DeleteText: delete text start_pos up to, but not including end_pos.
	DeleteText(startPos, endPos int)
	// InsertText: insert text at a given position.
	InsertText(str string, position *int)
	// PasteText: paste text from clipboard to specified position.
	PasteText(position int)
	// SetTextContents: set text contents of text.
	SetTextContents(str string)
}

EditableTexter describes EditableText's interface methods.

type Function

type Function func() (ok bool)

Function is a function definition used for padding which has been added to class and interface structures to allow for expansion in the future.

type GObjectAccessible

type GObjectAccessible struct {
	AtkObject
	// contains filtered or unexported fields
}

GObjectAccessible: this object class is derived from AtkObject and can be used as a basis implementing accessible objects.

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.

func (*GObjectAccessible) Object

func (obj *GObjectAccessible) Object() *coreglib.Object

Object gets the GObject for which obj is the accessible object.

The function returns the following values:

  • object which is the object for which obj is the accessible object.

type GObjectAccessibleClass added in v0.0.5

type GObjectAccessibleClass struct {
	// contains filtered or unexported fields
}

GObjectAccessibleClass: instance of this type is always passed by reference.

type GObjectAccessibleOverrides added in v0.0.5

type GObjectAccessibleOverrides struct {
}

GObjectAccessibleOverrides contains methods that are overridable.

type Hyperlink struct {
	*coreglib.Object

	Action
	// contains filtered or unexported fields
}

Hyperlink: ATK object which encapsulates a link or set of links in a hypertext document.

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.

func (*Hyperlink) ConnectLinkActivated

func (link_ *Hyperlink) ConnectLinkActivated(f func()) coreglib.SignalHandle

ConnectLinkActivated: signal link-activated is emitted when a link is activated.

func (*Hyperlink) EndIndex

func (link_ *Hyperlink) EndIndex() int

EndIndex gets the index with the hypertext document at which this link ends.

The function returns the following values:

  • gint: index with the hypertext document at which this link ends.

func (*Hyperlink) GetObject

func (link_ *Hyperlink) GetObject(i int) *AtkObject

GetObject returns the item associated with this hyperlinks nth anchor. For instance, the returned Object will implement Text if link_ is a text hyperlink, Image if link_ is an image hyperlink etc.

Multiple anchors are primarily used by client-side image maps.

The function takes the following parameters:

  • i: (zero-index) integer specifying the desired anchor.

The function returns the following values:

  • object associated with this hyperlinks i-th anchor.

func (*Hyperlink) IsInline

func (link_ *Hyperlink) IsInline() bool

IsInline indicates whether the link currently displays some or all of its content inline. Ordinary HTML links will usually return FALSE, but an inline <src> HTML element will return TRUE.

The function returns the following values:

  • ok: whether or not this link displays its content inline.
func (link_ *Hyperlink) IsSelectedLink() bool

IsSelectedLink determines whether this AtkHyperlink is selected

Deprecated: Please use ATK_STATE_FOCUSABLE for all links, and ATK_STATE_FOCUSED for focused links.

The function returns the following values:

  • ok: true if the AtkHyperlink is selected, False otherwise.

func (*Hyperlink) IsValid

func (link_ *Hyperlink) IsValid() bool

IsValid: since the document that a link is associated with may have changed this method returns TRUE if the link is still valid (with respect to the document it references) and FALSE otherwise.

The function returns the following values:

  • ok: whether or not this link is still valid.

func (*Hyperlink) NAnchors

func (link_ *Hyperlink) NAnchors() int

NAnchors gets the number of anchors associated with this hyperlink.

The function returns the following values:

  • gint: number of anchors associated with this hyperlink.

func (*Hyperlink) StartIndex

func (link_ *Hyperlink) StartIndex() int

StartIndex gets the index with the hypertext document at which this link begins.

The function returns the following values:

  • gint: index with the hypertext document at which this link begins.

func (*Hyperlink) URI

func (link_ *Hyperlink) URI(i int) string

URI: get a the URI associated with the anchor specified by i of link_.

Multiple anchors are primarily used by client-side image maps.

The function takes the following parameters:

  • i: (zero-index) integer specifying the desired anchor.

The function returns the following values:

  • utf8: string specifying the URI.

type HyperlinkClass added in v0.0.5

type HyperlinkClass struct {
	// contains filtered or unexported fields
}

HyperlinkClass: instance of this type is always passed by reference.

type HyperlinkImpl

type HyperlinkImpl struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

HyperlinkImpl: queryable interface which allows AtkHyperlink instances associated with an AtkObject to be obtained. AtkHyperlinkImpl corresponds to AT-SPI's Hyperlink interface, and differs from AtkHyperlink in that AtkHyperlink is an object type, rather than an interface, and thus cannot be directly queried. FTW.

HyperlinkImpl wraps an interface. This means the user can get the underlying type by calling Cast().

func (impl *HyperlinkImpl) Hyperlink() *Hyperlink

Hyperlink gets the hyperlink associated with this object.

The function returns the following values:

  • hyperlink: atkHyperlink object which points to this implementing AtkObject.

type HyperlinkImplIface added in v0.0.5

type HyperlinkImplIface struct {
	// contains filtered or unexported fields
}

HyperlinkImplIface: instance of this type is always passed by reference.

type HyperlinkImpler

type HyperlinkImpler interface {
	coreglib.Objector

	// Hyperlink gets the hyperlink associated with this object.
	Hyperlink() *Hyperlink
}

HyperlinkImpler describes HyperlinkImpl's interface methods.

type HyperlinkOverrides added in v0.0.5

type HyperlinkOverrides struct {
	// EndIndex gets the index with the hypertext document at which this link
	// ends.
	//
	// The function returns the following values:
	//
	//   - gint: index with the hypertext document at which this link ends.
	EndIndex func() int
	// NAnchors gets the number of anchors associated with this hyperlink.
	//
	// The function returns the following values:
	//
	//   - gint: number of anchors associated with this hyperlink.
	NAnchors func() int
	// GetObject returns the item associated with this hyperlinks nth anchor.
	// For instance, the returned Object will implement Text if link_ is a text
	// hyperlink, Image if link_ is an image hyperlink etc.
	//
	// Multiple anchors are primarily used by client-side image maps.
	//
	// The function takes the following parameters:
	//
	//   - i: (zero-index) integer specifying the desired anchor.
	//
	// The function returns the following values:
	//
	//   - object associated with this hyperlinks i-th anchor.
	GetObject func(i int) *AtkObject
	// StartIndex gets the index with the hypertext document at which this link
	// begins.
	//
	// The function returns the following values:
	//
	//   - gint: index with the hypertext document at which this link begins.
	StartIndex func() int
	// URI: get a the URI associated with the anchor specified by i of link_.
	//
	// Multiple anchors are primarily used by client-side image maps.
	//
	// The function takes the following parameters:
	//
	//   - i: (zero-index) integer specifying the desired anchor.
	//
	// The function returns the following values:
	//
	//   - utf8: string specifying the URI.
	URI func(i int) string
	// IsSelectedLink determines whether this AtkHyperlink is selected
	//
	// Deprecated: Please use ATK_STATE_FOCUSABLE for all links, and
	// ATK_STATE_FOCUSED for focused links.
	//
	// The function returns the following values:
	//
	//   - ok: true if the AtkHyperlink is selected, False otherwise.
	IsSelectedLink func() bool
	// IsValid: since the document that a link is associated with may have
	// changed this method returns TRUE if the link is still valid (with respect
	// to the document it references) and FALSE otherwise.
	//
	// The function returns the following values:
	//
	//   - ok: whether or not this link is still valid.
	IsValid       func() bool
	LinkActivated func()
	LinkState     func() uint
}

HyperlinkOverrides contains methods that are overridable.

type HyperlinkStateFlags

type HyperlinkStateFlags C.guint

HyperlinkStateFlags describes the type of link.

const (
	// HyperlinkIsInline: link is inline.
	HyperlinkIsInline HyperlinkStateFlags = 0b1
)

func (HyperlinkStateFlags) Has

Has returns true if h contains other.

func (HyperlinkStateFlags) String

func (h HyperlinkStateFlags) String() string

String returns the names in string for HyperlinkStateFlags.

type Hypertext

type Hypertext struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Hypertext: ATK interface which provides standard mechanism for manipulating hyperlinks.

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.

Hypertext wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Hypertext) ConnectLinkSelected

func (hypertext *Hypertext) ConnectLinkSelected(f func(arg1 int)) coreglib.SignalHandle

ConnectLinkSelected: "link-selected" signal is emitted by an AtkHyperText object when one of the hyperlinks associated with the object is selected.

func (hypertext *Hypertext) Link(linkIndex int) *Hyperlink

Link gets the link in this hypertext document at index link_index.

The function takes the following parameters:

  • linkIndex: integer specifying the desired link.

The function returns the following values:

  • hyperlink: link in this hypertext document at index link_index.

func (*Hypertext) LinkIndex

func (hypertext *Hypertext) LinkIndex(charIndex int) int

LinkIndex gets the index into the array of hyperlinks that is associated with the character specified by char_index.

The function takes the following parameters:

  • charIndex: character index.

The function returns the following values:

  • gint: index into the array of hyperlinks in hypertext, or -1 if there is no hyperlink associated with this character.
func (hypertext *Hypertext) NLinks() int

NLinks gets the number of links within this hypertext document.

The function returns the following values:

  • gint: number of links within this hypertext document.

type HypertextIface added in v0.0.5

type HypertextIface struct {
	// contains filtered or unexported fields
}

HypertextIface: instance of this type is always passed by reference.

type Hypertexter

type Hypertexter interface {
	coreglib.Objector

	// Link gets the link in this hypertext document at index link_index.
	Link(linkIndex int) *Hyperlink
	// LinkIndex gets the index into the array of hyperlinks that is associated
	// with the character specified by char_index.
	LinkIndex(charIndex int) int
	// NLinks gets the number of links within this hypertext document.
	NLinks() int

	// Link-selected: "link-selected" signal is emitted by an AtkHyperText
	// object when one of the hyperlinks associated with the object is selected.
	ConnectLinkSelected(func(arg1 int)) coreglib.SignalHandle
}

Hypertexter describes Hypertext's interface methods.

type Image

type Image struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Image: ATK Interface implemented by components which expose image or pixmap content on-screen.

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.

Image primarily provides two types of information: coordinate information (useful for screen review mode of screenreaders, and for use by onscreen magnifiers), and descriptive information. The descriptive information is provided for alternative, text-only presentation of the most significant information present in the image.

Image wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Image) ImageDescription

func (image *Image) ImageDescription() string

ImageDescription: get a textual description of this image.

The function returns the following values:

  • utf8: string representing the image description.

func (*Image) ImageLocale

func (image *Image) ImageLocale() string

ImageLocale retrieves the locale identifier associated to the Image.

The function returns the following values:

  • utf8 (optional): string corresponding to the POSIX LC_MESSAGES locale used by the image description, or NULL if the image does not specify a locale.

func (*Image) ImagePosition

func (image *Image) ImagePosition(coordType CoordType) (x, y int)

ImagePosition gets the position of the image in the form of a point specifying the images top-left corner.

If the position can not be obtained (e.g. missing support), x and y are set to -1.

The function takes the following parameters:

  • coordType specifies whether the coordinates are relative to the screen or to the components top level window.

The function returns the following values:

  • x (optional) address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
  • y (optional) address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained.

func (*Image) ImageSize

func (image *Image) ImageSize() (width, height int)

ImageSize: get the width and height in pixels for the specified image. The values of width and height are returned as -1 if the values cannot be obtained (for instance, if the object is not onscreen).

If the size can not be obtained (e.g. missing support), x and y are set to -1.

The function returns the following values:

  • width (optional): filled with the image width, or -1 if the value cannot be obtained.
  • height (optional): filled with the image height, or -1 if the value cannot be obtained.

func (*Image) SetImageDescription

func (image *Image) SetImageDescription(description string) bool

SetImageDescription sets the textual description for this image.

The function takes the following parameters:

  • description: string description to set for image.

The function returns the following values:

  • ok: boolean TRUE, or FALSE if operation could not be completed.

type ImageIface added in v0.0.5

type ImageIface struct {
	// contains filtered or unexported fields
}

ImageIface: instance of this type is always passed by reference.

type Imager

type Imager interface {
	coreglib.Objector

	// ImageDescription: get a textual description of this image.
	ImageDescription() string
	// ImageLocale retrieves the locale identifier associated to the Image.
	ImageLocale() string
	// ImagePosition gets the position of the image in the form of a point
	// specifying the images top-left corner.
	ImagePosition(coordType CoordType) (x, y int)
	// ImageSize: get the width and height in pixels for the specified image.
	ImageSize() (width, height int)
	// SetImageDescription sets the textual description for this image.
	SetImageDescription(description string) bool
}

Imager describes Image's interface methods.

type ImplementorIface

type ImplementorIface struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

ImplementorIface: atkImplementor interface is implemented by objects for which AtkObject peers may be obtained via calls to iface->(ref_accessible)(implementor);.

ImplementorIface wraps an interface. This means the user can get the underlying type by calling Cast().

func BaseImplementorIface

func BaseImplementorIface(obj ImplementorIfacer) *ImplementorIface

BaseImplementorIface returns the underlying base object.

type ImplementorIfacer

type ImplementorIfacer interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

ImplementorIfacer describes ImplementorIface's interface methods.

type KeyEventStruct

type KeyEventStruct struct {
	// contains filtered or unexported fields
}

KeyEventStruct encapsulates information about a key event.

An instance of this type is always passed by reference.

func (*KeyEventStruct) Keycode

func (k *KeyEventStruct) Keycode() uint16

Keycode: raw hardware code that generated the key event. This field is raraly useful.

func (*KeyEventStruct) Keyval

func (k *KeyEventStruct) Keyval() uint

Keyval: guint representing a keysym value corresponding to those used by GDK and X11: see /usr/X11/include/keysymdef.h.

func (*KeyEventStruct) Length

func (k *KeyEventStruct) Length() int

Length: length of member #string.

func (*KeyEventStruct) SetKeycode

func (k *KeyEventStruct) SetKeycode(keycode uint16)

Keycode: raw hardware code that generated the key event. This field is raraly useful.

func (*KeyEventStruct) SetKeyval

func (k *KeyEventStruct) SetKeyval(keyval uint)

Keyval: guint representing a keysym value corresponding to those used by GDK and X11: see /usr/X11/include/keysymdef.h.

func (*KeyEventStruct) SetLength

func (k *KeyEventStruct) SetLength(length int)

Length: length of member #string.

func (*KeyEventStruct) SetState

func (k *KeyEventStruct) SetState(state uint)

State: bitmask representing the state of the modifier keys immediately after the event takes place. The meaning of the bits is currently defined to match the bitmask used by GDK in GdkEventType.state, see http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.htmlEventKey.

func (*KeyEventStruct) SetTimestamp

func (k *KeyEventStruct) SetTimestamp(timestamp uint32)

Timestamp: timestamp in milliseconds indicating when the event occurred. These timestamps are relative to a starting point which should be considered arbitrary, and only used to compare the dispatch times of events to one another.

func (*KeyEventStruct) SetType

func (k *KeyEventStruct) SetType(typ int)

Type: atkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE.

func (*KeyEventStruct) State

func (k *KeyEventStruct) State() uint

State: bitmask representing the state of the modifier keys immediately after the event takes place. The meaning of the bits is currently defined to match the bitmask used by GDK in GdkEventType.state, see http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.htmlEventKey.

func (*KeyEventStruct) String

func (k *KeyEventStruct) String() string

String: string containing one of the following: either a string approximating the text that would result from this keypress, if the key is a control or graphic character, or a symbolic name for this keypress. Alphanumeric and printable keys will have the symbolic key name in this string member, for instance "A". "0", "semicolon", "aacute". Keypad keys have the prefix "KP".

func (*KeyEventStruct) Timestamp

func (k *KeyEventStruct) Timestamp() uint32

Timestamp: timestamp in milliseconds indicating when the event occurred. These timestamps are relative to a starting point which should be considered arbitrary, and only used to compare the dispatch times of events to one another.

func (*KeyEventStruct) Type

func (k *KeyEventStruct) Type() int

Type: atkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE.

type KeyEventType

type KeyEventType C.gint

KeyEventType specifies the type of a keyboard evemt.

const (
	// KeyEventPress specifies a key press event.
	KeyEventPress KeyEventType = iota
	// KeyEventRelease specifies a key release event.
	KeyEventRelease
	// KeyEventLastDefined: not a valid value; specifies end of enumeration.
	KeyEventLastDefined
)

func (KeyEventType) String

func (k KeyEventType) String() string

String returns the name in string for KeyEventType.

type KeySnoopFunc

type KeySnoopFunc func(event *KeyEventStruct) (gint int)

KeySnoopFunc is a type of callback which is called whenever a key event occurs, if registered via atk_add_key_event_listener. It allows for pre-emptive interception of key events via the return code as described below.

type Layer

type Layer C.gint

Layer describes the layer of a component

These enumerated "layer values" are used when determining which UI rendering layer a component is drawn into, which can help in making determinations of when components occlude one another.

const (
	// LayerInvalid: object does not have a layer.
	LayerInvalid Layer = iota
	// LayerBackground: this layer is reserved for the desktop background.
	LayerBackground
	// LayerCanvas: this layer is used for Canvas components.
	LayerCanvas
	// LayerWidget: this layer is normally used for components.
	LayerWidget
	// LayerMDI: this layer is used for layered components.
	LayerMDI
	// LayerPopup: this layer is used for popup components, such as menus.
	LayerPopup
	// LayerOverlay: this layer is reserved for future use.
	LayerOverlay
	// LayerWindow: this layer is used for toplevel windows.
	LayerWindow
)

func (Layer) String

func (l Layer) String() string

String returns the name in string for Layer.

type Live added in v0.3.0

type Live C.gint

Live: enumeration used to indicate a type of live region and how assertive it should be in terms of speaking notifications. Currently, this is only used for "notification" events, but it may be used for additional purposes in the future.

const (
	// LiveNone: no live region.
	LiveNone Live = iota
	// LivePolite: this live region should be considered polite.
	LivePolite
	// LiveAssertive: this live region should be considered assertive.
	LiveAssertive
)

func (Live) String added in v0.3.0

func (l Live) String() string

String returns the name in string for Live.

type Misc

type Misc struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Misc: set of ATK utility functions for thread locking

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

func MiscGetInstance deprecated

func MiscGetInstance() *Misc

MiscGetInstance: obtain the singleton instance of AtkMisc for this application.

Deprecated: Since 2.12.

The function returns the following values:

  • misc: singleton instance of AtkMisc for this application.

func (*Misc) ThreadsEnter deprecated

func (misc *Misc) ThreadsEnter()

ThreadsEnter: take the thread mutex for the GUI toolkit, if one exists. (This method is implemented by the toolkit ATK implementation layer; for instance, for GTK+, GAIL implements this via GDK_THREADS_ENTER).

Deprecated: Since 2.12.

func (*Misc) ThreadsLeave deprecated

func (misc *Misc) ThreadsLeave()

ThreadsLeave: release the thread mutex for the GUI toolkit, if one exists. This method, and atk_misc_threads_enter, are needed in some situations by threaded application code which services ATK requests, since fulfilling ATK requests often requires calling into the GUI toolkit. If a long-running or potentially blocking call takes place inside such a block, it should be bracketed by atk_misc_threads_leave/atk_misc_threads_enter calls. (This method is implemented by the toolkit ATK implementation layer; for instance, for GTK+, GAIL implements this via GDK_THREADS_LEAVE).

Deprecated: Since 2.12.

type MiscClass added in v0.0.5

type MiscClass struct {
	// contains filtered or unexported fields
}

MiscClass: usage of AtkMisc is deprecated since 2.12 and heavily discouraged.

An instance of this type is always passed by reference.

func (*MiscClass) Vfuncs added in v0.0.5

func (m *MiscClass) Vfuncs() [32]unsafe.Pointer

type MiscOverrides added in v0.0.5

type MiscOverrides struct {
	// ThreadsEnter: take the thread mutex for the GUI toolkit, if one exists.
	// (This method is implemented by the toolkit ATK implementation layer;
	// for instance, for GTK+, GAIL implements this via GDK_THREADS_ENTER).
	//
	// Deprecated: Since 2.12.
	ThreadsEnter func()
	// ThreadsLeave: release the thread mutex for the GUI toolkit,
	// if one exists. This method, and atk_misc_threads_enter, are needed
	// in some situations by threaded application code which services ATK
	// requests, since fulfilling ATK requests often requires calling
	// into the GUI toolkit. If a long-running or potentially blocking
	// call takes place inside such a block, it should be bracketed by
	// atk_misc_threads_leave/atk_misc_threads_enter calls. (This method is
	// implemented by the toolkit ATK implementation layer; for instance,
	// for GTK+, GAIL implements this via GDK_THREADS_LEAVE).
	//
	// Deprecated: Since 2.12.
	ThreadsLeave func()
}

MiscOverrides contains methods that are overridable.

type NoOpObject

type NoOpObject struct {
	AtkObject

	*coreglib.Object
	Action
	Component
	Document
	EditableText
	Hypertext
	Image
	Selection
	Table
	TableCell
	Text
	Value
	Window
	// contains filtered or unexported fields
}

NoOpObject: atkObject which purports to implement all ATK interfaces.

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.

func NewNoOpObject

func NewNoOpObject(obj *coreglib.Object) *NoOpObject

NewNoOpObject provides a default (non-functioning stub) Object. Application maintainers should not use this method.

The function takes the following parameters:

  • obj: #GObject.

The function returns the following values:

  • noOpObject: default (non-functioning stub) Object.

type NoOpObjectClass added in v0.0.5

type NoOpObjectClass struct {
	// contains filtered or unexported fields
}

NoOpObjectClass: instance of this type is always passed by reference.

func (*NoOpObjectClass) ParentClass added in v0.0.5

func (n *NoOpObjectClass) ParentClass() *ObjectClass

type NoOpObjectFactory

type NoOpObjectFactory struct {
	ObjectFactory
	// contains filtered or unexported fields
}

NoOpObjectFactory: atkObjectFactory which creates an AtkNoOpObject.

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.

func NewNoOpObjectFactory

func NewNoOpObjectFactory() *NoOpObjectFactory

NewNoOpObjectFactory creates an instance of an ObjectFactory which generates primitive (non-functioning) Objects.

The function returns the following values:

  • noOpObjectFactory: instance of an ObjectFactory.

type NoOpObjectFactoryClass added in v0.0.5

type NoOpObjectFactoryClass struct {
	// contains filtered or unexported fields
}

NoOpObjectFactoryClass: instance of this type is always passed by reference.

func (*NoOpObjectFactoryClass) ParentClass added in v0.0.5

func (n *NoOpObjectFactoryClass) ParentClass() *ObjectFactoryClass

type NoOpObjectFactoryOverrides added in v0.0.5

type NoOpObjectFactoryOverrides struct {
}

NoOpObjectFactoryOverrides contains methods that are overridable.

type NoOpObjectOverrides added in v0.0.5

type NoOpObjectOverrides struct {
}

NoOpObjectOverrides contains methods that are overridable.

type ObjectClass

type ObjectClass struct {
	// contains filtered or unexported fields
}

ObjectClass: instance of this type is always passed by reference.

type ObjectFactory

type ObjectFactory struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

ObjectFactory: base object class for a factory used to create accessible objects for objects of a specific GType.

This class is the base object class for a factory used to create an accessible object for a specific GType. The function atk_registry_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.

func (*ObjectFactory) AccessibleType

func (factory *ObjectFactory) AccessibleType() coreglib.Type

AccessibleType gets the GType of the accessible which is created by the factory.

The function returns the following values:

  • gType: type of the accessible which is created by the factory. The value G_TYPE_INVALID is returned if no type if found.

func (*ObjectFactory) CreateAccessible

func (factory *ObjectFactory) CreateAccessible(obj *coreglib.Object) *AtkObject

CreateAccessible provides an Object that implements an accessibility interface on behalf of obj.

The function takes the following parameters:

  • obj: #GObject.

The function returns the following values:

  • object that implements an accessibility interface on behalf of obj.

func (*ObjectFactory) Invalidate

func (factory *ObjectFactory) Invalidate()

Invalidate: inform factory that it is no longer being used to create accessibles. When called, factory may need to inform Objects which it has created that they need to be re-instantiated. Note: primarily used for runtime replacement of ObjectFactorys in object registries.

type ObjectFactoryClass added in v0.0.5

type ObjectFactoryClass struct {
	// contains filtered or unexported fields
}

ObjectFactoryClass: instance of this type is always passed by reference.

type ObjectFactoryOverrides added in v0.0.5

type ObjectFactoryOverrides struct {
	// Invalidate: inform factory that it is no longer being used to create
	// accessibles. When called, factory may need to inform Objects which it has
	// created that they need to be re-instantiated. Note: primarily used for
	// runtime replacement of ObjectFactorys in object registries.
	Invalidate func()
}

ObjectFactoryOverrides contains methods that are overridable.

type Plug

type Plug struct {
	AtkObject

	*coreglib.Object
	Component
	// contains filtered or unexported fields
}

Plug: toplevel for embedding into other processes

See atksocket.

func NewPlug

func NewPlug() *Plug

NewPlug creates a new Plug instance.

The function returns the following values:

  • plug: newly created Plug.

func (*Plug) ID

func (plug *Plug) ID() string

ID gets the unique ID of an Plug object, which can be used to embed inside of an Socket using atk_socket_embed().

Internally, this calls a class function that should be registered by the IPC layer (usually at-spi2-atk). The implementor of an Plug object should call this function (after atk-bridge is loaded) and pass the value to the process implementing the Socket, so it could embed the plug.

The function returns the following values:

  • utf8: unique ID for the plug.

func (*Plug) SetChild

func (plug *Plug) SetChild(child *AtkObject)

SetChild sets child as accessible child of plug and plug as accessible parent of child. child can be NULL.

In some cases, one can not use the AtkPlug type directly as accessible object for the toplevel widget of the application. For instance in the gtk case, GtkPlugAccessible can not inherit both from GtkWindowAccessible and from AtkPlug. In such a case, one can create, in addition to the standard accessible object for the toplevel widget, an AtkPlug object, and make the former the child of the latter by calling atk_plug_set_child().

The function takes the following parameters:

  • child to be set as accessible child of plug.

type PlugClass added in v0.0.5

type PlugClass struct {
	// contains filtered or unexported fields
}

PlugClass: instance of this type is always passed by reference.

func (*PlugClass) ParentClass added in v0.0.5

func (p *PlugClass) ParentClass() *ObjectClass

type PlugOverrides added in v0.0.5

type PlugOverrides struct {
	ObjectID func() string
}

PlugOverrides contains methods that are overridable.

type PropertyValues

type PropertyValues struct {
	// contains filtered or unexported fields
}

PropertyValues: note: old_value field of PropertyValues will not contain a valid value. This is a field defined with the purpose of contain the previous value of the property, but is not used anymore.

An instance of this type is always passed by reference.

func (*PropertyValues) PropertyName

func (p *PropertyValues) PropertyName() string

PropertyName: name of the ATK property which has changed.

type Range

type Range struct {
	// contains filtered or unexported fields
}

Range: given range or subrange, to be used with Value

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.

An instance of this type is always passed by reference.

func NewRange

func NewRange(lowerLimit float64, upperLimit float64, description string) *Range

NewRange constructs a struct Range.

func (*Range) Copy

func (src *Range) Copy() *Range

Copy returns a new Range that is a exact copy of src.

The function returns the following values:

  • _range: new Range copy of src.

func (*Range) Description

func (_range *Range) Description() string

Description returns the human readable description of range.

The function returns the following values:

  • utf8: human-readable description of range.

func (*Range) LowerLimit

func (_range *Range) LowerLimit() float64

LowerLimit returns the lower limit of range.

The function returns the following values:

  • gdouble: lower limit of range.

func (*Range) UpperLimit

func (_range *Range) UpperLimit() float64

UpperLimit returns the upper limit of range.

The function returns the following values:

  • gdouble: upper limit of range.

type Rectangle

type Rectangle struct {
	// contains filtered or unexported fields
}

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

An instance of this type is always passed by reference.

func NewRectangle

func NewRectangle(x, y, width, height int) Rectangle

NewRectangle creates a new Rectangle instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!

func (*Rectangle) Height

func (r *Rectangle) Height() int

Height: height of the rectangle.

func (*Rectangle) SetHeight

func (r *Rectangle) SetHeight(height int)

Height: height of the rectangle.

func (*Rectangle) SetWidth

func (r *Rectangle) SetWidth(width int)

Width: width of the rectangle.

func (*Rectangle) SetX

func (r *Rectangle) SetX(x int)

X coordinate of the left side of the rectangle.

func (*Rectangle) SetY

func (r *Rectangle) SetY(y int)

Y coordinate of the top side of the rectangle.

func (*Rectangle) Width

func (r *Rectangle) Width() int

Width: width of the rectangle.

func (*Rectangle) X

func (r *Rectangle) X() int

X coordinate of the left side of the rectangle.

func (*Rectangle) Y

func (r *Rectangle) Y() int

Y coordinate of the top side of the rectangle.

type Registry

type Registry struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Registry: object used to store the GType of the factories used to create an accessible object for an object of a particular GType.

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.

func GetDefaultRegistry

func GetDefaultRegistry() *Registry

GetDefaultRegistry gets a default implementation of the ObjectFactory/type registry. Note: For most toolkit maintainers, this will be the correct registry for registering new Object factories. Following a call to this function, maintainers may call atk_registry_set_factory_type() to associate an ObjectFactory subclass with the GType of objects for whom accessibility information will be provided.

The function returns the following values:

  • registry: default implementation of the ObjectFactory/type registry.

func (*Registry) Factory

func (registry *Registry) Factory(typ coreglib.Type) *ObjectFactory

Factory gets an ObjectFactory appropriate for creating Objects appropriate for type.

The function takes the following parameters:

  • typ with which to look up the associated ObjectFactory.

The function returns the following values:

  • objectFactory appropriate for creating Objects appropriate for type.

func (*Registry) FactoryType

func (registry *Registry) FactoryType(typ coreglib.Type) coreglib.Type

FactoryType provides a #GType indicating the ObjectFactory subclass associated with type.

The function takes the following parameters:

  • typ with which to look up the associated ObjectFactory subclass.

The function returns the following values:

  • gType associated with type type.

func (*Registry) SetFactoryType

func (registry *Registry) SetFactoryType(typ, factoryType coreglib.Type)

SetFactoryType: associate an ObjectFactory subclass with a #GType. Note: The associated factory_type will thereafter be responsible for the creation of new Object implementations for instances appropriate for type.

The function takes the following parameters:

  • typ: Object type.
  • factoryType type to associate with type. Must implement AtkObject appropriate for type.

type RegistryClass added in v0.0.5

type RegistryClass struct {
	// contains filtered or unexported fields
}

RegistryClass: instance of this type is always passed by reference.

type RegistryOverrides added in v0.0.5

type RegistryOverrides struct {
}

RegistryOverrides contains methods that are overridable.

type Relation

type Relation struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Relation: object used to describe a relation between a object and one or more other objects.

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.

func NewRelation

func NewRelation(targets []*AtkObject, relationship RelationType) *Relation

NewRelation: create a new relation for the specified key and the specified list of targets. See also atk_object_add_relationship().

The function takes the following parameters:

  • targets: array of pointers to Objects.
  • relationship with which to create the new Relation.

The function returns the following values:

  • relation: pointer to a new Relation.

func (*Relation) AddTarget

func (relation *Relation) AddTarget(target *AtkObject)

AddTarget adds the specified AtkObject to the target for the relation, if it is not already present. See also atk_object_add_relationship().

The function takes the following parameters:

  • target: Object.

func (*Relation) RelationType

func (relation *Relation) RelationType() RelationType

RelationType gets the type of relation.

The function returns the following values:

  • relationType: type of relation.

func (*Relation) RemoveTarget

func (relation *Relation) RemoveTarget(target *AtkObject) bool

RemoveTarget: remove the specified AtkObject from the target for the relation.

The function takes the following parameters:

  • target: Object.

The function returns the following values:

  • ok: TRUE if the removal is successful.

type RelationClass added in v0.0.5

type RelationClass struct {
	// contains filtered or unexported fields
}

RelationClass: instance of this type is always passed by reference.

type RelationOverrides added in v0.0.5

type RelationOverrides struct {
}

RelationOverrides contains methods that are overridable.

type RelationSet

type RelationSet struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

RelationSet: set of AtkRelations, normally the set of AtkRelations which an AtkObject has.

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.

func NewRelationSet

func NewRelationSet() *RelationSet

NewRelationSet creates a new empty relation set.

The function returns the following values:

  • relationSet: new RelationSet.

func (*RelationSet) Add

func (set *RelationSet) Add(relation *Relation)

Add a new relation to the current relation set if it is not already present. This function ref's the AtkRelation so the caller of this function should unref it to ensure that it will be destroyed when the AtkRelationSet is destroyed.

The function takes the following parameters:

  • relation: Relation.

func (*RelationSet) AddRelationByType

func (set *RelationSet) AddRelationByType(relationship RelationType, target *AtkObject)

AddRelationByType: add a new relation of the specified type with the specified target to the current relation set if the relation set does not contain a relation of that type. If it is does contain a relation of that typea the target is added to the relation.

The function takes the following parameters:

  • relationship: RelationType.
  • target: Object.

func (*RelationSet) Contains

func (set *RelationSet) Contains(relationship RelationType) bool

Contains determines whether the relation set contains a relation that matches the specified type.

The function takes the following parameters:

  • relationship: RelationType.

The function returns the following values:

  • ok: TRUE if relationship is the relationship type of a relation in set, FALSE otherwise.

func (*RelationSet) ContainsTarget

func (set *RelationSet) ContainsTarget(relationship RelationType, target *AtkObject) bool

ContainsTarget determines whether the relation set contains a relation that matches the specified pair formed by type relationship and object target.

The function takes the following parameters:

  • relationship: RelationType.
  • target: Object.

The function returns the following values:

  • ok: TRUE if set contains a relation with the relationship type relationship with an object target, FALSE otherwise.

func (*RelationSet) NRelations

func (set *RelationSet) NRelations() int

NRelations determines the number of relations in a relation set.

The function returns the following values:

  • gint: integer representing the number of relations in the set.

func (*RelationSet) Relation

func (set *RelationSet) Relation(i int) *Relation

Relation determines the relation at the specified position in the relation set.

The function takes the following parameters:

  • i: gint representing a position in the set, starting from 0.

The function returns the following values:

  • relation which is the relation at position i in the set.

func (*RelationSet) RelationByType

func (set *RelationSet) RelationByType(relationship RelationType) *Relation

RelationByType finds a relation that matches the specified type.

The function takes the following parameters:

  • relationship: RelationType.

The function returns the following values:

  • relation which is a relation matching the specified type.

func (*RelationSet) Remove

func (set *RelationSet) Remove(relation *Relation)

Remove removes a relation from the relation set. This function unref's the Relation so it will be deleted unless there is another reference to it.

The function takes the following parameters:

  • relation: Relation.

type RelationSetClass added in v0.0.5

type RelationSetClass struct {
	// contains filtered or unexported fields
}

RelationSetClass: instance of this type is always passed by reference.

type RelationSetOverrides added in v0.0.5

type RelationSetOverrides struct {
}

RelationSetOverrides contains methods that are overridable.

type RelationType

type RelationType C.gint

RelationType describes the type of the relation.

const (
	// RelationNull: not used, represens "no relationship" or an error
	// condition.
	RelationNull RelationType = iota
	// RelationControlledBy indicates an object controlled by one or more target
	// objects.
	RelationControlledBy
	// RelationControllerFor indicates an object is an controller for one or
	// more target objects.
	RelationControllerFor
	// RelationLabelFor indicates an object is a label for one or more target
	// objects.
	RelationLabelFor
	// RelationLabelledBy indicates an object is labelled by one or more target
	// objects.
	RelationLabelledBy
	// RelationMemberOf indicates an object is a member of a group of one or
	// more target objects.
	RelationMemberOf
	// RelationNodeChildOf indicates an object is a cell in a treetable which is
	// displayed because a cell in the same column is expanded and identifies
	// that cell.
	RelationNodeChildOf
	// RelationFlowsTo indicates that the object has content that flows
	// logically to another AtkObject in a sequential way, (for instance
	// text-flow).
	RelationFlowsTo
	// RelationFlowsFrom indicates that the object has content that flows
	// logically from another AtkObject in a sequential way, (for instance
	// text-flow).
	RelationFlowsFrom
	// RelationSubwindowOf indicates a subwindow attached to a component but
	// otherwise has no connection in the UI heirarchy to that component.
	RelationSubwindowOf
	// RelationEmbeds indicates that the object visually embeds another object's
	// content, i.e. this object's content flows around another's content.
	RelationEmbeds
	// RelationEmbeddedBy: reciprocal of ATK_RELATION_EMBEDS, indicates that
	// this object's content is visualy embedded in another object.
	RelationEmbeddedBy
	// RelationPopupFor indicates that an object is a popup for another object.
	RelationPopupFor
	// RelationParentWindowOf indicates that an object is a parent window of
	// another object.
	RelationParentWindowOf
	// RelationDescribedBy: reciprocal of ATK_RELATION_DESCRIPTION_FOR.
	// Indicates that one or more target objects provide descriptive information
	// about this object. This relation type is most appropriate for information
	// that is not essential as its presentation may be user-configurable
	// and/or limited to an on-demand mechanism such as an assistive technology
	// command. For brief, essential information such as can be found in a
	// widget's on-screen label, use ATK_RELATION_LABELLED_BY. For an on-screen
	// error message, use ATK_RELATION_ERROR_MESSAGE. For lengthy extended
	// descriptive information contained in an on-screen object, consider using
	// ATK_RELATION_DETAILS as assistive technologies may provide a means for
	// the user to navigate to objects containing detailed descriptions so that
	// their content can be more closely reviewed.
	RelationDescribedBy
	// RelationDescriptionFor: reciprocal of ATK_RELATION_DESCRIBED_BY.
	// Indicates that this object provides descriptive information
	// about the target object(s). See also ATK_RELATION_DETAILS_FOR and
	// ATK_RELATION_ERROR_FOR.
	RelationDescriptionFor
	// RelationNodeParentOf indicates an object is a cell in a treetable and is
	// expanded to display other cells in the same column.
	RelationNodeParentOf
	// RelationDetails: reciprocal of ATK_RELATION_DETAILS_FOR. Indicates
	// that this object has a detailed or extended description, the contents
	// of which can be found in the target object(s). This relation type
	// is most appropriate for information that is sufficiently lengthy as
	// to make navigation to the container of that information desirable.
	// For less verbose information suitable for announcement only,
	// see ATK_RELATION_DESCRIBED_BY. If the detailed information describes an
	// error condition, ATK_RELATION_ERROR_FOR should be used instead. Since:
	// ATK-2.26.
	RelationDetails
	// RelationDetailsFor: reciprocal of ATK_RELATION_DETAILS. Indicates
	// that this object provides a detailed or extended description about
	// the target object(s). See also ATK_RELATION_DESCRIPTION_FOR and
	// ATK_RELATION_ERROR_FOR. Since: ATK-2.26.
	RelationDetailsFor
	// RelationErrorMessage: reciprocal of ATK_RELATION_ERROR_FOR. Indicates
	// that this object has one or more errors, the nature of which is described
	// in the contents of the target object(s). Objects that have this relation
	// type should also contain ATK_STATE_INVALID_ENTRY in their StateSet.
	// Since: ATK-2.26.
	RelationErrorMessage
	// RelationErrorFor: reciprocal of ATK_RELATION_ERROR_MESSAGE. Indicates
	// that this object contains an error message describing an invalid
	// condition in the target object(s). Since: ATK_2.26.
	RelationErrorFor
	// RelationLastDefined: not used, this value indicates the end of the
	// enumeration.
	RelationLastDefined
)

func RelationTypeForName

func RelationTypeForName(name string) RelationType

RelationTypeForName: get the RelationType type corresponding to a relation name.

The function takes the following parameters:

  • name: string which is the (non-localized) name of an ATK relation type.

The function returns the following values:

  • relationType enumerated type corresponding to the specified name, or K_RELATION_NULL if no matching relation type is found.

func RelationTypeRegister

func RelationTypeRegister(name string) RelationType

RelationTypeRegister: associate name with a new RelationType.

The function takes the following parameters:

  • name string.

The function returns the following values:

  • relationType associated with name.

func (RelationType) String

func (r RelationType) String() string

String returns the name in string for RelationType.

type Role

type Role C.gint

Role describes the role of an object

These are the built-in enumerated roles that UI components can have in ATK. Other roles may be added at runtime, so an AtkRole >= ATK_ROLE_LAST_DEFINED is not necessarily an error.

const (
	// RoleInvalid: invalid role.
	RoleInvalid Role = iota
	// RoleAccelLabel: label which represents an accelerator.
	RoleAccelLabel
	// RoleAlert: object which is an alert to the user. Assistive Technologies
	// typically respond to ATK_ROLE_ALERT by reading the entire onscreen
	// contents of containers advertising this role. Should be used for warning
	// dialogs, etc.
	RoleAlert
	// RoleAnimation: object which is an animated image.
	RoleAnimation
	// RoleArrow: arrow in one of the four cardinal directions.
	RoleArrow
	// RoleCalendar: object that displays a calendar and allows the user to
	// select a date.
	RoleCalendar
	// RoleCanvas: object that can be drawn into and is used to trap events.
	RoleCanvas
	// RoleCheckBox: choice that can be checked or unchecked and provides a
	// separate indicator for the current state.
	RoleCheckBox
	// RoleCheckMenuItem: menu item with a check box.
	RoleCheckMenuItem
	// RoleColorChooser: specialized dialog that lets the user choose a color.
	RoleColorChooser
	// RoleColumnHeader: header for a column of data.
	RoleColumnHeader
	// RoleComboBox: collapsible list of choices the user can select from.
	RoleComboBox
	// RoleDateEditor: object whose purpose is to allow a user to edit a date.
	RoleDateEditor
	// RoleDesktopIcon: inconifed internal frame within a DESKTOP_PANE.
	RoleDesktopIcon
	// RoleDesktopFrame: pane that supports internal frames and iconified
	// versions of those internal frames.
	RoleDesktopFrame
	// RoleDial: object whose purpose is to allow a user to set a value.
	RoleDial
	// RoleDialog: top level window with title bar and a border.
	RoleDialog
	// RoleDirectoryPane: pane that allows the user to navigate through and
	// select the contents of a directory.
	RoleDirectoryPane
	// RoleDrawingArea: object used for drawing custom user interface elements.
	RoleDrawingArea
	// RoleFileChooser: specialized dialog that lets the user choose a file.
	RoleFileChooser
	// RoleFiller: object that fills up space in a user interface.
	RoleFiller
	// RoleFontChooser: specialized dialog that lets the user choose a font.
	RoleFontChooser
	// RoleFrame: top level window with a title bar, border, menubar, etc.
	RoleFrame
	// RoleGlassPane: pane that is guaranteed to be painted on top of all panes
	// beneath it.
	RoleGlassPane
	// RoleHtmlContainer: document container for HTML, whose children represent
	// the document content.
	RoleHtmlContainer
	// RoleIcon: small fixed size picture, typically used to decorate
	// components.
	RoleIcon
	// RoleImage: object whose primary purpose is to display an image.
	RoleImage
	// RoleInternalFrame: frame-like object that is clipped by a desktop pane.
	RoleInternalFrame
	// RoleLabel: object used to present an icon or short string in an
	// interface.
	RoleLabel
	// RoleLayeredPane: specialized pane that allows its children to be drawn in
	// layers, providing a form of stacking order.
	RoleLayeredPane
	// RoleList: object that presents a list of objects to the user and allows
	// the user to select one or more of them.
	RoleList
	// RoleListItem: object that represents an element of a list.
	RoleListItem
	// RoleMenu: object usually found inside a menu bar that contains a list of
	// actions the user can choose from.
	RoleMenu
	// RoleMenuBar: object usually drawn at the top of the primary dialog box of
	// an application that contains a list of menus the user can choose from.
	RoleMenuBar
	// RoleMenuItem: object usually contained in a menu that presents an action
	// the user can choose.
	RoleMenuItem
	// RoleOptionPane: specialized pane whose primary use is inside a DIALOG.
	RoleOptionPane
	// RolePageTab: object that is a child of a page tab list.
	RolePageTab
	// RolePageTabList: object that presents a series of panels (or page tabs),
	// one at a time, through some mechanism provided by the object.
	RolePageTabList
	// RolePanel: generic container that is often used to group objects.
	RolePanel
	// RolePasswordText: text object uses for passwords, or other places where
	// the text content is not shown visibly to the user.
	RolePasswordText
	// RolePopupMenu: temporary window that is usually used to offer the user
	// a list of choices, and then hides when the user selects one of those
	// choices.
	RolePopupMenu
	// RoleProgressBar: object used to indicate how much of a task has been
	// completed.
	RoleProgressBar
	// RolePushButton: object the user can manipulate to tell the application to
	// do something.
	RolePushButton
	// RoleRadioButton: specialized check box that will cause other radio
	// buttons in the same group to become unchecked when this one is checked.
	RoleRadioButton
	// RoleRadioMenuItem: check menu item which belongs to a group. At each
	// instant exactly one of the radio menu items from a group is selected.
	RoleRadioMenuItem
	// RoleRootPane: specialized pane that has a glass pane and a layered pane
	// as its children.
	RoleRootPane
	// RoleRowHeader: header for a row of data.
	RoleRowHeader
	// RoleScrollBar: object usually used to allow a user to incrementally view
	// a large amount of data.
	RoleScrollBar
	// RoleScrollPane: object that allows a user to incrementally view a large
	// amount of information.
	RoleScrollPane
	// RoleSeparator: object usually contained in a menu to provide a visible
	// and logical separation of the contents in a menu.
	RoleSeparator
	// RoleSlider: object that allows the user to select from a bounded range.
	RoleSlider
	// RoleSplitPane: specialized panel that presents two other panels at the
	// same time.
	RoleSplitPane
	// RoleSpinButton: object used to get an integer or floating point number
	// from the user.
	RoleSpinButton
	// RoleStatusbar: object which reports messages of minor importance to the
	// user.
	RoleStatusbar
	// RoleTable: object used to represent information in terms of rows and
	// columns.
	RoleTable
	// RoleTableCell: cell in a table.
	RoleTableCell
	// RoleTableColumnHeader: header for a column of a table.
	RoleTableColumnHeader
	// RoleTableRowHeader: header for a row of a table.
	RoleTableRowHeader
	// RoleTearOffMenuItem: menu item used to tear off and reattach its menu.
	RoleTearOffMenuItem
	// RoleTerminal: object that represents an accessible terminal. (Since:
	// 0.6).
	RoleTerminal
	// RoleText: interactive widget that supports multiple lines of text and
	// optionally accepts user input, but whose purpose is not to solicit user
	// input. Thus ATK_ROLE_TEXT is appropriate for the text view in a plain
	// text editor but inappropriate for an input field in a dialog box or
	// web form. For widgets whose purpose is to solicit input from the user,
	// see ATK_ROLE_ENTRY and ATK_ROLE_PASSWORD_TEXT. For generic objects which
	// display a brief amount of textual information, see ATK_ROLE_STATIC.
	RoleText
	// RoleToggleButton: specialized push button that can be checked or
	// unchecked, but does not provide a separate indicator for the current
	// state.
	RoleToggleButton
	// RoleToolBar: bar or palette usually composed of push buttons or toggle
	// buttons.
	RoleToolBar
	// RoleToolTip: object that provides information about another object.
	RoleToolTip
	// RoleTree: object used to represent hierarchical information to the user.
	RoleTree
	// RoleTreeTable: object capable of expanding and collapsing rows as well as
	// showing multiple columns of data. (Since: 0.7).
	RoleTreeTable
	// RoleUnknown: object contains some Accessible information, but its role is
	// not known.
	RoleUnknown
	// RoleViewport: object usually used in a scroll pane.
	RoleViewport
	// RoleWindow: top level window with no title or border.
	RoleWindow
	// RoleHeader: object that serves as a document header. (Since: 1.1.1).
	RoleHeader
	// RoleFooter: object that serves as a document footer. (Since: 1.1.1).
	RoleFooter
	// RoleParagraph: object which is contains a paragraph of text content.
	// (Since: 1.1.1).
	RoleParagraph
	// RoleRuler: object which describes margins and tab stops, etc. for text
	// objects which it controls (should have CONTROLLER_FOR relation to such).
	// (Since: 1.1.1).
	RoleRuler
	// RoleApplication: object is an application object, which may contain
	// ATK_ROLE_FRAME objects or other types of accessibles. The root accessible
	// of any application's ATK hierarchy should have ATK_ROLE_APPLICATION.
	// (Since: 1.1.4).
	RoleApplication
	// RoleAutocomplete: object is a dialog or list containing items for
	// insertion into an entry widget, for instance a list of words for
	// completion of a text entry. (Since: 1.3).
	RoleAutocomplete
	// RoleEditbar: object is an editable text object in a toolbar. (Since:
	// 1.5).
	RoleEditbar
	// RoleEmbedded: object is an embedded container within a document or panel.
	// This role is a grouping "hint" indicating that the contained objects
	// share a context. (Since: 1.7.2).
	RoleEmbedded
	// RoleEntry: object is a component whose textual content may be entered
	// or modified by the user, provided ATK_STATE_EDITABLE is present. (Since:
	// 1.11).
	RoleEntry
	// RoleChart: object is a graphical depiction of quantitative data.
	// It may contain multiple subelements whose attributes and/or description
	// may be queried to obtain both the quantitative data and information
	// about how the data is being presented. The LABELLED_BY relation is
	// particularly important in interpreting objects of this type, as is the
	// accessible-description property. (Since: 1.11).
	RoleChart
	// RoleCaption: object contains descriptive information, usually textual,
	// about another user interface element such as a table, chart, or image.
	// (Since: 1.11).
	RoleCaption
	// RoleDocumentFrame: object is a visual frame or container which
	// contains a view of document content. Document frames may occur within
	// another Document instance, in which case the second document may be
	// said to be embedded in the containing instance. HTML frames are often
	// ROLE_DOCUMENT_FRAME. Either this object, or a singleton descendant,
	// should implement the Document interface. (Since: 1.11).
	RoleDocumentFrame
	// RoleHeading: object serves as a heading for content which follows it
	// in a document. The 'heading level' of the heading, if availabe, may be
	// obtained by querying the object's attributes.
	RoleHeading
	// RolePage: object is a containing instance which encapsulates a page of
	// information. ATK_ROLE_PAGE is used in documents and content which support
	// a paginated navigation model. (Since: 1.11).
	RolePage
	// RoleSection: object is a containing instance of document content which
	// constitutes a particular 'logical' section of the document. The type of
	// content within a section, and the nature of the section division itself,
	// may be obtained by querying the object's attributes. Sections may be
	// nested. (Since: 1.11).
	RoleSection
	// RoleRedundantObject: object is redundant with another object in the
	// hierarchy, and is exposed for purely technical reasons. Objects of this
	// role should normally be ignored by clients. (Since: 1.11).
	RoleRedundantObject
	// RoleForm: object is a container for form controls, for instance as
	// part of a web form or user-input form within a document. This role
	// is primarily a tag/convenience for clients when navigating complex
	// documents, it is not expected that ordinary GUI containers will always
	// have ATK_ROLE_FORM. (Since: 1.12.0).
	RoleForm
	// RoleLink: object is a hypertext anchor, i.e. a "link" in a hypertext
	// document. Such objects are distinct from 'inline' content which may also
	// use the Hypertext/Hyperlink interfaces to indicate the range/location
	// within a text object where an inline or embedded object lies. (Since:
	// 1.12.1).
	RoleLink
	// RoleInputMethodWindow: object is a window or similar viewport which is
	// used to allow composition or input of a 'complex character', in other
	// words it is an "input method window." (Since: 1.12.1).
	RoleInputMethodWindow
	// RoleTableRow: row in a table. (Since: 2.1.0).
	RoleTableRow
	// RoleTreeItem: object that represents an element of a tree. (Since:
	// 2.1.0).
	RoleTreeItem
	// RoleDocumentSpreadsheet: document frame which contains a spreadsheet.
	// (Since: 2.1.0).
	RoleDocumentSpreadsheet
	// RoleDocumentPresentation: document frame which contains a presentation or
	// slide content. (Since: 2.1.0).
	RoleDocumentPresentation
	// RoleDocumentText: document frame which contains textual content, such as
	// found in a word processing application. (Since: 2.1.0).
	RoleDocumentText
	// RoleDocumentWeb: document frame which contains HTML or other markup
	// suitable for display in a web browser. (Since: 2.1.0).
	RoleDocumentWeb
	// RoleDocumentEmail: document frame which contains email content to be
	// displayed or composed either in plain text or HTML. (Since: 2.1.0).
	RoleDocumentEmail
	// RoleComment: object found within a document and designed to present a
	// comment, note, or other annotation. In some cases, this object might not
	// be visible until activated. (Since: 2.1.0).
	RoleComment
	// RoleListBox: non-collapsible list of choices the user can select from.
	// (Since: 2.1.0).
	RoleListBox
	// RoleGrouping: group of related widgets. This group typically has a label.
	// (Since: 2.1.0).
	RoleGrouping
	// RoleImageMap: image map object. Usually a graphic with multiple hotspots,
	// where each hotspot can be activated resulting in the loading of another
	// document or section of a document. (Since: 2.1.0).
	RoleImageMap
	// RoleNotification: transitory object designed to present a message to the
	// user, typically at the desktop level rather than inside a particular
	// application. (Since: 2.1.0).
	RoleNotification
	// RoleInfoBar: object designed to present a message to the user within an
	// existing window. (Since: 2.1.0).
	RoleInfoBar
	// RoleLevelBar: bar that serves as a level indicator to, for instance, show
	// the strength of a password or the state of a battery. (Since: 2.7.3).
	RoleLevelBar
	// RoleTitleBar: bar that serves as the title of a window or a dialog.
	// (Since: 2.12).
	RoleTitleBar
	// RoleBlockQuote: object which contains a text section that is quoted from
	// another source. (Since: 2.12).
	RoleBlockQuote
	// RoleAudio: object which represents an audio element. (Since: 2.12).
	RoleAudio
	// RoleVideo: object which represents a video element. (Since: 2.12).
	RoleVideo
	// RoleDefinition: definition of a term or concept. (Since: 2.12).
	RoleDefinition
	// RoleArticle: section of a page that consists of a composition that forms
	// an independent part of a document, page, or site. Examples: A blog entry,
	// a news story, a forum post. (Since: 2.12).
	RoleArticle
	// RoleLandmark: region of a web page intended as a navigational landmark.
	// This is designed to allow Assistive Technologies to provide quick
	// navigation among key regions within a document. (Since: 2.12).
	RoleLandmark
	// RoleLog: text widget or container holding log content, such as chat
	// history and error logs. In this role there is a relationship between the
	// arrival of new items in the log and the reading order. The log contains
	// a meaningful sequence and new information is added only to the end of the
	// log, not at arbitrary points. (Since: 2.12).
	RoleLog
	// RoleMarquee: container where non-essential information changes
	// frequently. Common usages of marquee include stock tickers and ad
	// banners. The primary difference between a marquee and a log is that logs
	// usually have a meaningful order or sequence of important content changes.
	// (Since: 2.12).
	RoleMarquee
	// RoleMath: text widget or container that holds a mathematical expression.
	// (Since: 2.12).
	RoleMath
	// RoleRating: widget whose purpose is to display a rating, such as the
	// number of stars associated with a song in a media player. Objects of this
	// role should also implement AtkValue. (Since: 2.12).
	RoleRating
	// RoleTimer: object containing a numerical counter which indicates an
	// amount of elapsed time from a start point, or the time remaining until an
	// end point. (Since: 2.12).
	RoleTimer
	// RoleDescriptionList: object that represents a list of term-value groups.
	// A term-value group represents a individual description and consist of one
	// or more names (ATK_ROLE_DESCRIPTION_TERM) followed by one or more values
	// (ATK_ROLE_DESCRIPTION_VALUE). For each list, there should not be more
	// than one group with the same term name. (Since: 2.12).
	RoleDescriptionList
	// RoleDescriptionTerm: object that represents a term or phrase with a
	// corresponding definition. (Since: 2.12).
	RoleDescriptionTerm
	// RoleDescriptionValue: object that represents the description, definition
	// or value of a term. (Since: 2.12).
	RoleDescriptionValue
	// RoleStatic: generic non-container object whose purpose is to display
	// a brief amount of information to the user and whose role is known by
	// the implementor but lacks semantic value for the user. Examples in
	// which ATK_ROLE_STATIC is appropriate include the message displayed in a
	// message box and an image used as an alternative means to display text.
	// ATK_ROLE_STATIC should not be applied to widgets which are traditionally
	// interactive, objects which display a significant amount of content,
	// or any object which has an accessible relation pointing to another
	// object. Implementors should expose the displayed information through the
	// accessible name of the object. If doing so seems inappropriate, it may
	// indicate that a different role should be used. For labels which describe
	// another widget, see ATK_ROLE_LABEL. For text views, see ATK_ROLE_TEXT.
	// For generic containers, see ATK_ROLE_PANEL. For objects whose role is not
	// known by the implementor, see ATK_ROLE_UNKNOWN. (Since: 2.16).
	RoleStatic
	// RoleMathFraction: object that represents a mathematical fraction. (Since:
	// 2.16).
	RoleMathFraction
	// RoleMathRoot: object that represents a mathematical expression displayed
	// with a radical. (Since: 2.16).
	RoleMathRoot
	// RoleSubscript: object that contains text that is displayed as a
	// subscript. (Since: 2.16).
	RoleSubscript
	// RoleSuperscript: object that contains text that is displayed as a
	// superscript. (Since: 2.16).
	RoleSuperscript
	// RoleFootnote: object that contains the text of a footnote. (Since: 2.26).
	RoleFootnote
	// RoleContentDeletion: content previously deleted or proposed to be
	// deleted, e.g. in revision history or a content view providing suggestions
	// from reviewers. (Since: 2.34).
	RoleContentDeletion
	// RoleContentInsertion: content previously inserted or proposed to
	// be inserted, e.g. in revision history or a content view providing
	// suggestions from reviewers. (Since: 2.34).
	RoleContentInsertion
	// RoleMark: run of content that is marked or highlighted, such as for
	// reference purposes, or to call it out as having a special purpose.
	// If the marked content has an associated section in the document
	// elaborating on the reason for the mark, then ATK_RELATION_DETAILS should
	// be used on the mark to point to that associated section. In addition,
	// the reciprocal relation ATK_RELATION_DETAILS_FOR should be used on the
	// associated content section to point back to the mark. (Since: 2.36).
	RoleMark
	// RoleSuggestion: container for content that is called out as a proposed
	// change from the current version of the document, such as by a reviewer of
	// the content. This role should include either ATK_ROLE_CONTENT_DELETION
	// and/or ATK_ROLE_CONTENT_INSERTION children, in any order, to indicate
	// what the actual change is. (Since: 2.36).
	RoleSuggestion
	// RolePushButtonMenu: specialized push button to open a menu. (Since:
	// 2.46).
	RolePushButtonMenu
	// RoleLastDefined: not a valid role, used for finding end of the
	// enumeration.
	RoleLastDefined
)

func RoleForName

func RoleForName(name string) Role

RoleForName: get the Role type corresponding to a rolew name.

The function takes the following parameters:

  • name: string which is the (non-localized) name of an ATK role.

The function returns the following values:

  • role enumerated type corresponding to the specified name, or K_ROLE_INVALID if no matching role is found.

func RoleRegister deprecated

func RoleRegister(name string) Role

RoleRegister registers the role specified by name. name must be a meaningful name. So it should not be empty, or consisting on whitespaces.

Deprecated: Since 2.12. If your application/toolkit doesn't find a suitable role for a specific object defined at Role, please submit a bug in order to add a new role to the specification.

The function takes the following parameters:

  • name: character string describing the new role.

The function returns the following values:

  • role for the new role if added properly. ATK_ROLE_INVALID in case of error.

func (Role) String

func (r Role) String() string

String returns the name in string for Role.

type ScrollType

type ScrollType C.gint

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

const (
	// ScrollTopLeft: scroll the object vertically and horizontally to bring its
	// top left corner to the top left corner of the window.
	ScrollTopLeft ScrollType = iota
	// ScrollBottomRight: scroll the object vertically and horizontally to bring
	// its bottom right corner to the bottom right corner of the window.
	ScrollBottomRight
	// ScrollTopEdge: scroll the object vertically to bring its top edge to the
	// top edge of the window.
	ScrollTopEdge
	// ScrollBottomEdge: scroll the object vertically to bring its bottom edge
	// to the bottom edge of the window.
	ScrollBottomEdge
	// ScrollLeftEdge: scroll the object vertically and horizontally to bring
	// its left edge to the left edge of the window.
	ScrollLeftEdge
	// ScrollRightEdge: scroll the object vertically and horizontally to bring
	// its right edge to the right edge of the window.
	ScrollRightEdge
	// ScrollAnywhere: scroll the object vertically and horizontally so that as
	// much as possible of the object becomes visible. The exact placement is
	// determined by the application.
	ScrollAnywhere
)

func (ScrollType) String

func (s ScrollType) String() string

String returns the name in string for ScrollType.

type Selection

type Selection struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Selection: ATK interface implemented by container objects whose Object children can be selected.

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.

Note that other types of "selection" (for instance text selection) are accomplished a other ATK interfaces - Selection is limited to the selection/deselection of children.

Selection wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Selection) AddSelection

func (selection *Selection) AddSelection(i int) bool

AddSelection adds the specified accessible child of the object to the object's selection.

The function takes the following parameters:

  • i specifying the child index.

The function returns the following values:

  • ok: TRUE if success, FALSE otherwise.

func (*Selection) ClearSelection

func (selection *Selection) ClearSelection() bool

ClearSelection clears the selection in the object so that no children in the object are selected.

The function returns the following values:

  • ok: TRUE if success, FALSE otherwise.

func (*Selection) ConnectSelectionChanged

func (selection *Selection) ConnectSelectionChanged(f func()) coreglib.SignalHandle

ConnectSelectionChanged: "selection-changed" signal is emitted by an object which implements AtkSelection interface when the selection changes.

func (*Selection) IsChildSelected

func (selection *Selection) IsChildSelected(i int) bool

IsChildSelected determines if the current child of this object is selected Note: callers should not rely on NULL or on a zero value for indication of whether AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk_get_accessible_value() convenience method.

The function takes the following parameters:

  • i specifying the child index.

The function returns the following values:

  • ok: gboolean representing the specified child is selected, or 0 if selection does not implement this interface.

func (*Selection) RefSelection

func (selection *Selection) RefSelection(i int) *AtkObject

RefSelection gets a reference to the accessible object representing the specified selected child of the object. Note: callers should not rely on NULL or on a zero value for indication of whether AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk_get_accessible_value() convenience method.

The function takes the following parameters:

  • i specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).

The function returns the following values:

  • object (optional) representing the selected accessible, or NULL if selection does not implement this interface.

func (*Selection) RemoveSelection

func (selection *Selection) RemoveSelection(i int) bool

RemoveSelection removes the specified child of the object from the object's selection.

The function takes the following parameters:

  • i specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).

The function returns the following values:

  • ok: TRUE if success, FALSE otherwise.

func (*Selection) SelectAllSelection

func (selection *Selection) SelectAllSelection() bool

SelectAllSelection causes every child of the object to be selected if the object supports multiple selections.

The function returns the following values:

  • ok: TRUE if success, FALSE otherwise.

func (*Selection) SelectionCount

func (selection *Selection) SelectionCount() int

SelectionCount gets the number of accessible children currently selected. Note: callers should not rely on NULL or on a zero value for indication of whether AtkSelectionIface is implemented, they should use type checking/interface checking macros or the atk_get_accessible_value() convenience method.

The function returns the following values:

  • gint representing the number of items selected, or 0 if selection does not implement this interface.

type SelectionIface added in v0.0.5

type SelectionIface struct {
	// contains filtered or unexported fields
}

SelectionIface: instance of this type is always passed by reference.

type Selectioner

type Selectioner interface {
	coreglib.Objector

	// AddSelection adds the specified accessible child of the object to the
	// object's selection.
	AddSelection(i int) bool
	// ClearSelection clears the selection in the object so that no children in
	// the object are selected.
	ClearSelection() bool
	// SelectionCount gets the number of accessible children currently selected.
	SelectionCount() int
	// IsChildSelected determines if the current child of this object is
	// selected Note: callers should not rely on NULL or on a zero value for
	// indication of whether AtkSelectionIface is implemented, they should use
	// type checking/interface checking macros or the atk_get_accessible_value()
	// convenience method.
	IsChildSelected(i int) bool
	// RefSelection gets a reference to the accessible object representing the
	// specified selected child of the object.
	RefSelection(i int) *AtkObject
	// RemoveSelection removes the specified child of the object from the
	// object's selection.
	RemoveSelection(i int) bool
	// SelectAllSelection causes every child of the object to be selected if the
	// object supports multiple selections.
	SelectAllSelection() bool

	// Selection-changed: "selection-changed" signal is emitted by an object
	// which implements AtkSelection interface when the selection changes.
	ConnectSelectionChanged(func()) coreglib.SignalHandle
}

Selectioner describes Selection's interface methods.

type Socket

type Socket struct {
	AtkObject

	*coreglib.Object
	Component
	// contains filtered or unexported fields
}

Socket: container for AtkPlug objects from other processes

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 atk_socket_embed(). Any accessible contained in the Plug will appear to the assistive technologies as being inside the application that created the Socket.

The communication between a Socket and a Plug is done by the IPC layer of the accessibility framework, normally implemented by the D-Bus based implementation of AT-SPI (at-spi2). If that is the case, at-spi-atk2 is the responsible to implement the abstract methods atk_plug_get_id() and atk_socket_embed(), so an ATK implementor shouldn't reimplement them. The process that contains the Plug is responsible to send the ID returned by atk_plug_id() to the process that contains the Socket, so it could call the method atk_socket_embed() in order to embed it.

For the same reasons, an implementor doesn't need to implement atk_object_get_n_accessible_children() and atk_object_ref_accessible_child(). All the logic related to those functions will be implemented by the IPC layer.

See atkplug.

func NewSocket

func NewSocket() *Socket

NewSocket creates a new Socket.

The function returns the following values:

  • socket: newly created Socket instance.

func (*Socket) Embed

func (obj *Socket) Embed(plugId string)

Embed embeds the children of an Plug as the children of the Socket. The plug may be in the same process or in a different process.

The class item used by this function should be filled in by the IPC layer (usually at-spi2-atk). The implementor of the AtkSocket should call this function and pass the id for the plug as returned by atk_plug_get_id(). It is the responsibility of the application to pass the plug id on to the process implementing the Socket as needed.

The function takes the following parameters:

  • plugId: ID of an Plug.

func (*Socket) IsOccupied

func (obj *Socket) IsOccupied() bool

IsOccupied determines whether or not the socket has an embedded plug.

The function returns the following values:

  • ok: TRUE if a plug is embedded in the socket.

type SocketClass added in v0.0.5

type SocketClass struct {
	// contains filtered or unexported fields
}

SocketClass: instance of this type is always passed by reference.

func (*SocketClass) ParentClass added in v0.0.5

func (s *SocketClass) ParentClass() *ObjectClass

type SocketOverrides added in v0.0.5

type SocketOverrides struct {
	// Embed embeds the children of an Plug as the children of the Socket.
	// The plug may be in the same process or in a different process.
	//
	// The class item used by this function should be filled in by the IPC layer
	// (usually at-spi2-atk). The implementor of the AtkSocket should call this
	// function and pass the id for the plug as returned by atk_plug_get_id().
	// It is the responsibility of the application to pass the plug id on to the
	// process implementing the Socket as needed.
	//
	// The function takes the following parameters:
	//
	//   - plugId: ID of an Plug.
	Embed func(plugId string)
}

SocketOverrides contains methods that are overridable.

type State

type State = uint64

State describes a single state of an object.

An AtkState describes a single state of an object. The full set of states that apply to an object at a given time are contained in its StateSet.

See atk_object_ref_state_set and atk_object_notify_state_change.

type StateSet

type StateSet struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

StateSet contains the states of an object.

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

func NewStateSet

func NewStateSet() *StateSet

NewStateSet creates a new empty state set.

The function returns the following values:

  • stateSet: new StateSet.

func (*StateSet) AddState

func (set *StateSet) AddState(typ StateType) bool

AddState adds the state of the specified type to the state set if it is not already present.

Note that because an StateSet is a read-only object, this method should be used to add a state to a newly-created set which will then be returned by #atk_object_ref_state_set. It should not be used to modify the existing state of an object. See also #atk_object_notify_state_change.

The function takes the following parameters:

  • typ: StateType.

The function returns the following values:

  • ok: TRUE if the state for type is not already in set.

func (*StateSet) AddStates

func (set *StateSet) AddStates(types []StateType)

AddStates adds the states of the specified types to the state set.

Note that because an StateSet is a read-only object, this method should be used to add states to a newly-created set which will then be returned by #atk_object_ref_state_set. It should not be used to modify the existing state of an object. See also #atk_object_notify_state_change.

The function takes the following parameters:

  • types: array of StateType.

func (*StateSet) AndSets

func (set *StateSet) AndSets(compareSet *StateSet) *StateSet

AndSets constructs the intersection of the two sets, returning NULL if the intersection is empty.

The function takes the following parameters:

  • compareSet: another StateSet.

The function returns the following values:

  • stateSet: new StateSet which is the intersection of the two sets.

func (*StateSet) ClearStates

func (set *StateSet) ClearStates()

ClearStates removes all states from the state set.

func (*StateSet) ContainsState

func (set *StateSet) ContainsState(typ StateType) bool

ContainsState checks whether the state for the specified type is in the specified set.

The function takes the following parameters:

  • typ: StateType.

The function returns the following values:

  • ok: TRUE if type is the state type is in set.

func (*StateSet) ContainsStates

func (set *StateSet) ContainsStates(types []StateType) bool

ContainsStates checks whether the states for all the specified types are in the specified set.

The function takes the following parameters:

  • types: array of StateType.

The function returns the following values:

  • ok: TRUE if all the states for type are in set.

func (*StateSet) IsEmpty

func (set *StateSet) IsEmpty() bool

IsEmpty checks whether the state set is empty, i.e. has no states set.

The function returns the following values:

  • ok: TRUE if set has no states set, otherwise FALSE.

func (*StateSet) OrSets

func (set *StateSet) OrSets(compareSet *StateSet) *StateSet

OrSets constructs the union of the two sets.

The function takes the following parameters:

  • compareSet: another StateSet.

The function returns the following values:

  • stateSet (optional): new StateSet which is the union of the two sets, returning NULL is empty.

func (*StateSet) RemoveState

func (set *StateSet) RemoveState(typ StateType) bool

RemoveState removes the state for the specified type from the state set.

Note that because an StateSet is a read-only object, this method should be used to remove a state to a newly-created set which will then be returned by #atk_object_ref_state_set. It should not be used to modify the existing state of an object. See also #atk_object_notify_state_change.

The function takes the following parameters:

  • typ: Type.

The function returns the following values:

  • ok: TRUE if type was the state type is in set.

func (*StateSet) XorSets

func (set *StateSet) XorSets(compareSet *StateSet) *StateSet

XorSets constructs the exclusive-or of the two sets, returning NULL is empty. The set returned by this operation contains the states in exactly one of the two sets.

The function takes the following parameters:

  • compareSet: another StateSet.

The function returns the following values:

  • stateSet: new StateSet which contains the states which are in exactly one of the two sets.

type StateSetClass added in v0.0.5

type StateSetClass struct {
	// contains filtered or unexported fields
}

StateSetClass: instance of this type is always passed by reference.

type StateSetOverrides added in v0.0.5

type StateSetOverrides struct {
}

StateSetOverrides contains methods that are overridable.

type StateType

type StateType C.gint

StateType: possible types of states of an object.

const (
	// StateInvalid indicates an invalid state - probably an error condition.
	StateInvalid StateType = iota
	// StateActive indicates a window is currently the active window,
	// or an object is the active subelement within a container or table.
	// ATK_STATE_ACTIVE should not be used for objects which have
	// ATK_STATE_FOCUSABLE or ATK_STATE_SELECTABLE: Those objects should use
	// ATK_STATE_FOCUSED and ATK_STATE_SELECTED respectively. ATK_STATE_ACTIVE
	// is a means to indicate that an object which is not focusable and not
	// selectable is the currently-active item within its parent container.
	StateActive
	// StateArmed indicates that the object is 'armed', i.e. will be activated
	// by if a pointer button-release event occurs within its bounds. Buttons
	// often enter this state when a pointer click occurs within their bounds,
	// as a precursor to activation. ATK_STATE_ARMED has been deprecated since
	// ATK-2.16 and should not be used in newly-written code.
	StateArmed
	// StateBusy indicates the current object is busy, i.e. onscreen
	// representation is in the process of changing, or the object is
	// temporarily unavailable for interaction due to activity already in
	// progress. This state may be used by implementors of Document to indicate
	// that content loading is underway. It also may indicate other 'pending'
	// conditions; clients may wish to interrogate this object when the
	// ATK_STATE_BUSY flag is removed.
	StateBusy
	// StateChecked indicates this object is currently checked, for instance a
	// checkbox is 'non-empty'.
	StateChecked
	// StateDefunct indicates that this object no longer has a valid backing
	// widget (for instance, if its peer object has been destroyed).
	StateDefunct
	// StateEditable indicates that this object can contain text, and that the
	// user can change the textual contents of this object by editing those
	// contents directly. For an object which is expected to be editable due to
	// its type, but which cannot be edited due to the application or platform
	// preventing the user from doing so, that object's StateSet should lack
	// ATK_STATE_EDITABLE and should contain ATK_STATE_READ_ONLY.
	StateEditable
	// StateEnabled indicates that this object is enabled, i.e. that it
	// currently reflects some application state. Objects that are "greyed
	// out" may lack this state, and may lack the STATE_SENSITIVE if direct
	// user interaction cannot cause them to acquire STATE_ENABLED. See also:
	// ATK_STATE_SENSITIVE.
	StateEnabled
	// StateExpandable indicates this object allows progressive disclosure of
	// its children.
	StateExpandable
	// StateExpanded indicates this object its expanded - see
	// ATK_STATE_EXPANDABLE above.
	StateExpanded
	// StateFocusable indicates this object can accept keyboard focus, which
	// means all events resulting from typing on the keyboard will normally be
	// passed to it when it has focus.
	StateFocusable
	// StateFocused indicates this object currently has the keyboard focus.
	StateFocused
	// StateHorizontal indicates the orientation of this object is horizontal;
	// used, for instance, by objects of ATK_ROLE_SCROLL_BAR. For objects where
	// vertical/horizontal orientation is especially meaningful.
	StateHorizontal
	// StateIconified indicates this object is minimized and is represented only
	// by an icon.
	StateIconified
	// StateModal indicates something must be done with this object before the
	// user can interact with an object in a different window.
	StateModal
	// StateMultiLine indicates this (text) object can contain multiple lines of
	// text.
	StateMultiLine
	// StateMultiselectable indicates this object allows more than one of its
	// children to be selected at the same time, or in the case of text objects,
	// that the object supports non-contiguous text selections.
	StateMultiselectable
	// StateOpaque indicates this object paints every pixel within its
	// rectangular region.
	StateOpaque
	// StatePressed indicates this object is currently pressed.
	StatePressed
	// StateResizable indicates the size of this object is not fixed.
	StateResizable
	// StateSelectable indicates this object is the child of an object that
	// allows its children to be selected and that this child is one of those
	// children that can be selected.
	StateSelectable
	// StateSelected indicates this object is the child of an object that allows
	// its children to be selected and that this child is one of those children
	// that has been selected.
	StateSelected
	// StateSensitive indicates this object is sensitive, e.g. to user
	// interaction. STATE_SENSITIVE usually accompanies STATE_ENABLED
	// for user-actionable controls, but may be found in the absence
	// of STATE_ENABLED if the current visible state of the control is
	// "disconnected" from the application state. In such cases, direct user
	// interaction can often result in the object gaining STATE_SENSITIVE,
	// for instance if a user makes an explicit selection using an object
	// whose current state is ambiguous or undefined. see STATE_ENABLED,
	// STATE_INDETERMINATE.
	StateSensitive
	// StateShowing indicates this object, the object's parent, the object's
	// parent's parent, and so on, are all 'shown' to the end-user, i.e. subject
	// to "exposure" if blocking or obscuring objects do not interpose between
	// this object and the top of the window stack.
	StateShowing
	// StateSingleLine indicates this (text) object can contain only a single
	// line of text.
	StateSingleLine
	// StateStale indicates that the information returned for this object may
	// no longer be synchronized with the application state. This is implied
	// if the object has STATE_TRANSIENT, and can also occur towards the end
	// of the object peer's lifecycle. It can also be used to indicate that the
	// index associated with this object has changed since the user accessed the
	// object (in lieu of "index-in-parent-changed" events).
	StateStale
	// StateTransient indicates this object is transient, i.e. a snapshot
	// which may not emit events when its state changes. Data from objects
	// with ATK_STATE_TRANSIENT should not be cached, since there may be no
	// notification given when the cached data becomes obsolete.
	StateTransient
	// StateVertical indicates the orientation of this object is vertical.
	StateVertical
	// StateVisible indicates this object is visible, e.g. has been explicitly
	// marked for exposure to the user. **note**: ATK_STATE_VISIBLE is no
	// guarantee that the object is actually unobscured on the screen,
	// only that it is 'potentially' visible, barring obstruction, being
	// scrolled or clipped out of the field of view, or having an ancestor
	// container that has not yet made visible. A widget is potentially onscreen
	// if it has both ATK_STATE_VISIBLE and ATK_STATE_SHOWING. The absence of
	// ATK_STATE_VISIBLE and ATK_STATE_SHOWING is semantically equivalent to
	// saying that an object is 'hidden'. See also ATK_STATE_TRUNCATED, which
	// applies if an object with ATK_STATE_VISIBLE and ATK_STATE_SHOWING set
	// lies within a viewport which means that its contents are clipped, e.g.
	// a truncated spreadsheet cell or an image within a scrolling viewport.
	// Mostly useful for screen-review and magnification algorithms.
	StateVisible
	// StateManagesDescendants indicates that "active-descendant-changed" event
	// is sent when children become 'active' (i.e. are selected or navigated to
	// onscreen). Used to prevent need to enumerate all children in very large
	// containers, like tables. The presence of STATE_MANAGES_DESCENDANTS is an
	// indication to the client. that the children should not, and need not,
	// be enumerated by the client. Objects implementing this state are
	// expected to provide relevant state notifications to listening clients,
	// for instance notifications of visibility changes and activation of their
	// contained child objects, without the client having previously requested
	// references to those children.
	StateManagesDescendants
	// StateIndeterminate indicates that the value, or some other quantifiable
	// property, of this AtkObject cannot be fully determined. In the case of a
	// large data set in which the total number of items in that set is unknown
	// (e.g. 1 of 999+), implementors should expose the currently-known set
	// size (999) along with this state. In the case of a check box, this state
	// should be used to indicate that the check box is a tri-state check box
	// which is currently neither checked nor unchecked.
	StateIndeterminate
	// StateTruncated indicates that an object is truncated, e.g. a text value
	// in a speradsheet cell.
	StateTruncated
	// StateRequired indicates that explicit user interaction with an object is
	// required by the user interface, e.g. a required field in a "web-form"
	// interface.
	StateRequired
	// StateInvalidEntry indicates that the object has encountered an error
	// condition due to failure of input validation. For instance, a form
	// control may acquire this state in response to invalid or malformed user
	// input.
	StateInvalidEntry
	// StateSupportsAutocompletion indicates that the object in question
	// implements some form of ¨typeahead¨ or pre-selection behavior whereby
	// entering the first character of one or more sub-elements causes
	// those elements to scroll into view or become selected. Subsequent
	// character input may narrow the selection further as long as one or
	// more sub-elements match the string. This state is normally only useful
	// and encountered on objects that implement Selection. In some cases the
	// typeahead behavior may result in full or partial ¨completion¨ of the
	// data in the input field, in which case these input events may trigger
	// text-changed events from the AtkText interface. This state supplants
	// ATK_ROLE_AUTOCOMPLETE.
	StateSupportsAutocompletion
	// StateSelectableText indicates that the object in question supports text
	// selection. It should only be exposed on objects which implement the Text
	// interface, in order to distinguish this state from ATK_STATE_SELECTABLE,
	// which infers that the object in question is a selectable child of an
	// object which implements Selection. While similar, text selection and
	// subelement selection are distinct operations.
	StateSelectableText
	// StateDefault indicates that the object is the "default" active component,
	// i.e. the object which is activated by an end-user press of the "Enter" or
	// "Return" key. Typically a "close" or "submit" button.
	StateDefault
	// StateAnimated indicates that the object changes its appearance
	// dynamically as an inherent part of its presentation. This state may
	// come and go if an object is only temporarily animated on the way to a
	// 'final' onscreen presentation. **note**: some applications, notably
	// content viewers, may not be able to detect all kinds of animated content.
	// Therefore the absence of this state should not be taken as definitive
	// evidence that the object's visual representation is static; this state is
	// advisory.
	StateAnimated
	// StateVisited indicates that the object (typically a hyperlink) has
	// already been 'activated', and/or its backing data has already been
	// downloaded, rendered, or otherwise "visited".
	StateVisited
	// StateCheckable indicates this object has the potential to be checked,
	// such as a checkbox or toggle-able table cell. Since: ATK-2.12.
	StateCheckable
	// StateHasPopup indicates that the object has a popup context menu
	// or sub-level menu which may or may not be showing. This means that
	// activation renders conditional content. Note that ordinary tooltips are
	// not considered popups in this context. Since: ATK-2.12.
	StateHasPopup
	// StateHasTooltip indicates this object has a tooltip. Since: ATK-2.16.
	StateHasTooltip
	// StateReadOnly indicates that a widget which is ENABLED and SENSITIVE
	// has a value which can be read, but not modified, by the user. Note
	// that this state should only be applied to widget types whose value is
	// normally directly user modifiable, such as check boxes, radio buttons,
	// spin buttons, text input fields, and combo boxes, as a means to convey
	// that the expected interaction with that widget is not possible. When the
	// expected interaction with a widget does not include modification by the
	// user, as is the case with labels and containers, ATK_STATE_READ_ONLY
	// should not be applied. See also ATK_STATE_EDITABLE. Since: ATK-2-16.
	StateReadOnly
	// StateCollapsed indicates this object is collapsed. Since: ATK-2.38.
	StateCollapsed
	// StateLastDefined: not a valid state, used for finding end of enumeration.
	StateLastDefined
)

func StateTypeForName

func StateTypeForName(name string) StateType

StateTypeForName gets the StateType corresponding to the description string name.

The function takes the following parameters:

  • name: character string state name.

The function returns the following values:

  • stateType corresponding to name.

func StateTypeRegister

func StateTypeRegister(name string) StateType

StateTypeRegister: register a new object state.

The function takes the following parameters:

  • name: character string describing the new state.

The function returns the following values:

  • stateType value for the new state.

func (StateType) String

func (s StateType) String() string

String returns the name in string for StateType.

type StreamableContent

type StreamableContent struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

StreamableContent: ATK interface which provides access to streamable content.

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.

Negotiation of content type is allowed. Clients may examine the backing data and transform, convert, or parse the content in order to present it in an alternate form to end-users.

The AtkStreamableContent interface is particularly useful for saving, printing, or post-processing entire documents, or for persisting alternate views of a document. If document content itself is being serialized, stored, or converted, then use of the AtkStreamableContent interface can help address performance issues. Unlike most ATK interfaces, this interface is not strongly tied to the current user-agent view of the a particular document, but may in some cases give access to the underlying model data.

StreamableContent wraps an interface. This means the user can get the underlying type by calling Cast().

func (*StreamableContent) MIMEType

func (streamable *StreamableContent) MIMEType(i int) string

MIMEType gets the character string of the specified mime type. The first mime type is at position 0, the second at position 1, and so on.

The function takes the following parameters:

  • i: gint representing the position of the mime type starting from 0.

The function returns the following values:

  • utf8: gchar* representing the specified mime type; the caller should not free the character string.

func (*StreamableContent) NMIMETypes

func (streamable *StreamableContent) NMIMETypes() int

NMIMETypes gets the number of mime types supported by this object.

The function returns the following values:

  • gint which is the number of mime types supported by the object.

func (*StreamableContent) Stream

func (streamable *StreamableContent) Stream(mimeType string) *glib.IOChannel

Stream gets the content in the specified mime type.

The function takes the following parameters:

  • mimeType: gchar* representing the mime type.

The function returns the following values:

  • ioChannel which contains the content in the specified mime type.

func (*StreamableContent) URI

func (streamable *StreamableContent) URI(mimeType string) string

URI: get a string representing a URI in IETF standard format (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content may be streamed in the specified mime-type, if one is available. If mime_type is NULL, the URI for the default (and possibly only) mime-type is returned.

Note that it is possible for get_uri to return NULL but for get_stream to work nonetheless, since not all GIOChannels connect to URIs.

The function takes the following parameters:

  • mimeType: gchar* representing the mime type, or NULL to request a URI for the default mime type.

The function returns the following values:

  • utf8 (optional) returns a string representing a URI, or NULL if no corresponding URI can be constructed.

type StreamableContentIface added in v0.0.5

type StreamableContentIface struct {
	// contains filtered or unexported fields
}

StreamableContentIface: instance of this type is always passed by reference.

type StreamableContenter

type StreamableContenter interface {
	coreglib.Objector

	// MIMEType gets the character string of the specified mime type.
	MIMEType(i int) string
	// NMIMETypes gets the number of mime types supported by this object.
	NMIMETypes() int
	// Stream gets the content in the specified mime type.
	Stream(mimeType string) *glib.IOChannel
	// URI: get a string representing a URI in IETF standard format (see
	// http://www.ietf.org/rfc/rfc2396.txt) from which the object's content may
	// be streamed in the specified mime-type, if one is available.
	URI(mimeType string) string
}

StreamableContenter describes StreamableContent's interface methods.

type Table

type Table struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Table: ATK interface implemented for UI components which contain tabular or row/column information.

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.

Children of Table are frequently "lightweight" objects, that is, they may not have backing widgets in the host UI toolkit. They are therefore often transient.

Since tables are often very complex, Table includes provision for offering simplified summary information, as well as row and column headers and captions. Headers and captions are Objects which may implement other interfaces (Text, Image, etc.) as appropriate. Table summaries may themselves be (simplified) Tables, etc.

Note for implementors: in the past, Table required that all the cells should be direct children of Table, and provided some index based methods to request the cells. The practice showed that that forcing made Table implementation complex, and hard to expose other kind of children, like rows or captions. Right now, index-based methods are deprecated.

Table wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Table) AddColumnSelection

func (table *Table) AddColumnSelection(column int) bool

AddColumnSelection adds the specified column to the selection.

The function takes the following parameters:

  • column representing a column in table.

The function returns the following values:

  • ok: gboolean representing if the column was successfully added to the selection, or 0 if value does not implement this interface.

func (*Table) AddRowSelection

func (table *Table) AddRowSelection(row int) bool

AddRowSelection adds the specified row to the selection.

The function takes the following parameters:

  • row representing a row in table.

The function returns the following values:

  • ok: gboolean representing if row was successfully added to selection, or 0 if value does not implement this interface.

func (*Table) Caption

func (table *Table) Caption() *AtkObject

Caption gets the caption for the table.

The function returns the following values:

  • object (optional): atkObject* representing the table caption, or NULL if value does not implement this interface.

func (*Table) ColumnAtIndex deprecated

func (table *Table) ColumnAtIndex(index_ int) int

ColumnAtIndex gets a #gint representing the column at the specified index_.

Deprecated: Since 2.12.

The function takes the following parameters:

  • index_ representing an index in table.

The function returns the following values:

  • gint representing the column at the specified index, or -1 if the table does not implement this method.

func (*Table) ColumnDescription

func (table *Table) ColumnDescription(column int) string

ColumnDescription gets the description text of the specified column in the table.

The function takes the following parameters:

  • column representing a column in table.

The function returns the following values:

  • utf8: gchar* representing the column description, or NULL if value does not implement this interface.

func (*Table) ColumnExtentAt

func (table *Table) ColumnExtentAt(row, column int) int

ColumnExtentAt gets the number of columns occupied by the accessible object at the specified row and column in the table.

The function takes the following parameters:

  • row representing a row in table.
  • column representing a column in table.

The function returns the following values:

  • gint representing the column extent at specified position, or 0 if value does not implement this interface.

func (*Table) ColumnHeader

func (table *Table) ColumnHeader(column int) *AtkObject

ColumnHeader gets the column header of a specified column in an accessible table.

The function takes the following parameters:

  • column representing a column in the table.

The function returns the following values:

  • object (optional): atkObject* representing the specified column header, or NULL if value does not implement this interface.

func (*Table) ConnectColumnDeleted

func (table *Table) ConnectColumnDeleted(f func(arg1, arg2 int)) coreglib.SignalHandle

ConnectColumnDeleted: "column-deleted" signal is emitted by an object which implements the AtkTable interface when a column is deleted.

func (*Table) ConnectColumnInserted

func (table *Table) ConnectColumnInserted(f func(arg1, arg2 int)) coreglib.SignalHandle

ConnectColumnInserted: "column-inserted" signal is emitted by an object which implements the AtkTable interface when a column is inserted.

func (*Table) ConnectColumnReordered

func (table *Table) ConnectColumnReordered(f func()) coreglib.SignalHandle

ConnectColumnReordered: "column-reordered" signal is emitted by an object which implements the AtkTable interface when the columns are reordered.

func (*Table) ConnectModelChanged

func (table *Table) ConnectModelChanged(f func()) coreglib.SignalHandle

ConnectModelChanged: "model-changed" signal is emitted by an object which implements the AtkTable interface when the model displayed by the table changes.

func (*Table) ConnectRowDeleted

func (table *Table) ConnectRowDeleted(f func(arg1, arg2 int)) coreglib.SignalHandle

ConnectRowDeleted: "row-deleted" signal is emitted by an object which implements the AtkTable interface when a row is deleted.

func (*Table) ConnectRowInserted

func (table *Table) ConnectRowInserted(f func(arg1, arg2 int)) coreglib.SignalHandle

ConnectRowInserted: "row-inserted" signal is emitted by an object which implements the AtkTable interface when a row is inserted.

func (*Table) ConnectRowReordered

func (table *Table) ConnectRowReordered(f func()) coreglib.SignalHandle

ConnectRowReordered: "row-reordered" signal is emitted by an object which implements the AtkTable interface when the rows are reordered.

func (*Table) IndexAt deprecated

func (table *Table) IndexAt(row, column int) int

IndexAt gets a #gint representing the index at the specified row and column.

Deprecated: Since 2.12. Use atk_table_ref_at() in order to get the accessible that represents the cell at (row, column).

The function takes the following parameters:

  • row representing a row in table.
  • column representing a column in table.

The function returns the following values:

  • gint representing the index at specified position. The value -1 is returned if the object at row,column is not a child of table or table does not implement this interface.

func (*Table) IsColumnSelected

func (table *Table) IsColumnSelected(column int) bool

IsColumnSelected gets a boolean value indicating whether the specified column is selected.

The function takes the following parameters:

  • column representing a column in table.

The function returns the following values:

  • ok: gboolean representing if the column is selected, or 0 if value does not implement this interface.

func (*Table) IsRowSelected

func (table *Table) IsRowSelected(row int) bool

IsRowSelected gets a boolean value indicating whether the specified row is selected.

The function takes the following parameters:

  • row representing a row in table.

The function returns the following values:

  • ok: gboolean representing if the row is selected, or 0 if value does not implement this interface.

func (*Table) IsSelected

func (table *Table) IsSelected(row, column int) bool

IsSelected gets a boolean value indicating whether the accessible object at the specified row and column is selected.

The function takes the following parameters:

  • row representing a row in table.
  • column representing a column in table.

The function returns the following values:

  • ok: gboolean representing if the cell is selected, or 0 if value does not implement this interface.

func (*Table) NColumns

func (table *Table) NColumns() int

NColumns gets the number of columns in the table.

The function returns the following values:

  • gint representing the number of columns, or 0 if value does not implement this interface.

func (*Table) NRows

func (table *Table) NRows() int

NRows gets the number of rows in the table.

The function returns the following values:

  • gint representing the number of rows, or 0 if value does not implement this interface.

func (*Table) RefAt

func (table *Table) RefAt(row, column int) *AtkObject

RefAt: get a reference to the table cell at row, column. This cell should implement the interface TableCell.

The function takes the following parameters:

  • row representing a row in table.
  • column representing a column in table.

The function returns the following values:

  • object representing the referred to accessible.

func (*Table) RemoveColumnSelection

func (table *Table) RemoveColumnSelection(column int) bool

RemoveColumnSelection adds the specified column to the selection.

The function takes the following parameters:

  • column representing a column in table.

The function returns the following values:

  • ok: gboolean representing if the column was successfully removed from the selection, or 0 if value does not implement this interface.

func (*Table) RemoveRowSelection

func (table *Table) RemoveRowSelection(row int) bool

RemoveRowSelection removes the specified row from the selection.

The function takes the following parameters:

  • row representing a row in table.

The function returns the following values:

  • ok: gboolean representing if the row was successfully removed from the selection, or 0 if value does not implement this interface.

func (*Table) RowAtIndex deprecated

func (table *Table) RowAtIndex(index_ int) int

RowAtIndex gets a #gint representing the row at the specified index_.

Deprecated: since 2.12.

The function takes the following parameters:

  • index_ representing an index in table.

The function returns the following values:

  • gint representing the row at the specified index, or -1 if the table does not implement this method.

func (*Table) RowDescription

func (table *Table) RowDescription(row int) string

RowDescription gets the description text of the specified row in the table.

The function takes the following parameters:

  • row representing a row in table.

The function returns the following values:

  • utf8 (optional): gchar* representing the row description, or NULL if value does not implement this interface.

func (*Table) RowExtentAt

func (table *Table) RowExtentAt(row, column int) int

RowExtentAt gets the number of rows occupied by the accessible object at a specified row and column in the table.

The function takes the following parameters:

  • row representing a row in table.
  • column representing a column in table.

The function returns the following values:

  • gint representing the row extent at specified position, or 0 if value does not implement this interface.

func (*Table) RowHeader

func (table *Table) RowHeader(row int) *AtkObject

RowHeader gets the row header of a specified row in an accessible table.

The function takes the following parameters:

  • row representing a row in the table.

The function returns the following values:

  • object (optional): atkObject* representing the specified row header, or NULL if value does not implement this interface.

func (*Table) SelectedColumns

func (table *Table) SelectedColumns(selected **int) int

SelectedColumns gets the selected columns of the table by initializing **selected with the selected column numbers. This array should be freed by the caller.

The function takes the following parameters:

  • selected that is to contain the selected columns numbers.

The function returns the following values:

  • gint representing the number of selected columns, or 0 if value does not implement this interface.

func (*Table) SelectedRows

func (table *Table) SelectedRows(selected **int) int

SelectedRows gets the selected rows of the table by initializing **selected with the selected row numbers. This array should be freed by the caller.

The function takes the following parameters:

  • selected that is to contain the selected row numbers.

The function returns the following values:

  • gint representing the number of selected rows, or zero if value does not implement this interface.

func (*Table) SetCaption

func (table *Table) SetCaption(caption *AtkObject)

SetCaption sets the caption for the table.

The function takes the following parameters:

  • caption representing the caption to set for table.

func (*Table) SetColumnDescription

func (table *Table) SetColumnDescription(column int, description string)

SetColumnDescription sets the description text for the specified column of the table.

The function takes the following parameters:

  • column representing a column in table.
  • description representing the description text to set for the specified column of the table.

func (*Table) SetColumnHeader

func (table *Table) SetColumnHeader(column int, header *AtkObject)

SetColumnHeader sets the specified column header to header.

The function takes the following parameters:

  • column representing a column in table.
  • header: Table.

func (*Table) SetRowDescription

func (table *Table) SetRowDescription(row int, description string)

SetRowDescription sets the description text for the specified row of table.

The function takes the following parameters:

  • row representing a row in table.
  • description representing the description text to set for the specified row of table.

func (*Table) SetRowHeader

func (table *Table) SetRowHeader(row int, header *AtkObject)

SetRowHeader sets the specified row header to header.

The function takes the following parameters:

  • row representing a row in table.
  • header: Table.

func (*Table) SetSummary

func (table *Table) SetSummary(accessible *AtkObject)

SetSummary sets the summary description of the table.

The function takes the following parameters:

  • accessible representing the summary description to set for table.

func (*Table) Summary

func (table *Table) Summary() *AtkObject

Summary gets the summary description of the table.

The function returns the following values:

  • object: atkObject* representing a summary description of the table, or zero if value does not implement this interface.

type TableCell

type TableCell struct {
	AtkObject
	// contains filtered or unexported fields
}

TableCell: ATK interface implemented for a cell inside a two-dimentional Table

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.

See atktable.

TableCell wraps an interface. This means the user can get the underlying type by calling Cast().

func (*TableCell) ColumnSpan

func (cell *TableCell) ColumnSpan() int

ColumnSpan returns the number of columns occupied by this cell accessible.

The function returns the following values:

  • gint representing the number of columns occupied by this cell, or 0 if the cell does not implement this method.

func (*TableCell) Position

func (cell *TableCell) Position() (row, column int, ok bool)

Position retrieves the tabular position of this cell.

The function returns the following values:

  • row of the given cell.
  • column of the given cell.
  • ok: TRUE if successful; FALSE otherwise.

func (*TableCell) RowColumnSpan

func (cell *TableCell) RowColumnSpan() (row, column, rowSpan, columnSpan int, ok bool)

RowColumnSpan gets the row and column indexes and span of this cell accessible.

Note: If the object does not implement this function, then, by default, atk will implement this function by calling get_row_span and get_column_span on the object.

The function returns the following values:

  • row index of the given cell.
  • column index of the given cell.
  • rowSpan: number of rows occupied by this cell.
  • columnSpan: number of columns occupied by this cell.
  • ok: TRUE if successful; FALSE otherwise.

func (*TableCell) RowSpan

func (cell *TableCell) RowSpan() int

RowSpan returns the number of rows occupied by this cell accessible.

The function returns the following values:

  • gint representing the number of rows occupied by this cell, or 0 if the cell does not implement this method.

func (*TableCell) Table

func (cell *TableCell) Table() *AtkObject

Table returns a reference to the accessible of the containing table.

The function returns the following values:

  • object: atk object for the containing table.

type TableCellIface added in v0.0.5

type TableCellIface struct {
	// contains filtered or unexported fields
}

TableCellIface: atkTableCell is an interface for cells inside an Table.

An instance of this type is always passed by reference.

type TableCeller

type TableCeller interface {
	coreglib.Objector

	// ColumnSpan returns the number of columns occupied by this cell
	// accessible.
	ColumnSpan() int
	// Position retrieves the tabular position of this cell.
	Position() (row, column int, ok bool)
	// RowColumnSpan gets the row and column indexes and span of this cell
	// accessible.
	RowColumnSpan() (row, column, rowSpan, columnSpan int, ok bool)
	// RowSpan returns the number of rows occupied by this cell accessible.
	RowSpan() int
	// Table returns a reference to the accessible of the containing table.
	Table() *AtkObject
}

TableCeller describes TableCell's interface methods.

type TableIface added in v0.0.5

type TableIface struct {
	// contains filtered or unexported fields
}

TableIface: instance of this type is always passed by reference.

type Tabler

type Tabler interface {
	coreglib.Objector

	// AddColumnSelection adds the specified column to the selection.
	AddColumnSelection(column int) bool
	// AddRowSelection adds the specified row to the selection.
	AddRowSelection(row int) bool
	// Caption gets the caption for the table.
	Caption() *AtkObject
	// ColumnAtIndex gets a #gint representing the column at the specified
	// index_.
	ColumnAtIndex(index_ int) int
	// ColumnDescription gets the description text of the specified column in
	// the table.
	ColumnDescription(column int) string
	// ColumnExtentAt gets the number of columns occupied by the accessible
	// object at the specified row and column in the table.
	ColumnExtentAt(row, column int) int
	// ColumnHeader gets the column header of a specified column in an
	// accessible table.
	ColumnHeader(column int) *AtkObject
	// IndexAt gets a #gint representing the index at the specified row and
	// column.
	IndexAt(row, column int) int
	// NColumns gets the number of columns in the table.
	NColumns() int
	// NRows gets the number of rows in the table.
	NRows() int
	// RowAtIndex gets a #gint representing the row at the specified index_.
	RowAtIndex(index_ int) int
	// RowDescription gets the description text of the specified row in the
	// table.
	RowDescription(row int) string
	// RowExtentAt gets the number of rows occupied by the accessible object at
	// a specified row and column in the table.
	RowExtentAt(row, column int) int
	// RowHeader gets the row header of a specified row in an accessible table.
	RowHeader(row int) *AtkObject
	// SelectedColumns gets the selected columns of the table by initializing
	// **selected with the selected column numbers.
	SelectedColumns(selected **int) int
	// SelectedRows gets the selected rows of the table by initializing
	// **selected with the selected row numbers.
	SelectedRows(selected **int) int
	// Summary gets the summary description of the table.
	Summary() *AtkObject
	// IsColumnSelected gets a boolean value indicating whether the specified
	// column is selected.
	IsColumnSelected(column int) bool
	// IsRowSelected gets a boolean value indicating whether the specified row
	// is selected.
	IsRowSelected(row int) bool
	// IsSelected gets a boolean value indicating whether the accessible object
	// at the specified row and column is selected.
	IsSelected(row, column int) bool
	// RefAt: get a reference to the table cell at row, column.
	RefAt(row, column int) *AtkObject
	// RemoveColumnSelection adds the specified column to the selection.
	RemoveColumnSelection(column int) bool
	// RemoveRowSelection removes the specified row from the selection.
	RemoveRowSelection(row int) bool
	// SetCaption sets the caption for the table.
	SetCaption(caption *AtkObject)
	// SetColumnDescription sets the description text for the specified column
	// of the table.
	SetColumnDescription(column int, description string)
	// SetColumnHeader sets the specified column header to header.
	SetColumnHeader(column int, header *AtkObject)
	// SetRowDescription sets the description text for the specified row of
	// table.
	SetRowDescription(row int, description string)
	// SetRowHeader sets the specified row header to header.
	SetRowHeader(row int, header *AtkObject)
	// SetSummary sets the summary description of the table.
	SetSummary(accessible *AtkObject)

	// Column-deleted: "column-deleted" signal is emitted by an object which
	// implements the AtkTable interface when a column is deleted.
	ConnectColumnDeleted(func(arg1, arg2 int)) coreglib.SignalHandle
	// Column-inserted: "column-inserted" signal is emitted by an object which
	// implements the AtkTable interface when a column is inserted.
	ConnectColumnInserted(func(arg1, arg2 int)) coreglib.SignalHandle
	// Column-reordered: "column-reordered" signal is emitted by an object which
	// implements the AtkTable interface when the columns are reordered.
	ConnectColumnReordered(func()) coreglib.SignalHandle
	// Model-changed: "model-changed" signal is emitted by an object which
	// implements the AtkTable interface when the model displayed by the table
	// changes.
	ConnectModelChanged(func()) coreglib.SignalHandle
	// Row-deleted: "row-deleted" signal is emitted by an object which
	// implements the AtkTable interface when a row is deleted.
	ConnectRowDeleted(func(arg1, arg2 int)) coreglib.SignalHandle
	// Row-inserted: "row-inserted" signal is emitted by an object which
	// implements the AtkTable interface when a row is inserted.
	ConnectRowInserted(func(arg1, arg2 int)) coreglib.SignalHandle
	// Row-reordered: "row-reordered" signal is emitted by an object which
	// implements the AtkTable interface when the rows are reordered.
	ConnectRowReordered(func()) coreglib.SignalHandle
}

Tabler describes Table's interface methods.

type Text

type Text struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Text: ATK interface implemented by components with text content.

Text should be implemented by Objects on behalf of widgets that have text content which is either attributed or otherwise non-trivial. Objects 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.

Text provides not only traversal facilities and change

notification for text content, but also caret tracking and glyph bounding box calculations. Note that the text strings are exposed as UTF-8, and are therefore potentially multi-byte, and caret-to-byte offset mapping makes no assumptions about the character length; also bounding box glyph-to-offset mapping may be complex for languages which use ligatures.

Text wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Text) AddSelection

func (text *Text) AddSelection(startOffset, endOffset int) bool

AddSelection adds a selection bounded by the specified offsets.

The function takes the following parameters:

  • startOffset: starting character offset of the selected region.
  • endOffset: offset of the first character after the selected region.

The function returns the following values:

  • ok: TRUE if successful, FALSE otherwise.

func (*Text) BoundedRanges

func (text *Text) BoundedRanges(rect *TextRectangle, coordType CoordType, xClipType, yClipType TextClipType) []*TextRange

BoundedRanges: get the ranges of text in the specified bounding box.

The function takes the following parameters:

  • rect: atkTextRectangle giving the dimensions of the bounding box.
  • coordType: specify whether coordinates are relative to the screen or widget window.
  • xClipType: specify the horizontal clip type.
  • yClipType: specify the vertical clip type.

The function returns the following values:

  • textRanges: array of AtkTextRange. The last element of the array returned by this function will be NULL.

func (*Text) CaretOffset

func (text *Text) CaretOffset() int

CaretOffset gets the offset of the position of the caret (cursor).

The function returns the following values:

  • gint: character offset of the position of the caret or -1 if the caret is not located inside the element or in the case of any other failure.

func (*Text) CharacterAtOffset

func (text *Text) CharacterAtOffset(offset int) uint32

CharacterAtOffset gets the specified text.

The function takes the following parameters:

  • offset: character offset within text.

The function returns the following values:

  • gunichar: character at offset or 0 in the case of failure.

func (*Text) CharacterCount

func (text *Text) CharacterCount() int

CharacterCount gets the character count.

The function returns the following values:

  • gint: number of characters or -1 in case of failure.

func (*Text) CharacterExtents

func (text *Text) CharacterExtents(offset int, coords CoordType) (x, y, width, height int)

CharacterExtents: if the extent can not be obtained (e.g. missing support), all of x, y, width, height are set to -1.

Get the bounding box containing the glyph representing the character at a particular text offset.

The function takes the following parameters:

  • offset of the text character for which bounding information is required.
  • coords: specify whether coordinates are relative to the screen or widget window.

The function returns the following values:

  • x (optional): pointer for the x coordinate of the bounding box.
  • y (optional): pointer for the y coordinate of the bounding box.
  • width (optional): pointer for the width of the bounding box.
  • height (optional): pointer for the height of the bounding box.

func (*Text) ConnectTextAttributesChanged

func (text *Text) ConnectTextAttributesChanged(f func()) coreglib.SignalHandle

ConnectTextAttributesChanged: "text-attributes-changed" signal is emitted when the text attributes of the text of an object which implements AtkText changes.

func (*Text) ConnectTextCaretMoved

func (text *Text) ConnectTextCaretMoved(f func(arg1 int)) coreglib.SignalHandle

ConnectTextCaretMoved: "text-caret-moved" signal is emitted when the caret position of the text of an object which implements AtkText changes.

func (*Text) ConnectTextChanged

func (text *Text) ConnectTextChanged(f func(arg1, arg2 int)) coreglib.SignalHandle

ConnectTextChanged: "text-changed" signal is emitted when the text of the object which implements the AtkText interface changes, This signal will have a detail which is either "insert" or "delete" which identifies whether the text change was an insertion or a deletion.

func (*Text) ConnectTextInsert

func (text *Text) ConnectTextInsert(f func(arg1, arg2 int, arg3 string)) coreglib.SignalHandle

ConnectTextInsert: "text-insert" signal is emitted when a new text is inserted. If the signal was not triggered by the user (e.g. typing or pasting text), the "system" detail should be included.

func (*Text) ConnectTextRemove

func (text *Text) ConnectTextRemove(f func(arg1, arg2 int, arg3 string)) coreglib.SignalHandle

ConnectTextRemove: "text-remove" signal is emitted when a new text is removed. If the signal was not triggered by the user (e.g. typing or pasting text), the "system" detail should be included.

func (*Text) ConnectTextSelectionChanged

func (text *Text) ConnectTextSelectionChanged(f func()) coreglib.SignalHandle

ConnectTextSelectionChanged: "text-selection-changed" signal is emitted when the selected text of an object which implements AtkText changes.

func (*Text) NSelections

func (text *Text) NSelections() int

NSelections gets the number of selected regions.

The function returns the following values:

  • gint: number of selected regions, or -1 in the case of failure.

func (*Text) OffsetAtPoint

func (text *Text) OffsetAtPoint(x, y int, coords CoordType) int

OffsetAtPoint gets the offset of the character located at coordinates x and y. x and y are interpreted as being relative to the screen or this widget's window depending on coords.

The function takes the following parameters:

  • x: screen x-position of character.
  • y: screen y-position of character.
  • coords: specify whether coordinates are relative to the screen or widget window.

The function returns the following values:

  • gint: offset to the character which is located at the specified x and y coordinates of -1 in case of failure.

func (*Text) RangeExtents

func (text *Text) RangeExtents(startOffset, endOffset int, coordType CoordType) *TextRectangle

RangeExtents: get the bounding box for text within the specified range.

If the extents can not be obtained (e.g. or missing support), the rectangle fields are set to -1.

The function takes the following parameters:

  • startOffset: offset of the first text character for which boundary information is required.
  • endOffset: offset of the text character after the last character for which boundary information is required.
  • coordType: specify whether coordinates are relative to the screen or widget window.

The function returns the following values:

  • rect: pointer to a AtkTextRectangle which is filled in by this function.

func (*Text) RemoveSelection

func (text *Text) RemoveSelection(selectionNum int) bool

RemoveSelection removes the specified selection.

The function takes the following parameters:

  • selectionNum: selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.

The function returns the following values:

  • ok: TRUE if successful, FALSE otherwise.

func (*Text) ScrollSubstringTo

func (text *Text) ScrollSubstringTo(startOffset, endOffset int, typ ScrollType) bool

ScrollSubstringTo makes a substring of text visible on the screen by scrolling all necessary parents.

The function takes the following parameters:

  • startOffset: start offset in the text.
  • endOffset: end offset in the text, or -1 for the end of the text.
  • typ: specify where the object should be made visible.

The function returns the following values:

  • ok: whether scrolling was successful.

func (*Text) ScrollSubstringToPoint

func (text *Text) ScrollSubstringToPoint(startOffset, endOffset int, coords CoordType, x, y int) bool

ScrollSubstringToPoint: move the top-left of a substring of text to a given position of the screen by scrolling all necessary parents.

The function takes the following parameters:

  • startOffset: start offset in the text.
  • endOffset: end offset in the text, or -1 for the end of the text.
  • coords: specify whether coordinates are relative to the screen or to the parent object.
  • x: x-position where to scroll to.
  • y: y-position where to scroll to.

The function returns the following values:

  • ok: whether scrolling was successful.

func (*Text) Selection

func (text *Text) Selection(selectionNum int) (startOffset, endOffset int, utf8 string)

Selection gets the text from the specified selection.

The function takes the following parameters:

  • selectionNum: selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.

The function returns the following values:

  • startOffset passes back the starting character offset of the selected region.
  • endOffset passes back the ending character offset (offset immediately past) of the selected region.
  • utf8: newly allocated string containing the selected text. Use g_free() to free the returned string.

func (*Text) SetCaretOffset

func (text *Text) SetCaretOffset(offset int) bool

SetCaretOffset sets the caret (cursor) position to the specified offset.

In the case of rich-text content, this method should either grab focus or move the sequential focus navigation starting point (if the application supports this concept) as if the user had clicked on the new caret position. Typically, this means that the target of this operation is the node containing the new caret position or one of its ancestors. In other words, after this method is called, if the user advances focus, it should move to the first focusable node following the new caret position.

Calling this method should also scroll the application viewport in a way that matches the behavior of the application's typical caret motion or tab navigation as closely as possible. This also means that if the application's caret motion or focus navigation does not trigger a scroll operation, this method should not trigger one either. If the application does not have a caret motion or focus navigation operation, this method should try to scroll the new caret position into view while minimizing unnecessary scroll motion.

The function takes the following parameters:

  • offset: character offset of the new caret position.

The function returns the following values:

  • ok: TRUE if successful, FALSE otherwise.

func (*Text) SetSelection

func (text *Text) SetSelection(selectionNum, startOffset, endOffset int) bool

SetSelection changes the start and end offset of the specified selection.

The function takes the following parameters:

  • selectionNum: selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
  • startOffset: new starting character offset of the selection.
  • endOffset: new end position of (e.g. offset immediately past) the selection.

The function returns the following values:

  • ok: TRUE if successful, FALSE otherwise.

func (*Text) StringAtOffset

func (text *Text) StringAtOffset(offset int, granularity TextGranularity) (startOffset, endOffset int, utf8 string)

StringAtOffset gets a portion of the text exposed through an Text according to a given offset and a specific granularity, along with the start and end offsets defining the boundaries of such a portion of text.

If granularity is ATK_TEXT_GRANULARITY_CHAR the character at the offset is returned.

If granularity is ATK_TEXT_GRANULARITY_WORD the returned string is from the word start at or before the offset to the word start after the offset.

The returned string will contain the word at the offset if the offset is inside a word and will contain the word before the offset if the offset is not inside a word.

If granularity is ATK_TEXT_GRANULARITY_SENTENCE the returned string is from the sentence start at or before the offset to the sentence start after the offset.

The returned string will contain the sentence at the offset if the offset is inside a sentence and will contain the sentence before the offset if the offset is not inside a sentence.

If granularity is ATK_TEXT_GRANULARITY_LINE the returned string is from the line start at or before the offset to the line start after the offset.

If granularity is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string is from the start of the paragraph at or before the offset to the start of the following paragraph after the offset.

The function takes the following parameters:

  • offset: position.
  • granularity: TextGranularity.

The function returns the following values:

  • startOffset: starting character offset of the returned string, or -1 in the case of error (e.g. invalid offset, not implemented).
  • endOffset: offset of the first character after the returned string, or -1 in the case of error (e.g. invalid offset, not implemented).
  • utf8 (optional): newly allocated string containing the text at the offset bounded by the specified granularity. Use g_free() to free the returned string. Returns NULL if the offset is invalid or no implementation is available.

func (*Text) Text

func (text *Text) Text(startOffset, endOffset int) string

Text gets the specified text.

The function takes the following parameters:

  • startOffset: starting character offset within text.
  • endOffset: ending character offset within text, or -1 for the end of the string.

The function returns the following values:

  • utf8: newly allocated string containing the text from start_offset up to, but not including end_offset. Use g_free() to free the returned string.

func (*Text) TextAfterOffset deprecated

func (text *Text) TextAfterOffset(offset int, boundaryType TextBoundary) (startOffset, endOffset int, utf8 string)

TextAfterOffset gets the specified text.

Deprecated: Please use atk_text_get_string_at_offset() instead.

The function takes the following parameters:

  • offset: position.
  • boundaryType: TextBoundary.

The function returns the following values:

  • startOffset: starting character offset of the returned string.
  • endOffset: offset of the first character after the returned substring.
  • utf8: newly allocated string containing the text after offset bounded by the specified boundary_type. Use g_free() to free the returned string.

func (*Text) TextAtOffset deprecated

func (text *Text) TextAtOffset(offset int, boundaryType TextBoundary) (startOffset, endOffset int, utf8 string)

TextAtOffset gets the specified text.

If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the offset is returned.

If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string is from the word start at or before the offset to the word start after the offset.

The returned string will contain the word at the offset if the offset is inside a word and will contain the word before the offset if the offset is not inside a word.

If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned string is from the sentence start at or before the offset to the sentence start after the offset.

The returned string will contain the sentence at the offset if the offset is inside a sentence and will contain the sentence before the offset if the offset is not inside a sentence.

If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned string is from the line start at or before the offset to the line start after the offset.

Deprecated: This method is deprecated since ATK version 2.9.4. Please use atk_text_get_string_at_offset() instead.

The function takes the following parameters:

  • offset: position.
  • boundaryType: TextBoundary.

The function returns the following values:

  • startOffset: starting character offset of the returned string.
  • endOffset: offset of the first character after the returned substring.
  • utf8: newly allocated string containing the text at offset bounded by the specified boundary_type. Use g_free() to free the returned string.

func (*Text) TextBeforeOffset deprecated

func (text *Text) TextBeforeOffset(offset int, boundaryType TextBoundary) (startOffset, endOffset int, utf8 string)

TextBeforeOffset gets the specified text.

Deprecated: Please use atk_text_get_string_at_offset() instead.

The function takes the following parameters:

  • offset: position.
  • boundaryType: TextBoundary.

The function returns the following values:

  • startOffset: starting character offset of the returned string.
  • endOffset: offset of the first character after the returned substring.
  • utf8: newly allocated string containing the text before offset bounded by the specified boundary_type. Use g_free() to free the returned string.

type TextAttribute

type TextAttribute C.gint

TextAttribute describes the text attributes supported.

const (
	// TextAttrInvalid: invalid attribute, like bad spelling or grammar.
	TextAttrInvalid TextAttribute = iota
	// TextAttrLeftMargin: pixel width of the left margin.
	TextAttrLeftMargin
	// TextAttrRightMargin: pixel width of the right margin.
	TextAttrRightMargin
	// TextAttrIndent: number of pixels that the text is indented.
	TextAttrIndent
	// TextAttrInvisible: either "true" or "false" indicating whether text is
	// visible or not.
	TextAttrInvisible
	// TextAttrEditable: either "true" or "false" indicating whether text is
	// editable or not.
	TextAttrEditable
	// TextAttrPixelsAboveLines pixels of blank space to leave above each
	// newline-terminated line.
	TextAttrPixelsAboveLines
	// TextAttrPixelsBelowLines pixels of blank space to leave below each
	// newline-terminated line.
	TextAttrPixelsBelowLines
	// TextAttrPixelsInsideWrap pixels of blank space to leave between wrapped
	// lines inside the same newline-terminated line (paragraph).
	TextAttrPixelsInsideWrap
	// TextAttrBgFullHeight: "true" or "false" whether to make the background
	// color for each character the height of the highest font used on the
	// current line, or the height of the font used for the current character.
	TextAttrBgFullHeight
	// TextAttrRise: number of pixels that the characters are risen above the
	// baseline. See also ATK_TEXT_ATTR_TEXT_POSITION.
	TextAttrRise
	// TextAttrUnderline: "none", "single", "double", "low", or "error".
	TextAttrUnderline
	// TextAttrStrikethrough: "true" or "false" whether the text is
	// strikethrough.
	TextAttrStrikethrough
	// TextAttrSize: size of the characters in points. eg: 10.
	TextAttrSize
	// TextAttrScale: scale of the characters. The value is a string
	// representation of a double.
	TextAttrScale
	// TextAttrWeight: weight of the characters.
	TextAttrWeight
	// TextAttrLanguage: language used.
	TextAttrLanguage
	// TextAttrFamilyName: font family name.
	TextAttrFamilyName
	// TextAttrBgColor: background color. The value is an RGB value of the
	// format "u,u,u".
	TextAttrBgColor
	// TextAttrFgColor: foreground color. The value is an RGB value of the
	// format "u,u,u".
	TextAttrFgColor
	// TextAttrBgStipple: "true" if a Bitmap is set for stippling the background
	// color.
	TextAttrBgStipple
	// TextAttrFgStipple: "true" if a Bitmap is set for stippling the foreground
	// color.
	TextAttrFgStipple
	// TextAttrWrapMode: wrap mode of the text, if any. Values are "none",
	// "char", "word", or "word_char".
	TextAttrWrapMode
	// TextAttrDirection: direction of the text, if set. Values are "none",
	// "ltr" or "rtl".
	TextAttrDirection
	// TextAttrJustification: justification of the text, if set. Values are
	// "left", "right", "center" or "fill".
	TextAttrJustification
	// TextAttrStretch: stretch of the text, if set. Values are
	// "ultra_condensed", "extra_condensed", "condensed", "semi_condensed",
	// "normal", "semi_expanded", "expanded", "extra_expanded" or
	// "ultra_expanded".
	TextAttrStretch
	// TextAttrVariant: capitalization variant of the text, if set. Values are
	// "normal" or "small_caps".
	TextAttrVariant
	// TextAttrStyle: slant style of the text, if set. Values are "normal",
	// "oblique" or "italic".
	TextAttrStyle
	// TextAttrTextPosition: vertical position with respect to the baseline.
	// Values are "baseline", "super", or "sub". Note that a super or sub text
	// attribute refers to position with respect to the baseline of the prior
	// character.
	TextAttrTextPosition
	// TextAttrLastDefined: not a valid text attribute, used for finding end of
	// enumeration.
	TextAttrLastDefined
)

func TextAttributeForName

func TextAttributeForName(name string) TextAttribute

TextAttributeForName: get the TextAttribute type corresponding to a text attribute name.

The function takes the following parameters:

  • name: string which is the (non-localized) name of an ATK text attribute.

The function returns the following values:

  • textAttribute enumerated type corresponding to the specified name, or K_TEXT_ATTRIBUTE_INVALID if no matching text attribute is found.

func TextAttributeRegister

func TextAttributeRegister(name string) TextAttribute

TextAttributeRegister: associate name with a new TextAttribute.

The function takes the following parameters:

  • name string.

The function returns the following values:

  • textAttribute associated with name.

func (TextAttribute) String

func (t TextAttribute) String() string

String returns the name in string for TextAttribute.

type TextBoundary

type TextBoundary C.gint

TextBoundary: 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.

const (
	// TextBoundaryChar: boundary is the boundary between characters (including
	// non-printing characters).
	TextBoundaryChar TextBoundary = iota
	// TextBoundaryWordStart: boundary is the start (i.e. first character) of a
	// word.
	TextBoundaryWordStart
	// TextBoundaryWordEnd: boundary is the end (i.e. last character) of a word.
	TextBoundaryWordEnd
	// TextBoundarySentenceStart: boundary is the first character in a sentence.
	TextBoundarySentenceStart
	// TextBoundarySentenceEnd: boundary is the last (terminal) character in
	// a sentence; in languages which use "sentence stop" punctuation such
	// as English, the boundary is thus the '.', '?', or similar terminal
	// punctuation character.
	TextBoundarySentenceEnd
	// TextBoundaryLineStart: boundary is the initial character of the content
	// or a character immediately following a newline, linefeed, or return
	// character.
	TextBoundaryLineStart
	// TextBoundaryLineEnd: boundary is the linefeed, or return character.
	TextBoundaryLineEnd
)

func (TextBoundary) String

func (t TextBoundary) String() string

String returns the name in string for TextBoundary.

type TextClipType

type TextClipType C.gint

TextClipType describes the type of clipping required.

const (
	// TextClipNone: no clipping to be done.
	TextClipNone TextClipType = iota
	// TextClipMin: text clipped by min coordinate is omitted.
	TextClipMin
	// TextClipMax: text clipped by max coordinate is omitted.
	TextClipMax
	// TextClipBoth: only text fully within mix/max bound is retained.
	TextClipBoth
)

func (TextClipType) String

func (t TextClipType) String() string

String returns the name in string for TextClipType.

type TextGranularity

type TextGranularity C.gint

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

const (
	// TextGranularityChar: granularity is defined by the boundaries between
	// characters (including non-printing characters).
	TextGranularityChar TextGranularity = iota
	// TextGranularityWord: granularity is defined by the boundaries of a word,
	// starting at the beginning of the current word and finishing at the
	// beginning of the following one, if present.
	TextGranularityWord
	// TextGranularitySentence: granularity is defined by the boundaries of a
	// sentence, starting at the beginning of the current sentence and finishing
	// at the beginning of the following one, if present.
	TextGranularitySentence
	// TextGranularityLine: granularity is defined by the boundaries of a line,
	// starting at the beginning of the current line and finishing at the
	// beginning of the following one, if present.
	TextGranularityLine
	// TextGranularityParagraph: granularity is defined by the boundaries of
	// a paragraph, starting at the beginning of the current paragraph and
	// finishing at the beginning of the following one, if present.
	TextGranularityParagraph
)

func (TextGranularity) String

func (t TextGranularity) String() string

String returns the name in string for TextGranularity.

type TextIface added in v0.0.5

type TextIface struct {
	// contains filtered or unexported fields
}

TextIface: instance of this type is always passed by reference.

type TextRange

type TextRange struct {
	// contains filtered or unexported fields
}

TextRange: structure used to describe a text range.

An instance of this type is always passed by reference.

func (*TextRange) Bounds

func (t *TextRange) Bounds() *TextRectangle

Bounds: rectangle giving the bounds of the text range.

func (*TextRange) Content

func (t *TextRange) Content() string

Content: text in the text range.

func (*TextRange) EndOffset

func (t *TextRange) EndOffset() int

EndOffset: end offset of a AtkTextRange.

func (*TextRange) SetEndOffset

func (t *TextRange) SetEndOffset(endOffset int)

EndOffset: end offset of a AtkTextRange.

func (*TextRange) SetStartOffset

func (t *TextRange) SetStartOffset(startOffset int)

StartOffset: start offset of a AtkTextRange.

func (*TextRange) StartOffset

func (t *TextRange) StartOffset() int

StartOffset: start offset of a AtkTextRange.

type TextRectangle

type TextRectangle struct {
	// contains filtered or unexported fields
}

TextRectangle: structure used to store a rectangle used by AtkText.

An instance of this type is always passed by reference.

func NewTextRectangle

func NewTextRectangle(x, y, width, height int) TextRectangle

NewTextRectangle creates a new TextRectangle instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!

func (*TextRectangle) Height

func (t *TextRectangle) Height() int

Height: height of a rectangle.

func (*TextRectangle) SetHeight

func (t *TextRectangle) SetHeight(height int)

Height: height of a rectangle.

func (*TextRectangle) SetWidth

func (t *TextRectangle) SetWidth(width int)

Width: width of a rectangle.

func (*TextRectangle) SetX

func (t *TextRectangle) SetX(x int)

X: horizontal coordinate of a rectangle.

func (*TextRectangle) SetY

func (t *TextRectangle) SetY(y int)

Y: vertical coordinate of a rectangle.

func (*TextRectangle) Width

func (t *TextRectangle) Width() int

Width: width of a rectangle.

func (*TextRectangle) X

func (t *TextRectangle) X() int

X: horizontal coordinate of a rectangle.

func (*TextRectangle) Y

func (t *TextRectangle) Y() int

Y: vertical coordinate of a rectangle.

type TextSelection added in v0.3.0

type TextSelection struct {
	// contains filtered or unexported fields
}

TextSelection: this structure represents a single text selection within a document. This selection is defined by two points in the content, where each one is defined by an AtkObject supporting the AtkText interface and a character offset relative to it.

The end object must appear after the start object in the accessibility tree, i.e. the end object must be reachable from the start object by navigating forward (next, first child etc).

This struct also contains a start_is_active boolean, to communicate if the start of the selection is the active point or not.

The active point corresponds to the user's focus or point of interest. The user moves the active point to expand or collapse the range. The anchor point is the other point of the range and typically remains constant. In most cases, anchor is the start of the range and active is the end. However, when selecting backwards (e.g. pressing shift+left arrow in a text field), the start of the range is the active point, as the user moves this to manipulate the selection.

An instance of this type is always passed by reference.

func (*TextSelection) EndObject added in v0.3.0

func (t *TextSelection) EndObject() *AtkObject

EndObject: atkText containing the end of the selection.

func (*TextSelection) EndOffset added in v0.3.0

func (t *TextSelection) EndOffset() int

EndOffset: text offset of the end of the selection within end_object.

func (*TextSelection) SetEndOffset added in v0.3.0

func (t *TextSelection) SetEndOffset(endOffset int)

EndOffset: text offset of the end of the selection within end_object.

func (*TextSelection) SetStartIsActive added in v0.3.0

func (t *TextSelection) SetStartIsActive(startIsActive bool)

StartIsActive: gboolean indicating whether the start of the selection is the active point.

func (*TextSelection) SetStartOffset added in v0.3.0

func (t *TextSelection) SetStartOffset(startOffset int)

StartOffset: text offset of the beginning of the selection within start_object.

func (*TextSelection) StartIsActive added in v0.3.0

func (t *TextSelection) StartIsActive() bool

StartIsActive: gboolean indicating whether the start of the selection is the active point.

func (*TextSelection) StartObject added in v0.3.0

func (t *TextSelection) StartObject() *AtkObject

StartObject: atkText containing the start of the selection.

func (*TextSelection) StartOffset added in v0.3.0

func (t *TextSelection) StartOffset() int

StartOffset: text offset of the beginning of the selection within start_object.

type Texter

type Texter interface {
	coreglib.Objector

	// AddSelection adds a selection bounded by the specified offsets.
	AddSelection(startOffset, endOffset int) bool
	// BoundedRanges: get the ranges of text in the specified bounding box.
	BoundedRanges(rect *TextRectangle, coordType CoordType, xClipType, yClipType TextClipType) []*TextRange
	// CaretOffset gets the offset of the position of the caret (cursor).
	CaretOffset() int
	// CharacterAtOffset gets the specified text.
	CharacterAtOffset(offset int) uint32
	// CharacterCount gets the character count.
	CharacterCount() int
	// CharacterExtents: if the extent can not be obtained (e.g.
	CharacterExtents(offset int, coords CoordType) (x, y, width, height int)
	// NSelections gets the number of selected regions.
	NSelections() int
	// OffsetAtPoint gets the offset of the character located at coordinates x
	// and y.
	OffsetAtPoint(x, y int, coords CoordType) int
	// RangeExtents: get the bounding box for text within the specified range.
	RangeExtents(startOffset, endOffset int, coordType CoordType) *TextRectangle
	// Selection gets the text from the specified selection.
	Selection(selectionNum int) (startOffset, endOffset int, utf8 string)
	// StringAtOffset gets a portion of the text exposed through an Text
	// according to a given offset and a specific granularity, along with the
	// start and end offsets defining the boundaries of such a portion of text.
	StringAtOffset(offset int, granularity TextGranularity) (startOffset, endOffset int, utf8 string)
	// Text gets the specified text.
	Text(startOffset, endOffset int) string
	// TextAfterOffset gets the specified text.
	TextAfterOffset(offset int, boundaryType TextBoundary) (startOffset, endOffset int, utf8 string)
	// TextAtOffset gets the specified text.
	TextAtOffset(offset int, boundaryType TextBoundary) (startOffset, endOffset int, utf8 string)
	// TextBeforeOffset gets the specified text.
	TextBeforeOffset(offset int, boundaryType TextBoundary) (startOffset, endOffset int, utf8 string)
	// RemoveSelection removes the specified selection.
	RemoveSelection(selectionNum int) bool
	// ScrollSubstringTo makes a substring of text visible on the screen by
	// scrolling all necessary parents.
	ScrollSubstringTo(startOffset, endOffset int, typ ScrollType) bool
	// ScrollSubstringToPoint: move the top-left of a substring of text to a
	// given position of the screen by scrolling all necessary parents.
	ScrollSubstringToPoint(startOffset, endOffset int, coords CoordType, x, y int) bool
	// SetCaretOffset sets the caret (cursor) position to the specified offset.
	SetCaretOffset(offset int) bool
	// SetSelection changes the start and end offset of the specified selection.
	SetSelection(selectionNum, startOffset, endOffset int) bool

	// Text-attributes-changed: "text-attributes-changed" signal is emitted when
	// the text attributes of the text of an object which implements AtkText
	// changes.
	ConnectTextAttributesChanged(func()) coreglib.SignalHandle
	// Text-caret-moved: "text-caret-moved" signal is emitted when the caret
	// position of the text of an object which implements AtkText changes.
	ConnectTextCaretMoved(func(arg1 int)) coreglib.SignalHandle
	// Text-changed: "text-changed" signal is emitted when the text of the
	// object which implements the AtkText interface changes, This signal will
	// have a detail which is either "insert" or "delete" which identifies
	// whether the text change was an insertion or a deletion.
	ConnectTextChanged(func(arg1, arg2 int)) coreglib.SignalHandle
	// Text-insert: "text-insert" signal is emitted when a new text is inserted.
	ConnectTextInsert(func(arg1, arg2 int, arg3 string)) coreglib.SignalHandle
	// Text-remove: "text-remove" signal is emitted when a new text is removed.
	ConnectTextRemove(func(arg1, arg2 int, arg3 string)) coreglib.SignalHandle
	// Text-selection-changed: "text-selection-changed" signal is emitted when
	// the selected text of an object which implements AtkText changes.
	ConnectTextSelectionChanged(func()) coreglib.SignalHandle
}

Texter describes Text's interface methods.

type Util

type Util struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Util: set of ATK utility functions for event and toolkit support.

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.

type UtilClass added in v0.0.5

type UtilClass struct {
	// contains filtered or unexported fields
}

UtilClass: instance of this type is always passed by reference.

type UtilOverrides added in v0.0.5

type UtilOverrides struct {
}

UtilOverrides contains methods that are overridable.

type Value

type Value struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Value: ATK interface implemented by valuators and components which display or select a value from a bounded range of values.

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. KValues may be read-only, in which case attempts to alter the value return would fail.

<refsect1 id="current-value-text"> <title>On the subject of current value text</title> <para> In addition to providing the current value, implementors can optionally provide an end-user-consumable textual description associated with this value. This description should be included when the numeric value fails to convey the full, on-screen representation seen by users. </para>

<example> <title>Password strength</title> A password strength meter whose value changes as the user types their new password. Red is used for values less than 4.0, yellow for values between 4.0 and 7.0, and green for values greater than 7.0. In this instance, value text should be provided by the implementor. Appropriate value text would be "weak", "acceptable," and "strong" respectively. </example>

A level bar whose value changes to reflect the battery charge. The color remains the same regardless of the charge and there is no on-screen text reflecting the fullness of the battery. In this case, because the position within the bar is the only indication the user has of the current charge, value text should not be provided by the implementor.

<refsect2 id="implementor-notes"> <title>Implementor Notes</title> <para> Implementors should bear in mind that assistive technologies will likely prefer the value text provided over the numeric value when presenting a widget's value. As a result, strings not intended for end users should not be exposed in the value text, and strings which are exposed should be localized. In the case of widgets which display value text on screen, for instance through a separate label in close proximity to the value-displaying widget, it is still expected that implementors will expose the value text using the above API. </para>

<para> Value should NOT be implemented for widgets whose displayed value is not reflective of a meaningful amount. For instance, a progress pulse indicator whose value alternates between 0.0 and 1.0 to indicate that some process is still taking place should not implement Value because the current value does not reflect progress towards completion. </para> </refsect2> </refsect1>

<refsect1 id="ranges"> <title>On the subject of ranges</title> <para> In addition to providing the minimum and maximum values, implementors can optionally provide details about subranges associated with the widget. These details should be provided by the implementor when both of the following are communicated visually to the end user: </para> <itemizedlist> <listitem>The existence of distinct ranges such as "weak", "acceptable", and "strong" indicated by color, bar tick marks, and/or on-screen text.</listitem> <listitem>Where the current value stands within a given subrange, for instance illustrating progression from very "weak" towards nearly "acceptable" through changes in shade and/or position on the bar within the "weak" subrange.</listitem> </itemizedlist> <para> If both of the above do not apply to the widget, it should be sufficient to expose the numeric value, along with the value text if appropriate, to make the widget accessible. </para>

<refsect2 id="ranges-implementor-notes"> <title>Implementor Notes</title> <para> If providing subrange details is deemed necessary, all possible values of the widget are expected to fall within one of the subranges defined by the implementor. </para> </refsect2> </refsect1>

<refsect1 id="localization"> <title>On the subject of localization of end-user-consumable text values</title> <para> Because value text and subrange descriptors are human-consumable, implementors are expected to provide localized strings which can be directly presented to end users via their assistive technology. In order to simplify this for implementors, implementors can use atk_value_type_get_localized_name() with the following already-localized constants for commonly-needed values can be used: </para>

<itemizedlist> <listitem>ATK_VALUE_VERY_WEAK</listitem> <listitem>ATK_VALUE_WEAK</listitem> <listitem>ATK_VALUE_ACCEPTABLE</listitem> <listitem>ATK_VALUE_STRONG</listitem> <listitem>ATK_VALUE_VERY_STRONG</listitem> <listitem>ATK_VALUE_VERY_LOW</listitem> <listitem>ATK_VALUE_LOW</listitem> <listitem>ATK_VALUE_MEDIUM</listitem> <listitem>ATK_VALUE_HIGH</listitem> <listitem>ATK_VALUE_VERY_HIGH</listitem> <listitem>ATK_VALUE_VERY_BAD</listitem> <listitem>ATK_VALUE_BAD</listitem> <listitem>ATK_VALUE_GOOD</listitem> <listitem>ATK_VALUE_VERY_GOOD</listitem> <listitem>ATK_VALUE_BEST</listitem> <listitem>ATK_VALUE_SUBSUBOPTIMAL</listitem> <listitem>ATK_VALUE_SUBOPTIMAL</listitem> <listitem>ATK_VALUE_OPTIMAL</listitem> </itemizedlist> <para> Proposals for additional constants, along with their use cases, should be submitted to the GNOME Accessibility Team. </para> </refsect1>

<refsect1 id="changes"> <title>On the subject of changes</title> <para> Note that if there is a textual description associated with the new numeric value, that description should be included regardless of whether or not it has also changed. </para> </refsect1>.

Value wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Value) ConnectValueChanged

func (obj *Value) ConnectValueChanged(f func(value float64, text string)) coreglib.SignalHandle

ConnectValueChanged: 'value-changed' signal is emitted when the current value that represent the object changes. value is the numerical representation of this new value. text is the human readable text alternative of value, and can be NULL if it is not available. Note that if there is a textual description associated with the new numeric value, that description should be included regardless of whether or not it has also changed.

Example: a password meter whose value changes as the user types their new password. Appropiate value text would be "weak", "acceptable" and "strong".

func (*Value) CurrentValue deprecated

func (obj *Value) CurrentValue() coreglib.Value

CurrentValue gets the value of this object.

Deprecated: Since 2.12. Use atk_value_get_value_and_text() instead.

The function returns the following values:

  • value representing the current accessible value.

func (*Value) Increment

func (obj *Value) Increment() float64

Increment gets the minimum increment by which the value of this object may be changed. If zero, the minimum increment is undefined, which may mean that it is limited only by the floating point precision of the platform.

The function returns the following values:

  • gdouble: minimum increment by which the value of this object may be changed. zero if undefined.

func (*Value) MaximumValue deprecated

func (obj *Value) MaximumValue() coreglib.Value

MaximumValue gets the maximum value of this object.

Deprecated: Since 2.12. Use atk_value_get_range() instead.

The function returns the following values:

  • value representing the maximum accessible value.

func (*Value) MinimumIncrement deprecated

func (obj *Value) MinimumIncrement() coreglib.Value

MinimumIncrement gets the minimum increment by which the value of this object may be changed. If zero, the minimum increment is undefined, which may mean that it is limited only by the floating point precision of the platform.

Deprecated: Since 2.12. Use atk_value_get_increment() instead.

The function returns the following values:

  • value representing the minimum increment by which the accessible value may be changed.

func (*Value) MinimumValue deprecated

func (obj *Value) MinimumValue() coreglib.Value

MinimumValue gets the minimum value of this object.

Deprecated: Since 2.12. Use atk_value_get_range() instead.

The function returns the following values:

  • value representing the minimum accessible value.

func (*Value) Range

func (obj *Value) Range() *Range

Range gets the range of this object.

The function returns the following values:

  • _range (optional): newly allocated Range that represents the minimum, maximum and descriptor (if available) of obj. NULL if that range is not defined.

func (*Value) SetCurrentValue deprecated

func (obj *Value) SetCurrentValue(value *coreglib.Value) bool

SetCurrentValue sets the value of this object.

Deprecated: Since 2.12. Use atk_value_set_value() instead.

The function takes the following parameters:

  • value which is the desired new accessible value.

The function returns the following values:

  • ok: TRUE if new value is successfully set, FALSE otherwise.

func (*Value) SetValue

func (obj *Value) SetValue(newValue float64)

SetValue sets the value of this object.

This method is intended to provide a way to change the value of the object. In any case, it is possible that the value can't be modified (ie: a read-only component). If the value changes due this call, it is possible that the text could change, and will trigger an Value::value-changed signal emission.

Note for implementors: the deprecated atk_value_set_current_value() method returned TRUE or FALSE depending if the value was assigned or not. In the practice several implementors were not able to decide it, and returned TRUE in any case. For that reason it is not required anymore to return if the value was properly assigned or not.

The function takes the following parameters:

  • newValue: double which is the desired new accessible value.

func (*Value) SubRanges

func (obj *Value) SubRanges() []*Range

SubRanges gets the list of subranges defined for this object. See Value introduction for examples of subranges and when to expose them.

The function returns the following values:

  • sList of Range which each of the subranges defined for this object. Free the returns list with g_slist_free().

func (*Value) ValueAndText

func (obj *Value) ValueAndText() (float64, string)

ValueAndText gets the current value and the human readable text alternative of obj. text is a newly created string, that must be freed by the caller. Can be NULL if no descriptor is available.

The function returns the following values:

  • value address of #gdouble to put the current value of obj.
  • text (optional) address of #gchar to put the human readable text alternative for value.

type ValueIface added in v0.0.5

type ValueIface struct {
	// contains filtered or unexported fields
}

ValueIface: instance of this type is always passed by reference.

type ValueType

type ValueType C.gint

ValueType: 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 atk_value_type_get_localized_name().

const (
	ValueVeryWeak ValueType = iota
	ValueWeak
	ValueAcceptable
	ValueStrong
	ValueVeryStrong
	ValueVeryLow
	ValueLow
	ValueMedium
	ValueHigh
	ValueVeryHigh
	ValueVeryBad
	ValueBad
	ValueGood
	ValueVeryGood
	ValueBest
	ValueLastDefined
)

func (ValueType) String

func (v ValueType) String() string

String returns the name in string for ValueType.

type Valueer

type Valueer interface {
	coreglib.Objector

	// CurrentValue gets the value of this object.
	CurrentValue() coreglib.Value
	// Increment gets the minimum increment by which the value of this object
	// may be changed.
	Increment() float64
	// MaximumValue gets the maximum value of this object.
	MaximumValue() coreglib.Value
	// MinimumIncrement gets the minimum increment by which the value of this
	// object may be changed.
	MinimumIncrement() coreglib.Value
	// MinimumValue gets the minimum value of this object.
	MinimumValue() coreglib.Value
	// Range gets the range of this object.
	Range() *Range
	// SubRanges gets the list of subranges defined for this object.
	SubRanges() []*Range
	// ValueAndText gets the current value and the human readable text
	// alternative of obj.
	ValueAndText() (float64, string)
	// SetCurrentValue sets the value of this object.
	SetCurrentValue(value *coreglib.Value) bool
	// SetValue sets the value of this object.
	SetValue(newValue float64)

	// Value-changed: 'value-changed' signal is emitted when the current value
	// that represent the object changes.
	ConnectValueChanged(func(value float64, text string)) coreglib.SignalHandle
}

Valueer describes Value's interface methods.

type Window

type Window struct {
	AtkObject
	// contains filtered or unexported fields
}

Window: ATK Interface provided by UI components that represent a top-level window.

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

See atkobject.

Window wraps an interface. This means the user can get the underlying type by calling Cast().

func BaseWindow

func BaseWindow(obj Windower) *Window

BaseWindow returns the underlying base object.

func (*Window) ConnectActivate

func (v *Window) ConnectActivate(f func()) coreglib.SignalHandle

ConnectActivate: signal Window::activate is emitted when a window becomes the active window of the application or session.

func (*Window) ConnectCreate

func (v *Window) ConnectCreate(f func()) coreglib.SignalHandle

ConnectCreate: signal Window::create is emitted when a new window is created.

func (*Window) ConnectDeactivate

func (v *Window) ConnectDeactivate(f func()) coreglib.SignalHandle

ConnectDeactivate: signal Window::deactivate is emitted when a window is no longer the active window of the application or session.

func (*Window) ConnectDestroy

func (v *Window) ConnectDestroy(f func()) coreglib.SignalHandle

ConnectDestroy: signal Window::destroy is emitted when a window is destroyed.

func (*Window) ConnectMaximize

func (v *Window) ConnectMaximize(f func()) coreglib.SignalHandle

ConnectMaximize: signal Window::maximize is emitted when a window is maximized.

func (*Window) ConnectMinimize

func (v *Window) ConnectMinimize(f func()) coreglib.SignalHandle

ConnectMinimize: signal Window::minimize is emitted when a window is minimized.

func (*Window) ConnectMove

func (v *Window) ConnectMove(f func()) coreglib.SignalHandle

ConnectMove: signal Window::move is emitted when a window is moved.

func (*Window) ConnectResize

func (v *Window) ConnectResize(f func()) coreglib.SignalHandle

ConnectResize: signal Window::resize is emitted when a window is resized.

func (*Window) ConnectRestore

func (v *Window) ConnectRestore(f func()) coreglib.SignalHandle

ConnectRestore: signal Window::restore is emitted when a window is restored.

type WindowIface added in v0.0.5

type WindowIface struct {
	// contains filtered or unexported fields
}

WindowIface: instance of this type is always passed by reference.

type WindowOverrider

type WindowOverrider interface {
}

WindowOverrider contains methods that are overridable.

type Windower

type Windower interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

Windower describes Window's interface methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL