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 */
32 *@ATK_SCROLL_TOP_LEFT: Scroll the object vertically and horizontally to the top
33 *left corner of the window.
34 *@ATK_SCROLL_BOTTOM_RIGHT: Scroll the object vertically and horizontally to the
35 *bottom right corner of the window.
36 *@ATK_SCROLL_TOP_EDGE: Scroll the object vertically to the top edge of the
38 *@ATK_SCROLL_BOTTOM_EDGE: Scroll the object vertically to the bottom edge of
40 *@ATK_SCROLL_LEFT_EDGE: Scroll the object vertically and horizontally to the
41 *left edge of the window.
42 *@ATK_SCROLL_RIGHT_EDGE: Scroll the object vertically and horizontally to the
43 *right edge of the window.
44 *@ATK_SCROLL_ANYWHERE: Scroll the object vertically and horizontally so that
45 *as much as possible of the object becomes visible. The exact placement is
46 *determined by the application.
48 * Specifies where an object should be placed on the screen when using scroll_to.
52 ATK_SCROLL_BOTTOM_RIGHT
,
54 ATK_SCROLL_BOTTOM_EDGE
,
56 ATK_SCROLL_RIGHT_EDGE
,
61 * The AtkComponent interface should be supported by any object that is
62 * rendered on the screen. The interface provides the standard mechanism
63 * for an assistive technology to determine and set the graphical
64 * representation of an object.
67 #define ATK_TYPE_COMPONENT (atk_component_get_type ())
68 #define ATK_IS_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_COMPONENT)
69 #define ATK_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_COMPONENT, AtkComponent)
70 #define ATK_COMPONENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_COMPONENT, AtkComponentIface))
72 #ifndef _TYPEDEF_ATK_COMPONENT_
73 #define _TYPEDEF_ATK_COMPONENT_
74 typedef struct _AtkComponent AtkComponent
;
76 typedef struct _AtkComponentIface AtkComponentIface
;
78 typedef void (*AtkFocusHandler
) (AtkObject
*, gboolean
);
80 typedef struct _AtkRectangle AtkRectangle
;
90 GType
atk_rectangle_get_type (void);
92 #define ATK_TYPE_RECTANGLE (atk_rectangle_get_type ())
93 struct _AtkComponentIface
95 GTypeInterface parent
;
97 guint (* add_focus_handler
) (AtkComponent
*component
,
98 AtkFocusHandler handler
);
100 gboolean (* contains
) (AtkComponent
*component
,
103 AtkCoordType coord_type
);
105 AtkObject
* (* ref_accessible_at_point
) (AtkComponent
*component
,
108 AtkCoordType coord_type
);
109 void (* get_extents
) (AtkComponent
*component
,
114 AtkCoordType coord_type
);
115 void (* get_position
) (AtkComponent
*component
,
118 AtkCoordType coord_type
);
119 void (* get_size
) (AtkComponent
*component
,
122 gboolean (* grab_focus
) (AtkComponent
*component
);
123 void (* remove_focus_handler
) (AtkComponent
*component
,
125 gboolean (* set_extents
) (AtkComponent
*component
,
130 AtkCoordType coord_type
);
131 gboolean (* set_position
) (AtkComponent
*component
,
134 AtkCoordType coord_type
);
135 gboolean (* set_size
) (AtkComponent
*component
,
139 AtkLayer (* get_layer
) (AtkComponent
*component
);
140 gint (* get_mdi_zorder
) (AtkComponent
*component
);
145 void (* bounds_changed
) (AtkComponent
*component
,
146 AtkRectangle
*bounds
);
147 gdouble (* get_alpha
) (AtkComponent
*component
);
150 * Scrolls this object so it becomes visible on the screen.
153 gboolean (*scroll_to
) (AtkComponent
*component
,
156 gboolean (*scroll_to_point
) (AtkComponent
*component
,
162 GType
atk_component_get_type (void);
164 /* convenience functions */
166 guint
atk_component_add_focus_handler (AtkComponent
*component
,
167 AtkFocusHandler handler
);
168 gboolean
atk_component_contains (AtkComponent
*component
,
171 AtkCoordType coord_type
);
172 AtkObject
* atk_component_ref_accessible_at_point(AtkComponent
*component
,
175 AtkCoordType coord_type
);
176 void atk_component_get_extents (AtkComponent
*component
,
181 AtkCoordType coord_type
);
182 void atk_component_get_position (AtkComponent
*component
,
185 AtkCoordType coord_type
);
186 void atk_component_get_size (AtkComponent
*component
,
189 AtkLayer
atk_component_get_layer (AtkComponent
*component
);
190 gint
atk_component_get_mdi_zorder (AtkComponent
*component
);
191 gboolean
atk_component_grab_focus (AtkComponent
*component
);
192 void atk_component_remove_focus_handler (AtkComponent
*component
,
194 gboolean
atk_component_set_extents (AtkComponent
*component
,
199 AtkCoordType coord_type
);
200 gboolean
atk_component_set_position (AtkComponent
*component
,
203 AtkCoordType coord_type
);
204 gboolean
atk_component_set_size (AtkComponent
*component
,
207 gdouble
atk_component_get_alpha (AtkComponent
*component
);
208 gboolean
atk_component_scroll_to (AtkComponent
*component
,
211 gboolean
atk_component_scroll_to_point (AtkComponent
*component
,
218 #endif /* __cplusplus */
221 #endif /* __ATK_COMPONENT_H__ */