CHANGES:
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 14 Aug 2001 13:15:30 +0000 (13:15 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 14 Aug 2001 13:15:30 +0000 (13:15 +0000)
* idl/Registry.idl : temporarily changed register_Application
to oneway, to work around issue with initial registration
re-entrancy.
* idl/Application.idl : changed attribute "id" from readonly
to read-write, since it needs to be assigned by Registry.
* registryd/registryd.c : added call to set application id
on registration.
* registryd/registry.c : changed de-registration procedure to
use CORBA_Object_hash() to find matching object ref in application
lists and listener lists.
* registryd/registry.c : defined EventTypeStruct and EventTypeMajor,
began distinguishing between event types (work in progress).
* libspi/application.c:
Added implementations for get/set id, get_toolkitName,
get_version.
* registryd/registryd.c :
* test/at.c :
* test/app.c :
* Makefile.am :
Converted from use of OAF to bonobo-activation.
* libspi/desktop.h :
* libspi/desktop.c :
* test/app.c :
Removed references to atksimpleobject, since base atkobject
implementation now provides functionality we need.
* libspi/atksimpleobject.c :
* libspi/atksimpleobject.h :
Removed.

ADDITIONS:
* at-bridge
* at-bridge/Makefile.am
* at-bridge/bridge.c
* configure.in
* Makefile.am
Added directory "bridge" and contents, and added dependencies
in Makefile.am/configure.in.
Initial checkin of "at-bridge".
This code is a GTK_MODULE which automatically registers
GTK+ apps with the accessibility registry, using an object
reference to the root ATK object.

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

ChangeLog
Makefile.am
at-bridge/.cvsignore [new file with mode: 0644]
at-bridge/Makefile.am [new file with mode: 0644]
at-bridge/bridge.c [new file with mode: 0644]
atk-bridge/.cvsignore [new file with mode: 0644]
atk-bridge/Makefile.am [new file with mode: 0644]
atk-bridge/bridge.c [new file with mode: 0644]
configure.in

index 40596e9..e4b284a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,51 @@
+2001-08-14  Bill Haneman <bill.haneman@sun.com>
+
+       * idl/Registry.idl : temporarily changed register_Application
+       to oneway, to work around issue with initial registration 
+       re-entrancy.
+       * idl/Application.idl : changed attribute "id" from readonly 
+       to read-write, since it needs to be assigned by Registry.
+       * registryd/registryd.c : added call to set application id 
+       on registration.
+       * registryd/registry.c : changed de-registration procedure to
+       use CORBA_Object_hash() to find matching object ref in application
+       lists and listener lists.
+       * registryd/registry.c : defined EventTypeStruct and EventTypeMajor,
+       began distinguishing between event types (work in progress).
+
+2001-08-13  Bill Haneman <bill.haneman@sun.com>
+
+       CHANGES:
+       * libspi/application.c:
+       Added implementations for get/set id, get_toolkitName,
+       get_version.
+       * registryd/registryd.c :
+       * test/at.c :
+       * test/app.c :
+       * Makefile.am :
+       Converted from use of OAF to bonobo-activation.
+       * libspi/desktop.h :
+       * libspi/desktop.c :
+       * test/app.c :
+       Removed references to atksimpleobject, since base atkobject
+       implementation now provides functionality we need.
+       * libspi/atksimpleobject.c :
+       * libspi/atksimpleobject.h :
+       Removed.
+       
+       ADDITIONS:
+       * at-bridge
+       * at-bridge/Makefile.am
+       * at-bridge/bridge.c
+       * configure.in
+       * Makefile.am
+       Added directory "bridge" and contents, and added dependencies
+       in Makefile.am/configure.in.  
+       Initial checkin of "at-bridge".
+       This code is a GTK_MODULE which automatically registers
+       GTK+ apps with the accessibility registry, using an object
+       reference to the root ATK object.
+       
 2001-08-10  Mark McLoughlin <mark@skynet.ie>
 
        * po/Makefile.in.in: Remove. Again. If this
 2001-08-10  Mark McLoughlin <mark@skynet.ie>
 
        * po/Makefile.in.in: Remove. Again. If this
index 2e28afc..cab8593 100644 (file)
@@ -1,3 +1,3 @@
-SUBDIRS=po intl docs idl libspi registryd test
+SUBDIRS=po intl docs idl libspi registryd test at-bridge
 
 EXTRA_DIST= xml-i18n-extract.in xml-i18n-merge.in xml-i18n-update.in
 
 EXTRA_DIST= xml-i18n-extract.in xml-i18n-merge.in xml-i18n-update.in
diff --git a/at-bridge/.cvsignore b/at-bridge/.cvsignore
new file mode 100644 (file)
index 0000000..3045c51
--- /dev/null
@@ -0,0 +1,4 @@
+.deps
+.libs
+Makefile.in
+Makefile
diff --git a/at-bridge/Makefile.am b/at-bridge/Makefile.am
new file mode 100644 (file)
index 0000000..8a09107
--- /dev/null
@@ -0,0 +1,27 @@
+lib_LTLIBRARIES = libat-bridge.la
+
+libat_bridge_la_SOURCES =      \
+       bridge.c        \
+       application.h
+
+INCLUDES = -I $(top_srcdir) \
+           -I $(top_builddir)          \
+          -I $(top_srcdir)/libspi      \
+          -I $(top_builddir)/libspi    \
+           -I $(top_builddir)/at-bridge \
+           $(AT_BRIDGE_CFLAGS)
+
+DEPS =         \
+       $(libatk)       \
+       $(libbonobo-2)  \
+       $(liboaf-2)     \
+       $(libORBit-2)   \
+       $(libat-spi)
+
+
+LDFLAGS = -no-undefined        \
+       @DEP_LIBS@
+
+libat_bridge_la_LIBADD = $(AT_BRIDGE_LIBS) -lspi
+
+CFLAGS += $(AT_BRIDGE_CFLAGS)
diff --git a/at-bridge/bridge.c b/at-bridge/bridge.c
new file mode 100644 (file)
index 0000000..6090c75
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libbonobo.h>
+#include <orbit/orbit.h>
+#include <atk/atk.h>
+#include <atk/atkobject.h>
+#include <libspi/Accessibility.h>
+#include "accessible.h"
+#include "application.h"
+
+typedef struct _ArgStruct ArgStruct;
+
+struct _ArgStruct {
+  gint c;
+  char **v;
+};
+
+static gboolean bridge_register_app (gpointer p);
+
+int
+gtk_module_init(gint argc, char* argv[])
+{
+  ArgStruct *args = (ArgStruct *) g_new0(ArgStruct, 1);
+  args->c = argc;
+  args->v = argv;
+  g_idle_add (bridge_register_app, args);
+}
+
+static gboolean
+bridge_register_app (gpointer gp)
+{
+  CORBA_Environment ev;
+  CORBA_Object oclient;
+  AtkObject *atko;
+  char *obj_id;
+  char sbuf[30];
+  ArgStruct *args = (ArgStruct *)gp;
+
+  Accessibility_Registry registry;
+  Application *app;
+
+  CORBA_exception_init(&ev);
+
+  if (!bonobo_init (&args->c, &args->v))
+    {
+      g_error ("Could not initialize Bonobo");
+    }
+
+  /* Create the accesssible application server object */
+  app = application_new(atk_get_root ());
+
+  obj_id = "OAFIID:Accessibility_Registry:proto0.1";
+
+  oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev);
+  if (ev._major != CORBA_NO_EXCEPTION) {
+    fprintf(stderr,
+            ("Accessibility app error: exception during registry activation from id: %s\n"),
+            CORBA_exception_id(&ev));
+    CORBA_exception_free(&ev);
+    exit(-1);
+  }
+
+  if (CORBA_Object_is_nil (oclient, &ev))
+    {
+      g_error ("Could not locate registry");
+    }
+
+  registry = (Accessibility_Registry) oclient;
+
+  fprintf(stderr, "About to register application\n");
+
+  Accessibility_Registry_registerApplication (registry,
+                                              bonobo_object_corba_objref (bonobo_object (app)),
+                                              &ev);
+  bonobo_activate ();
+  bonobo_main ();  /* because app is also a server */
+  return FALSE;
+}
diff --git a/atk-bridge/.cvsignore b/atk-bridge/.cvsignore
new file mode 100644 (file)
index 0000000..3045c51
--- /dev/null
@@ -0,0 +1,4 @@
+.deps
+.libs
+Makefile.in
+Makefile
diff --git a/atk-bridge/Makefile.am b/atk-bridge/Makefile.am
new file mode 100644 (file)
index 0000000..8a09107
--- /dev/null
@@ -0,0 +1,27 @@
+lib_LTLIBRARIES = libat-bridge.la
+
+libat_bridge_la_SOURCES =      \
+       bridge.c        \
+       application.h
+
+INCLUDES = -I $(top_srcdir) \
+           -I $(top_builddir)          \
+          -I $(top_srcdir)/libspi      \
+          -I $(top_builddir)/libspi    \
+           -I $(top_builddir)/at-bridge \
+           $(AT_BRIDGE_CFLAGS)
+
+DEPS =         \
+       $(libatk)       \
+       $(libbonobo-2)  \
+       $(liboaf-2)     \
+       $(libORBit-2)   \
+       $(libat-spi)
+
+
+LDFLAGS = -no-undefined        \
+       @DEP_LIBS@
+
+libat_bridge_la_LIBADD = $(AT_BRIDGE_LIBS) -lspi
+
+CFLAGS += $(AT_BRIDGE_CFLAGS)
diff --git a/atk-bridge/bridge.c b/atk-bridge/bridge.c
new file mode 100644 (file)
index 0000000..6090c75
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libbonobo.h>
+#include <orbit/orbit.h>
+#include <atk/atk.h>
+#include <atk/atkobject.h>
+#include <libspi/Accessibility.h>
+#include "accessible.h"
+#include "application.h"
+
+typedef struct _ArgStruct ArgStruct;
+
+struct _ArgStruct {
+  gint c;
+  char **v;
+};
+
+static gboolean bridge_register_app (gpointer p);
+
+int
+gtk_module_init(gint argc, char* argv[])
+{
+  ArgStruct *args = (ArgStruct *) g_new0(ArgStruct, 1);
+  args->c = argc;
+  args->v = argv;
+  g_idle_add (bridge_register_app, args);
+}
+
+static gboolean
+bridge_register_app (gpointer gp)
+{
+  CORBA_Environment ev;
+  CORBA_Object oclient;
+  AtkObject *atko;
+  char *obj_id;
+  char sbuf[30];
+  ArgStruct *args = (ArgStruct *)gp;
+
+  Accessibility_Registry registry;
+  Application *app;
+
+  CORBA_exception_init(&ev);
+
+  if (!bonobo_init (&args->c, &args->v))
+    {
+      g_error ("Could not initialize Bonobo");
+    }
+
+  /* Create the accesssible application server object */
+  app = application_new(atk_get_root ());
+
+  obj_id = "OAFIID:Accessibility_Registry:proto0.1";
+
+  oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev);
+  if (ev._major != CORBA_NO_EXCEPTION) {
+    fprintf(stderr,
+            ("Accessibility app error: exception during registry activation from id: %s\n"),
+            CORBA_exception_id(&ev));
+    CORBA_exception_free(&ev);
+    exit(-1);
+  }
+
+  if (CORBA_Object_is_nil (oclient, &ev))
+    {
+      g_error ("Could not locate registry");
+    }
+
+  registry = (Accessibility_Registry) oclient;
+
+  fprintf(stderr, "About to register application\n");
+
+  Accessibility_Registry_registerApplication (registry,
+                                              bonobo_object_corba_objref (bonobo_object (app)),
+                                              &ev);
+  bonobo_activate ();
+  bonobo_main ();  /* because app is also a server */
+  return FALSE;
+}
index 2989d8b..9a7977c 100644 (file)
@@ -51,18 +51,22 @@ ALL_LINGUAS=""
 AM_GNOME2_GETTEXT
 
 dnl Checks for libraries
 AM_GNOME2_GETTEXT
 
 dnl Checks for libraries
