Added initial implementations of SpiRelation and, for the C bindings
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_component.c
index c5f0aab..96fa586 100644 (file)
@@ -1,59 +1,61 @@
 /*
  *
- * SpiAccessibleComponent function implementations
+ * AccessibleComponent function implementations
  *
  */
 
 /**
- * SpiAccessibleComponent_ref:
- * @obj: a pointer to an object implementing #SpiAccessibleComponent on which to operate.
+ * AccessibleComponent_ref:
+ * @obj: a pointer to an object implementing #AccessibleComponent on which to operate.
  *
- * Increment the reference count for an #SpiAccessibleComponent.
+ * Increment the reference count for an #AccessibleComponent.
  *
  * Returns: (no return code implemented yet).
  *
  **/
 int
-SpiAccessibleComponent_ref (SpiAccessibleComponent *obj)
+AccessibleComponent_ref (AccessibleComponent *obj)
 {
-  Accessibility_SpiComponent_ref (*obj, &ev);
+  Accessibility_Component_ref (*obj, &ev);
   return 0;
 }
 
 /**
- * SpiAccessibleComponent_unref:
- * @obj: a pointer to the object implementing #SpiAccessibleComponent on which to operate.
+ * AccessibleComponent_unref:
+ * @obj: a pointer to the object implementing #AccessibleComponent on which to operate.
  *
- * Decrement the reference count for an #SpiAccessibleComponent.
+ * Decrement the reference count for an #AccessibleComponent.
  *
  * Returns: (no return code implemented yet).
  *
  **/
 int
-SpiAccessibleComponent_unref (SpiAccessibleComponent *obj)
+AccessibleComponent_unref (AccessibleComponent *obj)
 {
-  Accessibility_SpiComponent_unref (*obj, &ev);
+  Accessibility_Component_unref (*obj, &ev);
   return 0;
 }
 
 /**
- * SpiAccessibleComponent_contains:
- * @obj: a pointer to the #SpiAccessibleComponent to query.
+ * AccessibleComponent_contains:
+ * @obj: a pointer to the #AccessibleComponent to query.
  * @x: a #long specifying the x coordinate in question.
  * @y: a #long specifying the y coordinate in question.
  * @ctype: the desired coordinate system of the point (@x, @y)
- *         (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN).
+ *         (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
  *
- * Query whether a given #SpiAccessibleComponent contains a particular point.
+ * Query whether a given #AccessibleComponent contains a particular point.
  *
+ * Returns: a #TRUE if the specified component contains the point (@x, @y),
+ *          otherwise #FALSE.
  **/
 boolean
