Updated screen review test program.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_main.c
index f5cde18..471fe5f 100644 (file)
@@ -1,4 +1,26 @@
 /*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
  *
  * Basic SPI initialization and event loop function prototypes
  *
@@ -14,7 +36,7 @@ static Accessibility_Registry registry = CORBA_OBJECT_NIL;
 static GHashTable *live_refs = NULL;
 
 static guint
-spi_object_hash (gconstpointer key)
+cspi_object_hash (gconstpointer key)
 {
   CORBA_Object object = (CORBA_Object) key;
   guint        retval;
@@ -25,7 +47,7 @@ spi_object_hash (gconstpointer key)
 }
 
 static gboolean
-spi_object_equal (gconstpointer a, gconstpointer b)
+cspi_object_equal (gconstpointer a, gconstpointer b)
 {
   CORBA_Object objecta = (CORBA_Object) a;
   CORBA_Object objectb = (CORBA_Object) b;
@@ -37,7 +59,7 @@ spi_object_equal (gconstpointer a, gconstpointer b)
 }
 
 static void
-spi_object_release (gpointer  value)
+cspi_object_release (gpointer  value)
 {
   Accessible *a = (Accessible *) value;
 
@@ -91,14 +113,14 @@ cspi_accessible_is_a (Accessible *obj,
 }
 
 static GHashTable *
-get_live_refs (void)
+cspi_get_live_refs (void)
 {
   if (!live_refs) 
     {
-      live_refs = g_hash_table_new_full (spi_object_hash,
-                                        spi_object_equal,
+      live_refs = g_hash_table_new_full (cspi_object_hash,
+                                        cspi_object_equal,
                                         NULL,
-                                        spi_object_release);
+                                        cspi_object_release);
     }
   return live_refs;
 }
@@ -143,13 +165,13 @@ cspi_object_add (CORBA_Object corba_object)
     {
       ref = NULL;
     }
-  else if (!cspi_check_ev ("pre method check"))
+  else if (!cspi_check_ev ("pre method check: add"))
     {
       ref = NULL;
     }
   else
     {
-      if ((ref = g_hash_table_lookup (get_live_refs (), corba_object)))
+      if ((ref = g_hash_table_lookup (cspi_get_live_refs (), corba_object)))
         {
           g_assert (ref->ref_count > 0);
          ref->ref_count++;
@@ -169,7 +191,7 @@ cspi_object_add (CORBA_Object corba_object)
           ref->objref = corba_object;
           ref->ref_count = 1;
 
-          g_hash_table_insert (get_live_refs (), ref->objref, ref);
+          g_hash_table_insert (cspi_get_live_refs (), ref->objref, ref);
        }
     }
 
@@ -194,7 +216,7 @@ cspi_object_unref (Accessible *accessible)
 
   if (--accessible->ref_count == 0)
     {
-      g_hash_table_remove (get_live_refs (), accessible->objref);
+      g_hash_table_remove (cspi_get_live_refs (), accessible->objref);
     }
 }