[at-spi2-core] Remove some dead code



commit 38592ec980eecc0f08f13d8eeb71d879e37000c9
Author: Mike Gorse <mgorse novell com>
Date:   Wed Dec 22 16:20:40 2010 -0500

    Remove some dead code

 atspi/atspi-accessible.c |  312 ----------------------------------------------
 1 files changed, 0 insertions(+), 312 deletions(-)
---
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index 44b6306..edc12f1 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -1114,318 +1114,6 @@ atspi_accessible_get_value (AtspiAccessible *accessible)
           g_object_ref (ATSPI_VALUE (accessible)) : NULL);  
 }
 
-#if 0
-static gboolean
-cspi_init_relation_type_table (AccessibleRelationType *relation_type_table)
-{
-  int i;
-  for (i = 0; i < Accessibility_RELATION_LAST_DEFINED; ++i)
-    {
-      relation_type_table [i] = SPI_RELATION_NULL;
-    }
-  relation_type_table [Accessibility_RELATION_NULL] = SPI_RELATION_NULL;
-  relation_type_table [Accessibility_RELATION_LABEL_FOR] = SPI_RELATION_LABEL_FOR;
-  relation_type_table [Accessibility_RELATION_LABELLED_BY] = SPI_RELATION_LABELED_BY;
-  relation_type_table [Accessibility_RELATION_CONTROLLER_FOR] = SPI_RELATION_CONTROLLER_FOR;
-  relation_type_table [Accessibility_RELATION_CONTROLLED_BY] = SPI_RELATION_CONTROLLED_BY;
-  relation_type_table [Accessibility_RELATION_MEMBER_OF] = SPI_RELATION_MEMBER_OF;
-  relation_type_table [Accessibility_RELATION_TOOLTIP_FOR] = SPI_RELATION_NULL;
-  relation_type_table [Accessibility_RELATION_NODE_CHILD_OF] = SPI_RELATION_NODE_CHILD_OF;
-  relation_type_table [Accessibility_RELATION_EXTENDED] = SPI_RELATION_EXTENDED;
-  relation_type_table [Accessibility_RELATION_FLOWS_TO] = SPI_RELATION_FLOWS_TO;
-  relation_type_table [Accessibility_RELATION_FLOWS_FROM] = SPI_RELATION_FLOWS_FROM;
-  relation_type_table [Accessibility_RELATION_SUBWINDOW_OF] = SPI_RELATION_SUBWINDOW_OF;
-  relation_type_table [Accessibility_RELATION_EMBEDS] = SPI_RELATION_EMBEDS;
-  relation_type_table [Accessibility_RELATION_EMBEDDED_BY] = SPI_RELATION_EMBEDDED_BY;
-  relation_type_table [Accessibility_RELATION_POPUP_FOR] = SPI_RELATION_POPUP_FOR;
-  relation_type_table [Accessibility_RELATION_PARENT_WINDOW_OF] = SPI_RELATION_PARENT_WINDOW_OF;
-  relation_type_table [Accessibility_RELATION_DESCRIBED_BY] = SPI_RELATION_DESCRIBED_BY;
-  relation_type_table [Accessibility_RELATION_DESCRIPTION_FOR] = SPI_RELATION_DESCRIPTION_FOR;
-  return TRUE;
-}
-
-static AccessibleRelationType
-cspi_relation_type_from_spi_relation_type (Accessibility_RelationType type)
-{
-  /* array is sized according to IDL RelationType because IDL RelationTypes are the index */	
-  static AccessibleRelationType cspi_relation_type_table [Accessibility_RELATION_LAST_DEFINED];
-  static gboolean is_initialized = FALSE;
-  AccessibleRelationType cspi_type;
-  if (!is_initialized)
-    {
-      is_initialized = cspi_init_relation_type_table (cspi_relation_type_table);	    
-    }
-  if (type >= 0 && type < Accessibility_RELATION_LAST_DEFINED)
-    {
-      cspi_type = cspi_relation_type_table [type];	    
-    }
-  else
-    {
-      cspi_type = SPI_RELATION_NULL;
-    }
-  return cspi_type; 
-}
-/**
- * AccessibleRelation_getRelationType:
- * @obj: a pointer to the #AtspiAccessibleRelation object to query.
- *
- * Get the type of relationship represented by an #AtspiAccessibleRelation.
- *
- * Returns: an #AtspiAccessibleRelationType indicating the type of relation
- *         encapsulated in this #AtspiAccessibleRelation object.
- *
- **/
-AccessibleRelationType
-AccessibleRelation_getRelationType (AccessibleRelation *obj)
-{
-  cspi_return_val_if_fail (obj, SPI_RELATION_NULL);
-  return cspi_relation_type_from_spi_relation_type (obj->type);
-}
-
-/**
- * AccessibleRelation_getNTargets:
- * @obj: a pointer to the #AtspiAccessibleRelation object to query.
- *
- * Get the number of objects which this relationship has as its
- *       target objects (the subject is the #AtspiAccessible from which this
- *       #AtspiAccessibleRelation originated).
- *
- * Returns: a short integer indicating how many target objects which the
- *       originating #AtspiAccessible object has the #AtspiAccessibleRelation
- *       relationship with.
- **/
-int
-AccessibleRelation_getNTargets (AccessibleRelation *obj)
-{
-  cspi_return_val_if_fail (obj, -1);
-  return obj->targets->len;
-}
-
-/**
- * AccessibleRelation_getTarget:
- * @obj: a pointer to the #AtspiAccessibleRelation object to query.
- * @i: a (zero-index) integer indicating which (of possibly several) target is requested.
- *
- * Get the @i-th target of a specified #AtspiAccessibleRelation relationship.
- *
- * Returns: an #AtspiAccessible which is the @i-th object with which the
- *      originating #AtspiAccessible has relationship specified in the
- *      #AtspiAccessibleRelation object.
- *
- **/
-Accessible *
-AccessibleRelation_getTarget (AccessibleRelation *obj, int i)
-{
-  cspi_return_val_if_fail (obj, NULL);
-
-  if (i < 0 || i >= obj->targets->len) return NULL;
-  return cspi_object_add (
-			 g_array_index (obj->targets, Accessible *, i));
-}
-
-/**
- * AccessibleStateSet_ref:
- * @obj: a pointer to the #AtspiAccessibleStateSet object on which to operate.
- *
- * Increment the reference count for an #AtspiAccessibleStateSet object.
- *
- **/
-void
-AccessibleStateSet_ref (AccessibleStateSet *obj)
-{
-  spi_state_set_cache_ref (obj);
-}
-
-/**
- * AccessibleStateSet_unref:
- * @obj: a pointer to the #AtspiAccessibleStateSet object on which to operate.
- *
- * Decrement the reference count for an #AtspiAccessibleStateSet object.
- *
- **/
-void
-AccessibleStateSet_unref (AccessibleStateSet *obj)
-{
-  spi_state_set_cache_unref (obj);
-}
-
-static Accessibility_StateType
-spi_state_to_dbus (AccessibleState state)
-{
-#define MAP_STATE(a) \
-  case SPI_STATE_##a: \
-    return Accessibility_STATE_##a
-
-  switch (state)
-    {
-      MAP_STATE (INVALID);
-      MAP_STATE (ACTIVE);
-      MAP_STATE (ARMED);
-      MAP_STATE (BUSY);
-      MAP_STATE (CHECKED);
-      MAP_STATE (DEFUNCT);
-      MAP_STATE (EDITABLE);
-      MAP_STATE (ENABLED);
-      MAP_STATE (EXPANDABLE);
-      MAP_STATE (EXPANDED);
-      MAP_STATE (FOCUSABLE);
-      MAP_STATE (FOCUSED);
-      MAP_STATE (HORIZONTAL);
-      MAP_STATE (ICONIFIED);
-      MAP_STATE (MODAL);
-      MAP_STATE (MULTI_LINE);
-      MAP_STATE (MULTISELECTABLE);
-      MAP_STATE (OPAQUE);
-      MAP_STATE (PRESSED);
-      MAP_STATE (RESIZABLE);
-      MAP_STATE (SELECTABLE);
-      MAP_STATE (SELECTED);
-      MAP_STATE (SENSITIVE);
-      MAP_STATE (SHOWING);
-      MAP_STATE (SINGLE_LINE);
-      MAP_STATE (STALE);
-      MAP_STATE (TRANSIENT);
-      MAP_STATE (VERTICAL);
-      MAP_STATE (VISIBLE);
-      MAP_STATE (MANAGES_DESCENDANTS);
-      MAP_STATE (INDETERMINATE);
-      MAP_STATE (TRUNCATED);
-      MAP_STATE (REQUIRED);
-      MAP_STATE (INVALID_ENTRY);
-      MAP_STATE (SUPPORTS_AUTOCOMPLETION);
-      MAP_STATE (SELECTABLE_TEXT);
-      MAP_STATE (IS_DEFAULT);
-      MAP_STATE (VISITED);
-    default:
-      return Accessibility_STATE_INVALID;
-  }
-#undef MAP_STATE
-}	      
-
-/**
- * AccessibleStateSet_contains:
- * @obj: a pointer to the #AtspiAccessibleStateSet object on which to operate.
- * @state: an #AtspiAccessibleState for which the specified #AtspiAccessibleStateSet
- *       will be queried.
- *
- * Determine whether a given #AtspiAccessibleStateSet includes a given state; that is,
- *       whether @state is true for the stateset in question.
- *
- * Returns: #TRUE if @state is true/included in the given #AtspiAccessibleStateSet,
- *          otherwise #FALSE.
- *
- **/
-gboolean
-AccessibleStateSet_contains (AccessibleStateSet *obj,
-			     AccessibleState state)
-{
-  return spi_state_set_cache_contains (obj, spi_state_to_dbus (state));
-}
-
-/**
- * AccessibleStateSet_add:
- * @obj: a pointer to the #AtspiAccessibleStateSet object on which to operate.
- * @state: an #AtspiAccessibleState to be added to the specified #AtspiAccessibleStateSet
- *
- * Add a particular #AtspiAccessibleState to an #AtspiAccessibleStateSet (i.e. set the
- *       given state to #TRUE in the stateset.
- *
- **/
-void
-AccessibleStateSet_add (AccessibleStateSet *obj,
-			AccessibleState state)
-{
-  spi_state_set_cache_add (obj, spi_state_to_dbus (state));
-}
-
-/**
- * AccessibleStateSet_remove:
- * @obj: a pointer to the #AtspiAccessibleStateSet object on which to operate.
- * @state: an #AtspiAccessibleState to be removed from the specified #AtspiAccessibleStateSet
- *
- * Remove a particular #AtspiAccessibleState to an #AtspiAccessibleStateSet (i.e. set the
- *       given state to #FALSE in the stateset.)
- *
- **/
-void
-AccessibleStateSet_remove (AccessibleStateSet *obj,
-			   AccessibleState state)
-{
-  spi_state_set_cache_remove (obj, spi_state_to_dbus (state));
-}
-
-/**
- * AccessibleStateSet_equals:
- * @obj: a pointer to the first #AtspiAccessibleStateSet object on which to operate.
- * @obj2: a pointer to the second #AtspiAccessibleStateSet object on which to operate.
- *
- * Determine whether two instances of #AtspiAccessibleStateSet are equivalent (i.e.
- *         consist of the same #AtspiAccessibleStates).  Useful for checking multiple
- *         state variables at once; construct the target state then compare against it.
- *
- * @see AccessibleStateSet_compare().
- *
- * Returns: #TRUE if the two #AtspiAccessibleStateSets are equivalent,
- *          otherwise #FALSE.
- *
- **/
-gboolean
-AccessibleStateSet_equals (AccessibleStateSet *obj,
-                           AccessibleStateSet *obj2)
-{
-  gboolean   eq;
-  AtkStateSet *cmp;
-
-  if (obj == obj2)
-    {
-      return TRUE;
-    }
-
-  cmp = spi_state_set_cache_xor (obj, obj2);
-  eq = spi_state_set_cache_is_empty (cmp);
-  spi_state_set_cache_unref (cmp);
-
-  return eq;
-}
-
-/**
- * AccessibleStateSet_compare:
- * @obj: a pointer to the first #AtspiAccessibleStateSet object on which to operate.
- * @obj2: a pointer to the second #AtspiAccessibleStateSet object on which to operate.
- *
- * Determine the differences between two instances of #AtspiAccessibleStateSet.
- * Not Yet Implemented.
- *.
- * @see AccessibleStateSet_equals().
- *
- * Returns: an #AtspiAccessibleStateSet object containing all states contained on one of
- *          the two sets but not the other.
- *
- **/
-AccessibleStateSet *
-AccessibleStateSet_compare (AccessibleStateSet *obj,
-                            AccessibleStateSet *obj2)
-{
-  return spi_state_set_cache_xor (obj, obj2);
-}
-
-/**
- * AccessibleStateSet_isEmpty:
- * @obj: a pointer to the #AtspiAccessibleStateSet object on which to operate.
- *
- * Determine whether a given #AtspiAccessibleStateSet is the empty set.
- *
- * Returns: #TRUE if the given #AtspiAccessibleStateSet contains no (true) states,
- *          otherwise #FALSE.
- *
- **/
-gboolean
-AccessibleStateSet_isEmpty (AccessibleStateSet *obj)
-{
-  return spi_state_set_cache_is_empty (obj);
-}
-#endif
-
 gboolean
 _atspi_accessible_is_a (AtspiAccessible *accessible,
 		      const char *interface_name)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]