Removed references to bonobo_x_object, which is now redundant with bonobo_object...
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 31 Jul 2001 13:18:12 +0000 (13:18 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 31 Jul 2001 13:18:12 +0000 (13:18 +0000)
Also we now null-out the 'atko' member of the accessible instance on finalize.

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

22 files changed:
ChangeLog
idl/Accessibility_Action.idl
idl/Accessibility_Component.idl
idl/Accessibility_Hyperlink.idl
idl/Accessibility_Hypertext.idl
idl/Accessibility_Image.idl
idl/Accessibility_Selection.idl
idl/Accessibility_StreamableContent.idl
idl/Action.idl
idl/Component.idl
idl/Hyperlink.idl
idl/Hypertext.idl
idl/Image.idl
idl/Selection.idl
idl/StreamableContent.idl
libspi/accessible.c
libspi/accessible.h
libspi/application.c
libspi/desktop.c
libspi/registry.c
registryd/desktop.c
registryd/registry.c

index d118824e7e67f9252413d503b6258f7d32c21f10..3b0f68cd6891b7b3afc5874753ad1fb54383f5f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,27 @@
+2001-07-31  Bill Haneman <bill.haneman@sun.com>
+
+       * libspi/accessible.c
+       * libspi/desktop.c
+       * libspi/registry.c : changed to use bonobo_object instead of bonobo_x_object
+           (since the two are now equivalent in libbonobo)
+       * idl/Action.idl
+       * idl/Component.idl
+       * idl/Hyperlink.idl
+       * idl/Image.idl
+       * idl/Selection.idl
+       * idl/Table.idl
+       * idl/Text.idl
+       * idl/Value.idl : changed these 'secondary' interfaces to inherit from
+            Bonobo::Unknown as does Accessibility::Accessible.
+       * idl/StreamableContent.idl : as above, and replaced internal InputStream
+            interface with Bonobo::Stream, since it was redundant with it.
+            (The Stream returned by a StreamableContext object is expected to
+            implement only a subset of Bonobo::Stream)
+
 2001-07-28  Anders Carlsson  <andersca@gnome.org>
 
-       * libspi/accessible.c (accessible_object_finalize): Change
-       g_free to g_object_unref since the AtkObject is a GObject.
+        * libspi/accessible.c (accessible_object_finalize): Change
+          g_free to g_object_unref since the AtkObject is a GObject.
 
 2001-07-30  Bill Haneman <bill.haneman@sun.com>
 
index 585438b613adc8f5d2f001adf7f1dde4e9c585e2..ea869f506539a8123cb82a851a967db04b284348 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Action {
+  interface Action : Bonobo::Unknown {
 
         /**
          * getNActions:
index aa690d1e4ccc5c9de1f7a952cc13c041063f664f..856407efc4165701836fdd825dcadef9427b21da 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Component {
+  interface Component : Bonobo::Unknown {
 
         boolean contains (in long x, in long y);
         Accessible getAccessibleAtPoint (in long x, in long y);
index 50db8ab71a280689100a99cd1f5020aba88dceba..845d415942447954acf3e6daeec1dad3315a7bd2 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Hyperlink {
+  interface Hyperlink : Bonobo::Unknown {
         Accessible getAnchor (in long i);
         Accessible getObject (in long i);
         long getStartIndex ();
index 47b68b2796c03905ae2a545b78fcd07553c09088..05952bac7225edb72b06317e2f6ac21dc6219c34 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Hypertext {
+  interface Hypertext : Text {
         long getNLinks ();
         Hyperlink getLink (in long linkIndex);
         long getLinkIndex (in long characterIndex);
index a186e6a330490a4950e605c59c21c3efba29c0ff..4e04bbf17df40a0a3858c18ad4392b3a285359c7 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Image {
+  interface Image : Bonobo::Unknown  {
         string getImageDescription ();
         long getImageHeight ();
         long getImageWidth ();
index 006b12c42b5dd7e8658535052b884c0403354470..e1da97aaf19280fac55ecd26e7c64434f0497613 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Selection {
+  interface Selection : Bonobo::Unknown {
         long getNSelectedChildren ();
         Accessible getSelectedChild (in long selectedChildIndex);
         boolean selectChild (in long childIndex);
index a9c9d3669e9751e2b76ed1604667f36d80061c3c..13f38056afbe3a71342e42c412f4caf7fd2c48c5 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include <Bonobo_Storage.idl>
+
 module Accessibility {
 
   typedef sequence<string> StringSeq;
@@ -32,16 +34,9 @@ module Accessibility {
     SEEK_CURRENT
   };
 
-  interface InputStream {
-    void open ();
-    long read (inout OctetSeq buffer, in long howmany);
-    boolean seek (in long offset, in SeekType type);
-    boolean rewind ();
-    void close ();
-  };
-
   interface StreamableContent {
     StringSeq getContentTypes ();
-    InputStream getContent (in string contentType);
+    Bonobo::Stream getContent (in string contentType);
+    /* methods used from Bonobo::Stream : seek, read.  Others unsupported. */
   };
 };
index 585438b613adc8f5d2f001adf7f1dde4e9c585e2..ea869f506539a8123cb82a851a967db04b284348 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Action {
+  interface Action : Bonobo::Unknown {
 
         /**
          * getNActions:
index aa690d1e4ccc5c9de1f7a952cc13c041063f664f..856407efc4165701836fdd825dcadef9427b21da 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Component {
+  interface Component : Bonobo::Unknown {
 
         boolean contains (in long x, in long y);
         Accessible getAccessibleAtPoint (in long x, in long y);
index 50db8ab71a280689100a99cd1f5020aba88dceba..845d415942447954acf3e6daeec1dad3315a7bd2 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Hyperlink {
+  interface Hyperlink : Bonobo::Unknown {
         Accessible getAnchor (in long i);
         Accessible getObject (in long i);
         long getStartIndex ();
index 47b68b2796c03905ae2a545b78fcd07553c09088..05952bac7225edb72b06317e2f6ac21dc6219c34 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Hypertext {
+  interface Hypertext : Text {
         long getNLinks ();
         Hyperlink getLink (in long linkIndex);
         long getLinkIndex (in long characterIndex);
index a186e6a330490a4950e605c59c21c3efba29c0ff..4e04bbf17df40a0a3858c18ad4392b3a285359c7 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Image {
+  interface Image : Bonobo::Unknown  {
         string getImageDescription ();
         long getImageHeight ();
         long getImageWidth ();
index 006b12c42b5dd7e8658535052b884c0403354470..e1da97aaf19280fac55ecd26e7c64434f0497613 100644 (file)
@@ -24,7 +24,7 @@
 
 module Accessibility {
 
-  interface Selection {
+  interface Selection : Bonobo::Unknown {
         long getNSelectedChildren ();
         Accessible getSelectedChild (in long selectedChildIndex);
         boolean selectChild (in long childIndex);
index a9c9d3669e9751e2b76ed1604667f36d80061c3c..13f38056afbe3a71342e42c412f4caf7fd2c48c5 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include <Bonobo_Storage.idl>
+
 module Accessibility {
 
   typedef sequence<string> StringSeq;
@@ -32,16 +34,9 @@ module Accessibility {
     SEEK_CURRENT
   };
 
-  interface InputStream {
-    void open ();
-    long read (inout OctetSeq buffer, in long howmany);
-    boolean seek (in long offset, in SeekType type);
-    boolean rewind ();
-    void close ();
-  };
-
   interface StreamableContent {
     StringSeq getContentTypes ();
-    InputStream getContent (in string contentType);
+    Bonobo::Stream getContent (in string contentType);
+    /* methods used from Bonobo::Stream : seek, read.  Others unsupported. */
   };
 };
index 4828d51018621b34d7ae7bd6d5168af8255a2111..276c2c3280638ed832c2d46bec73ca1bc62db36d 100644 (file)
@@ -42,7 +42,7 @@
 /*
  * Our parent Gtk object type
  */
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
+#define PARENT_TYPE BONOBO_OBJECT_TYPE
 
 /*
  * A pointer to our parent object class
@@ -59,6 +59,7 @@ accessible_object_finalize (GObject *object)
 
         printf("accessible_object_finalize called\n");
         g_object_unref (accessible->atko);
+        accessible->atko = NULL;
 
         printf("atko freed, calling parent finalize\n");
         accessible_parent_class->finalize (object);
@@ -91,18 +92,54 @@ impl_accessibility_accessible_set_name (PortableServer_Servant servant,
   printf ("Accessible set_name called: %s\n", name);
 }
 
+/*
+ * CORBA Accessibility::Accessible::get_description method implementation
+ */
+static CORBA_char *
+impl_accessibility_accessible_get_description (PortableServer_Servant servant,
+                                               CORBA_Environment     *ev)
+{
+  CORBA_char * retval;
+  Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant));
+  retval = CORBA_string_dup (atk_object_get_description (accessible->atko));
+  fprintf (stderr, "Accessible get_description called: %s\n", retval);
+  return retval;
+}
+
+/*
+ * CORBA Accessibility::Accessible::set_description method implementation
+ */
+static void
+impl_accessibility_accessible_set_description (PortableServer_Servant servant,
+                                               const CORBA_char      *name,
+                                               CORBA_Environment     *ev)
+{
+  Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant));
+  atk_object_set_description (accessible->atko, name);
+  printf ("Accessible set_description called: %s\n", name);
+}
+
 static void
 accessible_class_init (AccessibleClass *klass)
 {
         GObjectClass * object_class = (GObjectClass *) klass;
         POA_Accessibility_Accessible__epv *epv = &klass->epv;
-        accessible_parent_class = g_type_class_ref (BONOBO_X_OBJECT_TYPE);
-        /*accessible_parent_class = g_type_class_peek_parent (klass);*/
+        accessible_parent_class = g_type_class_peek_parent (klass);
 
         object_class->finalize = accessible_object_finalize;
 
         epv->_get_name = impl_accessibility_accessible_get_name;
         epv->_set_name = impl_accessibility_accessible_set_name;
+        epv->_get_description = impl_accessibility_accessible_get_description;
+        epv->_set_description = impl_accessibility_accessible_set_description;
+
+        /* epv->_get_parent = impl_accessibility_accessible_get_parent;               */
+        /* epv->_get_childCount = impl_accessibility_accessible_get_child_count;      */
+        /* epv->getChildAtIndex = impl_accessibility_accessible_get_child_at_index;   */
+        /* epv->getIndexInParent = impl_accessibility_accessible_get_index_in_parent; */
+        /* epv->getRelationSet = impl_accessibility_accessible_get_relation_set;      */
+        /* epv->getState = impl_accessibility_accessible_get_state;                   */
+        /* epv->getRole = impl_accessibility_accessible_get_role;                     */
 }
 
 static void
