Strip symbols that should not be exported; add "Since" tag to at-spi
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_event.c
index 09e2673..07feaed 100644 (file)
@@ -339,6 +339,10 @@ cspi_internal_event_get_text (const InternalEvent *e)
   if (CORBA_TypeCode_equivalent (any->_type, TC_Accessibility_EventDetails, NULL)) 
     {
       Accessibility_EventDetails *details = (Accessibility_EventDetails *)any->_value;
+      if (CORBA_TypeCode_equal (details->any_data._type, TC_CORBA_string, cspi_ev()))
+         return CORBA_string_dup (* (char **) (details->any_data._value));
+      else
+         return CORBA_string_dup ("");
       return CORBA_string_dup (* (char **) (details->any_data._value));
     }
   else if (CORBA_TypeCode_equivalent (any->_type, TC_CORBA_string, NULL)) 
@@ -367,7 +371,10 @@ cspi_internal_event_get_object (const InternalEvent *e)
   if (CORBA_TypeCode_equivalent (any->_type, TC_Accessibility_EventDetails, NULL)) 
     {
       Accessibility_EventDetails *details = (Accessibility_EventDetails *)any->_value;
-      return cspi_object_take (* (CORBA_Object *) (details->any_data._value));
+      if (CORBA_TypeCode_equal (details->any_data._type, TC_CORBA_Object, cspi_ev()))
+         return cspi_object_take (* (CORBA_Object *) (details->any_data._value));
+      else
+         return NULL;
     }
   else if (CORBA_TypeCode_equal (any->_type, TC_CORBA_Object, cspi_ev()))
     return cspi_object_take (* (CORBA_Object *) any->_value);
@@ -386,12 +393,17 @@ cspi_internal_event_get_rect (const InternalEvent *e)
     {
       Accessibility_EventDetails *details = (Accessibility_EventDetails *)any->_value;
       SPIRect *rect = g_new (SPIRect, 1);
-      Accessibility_BoundingBox *bounds = (Accessibility_BoundingBox *) details->any_data._value;
-      rect->x = bounds->x;
-      rect->y = bounds->y;
-      rect->width = bounds->width;
-      rect->height = bounds->height;
-      return rect;
+      if (CORBA_TypeCode_equal (details->any_data._type, TC_Accessibility_BoundingBox, cspi_ev()))
+      {
+         Accessibility_BoundingBox *bounds = (Accessibility_BoundingBox *) details->any_data._value;
+         rect->x = bounds->x;
+         rect->y = bounds->y;
+         rect->width = bounds->width;
+         rect->height = bounds->height;
+         return rect;
+      }
+      else
+         return NULL;
     }
   if (CORBA_TypeCode_equivalent (any->_type, TC_Accessibility_BoundingBox, NULL)) 
     {
@@ -415,9 +427,9 @@ cspi_internal_event_get_rect (const InternalEvent *e)
 
 /**
  * AccessibleEvent_getSourceName:
+ * @e: an #AccessibleEvent to be queried. 
  *
  * Get the 'accessible-name' of the object emitting the event.
- * @event: an #AccessibleEvent to be queried. 
  *
  * Returns: The name of the event source, or NULL if the event source cannot be identified
  *          or does not report a name.
@@ -439,9 +451,9 @@ char*        AccessibleEvent_getSourceName (const AccessibleEvent *e)
 
 /**
  * AccessibleEvent_getSourceRole:
+ * @e: an #AccessibleEvent to be queried. 
  *
  * Get the #AccessibleRole of the object emitting the event.
- * @event: an #AccessibleEvent to be queried. 
  *
  * Returns: #AccessibleRole of the event source, or SPI_ROLE_UNKNOWN
  *          if the event source's role is unknown or unspecified.
@@ -465,9 +477,9 @@ AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e)
 
 /**
  * AccessibleEvent_getSourceApplication:
+ * @e: an #AccessibleEvent to be queried. 
  *
  * Get the #Application hosting the object which emitted the event.
- * @event: an #AccessibleEvent to be queried. 
  *
  * Returns: A pointer to the host #Application contining the event source
  *          component.
@@ -488,13 +500,18 @@ AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEve
 }
 
 /**
- * AccessibleEvent_getSourceApplication:
+ * AccessibleEvent_getSourceDetails:
+ * @e: an #AccessibleEvent to be queried. 
+ * @name: a pointer to a character string which will point to the name of the event source 
+ * on successful completion of the call.
+ * @role: a pointer to an #AccessibleRole which will point to the role of the event source
+ * on successful completion of the call.
+ * @app: A pointer to an #AccessibleApplication which points to the host application for this event
+ * on successful completion of the call.
  *
  * Get the host #Application, "accessible name", and #AccessibleRole 
  * of the object which emitted the event.
  *
- * @event: an #AccessibleEvent to be queried. 
- *
  * Returns: TRUE if the source details were successfully retrieved, 
  *          FALSE if they were not, either due to error, incomplete data,
  *          or the fact that the event did not encapsulate the required data.
@@ -762,6 +779,8 @@ AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e
  *         The returned structure should be freed with SPI_freeRect when 
  *         the caller has finished referencing it.
  *
+ * @Since: AT-SPI 1.6
+ *
  * Returns: a pointer to an SPIRect defining the new object bounds.
  **/
 SPIRect *