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 94f6857a4e1dcf458de36352ab695fc3a71141e3..23d1daca019b05c8b473c1772ae211a5bf6ea836 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 dd02937085886ac2d1d1e08dff6f498a7903c6b0..5bf3880fad5e7e5bc09b0eacfb2f6b4d6d2333a9 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 5b70f7bf77424d63e2e14a202b9a8aa13051ec1b..f0e6002d9e9a72df4c54277414f0e9158c5aa13c 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 7024a7a541ce36369db6de779da54fab1c337308..13b1ec7e97cfc60e547b35032d185efd7f7b0047 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 8149eabbaf58ea905f15753a8d4fe5488fe1d06e..bca3dea631d9b046a64d07dd78de2e86be0ba79c 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 521e6d915f91278529720dde7df5c38977ffdff4..5a5a687f8071f204adc6e308b7b9a4b02566bb07 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 84c9b218c3ead6369b8e3a68cdbfbb18bf474377..241fbc1360508ab3f33950cb74228e3715b10156 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 93dcb25032027ac66134e547eb11e7ce03cec32b..a9867c86b4b4ba17c0fed987b7e675bd282dcc1c 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 13086ea7631899868cfbaeff5ee4b0ad47fa3b6b..aa4c9620ae1c0195dc96f54e3d5eb7e469ceb55e 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 7c750b49d6af30128d02bcce0c55a38195f381e0..42bc9001c2ccbef996f40b52344dc14cf70eb59d 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 e4a1ec5ac621939e07cdb19b20932d5846c2fd43..6c00d44c80cb2f2dfba9578a325ebac00171e2fe 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 794f1e7e1c931316e14195fb51f2d83b3882ecb4..b9578495fc352e8a8c496ac4ae7e8b29306a66df 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 d3877efb49b2abfa403f4438188d084200cf6259..1ddb74f23531febdc2cd7819ae6c25c8d9f064b6 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 9ab0b0e5d6ce0ff0254ac99021599be257163cb1..aa0ff470b40fd9afe73d874761f9614e2d00851a 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 08fc3bc1778c3804eaf1ffeb02de71b808c0c610..4264697737404f832bb060f296b1ef46bd2c4bd4 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 84c9b218c3ead6369b8e3a68cdbfbb18bf474377..241fbc1360508ab3f33950cb74228e3715b10156 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