-PKG_CHECK_MODULES(LIBSPI, oaf-2.0 >= 0.7.0 libbonobo-2.0 >= 1.97.0 ORBit-2.0 >= 2.3.91 atk >= 0.2)
+PKG_CHECK_MODULES(LIBSPI, bonobo-activation-2.0 >= 0.7.0 libbonobo-2.0 >= 1.97.0 ORBit-2.0 >= 2.3.91 atk >= 0.2)
 AC_SUBST(LIBSPI_LIBS)
 AC_SUBST(LIBSPI_CFLAGS)
 
 AC_SUBST(LIBSPI_LIBS)
 AC_SUBST(LIBSPI_CFLAGS)
 
-PKG_CHECK_MODULES(REGISTRYD, oaf-2.0 >= 0.7.0 libbonobo-2.0 >= 1.97.0 atk >= 0.2)
+PKG_CHECK_MODULES(REGISTRYD, bonobo-activation-2.0 >= 0.7.0 libbonobo-2.0 >= 1.97.0 atk >= 0.2)
 AC_SUBST(REGISTRYD_LIBS)
 AC_SUBST(REGISTRYD_CFLAGS)
 
 AC_SUBST(REGISTRYD_LIBS)
 AC_SUBST(REGISTRYD_CFLAGS)
 
