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 d118824..3b0f68c 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 585438b..ea869f5 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Action {
+  interface Action : Bonobo::Unknown {
 
         /**
          * getNActions:
index aa690d1..856407e 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 50db8ab..845d415 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 47b68b2..05952ba 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 a186e6a..4e04bbf 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Image {
+  interface Image : Bonobo::Unknown  {
         string getImageDescription ();
         long getImageHeight ();
         long getImageWidth ();
index 006b12c..e1da97a 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 a9c9d36..13f3805 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 585438b..ea869f5 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Action {
+  interface Action : Bonobo::Unknown {
 
         /**
          * getNActions:
index aa690d1..856407e 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 50db8ab..845d415 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 47b68b2..05952ba 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 a186e6a..4e04bbf 100644 (file)
@@ -22,7 +22,7 @@
 
 module Accessibility {
 
-  interface Image {
+  interface Image : Bonobo::Unknown  {
         string getImageDescription ();
         long getImageHeight ();
         long getImageWidth ();
index 006b12c..e1da97a 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 a9c9d36..13f3805 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 4828d51..276c2c3 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 70742d8..406d026 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 2a2f4a2..8e16e12 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 a67ca65..b21fdfe 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 506843d..4e767ad 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 a67ca65..b21fdfe 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 506843d..4e767ad 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,