1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/other-licenses/atk-1.0/atk/atkcomponent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,171 @@ 1.4 +/* ATK - Accessibility Toolkit 1.5 + * Copyright 2001 Sun Microsystems Inc. 1.6 + * 1.7 + * This library is free software; you can redistribute it and/or 1.8 + * modify it under the terms of the GNU Library General Public 1.9 + * License as published by the Free Software Foundation; either 1.10 + * version 2 of the License, or (at your option) any later version. 1.11 + * 1.12 + * This library is distributed in the hope that it will be useful, 1.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 1.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1.15 + * Library General Public License for more details. 1.16 + * 1.17 + * You should have received a copy of the GNU Library General Public 1.18 + * License along with this library; if not, write to the 1.19 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 1.20 + * Boston, MA 02111-1307, USA. 1.21 + */ 1.22 + 1.23 +#ifndef __ATK_COMPONENT_H__ 1.24 +#define __ATK_COMPONENT_H__ 1.25 + 1.26 +#include <atk/atkobject.h> 1.27 +#include <atk/atkutil.h> 1.28 + 1.29 +#ifdef __cplusplus 1.30 +extern "C" { 1.31 +#endif /* __cplusplus */ 1.32 + 1.33 +/* 1.34 + * The AtkComponent interface should be supported by any object that is 1.35 + * rendered on the screen. The interface provides the standard mechanism 1.36 + * for an assistive technology to determine and set the graphical 1.37 + * representation of an object. 1.38 + */ 1.39 + 1.40 +#define ATK_TYPE_COMPONENT (atk_component_get_type ()) 1.41 +#define ATK_IS_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_COMPONENT) 1.42 +#define ATK_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_COMPONENT, AtkComponent) 1.43 +#define ATK_COMPONENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_COMPONENT, AtkComponentIface)) 1.44 + 1.45 +#ifndef _TYPEDEF_ATK_COMPONENT_ 1.46 +#define _TYPEDEF_ATK_COMPONENT_ 1.47 +typedef struct _AtkComponent AtkComponent; 1.48 +#endif 1.49 +typedef struct _AtkComponentIface AtkComponentIface; 1.50 + 1.51 +typedef void (*AtkFocusHandler) (AtkObject*, gboolean); 1.52 + 1.53 +typedef struct _AtkRectangle AtkRectangle; 1.54 + 1.55 +struct _AtkRectangle 1.56 +{ 1.57 + gint x; 1.58 + gint y; 1.59 + gint width; 1.60 + gint height; 1.61 +}; 1.62 + 1.63 +GType atk_rectangle_get_type (void); 1.64 + 1.65 +#define ATK_TYPE_RECTANGLE (atk_rectangle_get_type ()) 1.66 +struct _AtkComponentIface 1.67 +{ 1.68 + GTypeInterface parent; 1.69 + 1.70 + guint (* add_focus_handler) (AtkComponent *component, 1.71 + AtkFocusHandler handler); 1.72 + 1.73 + gboolean (* contains) (AtkComponent *component, 1.74 + gint x, 1.75 + gint y, 1.76 + AtkCoordType coord_type); 1.77 + 1.78 + AtkObject* (* ref_accessible_at_point) (AtkComponent *component, 1.79 + gint x, 1.80 + gint y, 1.81 + AtkCoordType coord_type); 1.82 + void (* get_extents) (AtkComponent *component, 1.83 + gint *x, 1.84 + gint *y, 1.85 + gint *width, 1.86 + gint *height, 1.87 + AtkCoordType coord_type); 1.88 + void (* get_position) (AtkComponent *component, 1.89 + gint *x, 1.90 + gint *y, 1.91 + AtkCoordType coord_type); 1.92 + void (* get_size) (AtkComponent *component, 1.93 + gint *width, 1.94 + gint *height); 1.95 + gboolean (* grab_focus) (AtkComponent *component); 1.96 + void (* remove_focus_handler) (AtkComponent *component, 1.97 + guint handler_id); 1.98 + gboolean (* set_extents) (AtkComponent *component, 1.99 + gint x, 1.100 + gint y, 1.101 + gint width, 1.102 + gint height, 1.103 + AtkCoordType coord_type); 1.104 + gboolean (* set_position) (AtkComponent *component, 1.105 + gint x, 1.106 + gint y, 1.107 + AtkCoordType coord_type); 1.108 + gboolean (* set_size) (AtkComponent *component, 1.109 + gint width, 1.110 + gint height); 1.111 + 1.112 + AtkLayer (* get_layer) (AtkComponent *component); 1.113 + gint (* get_mdi_zorder) (AtkComponent *component); 1.114 + 1.115 + /* 1.116 + * signal handlers 1.117 + */ 1.118 + void (* bounds_changed) (AtkComponent *component, 1.119 + AtkRectangle *bounds); 1.120 + gdouble (* get_alpha) (AtkComponent *component); 1.121 +}; 1.122 + 1.123 +GType atk_component_get_type (void); 1.124 + 1.125 +/* convenience functions */ 1.126 + 1.127 +guint atk_component_add_focus_handler (AtkComponent *component, 1.128 + AtkFocusHandler handler); 1.129 +gboolean atk_component_contains (AtkComponent *component, 1.130 + gint x, 1.131 + gint y, 1.132 + AtkCoordType coord_type); 1.133 +AtkObject* atk_component_ref_accessible_at_point(AtkComponent *component, 1.134 + gint x, 1.135 + gint y, 1.136 + AtkCoordType coord_type); 1.137 +void atk_component_get_extents (AtkComponent *component, 1.138 + gint *x, 1.139 + gint *y, 1.140 + gint *width, 1.141 + gint *height, 1.142 + AtkCoordType coord_type); 1.143 +void atk_component_get_position (AtkComponent *component, 1.144 + gint *x, 1.145 + gint *y, 1.146 + AtkCoordType coord_type); 1.147 +void atk_component_get_size (AtkComponent *component, 1.148 + gint *width, 1.149 + gint *height); 1.150 +AtkLayer atk_component_get_layer (AtkComponent *component); 1.151 +gint atk_component_get_mdi_zorder (AtkComponent *component); 1.152 +gboolean atk_component_grab_focus (AtkComponent *component); 1.153 +void atk_component_remove_focus_handler (AtkComponent *component, 1.154 + guint handler_id); 1.155 +gboolean atk_component_set_extents (AtkComponent *component, 1.156 + gint x, 1.157 + gint y, 1.158 + gint width, 1.159 + gint height, 1.160 + AtkCoordType coord_type); 1.161 +gboolean atk_component_set_position (AtkComponent *component, 1.162 + gint x, 1.163 + gint y, 1.164 + AtkCoordType coord_type); 1.165 +gboolean atk_component_set_size (AtkComponent *component, 1.166 + gint width, 1.167 + gint height); 1.168 +gdouble atk_component_get_alpha (AtkComponent *component); 1.169 +#ifdef __cplusplus 1.170 +} 1.171 +#endif /* __cplusplus */ 1.172 + 1.173 + 1.174 +#endif /* __ATK_COMPONENT_H__ */