+
+/**
+ * atspi_state_set_equals:
+ * @set: a pointer to the first #AtspiStateSet object on which to operate.
+ * @set2: a pointer to the second #AtspiStateSet object on which to operate.
+ *
+ * Determine whether two instances of #AtspiStateSet are equivalent (i.e.
+ * consist of the same #AtspiStates). Useful for checking multiple
+ * state variables at once; construct the target state then compare against it.
+ *
+ * @see AtspiStateSet_compare().
+ *
+ * Returns: #TRUE if the two #AtspiStateSets are equivalent,
+ * otherwise #FALSE.
+ *
+ **/
+gboolean
+atspi_state_set_equals (AtspiStateSet *set,
+ AtspiStateSet *set2)
+{
+ if (set == set2)
+ return TRUE;
+ if (set == NULL || set2 == NULL)
+ return FALSE;
+ return (set->states == set2->states);
+}
+
+/**
+ * atspi_state_set_get_states:
+ *
+ * @set: The #AtspiStateSet to be queried.
+ *
+ * Return the states in an #AtspiStateSet as an array.
+ *
+ * Returns: (element-type AtspiStateType) (transfer full): A #GArray of state
+ * types representing the current state.
+ **/
+GArray *
+atspi_state_set_get_states (AtspiStateSet *set)
+{
+ gint i = 0;
+ guint64 val = 1;
+ GArray *ret;
+
+ g_return_val_if_fail (set != NULL, NULL);
+ refresh_states (set);
+ ret = g_array_new (TRUE, TRUE, sizeof (AtspiStateType));
+ if (!ret)
+ return NULL;
+ for (i = 0; i < 64; i++)
+ {
+ if (set->states & val)
+ {
+ GArray *new_array = g_array_append_val (ret, i);
+ if (new_array)
+ ret = new_array;
+ }
+ val <<= 1;
+ }
+ return ret;
+}
+
+/**
+ * atspi_state_set_is_empty:
+ *
+ * @set: The #AtspiStateSet to query.
+ *
+ * Returns: #TRUE if the state set contains no states; #FALSE otherwise.
+ **/
+gboolean
+atspi_state_set_is_empty (AtspiStateSet *set)
+{
+ return (set->states == 0);
+}
+
+/**
+ * atspi_state_set_remove:
+ *
+ * @set: a pointer to the #AtspiStateSet object on which to operate.
+ * @state: an #AtspiStateType to remove from the specifiedn state set.
+ *
+ * Remove a particular #AtspiState to an #AtspiStateSet (i.e. set the
+ * given state to #FALSE in the stateset.)
+ *
+ **/
+void
+atspi_state_set_remove (AtspiStateSet *set, AtspiStateType state)
+{
+ g_return_if_fail (set != NULL);
+ set->states &= ~(1 << state);
+}
+