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>
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;
46 typedef struct _AtkComponentIface AtkComponentIface;
48 typedef void (*AtkFocusHandler) (AtkObject*, gboolean);
50 typedef struct _AtkRectangle AtkRectangle;
60 struct _AtkComponentIface
62 GTypeInterface parent;
64 guint (* add_focus_handler) (AtkComponent *component,
65 AtkFocusHandler handler);
67 gboolean (* contains) (AtkComponent *component,
70 AtkCoordType coord_type);
72 AtkObject* (* ref_accessible_at_point) (AtkComponent *component,
75 AtkCoordType coord_type);
76 void (* get_extents) (AtkComponent *component,
81 AtkCoordType coord_type);
82 void (* get_position) (AtkComponent *component,
85 AtkCoordType coord_type);
86 void (* get_size) (AtkComponent *component,
89 gboolean (* grab_focus) (AtkComponent *component);
90 void (* remove_focus_handler) (AtkComponent *component,
92 gboolean (* set_extents) (AtkComponent *component,
97 AtkCoordType coord_type);
98 gboolean (* set_position) (AtkComponent *component,
101 AtkCoordType coord_type);
102 gboolean (* set_size) (AtkComponent *component,
106 AtkLayer (* get_layer) (AtkComponent *component);
107 gint (* get_mdi_zorder) (AtkComponent *component);
112 void (* bounds_changed) (AtkComponent *component,
113 AtkRectangle *bounds);
117 GType atk_component_get_type (void);
119 /* convenience functions */
121 guint atk_component_add_focus_handler (AtkComponent *component,
122 AtkFocusHandler handler);
123 gboolean atk_component_contains (AtkComponent *component,
126 AtkCoordType coord_type);
127 AtkObject* atk_component_ref_accessible_at_point(AtkComponent *component,
130 AtkCoordType coord_type);
131 void atk_component_get_extents (AtkComponent *component,
136 AtkCoordType coord_type);
137 void atk_component_get_position (AtkComponent *component,
140 AtkCoordType coord_type);
141 void atk_component_get_size (AtkComponent *component,
144 AtkLayer atk_component_get_layer (AtkComponent *component);
145 gint atk_component_get_mdi_zorder (AtkComponent *component);
146 gboolean atk_component_grab_focus (AtkComponent *component);
147 void atk_component_remove_focus_handler (AtkComponent *component,
149 gboolean atk_component_set_extents (AtkComponent *component,
154 AtkCoordType coord_type);
155 gboolean atk_component_set_position (AtkComponent *component,
158 AtkCoordType coord_type);
159 gboolean atk_component_set_size (AtkComponent *component,
165 #endif /* __cplusplus */
168 #endif /* __ATK_COMPONENT_H__ */