comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/accessibility/AccessibleObject.d @ 108:b397a43d66d1

Updated swt linux for DMD 1.063 and latest Tango trunk.
author Jacob Carlborg <doob@me.com>
date Wed, 25 Aug 2010 23:08:27 +0200
parents ea8b884d85f6
children fb3aa8075988
comparison
equal deleted inserted replaced
107:e944a4cf537b 108:b397a43d66d1
155 155
156 package static extern(C) void atkComponent_get_extents (void* obj, int* x, int* y, int* width, int* height, int coord_type) { 156 package static extern(C) void atkComponent_get_extents (void* obj, int* x, int* y, int* width, int* height, int coord_type) {
157 auto atkObject = cast(AtkObject*)obj; 157 auto atkObject = cast(AtkObject*)obj;
158 if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_extents"); 158 if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_extents");
159 AccessibleObject object = getAccessibleObject (atkObject); 159 AccessibleObject object = getAccessibleObject (atkObject);
160 if (object is null) return 0; 160 if (object is null) return;
161 *x = 0; 161 *x = 0;
162 *y = 0; 162 *y = 0;
163 *width = 0; 163 *width = 0;
164 *height = 0; 164 *height = 0;
165 if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) { 165 if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) {
167 if (componentIface.get_extents !is null) { 167 if (componentIface.get_extents !is null) {
168 componentIface.get_extents( object.handle, x, y, width, height, coord_type); 168 componentIface.get_extents( object.handle, x, y, width, height, coord_type);
169 } 169 }
170 } 170 }
171 AccessibleControlListener[] listeners = object.getControlListeners (); 171 AccessibleControlListener[] listeners = object.getControlListeners ();
172 if (listeners.length is 0) return 0; 172 if (listeners.length is 0) return;
173 173
174 int parentX = *x, parentY = *y; 174 int parentX = *x, parentY = *y;
175 int parentWidth = *width, parentHeight = *height; 175 int parentWidth = *width, parentHeight = *height;
176 AccessibleControlEvent event = new AccessibleControlEvent (object); 176 AccessibleControlEvent event = new AccessibleControlEvent (object);
177 event.childID = object.id; 177 event.childID = object.id;
209 209
210 package static extern(C) void atkComponent_get_position (void* obj, int* x, int* y, int coord_type) { 210 package static extern(C) void atkComponent_get_position (void* obj, int* x, int* y, int coord_type) {
211 auto atkObject = cast(AtkObject*)obj; 211 auto atkObject = cast(AtkObject*)obj;
212 if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_position, object: {} x:{} y:{} coord:{}", atkObject, x, y, coord_type); 212 if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_position, object: {} x:{} y:{} coord:{}", atkObject, x, y, coord_type);
213 AccessibleObject object = getAccessibleObject (atkObject); 213 AccessibleObject object = getAccessibleObject (atkObject);
214 if (object is null) return 0; 214 if (object is null) return;
215 *x=0; 215 *x=0;
216 *y=0; 216 *y=0;
217 if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) { 217 if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) {
218 auto componentIface = cast(AtkComponentIface*)ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle)); 218 auto componentIface = cast(AtkComponentIface*)ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle));
219 if (componentIface.get_extents !is null) { 219 if (componentIface.get_extents !is null) {
220 componentIface.get_position( object.handle, x, y, coord_type); 220 componentIface.get_position( object.handle, x, y, coord_type);
221 } 221 }
222 } 222 }
223 AccessibleControlListener[] listeners = object.getControlListeners (); 223 AccessibleControlListener[] listeners = object.getControlListeners ();
224 if (listeners.length is 0) return 0; 224 if (listeners.length is 0) return;
225 225
226 int parentX, parentY; 226 int parentX, parentY;
227 parentX = *x; 227 parentX = *x;
228 parentY = *y; 228 parentY = *y;
229 AccessibleControlEvent event = new AccessibleControlEvent (object); 229 AccessibleControlEvent event = new AccessibleControlEvent (object);
261 //package static extern(C) void atkComponent_get_size (void* obj, int* width, int* height, int coord_type) { 261 //package static extern(C) void atkComponent_get_size (void* obj, int* width, int* height, int coord_type) {
262 package static extern(C) void atkComponent_get_size (void* obj, int* width, int* height) { 262 package static extern(C) void atkComponent_get_size (void* obj, int* width, int* height) {
263 auto atkObject = cast(AtkObject*)obj; 263 auto atkObject = cast(AtkObject*)obj;
264 if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_size"); 264 if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_size");
265 AccessibleObject object = getAccessibleObject (atkObject); 265 AccessibleObject object = getAccessibleObject (atkObject);
266 if (object is null) return 0; 266 if (object is null) return;
267 *width=0; 267 *width=0;
268 *height=0; 268 *height=0;
269 if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) { 269 if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) {
270 auto componentIface = cast(AtkComponentIface*)ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle)); 270 auto componentIface = cast(AtkComponentIface*)ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle));
271 if (componentIface.get_extents !is null) { 271 if (componentIface.get_extents !is null) {
272 //PORTING_FIXME: what about the coord_type? componentIface.get_size( object.handle, width, height, coord_type); 272 //PORTING_FIXME: what about the coord_type? componentIface.get_size( object.handle, width, height, coord_type);
273 componentIface.get_size( object.handle, width, height); 273 componentIface.get_size( object.handle, width, height);
274 } 274 }
275 } 275 }
276 AccessibleControlListener[] listeners = object.getControlListeners (); 276 AccessibleControlListener[] listeners = object.getControlListeners ();
277 if (listeners.length is 0) return 0; 277 if (listeners.length is 0) return;
278 278
279 int parentWidth, parentHeight; 279 int parentWidth, parentHeight;
280 parentWidth= *width; 280 parentWidth= *width;
281 parentHeight= *height; 281 parentHeight= *height;
282 AccessibleControlEvent event = new AccessibleControlEvent (object); 282 AccessibleControlEvent event = new AccessibleControlEvent (object);