Latest rev (previous commit was out of date). Added README and NEWS.
[platform/upstream/atk.git] / atk / atkvalue.h
1 /* ATK -  Accessibility Toolkit
2  * Copyright 2001 Sun Microsystems Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __ATK_VALUE_H__
21 #define __ATK_VALUE_H__
22
23 #include <atk/atkobject.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28
29 /*
30  * The AtkValue interface should be supported by any object that 
31  * supports a numerical value (e.g., a scroll bar). This interface 
32  * provides the standard mechanism for an assistive technology to 
33  * determine and set the numerical value as well as get the minimum 
34  * and maximum values.
35  */
36
37 #define ATK_TYPE_VALUE                    (atk_value_get_type ())
38 #define ATK_IS_VALUE(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_VALUE)
39 #define ATK_VALUE(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_VALUE, AtkValue)
40 #define ATK_VALUE_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_VALUE, AtkValueIface))
41
42 #ifndef _TYPEDEF_ATK_VALUE_
43 #define _TYPEDEF_ATK_VALUE__
44 typedef struct _AtkValue AtkValue;
45 #endif
46 typedef struct _AtkValueIface AtkValueIface;
47
48 struct _AtkValueIface
49 {
50   GTypeInterface parent;
51
52   /*
53    * Gets the value of this object
54    */
55   void     (* get_current_value) (AtkValue     *obj,
56                                   GValue       *value);
57   /*
58    * Gets the maximum value of this object
59    */
60   void     (* get_maximum_value) (AtkValue     *obj,
61                                   GValue       *value);
62   /*
63    * Gets the minimum value of this object
64    */
65   void     (* get_minimum_value) (AtkValue     *obj,
66                                   GValue       *value);
67   /*
68    * Sets the value of this object
69    */
70   gboolean (* set_current_value) (AtkValue     *obj,
71                                   GValue       *value);
72
73 };
74
75 GType            atk_value_get_type (void);
76
77 void      atk_value_get_current_value (AtkValue     *obj,
78                                        GValue       *value);
79
80
81 void     atk_value_get_maximum_value  (AtkValue     *obj,
82                                        GValue       *value);
83
84 void     atk_value_get_minimum_value  (AtkValue     *obj,
85                                        GValue       *value);
86
87 gboolean atk_value_set_current_value  (AtkValue     *obj,
88                                        GValue       *value);
89
90 /*
91  * Additional GObject properties exported by GaccessibleValue:
92  *    "accessible_value"
93  *       (the accessible value has changed)
94  */
95
96
97 #ifdef __cplusplus
98 }
99 #endif /* __cplusplus */
100
101
102 #endif /* __ATK_VALUE_H__ */