atspi-selection

## atspi-selection atspi-selection — An interface which indicates that an object exposes a 'selection' model, allowing the selection of one or more of its children. |

## Synopsis

                        AtspiSelection;
    gint                atspi_selection_get_n_selected_children
                                                            (AtspiSelection *obj,
                                                             GError **error);
    AtspiAccessible *   atspi_selection_get_selected_child  (AtspiSelection *obj,
                                                             gint selected_child_index,
                                                             GError **error);
    gboolean            atspi_selection_select_child        (AtspiSelection *obj,
                                                             gint child_index,
                                                             GError **error);
    gboolean            atspi_selection_deselect_selected_child
                                                            (AtspiSelection *obj,
                                                             gint selected_child_index,
                                                             GError **error);
    gboolean            atspi_selection_deselect_child      (AtspiSelection *obj,
                                                             gint child_index,
                                                             GError **error);
    gboolean            atspi_selection_is_child_selected   (AtspiSelection *obj,
                                                             gint child_index,
                                                             GError **error);
    gboolean            atspi_selection_select_all          (AtspiSelection *obj,
                                                             GError **error);
    gboolean            atspi_selection_clear_selection     (AtspiSelection *obj,
                                                             GError **error);

## Object Hierarchy

      GInterface
       +----AtspiSelection

## Known Implementations

AtspiSelection is implemented by AtspiAccessible.

## Description

An interface which indicates that an object exposes a 'selection' model, allowing the selection of one or more of its children. Read-only Selection instances are possible, in which case the interface is used to programmatically determine the selected-ness of its children.

## Details

### AtspiSelection

    typedef struct _AtspiSelection AtspiSelection;

### atspi_selection_get_n_selected_children ()

    gint                atspi_selection_get_n_selected_children
                                                            (AtspiSelection *obj,
                                                             GError **error);

Gets the number of children of an AtspiSelection implementor which are currently selected.

`obj` : | a pointer to the AtspiSelection implementor on which to operate.
Returns : | a gint indicating the number of Accessible children of the AtspiSelection implementor which are currently selected.

### atspi_selection_get_selected_child ()

    AtspiAccessible *   atspi_selection_get_selected_child  (AtspiSelection *obj,
                                                             gint selected_child_index,
                                                             GError **error);

Gets the i-th selected AtspiAccessible child of an AtspiSelection. Note that `selected_child_index` refers to the index in the list of 'selected' children and generally differs from that used in atspi_accessible_get_child_at_index or returned by atspi_accessible_get_index_in_parent. `selected_child_index` must lie between 0 and atspi_selection_get_n_selected_children - 1, inclusive.

`obj` : | a pointer to the AtspiSelection on which to operate.
`selected_child_index` : | a gint indicating which of the selected children is specified.
Returns : | a pointer to a selected AtspiAccessible child object, specified by `selected_child_index`. [transfer full]

### atspi_selection_select_child ()

    gboolean            atspi_selection_select_child        (AtspiSelection *obj,
                                                             gint child_index,
                                                             GError **error);

Adds a child to the selected children list of an AtspiSelection. For AtspiSelection implementors that only allow single selections, this may replace the (single) current selection.

`obj` : | a pointer to the AtspiSelection on which to operate.
`child_index` : | a gint indicating which child of the Accessible is to be selected.
Returns : | TRUE if the child was successfully selected, FALSE otherwise.

### atspi_selection_deselect_selected_child ()

    gboolean            atspi_selection_deselect_selected_child
                                                            (AtspiSelection *obj,
                                                             gint selected_child_index,
                                                             GError **error);

Removes a child from the selected children list of an AtspiSelection. Note that `child_index` is the index in the selected-children list, not the index in the parent container. `selectedChildIndex` in this method, and `child_index` in atspi_selection_select_child are asymmetric.

`obj` : | a pointer to the AtspiSelection on which to operate.
`selected_child_index` : | a gint indicating which of the selected children of the Accessible is to be selected.
Returns : | TRUE if the child was successfully deselected, FALSE otherwise.

### atspi_selection_deselect_child ()

    gboolean            atspi_selection_deselect_child      (AtspiSelection *obj,
                                                             gint child_index,
                                                             GError **error);

Deselects a specific child of an AtspiSelection. Note that `child_index` is the index of the child in the parent container.

See atspi_selection_deselect_selected_child

`obj` : | a pointer to the AtspiSelection on which to operate.
`child_index` : | a gint indicating which of the children of the AtspiAccessible is to be de-selected.
Returns : | TRUE if the child was successfully deselected, FALSE otherwise.

### atspi_selection_is_child_selected ()

    gboolean            atspi_selection_is_child_selected   (AtspiSelection *obj,
                                                             gint child_index,
                                                             GError **error);

Determines whether a particular child of an AtspiSelection implementor is currently selected. Note that `child_index` is the index into the standard AtspiAccessible container's list of children.

`obj` : | a pointer to the AtspiSelection implementor on which to operate.
`child_index` : | an index into the AtspiSelection's list of children.
Returns : | TRUE if the specified child is currently selected, FALSE otherwise.

### atspi_selection_select_all ()

    gboolean            atspi_selection_select_all          (AtspiSelection *obj,
                                                             GError **error);

Attempts to select all of the children of an AtspiSelection implementor. Not all AtspiSelection implementors support this operation.

`obj` : | a pointer to the AtspiSelection implementor on which to operate.
Returns : | TRUE if successful, FALSE otherwise.

### atspi_selection_clear_selection ()

    gboolean            atspi_selection_clear_selection     (AtspiSelection *obj,
                                                             GError **error);

Clears the current selection, removing all selected children from the specified AtspiSelection implementor's selection list.

`obj` : | a pointer to the AtspiSelection implementor on which to operate.
Returns : | TRUE if successful, FALSE otherwise.