2001-11-20 Michael Meeks <michael@ximian.com>
authormichael <michael@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 20 Nov 2001 00:47:32 +0000 (00:47 +0000)
committermichael <michael@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 20 Nov 2001 00:47:32 +0000 (00:47 +0000)
* libspi/*.[ch]: fixup headers, includes and over commenting.

* libspi/image.c (impl__get_imageDescription): const
correctness warning fix. remove redundant casting.

* libspi/table.c (impl_getRowDescription): ditto.
(impl_getColumnDescription): ditto.

* libspi/libspi.h: add.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@98 e2bd861d-eb25-0410-b326-f6ed22b6b98c

17 files changed:
ChangeLog
libspi/Makefile.am
libspi/accessible.c
libspi/action.c
libspi/application.c
libspi/component.c
libspi/desktop.c
libspi/editabletext.c
libspi/hyperlink.c
libspi/hypertext.c
libspi/hypertext.h
libspi/image.c
libspi/libspi.h [new file with mode: 0644]
libspi/relation.c
libspi/selection.c
libspi/table.c
registryd/desktop.c

index 94f6857..23d1dac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-11-20  Michael Meeks  <michael@ximian.com>
+
+       * libspi/*.[ch]: fixup headers, includes and over commenting.
+
+       * libspi/image.c (impl__get_imageDescription): const
+       correctness warning fix. remove redundant casting.
+
+       * libspi/table.c (impl_getRowDescription): ditto.
+       (impl_getColumnDescription): ditto.
+
+       * libspi/libspi.h: add.
+
 2001-11-19  Michael Meeks  <michael@ximian.com>
 
        * libspi/editabletext.c (impl_setAttributes): fix warnings.
index dd02937..5bf3880 100644 (file)
@@ -14,27 +14,28 @@ CFLAGS += $(DEBUG_CFLAGS)
 
 libspiincludedir = $(includedir)/at-spi-1.0/libspi
 
-libspiinclude_HEADERS = accessible.h       \
-                       action.h\
-                        application.h      \
-                       component.h\
-                        desktop.h          \
+libspiinclude_HEADERS = Accessibility.h \
+                       accessible.h \
+                       accessibleeventlistener.h \
+                       action.h \
+                        application.h \
+                       component.h \
+                        desktop.h \
+                       deviceeventcontroller.h \
                        editabletext.h\
                        hyperlink.h\
                        hypertext.h\
-                       image.h\
-                       relation.h\
-                       selection.h\
-                       table.h\
-                       text.h\
-                       value.h\
-                        listener.h   \
-                       keystrokelistener.h     \
-                       accessibleeventlistener.h       \
-                       deviceeventcontroller.h \
-                        registry.h         \
-                       keymasks.h      \
-                        Accessibility.h
+                       image.h \
+                       keystrokelistener.h \
+                       keymasks.h \
+                       libspi.h \
+                        listener.h \
+                        registry.h \
+                       relation.h \
+                       selection.h \
+                       table.h \
+                       text.h \
+                       value.h
 
 IDL_OUT = Accessibility.h Accessibility-stubs.c Accessibility-skels.c Accessibility-common.c
 
index 5b70f7b..f0e6002 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * accessible.c: test for accessibility implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* accessible.c: the core of the accessibility implementation */
 
+#include <config.h>
 #include <stdio.h>
-
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition for the BonoboObject (Gtk Type)
- */
-#include "accessible.h"
-#include "component.h"
-#include "editabletext.h"
-#include "hyperlink.h"
-#include "hypertext.h"
-#include "image.h"
-#include "selection.h"
-#include "table.h"
-#include "text.h"
-#include "value.h"
-#include "action.h"
-#include "relation.h"
+#include <libspi/libspi.h>
 
 /*
  * Our parent Gtk object type
index 7024a7a..13b1ec7 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* component.c : bonobo wrapper for accessible component implementation */
 
+#include <config.h>
 #include <stdio.h>
-
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition of the SpiAction bonobo object
- */
-#include "action.h"
+#include <libspi/action.h>
 
 /*
  * Static function declarations
index 8149eab..bca3dea 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * application.c: implements SpiApplication.idl
- *
- */
+/* application.c: implements SpiApplication.idl */
+
 #include <string.h>
 #include <config.h>
-#include <bonobo/Bonobo.h>
 #include <atk/atkutil.h>
-
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition for the BonoboObject (GObject Type)
- */
-#include "application.h"
+#include <libspi/application.h>
 
 /*
  * Our parent Gtk object type
index 521e6d9..5a5a687 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* component.c : implements the Component interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/accessible.h>
+#include <libspi/component.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition for the BonoboObject (Gtk Type)
- */
-#include "component.h"
-#include "accessible.h"
-
-/*
- * Our parent Gtk object type
- */
+/* Our parent Gtk object type */
 #define PARENT_TYPE BONOBO_OBJECT_TYPE
 
