===== Released 1.1.4 =====
[atk.git] / atk / atkcomponent.h
blobccb73d1a34d4b8735d59b9a7150cec519510ea75
1 /* ATK - Accessibility Toolkit
2 * Copyright 2001 Sun Microsystems Inc.
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.
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.
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.
20 #ifndef __ATK_COMPONENT_H__
21 #define __ATK_COMPONENT_H__
23 #include <atk/atkobject.h>
24 #include <atk/atkutil.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
31 * The AtkComponent interface should be supported by any object that is
32 * rendered on the screen. The interface provides the standard mechanism
33 * for an assistive technology to determine and set the graphical
34 * representation of an object.
37 #define ATK_TYPE_COMPONENT (atk_component_get_type ())
38 #define ATK_IS_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_COMPONENT)
39 #define ATK_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_COMPONENT, AtkComponent)
40 #define ATK_COMPONENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_COMPONENT, AtkComponentIface))
42 #ifndef _TYPEDEF_ATK_COMPONENT_
43 #define _TYPEDEF_ATK_COMPONENT_
44 typedef struct _AtkComponent AtkComponent;
45 #endif
46 typedef struct _AtkComponentIface AtkComponentIface;
48 typedef void (*AtkFocusHandler) (AtkObject*, gboolean);
51 struct _AtkComponentIface
53 GTypeInterface parent;
55 guint (* add_focus_handler) (AtkComponent *component,
56 AtkFocusHandler handler);
58 gboolean (* contains) (AtkComponent *component,
59 gint x,
60 gint y,
61 AtkCoordType coord_type);
63 AtkObject* (* ref_accessible_at_point) (AtkComponent *component,
64 gint x,
65 gint y,
66 AtkCoordType coord_type);
67 void (* get_extents) (AtkComponent *component,
68 gint *x,
69 gint *y,
70 gint *width,
71 gint *height,
72 AtkCoordType coord_type);
73 void (* get_position) (AtkComponent *component,
74 gint *x,
75 gint *y,
76 AtkCoordType coord_type);
77 void (* get_size) (AtkComponent *component,
78 gint *width,
79 gint *height);
80 gboolean (* grab_focus) (AtkComponent *component);
81 void (* remove_focus_handler) (AtkComponent *component,
82 guint handler_id);
83 gboolean (* set_extents) (AtkComponent *component,
84 gint x,
85 gint y,
86 gint width,
87 gint height,
88 AtkCoordType coord_type);
89 gboolean (* set_position) (AtkComponent *component,
90 gint x,
91 gint y,
92 AtkCoordType coord_type);
93 gboolean (* set_size) (AtkComponent *component,
94 gint width,
95 gint height);
97 AtkLayer (* get_layer) (AtkComponent *component);
98 gint (* get_mdi_zorder) (AtkComponent *component);
100 AtkFunction pad1;
101 AtkFunction pad2;
104 GType atk_component_get_type (void);
106 /* convenience functions */
108 guint atk_component_add_focus_handler (AtkComponent *component,
109 AtkFocusHandler handler);
110 gboolean atk_component_contains (AtkComponent *component,
111 gint x,
112 gint y,
113 AtkCoordType coord_type);
114 AtkObject* atk_component_ref_accessible_at_point(AtkComponent *component,
115 gint x,
116 gint y,
117 AtkCoordType coord_type);
118 void atk_component_get_extents (AtkComponent *component,
119 gint *x,
120 gint *y,
121 gint *width,
122 gint *height,
123 AtkCoordType coord_type);
124 void atk_component_get_position (AtkComponent *component,
125 gint *x,
126 gint *y,
127 AtkCoordType coord_type);
128 void atk_component_get_size (AtkComponent *component,
129 gint *width,
130 gint *height);
131 AtkLayer atk_component_get_layer (AtkComponent *component);
132 gint atk_component_get_mdi_zorder (AtkComponent *component);
133 gboolean atk_component_grab_focus (AtkComponent *component);
134 void atk_component_remove_focus_handler (AtkComponent *component,
135 guint handler_id);
136 gboolean atk_component_set_extents (AtkComponent *component,
137 gint x,
138 gint y,
139 gint width,
140 gint height,
141 AtkCoordType coord_type);
142 gboolean atk_component_set_position (AtkComponent *component,
143 gint x,
144 gint y,
145 AtkCoordType coord_type);
146 gboolean atk_component_set_size (AtkComponent *component,
147 gint width,
148 gint height);
150 #ifdef __cplusplus
152 #endif /* __cplusplus */
155 #endif /* __ATK_COMPONENT_H__ */