AtkUtil {RGtk2} | R Documentation

## AtkUtil

### Description

A set of ATK utility functions for event and toolkit support.

### Methods and Functions

`atkAddFocusTracker(focus.tracker)`
`atkRemoveFocusTracker(tracker.id)`
`atkFocusTrackerInit(add.function)`
`atkFocusTrackerNotify(object)`
`atkAddGlobalEventListener(listener, event.type)`
`atkRemoveGlobalEventListener(listener.id)`
`atkAddKeyEventListener(listener, data)`
`atkRemoveKeyEventListener(listener.id)`
`atkGetRoot()`
`atkGetFocusObject()`
`atkGetToolkitName()`
`atkGetToolkitVersion()`

### Hierarchy

    GObject
       +----AtkUtil

### Detailed Description

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.

### Structures

`AtkUtil`

  The AtkUtil struct does not contain any fields.

`AtkKeyEventStruct`

  Encapsulates information about a key event. `AtkKeyEventStruct` is a transparent-type.

  `type`

    [integer] An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE

  `state`

    [numeric] A 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 https://developer.gnome.org/gdk2/stable/gdk2-Event-Structures.html`GdkEventKey`

  `keyval`

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

  `length`

    [integer] The length of member `string`.

  `string`

    [character] A 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".

  `keycode`

    [integer] The raw hardware code that generated the key event. This field is raraly useful.

  `timestamp`

    [numeric] A 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.

### Enums and Flags

`AtkCoordType`

  Specifies how xy coordinates are to be interpreted. Used by functions such as `atkComponentGetPosition` and `atkTextGetCharacterExtents`

  `screen`

    specifies xy coordinates relative to the screen

  `window`

    specifies xy coordinates relative to the widget's top-level window

`AtkKeyEventType`

  Specifies the type of a keyboard evemt.

  `press`

    specifies a key press event

  `release`

    specifies a key release event

  `last-defined`

    Not a valid value; specifies end of enumeration

### User Functions

`AtkEventListener(obj)`

  A function which is called when an object emits a matching event, as used in `atkAddFocusTracker`. Currently the only events for which object-specific handlers are supported are events of type "focus:". Most clients of ATK will prefer to attach signal handlers for the various ATK signals instead. `see`: atk_add_focus_tracker.

  `obj`

    [`AtkObject`] An `AtkObject` instance for whom the callback will be called when the specified event (e.g. 'focus:') takes place.

`AtkEventListenerInit()`

  An `AtkEventListenerInit` function is a special function that is called in order to initialize the per-object event registration system used by `AtkEventListener`, if any preparation is required. `see`: atk_focus_tracker_init.

`AtkKeySnoopFunc(event, func.data)`

  An `AtkKeySnoopFunc` 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.

  `event`

    [`AtkKeyEventStruct`] an AtkKeyEventStruct containing information about the key event for which notification is being given.

  `func.data`

    [R object] a block of data which will be passed to the event listener, on notification.

  Returns: [integer] TRUE (nonzero) if the event emission should be stopped and the event discarded without being passed to the normal GUI recipient; FALSE (zero) if the event dispatch to the client application should proceed as normal. `see`: atk_add_key_event_listener.

### Author(s)

Derived by RGtkGen from GTK+ documentation

### References

https://developer.gnome.org/atk/stable/AtkUtil.html

[Package RGtk2 version 2.20.36.3 Index]