-PKG_CHECK_MODULES(TESTS, oaf-2.0 >= 0.7.0 libbonobo-2.0 >= 1.97.0 ORBit-2.0 atk >= 0.2)
+PKG_CHECK_MODULES(TESTS, bonobo-activation-2.0 >= 0.7.0 libbonobo-2.0 >= 1.97.0 ORBit-2.0 atk >= 0.2)
 AC_SUBST(TESTS_LIBS)
 AC_SUBST(TESTS_CFLAGS)
 
 AC_SUBST(TESTS_LIBS)
 AC_SUBST(TESTS_CFLAGS)
 
+PKG_CHECK_MODULES(AT_BRIDGE, bonobo-activation-2.0 >= 0.7.0 libbonobo-2.0 >= 1.97.0 ORBit-2.0 atk >= 0.2)
+AC_SUBST(AT_BRIDGE_LIBS)
+AC_SUBST(AT_BRIDGE_CFLAGS)
+
 dnl orbit-idl.
 ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
 AC_SUBST(ORBIT_IDL)
 dnl orbit-idl.
 ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
 AC_SUBST(ORBIT_IDL)
@@ -86,6 +90,7 @@ idl/Makefile
 libspi/Makefile
 registryd/Makefile
 registryd/Accessibility_Registry.oaf
 libspi/Makefile
 registryd/Makefile
 registryd/Accessibility_Registry.oaf
+at-bridge/Makefile
 test/Makefile
 ])
 
 test/Makefile
 ])