2009-06-11 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / spi-common / spi-stateset.h
1 /*
2  * AT-SPI - Assistive Technology Service Provider Interface
3  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4  *
5  * Copyright 2001, 2002 Sun Microsystems Inc.,
6  * Copyright 2001, 2002 Ximian, Inc.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef SPI_STATE_SET_H_
25 #define SPI_STATE_SET_H_
26
27 #include "spi-types.h"
28 #include <atk/atkstateset.h>
29
30 G_BEGIN_DECLS
31
32 /* private - internal API to abstract away atk API */
33 AtkStateSet *spi_state_set_cache_from_sequence(const GArray *seq);
34 AtkState     spi_atk_state_from_spi_state     (Accessibility_StateType state);
35 void spi_atk_state_to_dbus_array (AtkObject * object, dbus_uint32_t * array);
36 #define      spi_state_set_cache_ref(s)        g_object_ref (s)
37 #define      spi_state_set_cache_unref(s)      g_object_unref (s)
38 #define      spi_state_set_cache_new(seq)      spi_state_set_cache_from_sequence (seq)
39 #define      spi_state_set_cache_contains(s,a) atk_state_set_contains_state (ATK_STATE_SET (s), \
40                                                                              spi_atk_state_from_spi_state (a))
41 #define      spi_state_set_cache_add(s,a)      atk_state_set_add_state (ATK_STATE_SET (s), \
42                                                                              spi_atk_state_from_spi_state (a))
43 #define      spi_state_set_cache_remove(s,a)   atk_state_set_remove_state (ATK_STATE_SET (s), \
44                                                                              spi_atk_state_from_spi_state (a))
45 #define      spi_state_set_cache_xor(a,b)      atk_state_set_xor_sets (ATK_STATE_SET (a), ATK_STATE_SET (b))
46 #define      spi_state_set_cache_is_empty(a)   atk_state_set_is_empty (ATK_STATE_SET (a))
47
48 G_END_DECLS
49
50 #endif /* SPI_STATE_SET_H_ */