### Interface

# Atk Selection

#### Description [src]

    interface Atk.Selection : GObject.Object

The ATK interface implemented by container objects whose `AtkObject` children can be selected.

`AtkSelection` 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 `AtkObject` children - for example, selectable lists.

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

#### Prerequisite

In order to implement Selection, your type must inherit from`GObject`.

#### Implementations

- AtkNoOpObject

#### Instance methods

###### atk_selection_add_selection

Adds the specified accessible child of the object to the object’s selection.

###### atk_selection_clear_selection

Clears the selection in the object so that no children in the object are selected.

###### atk_selection_get_selection_count

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.

###### atk_selection_is_child_selected

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.

###### atk_selection_ref_selection

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.

###### atk_selection_remove_selection

Removes the specified child of the object from the object’s selection.

###### atk_selection_select_all_selection

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

#### Signals

###### Atk.Selection::selection-changed

The “selection-changed” signal is emitted by an object which implements AtkSelection interface when the selection changes.

#### Interface structure

    struct AtkSelectionIface {
      GTypeInterface parent;
      gboolean (* add_selection) (
        AtkSelection* selection,
        gint i
      );
      gboolean (* clear_selection) (
        AtkSelection* selection
      );
      AtkObject* (* ref_selection) (
        AtkSelection* selection,
        gint i
      );
      gint (* get_selection_count) (
        AtkSelection* selection
      );
      gboolean (* is_child_selected) (
        AtkSelection* selection,
        gint i
      );
      gboolean (* remove_selection) (
        AtkSelection* selection,
        gint i
      );
      gboolean (* select_all_selection) (
        AtkSelection* selection
      );
      void (* selection_changed) (
        AtkSelection* selection
      );

    }

No description available.

###### Interface members

`parent`

    GTypeInterface

| No description available.

`add_selection`

    gboolean (* add_selection) (
        AtkSelection* selection,
        gint i
      )

| No description available.

`clear_selection`

    gboolean (* clear_selection) (
        AtkSelection* selection
      )

| No description available.

`ref_selection`

    AtkObject* (* ref_selection) (
        AtkSelection* selection,
        gint i
      )

| No description available.

`get_selection_count`

    gint (* get_selection_count) (
        AtkSelection* selection
      )

| No description available.

`is_child_selected`

    gboolean (* is_child_selected) (
        AtkSelection* selection,
        gint i
      )

| No description available.

`remove_selection`

    gboolean (* remove_selection) (
        AtkSelection* selection,
        gint i
      )

| No description available.

`select_all_selection`

    gboolean (* select_all_selection) (
        AtkSelection* selection
      )

| No description available.

`selection_changed`

    void (* selection_changed) (
        AtkSelection* selection
      )

| No description available.

#### Virtual methods

###### Atk.Selection.add_selection

Adds the specified accessible child of the object to the object’s selection.

###### Atk.Selection.clear_selection

Clears the selection in the object so that no children in the object are selected.

###### Atk.Selection.get_selection_count

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.

###### Atk.Selection.is_child_selected

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.

###### Atk.Selection.ref_selection

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.

###### Atk.Selection.remove_selection

Removes the specified child of the object from the object’s selection.

###### Atk.Selection.select_all_selection

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

###### Atk.Selection.selection_changed

No description available.