-SpiAccessibleComponent_contains (SpiAccessibleComponent *obj,
-                              long x,
-                              long y,
-                              SpiAccessibleCoordType ctype)
+AccessibleComponent_contains (AccessibleComponent *obj,
+                              long int x,
+                              long int y,
+                              AccessibleCoordType ctype)
 {
-  return Accessibility_SpiComponent_contains (*obj,
+  return Accessibility_Component_contains (*obj,
                                            (CORBA_long) x,
                                            (CORBA_long) y,
                                            ctype,
@@ -61,26 +63,26 @@ SpiAccessibleComponent_contains (SpiAccessibleComponent *obj,
 }
 
 /**
- * SpiAccessibleComponent_getAccessibleAtPoint:
- * @obj: a pointer to the #SpiAccessibleComponent to query.
+ * AccessibleComponent_getAccessibleAtPoint:
+ * @obj: a pointer to the #AccessibleComponent to query.
  * @x: a #long specifying the x coordinate of the point in question.
  * @y: a #long specifying the y coordinate of the point in question.
  * @ctype: the coordinate system of the point (@x, @y)
- *         (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN).
+ *         (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
  *
- * Get the accessible child at a given coordinate within an #SpiAccessibleComponent.
+ * Get the accessible child at a given coordinate within an #AccessibleComponent.
  *
- * Returns: a pointer to an #SpiAccessible child of the specified component which
+ * Returns: a pointer to an #Accessible child of the specified component which
  *          contains the point (@x, @y), or NULL of no child contains the point.
  **/
-SpiAccessible *
-SpiAccessibleComponent_getAccessibleAtPoint (SpiAccessibleComponent *obj,
-                                          long x,
-                                          long y,
-                                          SpiAccessibleCoordType ctype)
+Accessible *
+AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj,
+                                          long int x,
+                                          long int y,
+                                          AccessibleCoordType ctype)
 {
-  SpiAccessible child;
-  child = Accessibility_SpiComponent_getAccessibleAtPoint(*obj,
+  Accessible child;
+  child = Accessibility_Component_getAccessibleAtPoint(*obj,
                                                        (CORBA_long) x,
                                                        (CORBA_long) y,
                                                        ctype,
@@ -89,35 +91,35 @@ SpiAccessibleComponent_getAccessibleAtPoint (SpiAccessibleComponent *obj,
 }
 
 /**
- * SpiAccessibleComponent_getExtents:
- * @obj: a pointer to the #SpiAccessibleComponent to query.
+ * AccessibleComponent_getExtents:
+ * @obj: a pointer to the #AccessibleComponent to query.
  * @x: a pointer to a #long into which the minimum x coordinate will be returned.
  * @y: a pointer to a #long into which the minimum y coordinate will be returned.
  * @width: a pointer to a #long into which the x extents (width) will be returned.
  * @height: a pointer to a #long into which the y extents (height) will be returned.
  * @ctype: the desired coordinate system into which to return the results,
- *         (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN).
+ *         (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
  *
- * Get the bounding box of the specified #SpiAccessibleComponent.
+ * Get the bounding box of the specified #AccessibleComponent.
  *
  **/
 void
-SpiAccessibleComponent_getExtents (SpiAccessibleComponent *obj,
-                                long *x,
-                                long *y,
-                                long *width,
-                                long *height,
-                                SpiAccessibleCoordType ctype)
+AccessibleComponent_getExtents (AccessibleComponent *obj,
+                                long int *x,
+                                long int *y,
+                                long int *width,
+                                long int *height,
+                                AccessibleCoordType ctype)
 {
   CORBA_long cx, cy, cw, ch;   
-  Accessibility_SpiComponent_getExtents (*obj,
+  Accessibility_Component_getExtents (*obj,
                                       &cx,
                                       &cy,
                                       &cw,
                                       &ch,
                                      ctype,
                                      &ev);
-  spi_warn_ev (&ev, "SpiAccessibleComponent_getExtents");
+  spi_warn_ev (&ev, "AccessibleComponent_getExtents");
   *x = (long) cx;
   *y = (long) cy;
   *width = (long) cw;
@@ -125,23 +127,23 @@ SpiAccessibleComponent_getExtents (SpiAccessibleComponent *obj,
 }
 
 /**
- * SpiAccessibleComponent_getPosition:
- * @obj: a pointer to the #SpiAccessibleComponent to query.
+ * AccessibleComponent_getPosition:
+ * @obj: a pointer to the #AccessibleComponent to query.
  * @x: a pointer to a #long into which the minimum x coordinate will be returned.
  * @y: a pointer to a #long into which the minimum y coordinate will be returned.
  * @ctype: the desired coordinate system into which to return the results,
- *         (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN).
+ *         (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
  *
- * Get the minimum x and y coordinates of the specified #SpiAccessibleComponent.
+ * Get the minimum x and y coordinates of the specified #AccessibleComponent.
  *
  **/
 void
-SpiAccessibleComponent_getPosition (SpiAccessibleComponent *obj,
-                                 long *x,
-                                 long *y,
-                                 SpiAccessibleCoordType ctype)
+AccessibleComponent_getPosition (AccessibleComponent *obj,
+                                 long int *x,
+                                 long int *y,
+                                 AccessibleCoordType ctype)
 {
-  Accessibility_SpiComponent_getPosition (*obj,
+  Accessibility_Component_getPosition (*obj,
                                        (CORBA_long *) x,
                                        (CORBA_long *) y,
                                        ctype,
@@ -149,28 +151,35 @@ SpiAccessibleComponent_getPosition (SpiAccessibleComponent *obj,
 }
 
 /**
- * SpiAccessibleComponent_getSize:
- * @obj: a pointer to the #SpiAccessibleComponent to query.
+ * AccessibleComponent_getSize:
+ * @obj: a pointer to the #AccessibleComponent to query.
  * @width: a pointer to a #long into which the x extents (width) will be returned.
  * @height: a pointer to a #long into which the y extents (height) will be returned.
  *
- * Get the size of the specified #SpiAccessibleComponent.
+ * Get the size of the specified #AccessibleComponent.
  *
  **/
 void
-SpiAccessibleComponent_getSize (SpiAccessibleComponent *obj,
-                             long *width,
-                             long *height)
+AccessibleComponent_getSize (AccessibleComponent *obj,
+                             long int *width,
+                             long int *height)
 {
-  Accessibility_SpiComponent_getSize (*obj,
+  Accessibility_Component_getSize (*obj,
                                    (CORBA_long *) width,
                                    (CORBA_long *) height,
                                    &ev);
 }
 
-/* Not Yet Implemented */
+/**
+ * AccessibleComponent_grabFocus:
+ * @obj: a pointer to the #AccessibleComponent on which to operate.
+ *
+ * Attempt to set the keyboard input focus to the specified
+ *         #AccessibleComponent.
+ *
+ **/
 void
-SpiAccessibleComponent_grabFocus (SpiAccessibleComponent *obj)
+AccessibleComponent_grabFocus (AccessibleComponent *obj)
 {
   ;
 }