@@ -129,12 +166,11 @@ accessible_get_type (void)
                         NULL /* value table */
                 };
                 /*
-                 *   Here we use bonobo_x_type_unique instead of
-                 * gtk_type_unique, this auto-generates a load of
+                 * Bonobo_type_unique auto-generates a load of
                  * CORBA structures for us. All derived types must
-                 * use bonobo_x_type_unique.
+                 * use bonobo_type_unique.
                  */
-                type = bonobo_x_type_unique (
+                type = bonobo_type_unique (
                         PARENT_TYPE,
                         POA_Accessibility_Accessible__init,
                         NULL,
index 70742d8082107de990e8ce91989ab447a015bf9c..406d026f7a6928dd3fe84607e1ff984f2d816e2d 100644 (file)
@@ -25,7 +25,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#include <bonobo/bonobo-xobject.h>
+#include <bonobo/bonobo-object.h>
 #include <atk/atkobject.h>
 #include <libspi/Accessibility.h>
 
@@ -36,12 +36,12 @@ extern "C" {
 #define IS_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ACCESSIBLE_TYPE))
 
 typedef struct {
-        BonoboXObject parent;
+        BonoboObject parent;
         AtkObject *atko;
 } Accessible;
 
 typedef struct {
-        BonoboXObjectClass parent_class;
+        BonoboObjectClass parent_class;
         POA_Accessibility_Accessible__epv epv;
 } AccessibleClass;
 
index 2a2f4a2697938639a1eba46c5184c5306505b775..8e16e12486aac75d70d47e57fef303b4c9156819 100644 (file)
@@ -74,12 +74,11 @@ application_get_type (void)
                         NULL /* value table */
                 };
                 /*
-                 *   Here we use bonobo_x_type_unique instead of
-                 * gtk_type_unique, this auto-generates a load of
+                 * Bonobo_type_unique auto-generates a load of
                  * CORBA structures for us. All derived types must
-                 * use bonobo_x_type_unique.
+                 * use bonobo_type_unique.
                  */
-                type = bonobo_x_type_unique (
+                type = bonobo_type_unique (
                         PARENT_TYPE,
                         POA_Accessibility_Application__init,
                         NULL,
index a67ca652c43cc24d86067bbcc37d393d3c873b13..b21fdfe8e767280ddc0b86fe7b798f883a54411a 100644 (file)
@@ -127,12 +127,12 @@ desktop_get_type (void)
                         NULL /* value table */
                 };
                 /*
-                 *   Here we use bonobo_x_type_unique instead of
+                 *   Here we use bonobo_type_unique instead of
                  * gtk_type_unique, this auto-generates a load of
                  * CORBA structures for us. All derived types must
-                 * use bonobo_x_type_unique.
+                 * use bonobo_type_unique.
                  */
-                type = bonobo_x_type_unique (
+                type = bonobo_type_unique (
                         PARENT_TYPE,
                         POA_Accessibility_Desktop__init,
                         NULL,
index 506843d05ad668b52dfce2bdda3176f61e4ab634..4e767ad6a71942e1d7cb07d5e3bf7b36b2014c2c 100644 (file)
@@ -309,7 +309,7 @@ registry_get_type (void)
                  * CORBA structures for us. All derived types must
                  * use bonobo_x_type_unique.
                  */
-                type = bonobo_x_type_unique (
+                type = bonobo_type_unique (
                         PARENT_TYPE,
                         POA_Accessibility_Registry__init,
                         NULL,
index a67ca652c43cc24d86067bbcc37d393d3c873b13..b21fdfe8e767280ddc0b86fe7b798f883a54411a 100644 (file)
@@ -127,12 +127,12 @@ desktop_get_type (void)
                         NULL /* value table */
                 };
                 /*
-                 *   Here we use bonobo_x_type_unique instead of
+                 *   Here we use bonobo_type_unique instead of
                  * gtk_type_unique, this auto-generates a load of
                  * CORBA structures for us. All derived types must
-                 * use bonobo_x_type_unique.
+                 * use bonobo_type_unique.
                  */
-                type = bonobo_x_type_unique (
+                type = bonobo_type_unique (
                         PARENT_TYPE,
                         POA_Accessibility_Desktop__init,
                         NULL,
index 506843d05ad668b52dfce2bdda3176f61e4ab634..4e767ad6a71942e1d7cb07d5e3bf7b36b2014c2c 100644 (file)
@@ -309,7 +309,7 @@ registry_get_type (void)
                  * CORBA structures for us. All derived types must
                  * use bonobo_x_type_unique.
                  */
-                type = bonobo_x_type_unique (
+                type = bonobo_type_unique (
                         PARENT_TYPE,
                         POA_Accessibility_Registry__init,
                         NULL,