*** empty log message ***
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_component.c
index 530dc8e..44d3ef6 100644 (file)
@@ -2,7 +2,8 @@
  * AT-SPI - Assistive Technology Service Provider Interface
  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
  *
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -76,8 +77,8 @@ AccessibleComponent_contains (AccessibleComponent *obj,
   cspi_return_val_if_fail (obj != NULL, FALSE);
 
   retval = Accessibility_Component_contains (CSPI_OBJREF (obj),
-                                            (CORBA_long) x,
-                                            (CORBA_long) y,
+                                            x,
+                                            y,
                                             ctype,
                                             cspi_ev ());
   cspi_return_val_if_ev ("contains", FALSE);
@@ -109,8 +110,8 @@ AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj,
   cspi_return_val_if_fail (obj != NULL, NULL);
 
   child = Accessibility_Component_getAccessibleAtPoint (CSPI_OBJREF (obj),
-                                                       (CORBA_long) x,
-                                                       (CORBA_long) y,
+                                                       x,
+                                                       y,
                                                        ctype,
                                                        cspi_ev ());
   return cspi_object_add (child);
@@ -144,7 +145,7 @@ AccessibleComponent_getExtents (AccessibleComponent *obj,
   bbox = Accessibility_Component_getExtents (CSPI_OBJREF (obj),
                                             ctype,
                                             cspi_ev ());
-  if (!cspi_check_ev ("AccessibleComponent_getExtents"))
+  if (!cspi_check_ev ("getExtents"))
     {
       *x = *y = *width = *height = 0;    
     }
@@ -206,12 +207,23 @@ AccessibleComponent_getSize (AccessibleComponent *obj,
                              long int *width,
                              long int *height)
 {
+  CORBA_long cw, ch;
+
   cspi_return_if_fail (obj != NULL);
 
   Accessibility_Component_getSize (CSPI_OBJREF (obj),
-                                   (CORBA_long *) width,
-                                   (CORBA_long *) height,
+                                   &cw,
+                                   &ch,
                                    cspi_ev ());
+  if (cspi_check_ev ("getSize"))
+  {
+    *width = *height = 0;
+  }
+  else
+  {
+    *width = cw;
+    *height = ch;
+  }
 }
 
 /**
@@ -256,6 +268,9 @@ AccessibleComponent_getLayer (AccessibleComponent *obj)
     case Accessibility_LAYER_OVERLAY:    
       retval = SPI_LAYER_OVERLAY;
       break;
+    case Accessibility_LAYER_WINDOW:     
+      retval = SPI_LAYER_WINDOW;
+      break;
     default:
       retval = SPI_LAYER_INVALID;
       break;
@@ -268,8 +283,8 @@ AccessibleComponent_getLayer (AccessibleComponent *obj)
  * AccessibleComponent_getMDIZOrder:
  * @obj: a pointer to the #AccessibleComponent to query.
  *
- * Query the z stacking order of a component which is in the MDI layer.
- *       (Bigger z-order numbers mean nearer the top)
+ * Query the z stacking order of a component which is in the MDI or window
+ *       layer. (Bigger z-order numbers mean nearer the top)
  *
  * Returns: a short integer indicating the stacking order of the component 
  *       in the MDI layer, or -1 if the component is not in the MDI layer.
@@ -302,7 +317,7 @@ AccessibleComponent_getMDIZOrder (AccessibleComponent *obj)
 SPIBoolean
 AccessibleComponent_grabFocus (AccessibleComponent *obj)
 {
-  short retval;
+  SPIBoolean retval;
 
   cspi_return_val_if_fail (obj != NULL, FALSE);