-/*
- * A pointer to our parent object class
- */
+/* A pointer to our parent object class */
 static GObjectClass *spi_component_parent_class;
 
 /*
index 84c9b21..241fbc1 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * desktop.c: implements SpiDesktop.idl
- *
- */
-
-/* #include <config.h> */
-#include <libbonobo.h>
+/* desktop.c: implements SpiDesktop.idl */
 
+#include <config.h>
 #include <stdio.h>
+#include <libbonobo.h>
+#include <libspi/desktop.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition for the BonoboObject (Gtk Type)
- */
-#include "desktop.h"
-
-/*
- * Our parent Gtk object type
- */
+/* Our parent Gtk object type */
 #define PARENT_TYPE SPI_ACCESSIBLE_TYPE
 
-/*
- * A pointer to our parent object class
- */
+/* A pointer to our parent object class */
 static SpiAccessibleClass *parent_class;
 
 static void
index 93dcb25..a9867c8 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* editabletext.c : implements the EditableText interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/editabletext.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition of the SpiEditableText bonobo object
- */
-#include "editabletext.h"
-
-/*
- * Static function declarations
- */
+/* Static function declarations */
 
 static void
 spi_editable_text_class_init (SpiEditableTextClass *klass);
index 13086ea..aa4c962 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* hyperlink.c : implements the Hyperlink interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/hyperlink.h>
+#include <libspi/accessible.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition of the hyperlink bonobo object
- */
-#include "hyperlink.h"
-#include "accessible.h"
-
-/*
- * Static function declarations
- */
+/* Static function declarations */
 
 static void
 spi_hyperlink_class_init (SpiHyperlinkClass *klass);
@@ -195,5 +180,3 @@ impl_isValid (PortableServer_Servant _servant,
   SpiHyperlink *link = SPI_HYPERLINK(bonobo_object_from_servant(_servant));
   return (CORBA_boolean) atk_hyperlink_is_valid (ATK_HYPERLINK(link->hyperlink));
 }
-
-
index 7c750b4..42bc900 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* hypertext.c : implements the HyperText interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/hyperlink.h>
+#include <libspi/hypertext.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition of the hypertext bonobo object
- */
-#include "hypertext.h"
-
-/*
- * Static function declarations
- */
+/* Static function declarations */
 
 static void
 spi_hypertext_class_init (SpiHypertextClass *klass);
@@ -173,17 +159,22 @@ impl_getNLinks (PortableServer_Servant _servant,
 
 
 static Accessibility_Hyperlink
-impl_getLink (PortableServer_Servant _servant,
-             const CORBA_long linkIndex,
-                                         CORBA_Environment * ev)
+impl_getLink (PortableServer_Servant servant,
+             const CORBA_long       linkIndex,
+             CORBA_Environment     *ev)
 {
   AtkHyperlink *link;
-  SpiHypertext *hypertext = SPI_HYPERTEXT(bonobo_object_from_servant(_servant));
+  SpiHypertext *hypertext;
   Accessibility_Hyperlink rv;
   
-  link = atk_hypertext_get_link (ATK_HYPERTEXT(hypertext->atko),
-                                (gint) linkIndex);
-  rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_hyperlink_new(ATK_OBJECT(link))));
+  hypertext = SPI_HYPERTEXT (bonobo_object_from_servant (servant));
+
+  link = atk_hypertext_get_link (
+         ATK_HYPERTEXT (hypertext->atko), linkIndex);
+
+  rv = bonobo_object_corba_objref (BONOBO_OBJECT (
+         spi_hyperlink_new (ATK_OBJECT (link))));
+
   return rv;
 }
 
index e4a1ec5..6c00d44 100644 (file)
@@ -48,11 +48,8 @@ struct _HypertextClass {
   POA_Accessibility_Hypertext__epv epv;
 };
 
-GType
-spi_hypertext_get_type   (void);
-
-SpiHypertext *
-spi_hypertext_interface_new       (AtkObject *obj);
+GType         spi_hypertext_get_type      (void);
+SpiHypertext *spi_hypertext_interface_new (AtkObject *obj);
 
 #ifdef __cplusplus
 }
index 794f1e7..b957849 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* image.c : implements the Image interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/image.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition of the image bonobo object
- */
-#include "image.h"
-
-/*
- * Static function declarations
- */
+/* Static function declarations */
 
 static void
 spi_image_class_init (SpiImageClass *klass);
