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 | * Copyright 2010, 2011 Novell, Inc. |
8 | * |
9 | * This library is free software; you can redistribute it and/or |
10 | * modify it under the terms of the GNU Library General Public |
11 | * License as published by the Free Software Foundation; either |
12 | * version 2 of the License, or (at your option) any later version. |
13 | * |
14 | * This library is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 | * Library General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU Library General Public |
20 | * License along with this library; if not, write to the |
21 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
22 | * Boston, MA 02111-1307, USA. |
23 | */ |
24 | |
25 | #ifndef _ATSPI_STATE_SET_H_ |
26 | #define _ATSPI_STATE_SET_H_ |
27 | |
28 | #define ATSPI_TYPE_STATE_SET (atspi_state_set_get_type ()) |
29 | #define ATSPI_STATE_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_STATE_SET, AtspiStateSet)) |
30 | #define ATSPI_STATE_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_STATE_SET, AtspiStateSetClass)) |
31 | #define ATSPI_IS_STATE_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_STATE_SET)) |
32 | #define ATSPI_IS_STATE_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATSPI_TYPE_STATE_SET)) |
33 | #define ATSPI_STATE_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATSPI_TYPE_STATE_SET, AtspiStateSetClass)) |
34 | |
35 | G_BEGIN_DECLS |
36 | |
37 | typedef struct _AtspiStateSet AtspiStateSet; |
38 | struct _AtspiStateSet |
39 | { |
40 | GObject parent; |
41 | struct _AtspiAccessible *accessible; |
42 | gint64 states; |
43 | }; |
44 | |
45 | typedef struct _AtspiStateSetClass AtspiStateSetClass; |
46 | struct _AtspiStateSetClass |
47 | { |
48 | GObjectClass parent_class; |
49 | }; |
50 | |
51 | GType atspi_state_set_get_type (void); |
52 | |
53 | AtspiStateSet * atspi_state_set_new (GArray *states); |
54 | |
55 | void atspi_state_set_set_by_name (AtspiStateSet *set, const gchar *name, gboolean enabled); |
56 | |
57 | void atspi_state_set_add (AtspiStateSet *set, AtspiStateType state); |
58 | |
59 | AtspiStateSet * atspi_state_set_compare (AtspiStateSet *set, AtspiStateSet *set2); |
60 | |
61 | gboolean atspi_state_set_contains (AtspiStateSet *set, AtspiStateType state); |
62 | |
63 | gboolean atspi_state_set_equals (AtspiStateSet *set, AtspiStateSet *set2); |
64 | |
65 | GArray * atspi_state_set_get_states (AtspiStateSet *set); |
66 | |
67 | gboolean atspi_state_set_is_empty (AtspiStateSet *set); |
68 | |
69 | void atspi_state_set_remove (AtspiStateSet *set, AtspiStateType state); |
70 | |
71 | AtspiStateSet * _atspi_state_set_new_internal (struct _AtspiAccessible *accessible, gint64 states); |
72 | |
73 | G_END_DECLS |
74 | |
75 | #endif /* _ATSPI_STATE_SET_H_ */ |
76 | |