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>
27 #endif /* __cplusplus */
30 * The AtkComponent interface should be supported by any object that is
31 * rendered on the screen. The interface provides the standard mechanism
32 * for an assistive technology to determine and set the graphical
33 * representation of an object.
36 #define ATK_TYPE_COMPONENT (atk_component_get_type ())
37 #define ATK_IS_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_COMPONENT)
38 #define ATK_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_COMPONENT, AtkComponent)
39 #define ATK_COMPONENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_COMPONENT, AtkComponentIface))
41 #ifndef _TYPEDEF_ATK_COMPONENT_
42 #define _TYPEDEF_ATK_COMPONENT_
43 typedef struct _AtkComponent AtkComponent;
45 typedef struct _AtkComponentIface AtkComponentIface;
47 typedef void (*AtkFocusHandler) (AtkObject*, gboolean);
50 struct _AtkComponentIface
52 GTypeInterface parent;
54 guint (* add_focus_handler) (AtkComponent *component,
55 AtkFocusHandler handler);
56 gboolean (* contains) (AtkComponent *component,
60 AtkObject* (* get_accessible_at_point) (AtkComponent *component,
63 void (* get_extents) (AtkComponent *component,
68 void (* get_position) (AtkComponent *component,
71 void (* get_position_on_screen) (AtkComponent *component,
74 void (* get_size) (AtkComponent *component,
77 void (* grab_focus) (AtkComponent *component);
78 void (* remove_focus_handler) (AtkComponent *component,
80 void (* set_extents) (AtkComponent *component,
85 void (* set_position) (AtkComponent *component,
88 void (* set_size) (AtkComponent *component,
93 GType atk_component_get_type ();
95 /* convenience functions */
97 guint atk_component_add_focus_handler (AtkComponent *component,
98 AtkFocusHandler handler);
99 gboolean atk_component_contains (AtkComponent *component,
102 AtkObject* atk_component_get_accessible_at_point(AtkComponent *component,
105 void atk_component_get_extents (AtkComponent *component,
110 void atk_component_get_position (AtkComponent *component,
113 void atk_component_get_position_on_screen (AtkComponent *component,
116 void atk_component_get_size (AtkComponent *component,
119 void atk_component_grab_focus (AtkComponent *component);
120 void atk_component_remove_focus_handler (AtkComponent *component,
122 void atk_component_set_extents (AtkComponent *component,
127 void atk_component_set_position (AtkComponent *component,
130 void atk_component_set_size (AtkComponent *component,
136 #endif /* __cplusplus */
139 #endif /* __ATK_COMPONENT_H__ */