@@ -171,13 +156,15 @@ impl_getImageSize (PortableServer_Servant _servant,
 
 
 static CORBA_string 
-impl__get_imageDescription (PortableServer_Servant _servant,
-                         CORBA_Environment * ev)
+impl__get_imageDescription (PortableServer_Servant servant,
+                           CORBA_Environment     *ev)
 {
-  SpiImage *image = SPI_IMAGE (bonobo_object_from_servant(_servant));
-  CORBA_char *rv;
+  SpiImage *image;
+  const char *rv;
+
+  image = SPI_IMAGE (bonobo_object_from_servant (servant));
 
-  rv = atk_image_get_image_description (ATK_IMAGE(image->atko));
+  rv = atk_image_get_image_description (ATK_IMAGE (image->atko));
   if (rv)
     return CORBA_string_dup (rv);
   else
diff --git a/libspi/libspi.h b/libspi/libspi.h
new file mode 100644 (file)
index 0000000..5b5ea71
--- /dev/null
@@ -0,0 +1,46 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Ximian, 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.
+ *
+ * libspi.h: the main include header for libspi.
+ */
+#ifndef LIBSPI_H_
+#define LIBSPI_H_
+
+#include <libspi/Accessibility.h>
+#include <libspi/accessible.h>
+#include <libspi/action.h>
+#include <libspi/application.h>
+#include <libspi/component.h>
+#include <libspi/desktop.h>
+#include <libspi/editabletext.h>
+#include <libspi/hyperlink.h>
+#include <libspi/hypertext.h>
+#include <libspi/image.h>
+#include <libspi/relation.h>
+#include <libspi/selection.h>
+#include <libspi/table.h>
+#include <libspi/text.h>
+#include <libspi/value.h>
+#include <libspi/listener.h>
+#include <libspi/keystrokelistener.h>
+#include <libspi/accessibleeventlistener.h>
+#include <libspi/deviceeventcontroller.h>
+#include <libspi/registry.h>
+#include <libspi/keymasks.h>
+
+#endif /* LIBSPI_H_ */
index d3877ef..1ddb74f 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * relation.c : bonobo wrapper for accessible relation implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* relation.c : implements the Relation interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/relation.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition of the relation bonobo object
- */
-#include "relation.h"
-
-/*
- * Static function declarations
- */
+/* Static function declarations */
 
 static void
 spi_relation_class_init (SpiRelationClass *klass);
index 9ab0b0e..aa0ff47 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* selection.c : implements the Selection interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/accessible.h>
+#include <libspi/selection.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-#include "accessible.h"
-
-/*
- * This pulls the definition of the selection bonobo object
- */
-#include "selection.h"
-
-/*
- * Static function declarations
- */
+/* Static function declarations */
 
 static void
 spi_selection_class_init (SpiSelectionClass *klass);
index 08fc3bc..4264697 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* table.c : implements the Table interface */
 
+#include <config.h>
 #include <stdio.h>
+#include <libspi/accessible.h>
+#include <libspi/table.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition of the SpiTable bonobo object
- */
-#include "table.h"
-
-/*
- * Static function declarations
- */
+/* Static function declarations */
 
 static void
 spi_table_class_init (SpiTableClass *klass);
@@ -333,14 +319,17 @@ impl_getColumnAtIndex (PortableServer_Servant _servant,
 
 
 static CORBA_string
-impl_getRowDescription (PortableServer_Servant _servant,
-                       const CORBA_long row,
-                       CORBA_Environment ev)
+impl_getRowDescription (PortableServer_Servant servant,
+                       const CORBA_long       row,
+                       CORBA_Environment     *ev)
 {
-  SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant));
-  CORBA_char *rv;
+  const char *rv;
+  SpiTable   *table;
+
+  table = SPI_TABLE (bonobo_object_from_servant (servant));
   
-  rv = atk_table_get_row_description (ATK_TABLE(table->atko), (gint) row);
+  rv = atk_table_get_row_description (ATK_TABLE (table->atko), row);
+
   if (rv)
     return CORBA_string_dup (rv);
   else
@@ -350,14 +339,17 @@ impl_getRowDescription (PortableServer_Servant _servant,
 
 
 static CORBA_string
-impl_getColumnDescription (PortableServer_Servant _servant,
-                          const CORBA_long column,
-                          CORBA_Environment ev)
+impl_getColumnDescription (PortableServer_Servant servant,
+                          const CORBA_long       column,
+                          CORBA_Environment     *ev)
 {
-  SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant));
-  CORBA_char *rv;
+  const char *rv;
+  SpiTable   *table;
+
+  table = SPI_TABLE (bonobo_object_from_servant (servant));
+  
+  rv = atk_table_get_row_description (ATK_TABLE (table->atko), column);
 
-  rv = atk_table_get_column_description (ATK_TABLE(table->atko), (gint) column);
   if (rv)
     return CORBA_string_dup (rv);
   else
index 84c9b21..241fbc1 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-/*
- * desktop.c: implements SpiDesktop.idl
- *
- */
-
-/* #include <config.h> */
-#include <libbonobo.h>
+/* desktop.c: implements SpiDesktop.idl */
 
+#include <config.h>
 #include <stdio.h>
+#include <libbonobo.h>
+#include <libspi/desktop.h>
 
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition for the BonoboObject (Gtk Type)
- */
-#include "desktop.h"
-
-/*
- * Our parent Gtk object type
- */
+/* Our parent Gtk object type */
 #define PARENT_TYPE SPI_ACCESSIBLE_TYPE
 
-/*
- * A pointer to our parent object class
- */
+/* A pointer to our parent object class */
 static SpiAccessibleClass *parent_class;
 
 static void