From ee75de39f4e8247f694b328163fc974ba791305f Mon Sep 17 00:00:00 2001 From: billh Date: Tue, 14 Aug 2001 13:16:23 +0000 Subject: [PATCH] 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). HANGES: * 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@19 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- idl/Accessibility_Application.idl | 5 +- idl/Accessibility_Registry.idl | 2 +- idl/Application.idl | 5 +- idl/Registry.idl | 2 +- libspi/Makefile.am | 3 -- libspi/accessible.c | 6 ++- libspi/application.c | 81 +++++++++++++++++++++++++--- libspi/application.h | 4 +- libspi/atksimpleobject.c | 108 -------------------------------------- libspi/atksimpleobject.h | 63 ---------------------- libspi/desktop.c | 2 +- libspi/desktop.h | 1 - libspi/registry.c | 60 +++++++++++++++++++-- registryd/desktop.c | 2 +- registryd/desktop.h | 1 - registryd/registry-main.c | 2 +- registryd/registry.c | 60 +++++++++++++++++++-- registryd/registryd.c | 2 +- test/app.c | 10 ++-- test/at.c | 2 +- 20 files changed, 212 insertions(+), 209 deletions(-) delete mode 100644 libspi/atksimpleobject.c delete mode 100644 libspi/atksimpleobject.h diff --git a/idl/Accessibility_Application.idl b/idl/Accessibility_Application.idl index 1253bb4..6ecd658 100644 --- a/idl/Accessibility_Application.idl +++ b/idl/Accessibility_Application.idl @@ -45,11 +45,10 @@ module Accessibility { readonly attribute string version; /** - * Get the application's process ID in the operating system's - * process table. + * Get the application instance's unique ID as assigned by the registry. * **/ - readonly attribute string id; + attribute string id; /** * pause: diff --git a/idl/Accessibility_Registry.idl b/idl/Accessibility_Registry.idl index e2b4a87..09b8957 100644 --- a/idl/Accessibility_Registry.idl +++ b/idl/Accessibility_Registry.idl @@ -44,7 +44,7 @@ module Accessibility { * Register a new application with the accessibility broker. * **/ - void registerApplication (in Application application); + oneway void registerApplication (in Application application); /** * deregisterApplication: diff --git a/idl/Application.idl b/idl/Application.idl index 1253bb4..6ecd658 100644 --- a/idl/Application.idl +++ b/idl/Application.idl @@ -45,11 +45,10 @@ module Accessibility { readonly attribute string version; /** - * Get the application's process ID in the operating system's - * process table. + * Get the application instance's unique ID as assigned by the registry. * **/ - readonly attribute string id; + attribute string id; /** * pause: diff --git a/idl/Registry.idl b/idl/Registry.idl index e2b4a87..09b8957 100644 --- a/idl/Registry.idl +++ b/idl/Registry.idl @@ -44,7 +44,7 @@ module Accessibility { * Register a new application with the accessibility broker. * **/ - void registerApplication (in Application application); + oneway void registerApplication (in Application application); /** * deregisterApplication: diff --git a/libspi/Makefile.am b/libspi/Makefile.am index da5a186..d8d7a6e 100644 --- a/libspi/Makefile.am +++ b/libspi/Makefile.am @@ -16,7 +16,6 @@ libspiincludedir = $(includedir)/libspi libspiinclude_HEADERS = accessible.h \ application.h \ - atksimpleobject.h \ desktop.h \ listener.h \ registry.h \ @@ -42,8 +41,6 @@ libspi_la_SOURCES = accessible.c \ accessible.h \ application.c \ application.h \ - atksimpleobject.c \ - atksimpleobject.h \ desktop.c \ desktop.h \ listener.c \ diff --git a/libspi/accessible.c b/libspi/accessible.c index 276c2c3..c8493c6 100644 --- a/libspi/accessible.c +++ b/libspi/accessible.c @@ -74,7 +74,11 @@ impl_accessibility_accessible_get_name (PortableServer_Servant servant, { CORBA_char * retval; Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); - retval = CORBA_string_dup (atk_object_get_name (accessible->atko)); + retval = atk_object_get_name (accessible->atko); + if (retval ) + retval = CORBA_string_dup (retval); + else + retval = CORBA_string_dup (""); fprintf (stderr, "Accessible get_name called: %s\n", retval); return retval; } diff --git a/libspi/application.c b/libspi/application.c index 8e16e12..99746d4 100644 --- a/libspi/application.c +++ b/libspi/application.c @@ -26,7 +26,7 @@ */ #include #include -#include "atksimpleobject.h" +#include /* * This pulls the CORBA definitions for the "Accessibility::Accessible" server @@ -43,16 +43,85 @@ */ #define PARENT_TYPE ACCESSIBLE_TYPE +/* + * A pointer to our parent object class + */ +static AccessibleClass *application_parent_class; + +/* + * Implemented GObject::finalize + */ +static void +accessible_application_finalize (GObject *object) +{ + /* TODO: any necessary cleanup */ + Accessible *accessible = ACCESSIBLE (object); + + g_object_unref (accessible->atko); + accessible->atko = NULL; + + /* TODO: chain to parent class instead */ +} + +static CORBA_string +impl_accessibility_application_get_toolkit_name (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + CORBA_char *retval; + Application *application = APPLICATION (bonobo_object_from_servant (servant)); + retval = CORBA_string_dup (atk_get_toolkit_name ()); + return retval; +} + +static CORBA_string +impl_accessibility_application_get_version (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + CORBA_char *retval; + Application *application = APPLICATION (bonobo_object_from_servant (servant)); + retval = CORBA_string_dup (atk_get_toolkit_version ()); + return retval; +} + +static CORBA_string +impl_accessibility_application_get_id (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + CORBA_char *retval; + Application *application = APPLICATION (bonobo_object_from_servant (servant)); + retval = CORBA_string_dup (application->id); + return retval; +} + +static void +impl_accessibility_application_set_id (PortableServer_Servant servant, + const CORBA_char *id, + CORBA_Environment *ev) +{ + Application *application = APPLICATION (bonobo_object_from_servant (servant)); + application->id = id; +} + static void application_class_init (ApplicationClass *klass) { - ; + GObjectClass * object_class = (GObjectClass *) klass; + POA_Accessibility_Application__epv *epv = &klass->epv; + + application_parent_class = g_type_class_ref (ACCESSIBLE_TYPE); + + object_class->finalize = accessible_application_finalize; + + epv->_get_toolkitName = impl_accessibility_application_get_toolkit_name; + epv->_get_version = impl_accessibility_application_get_version; + epv->_get_id = impl_accessibility_application_get_id; + epv->_set_id = impl_accessibility_application_set_id; } static void application_init (Application *application) { - ACCESSIBLE (application)->atko = atk_simple_object_new(); + ACCESSIBLE (application)->atko = g_object_new (atk_object_get_type(), NULL); } GType @@ -91,12 +160,10 @@ application_get_type (void) } Application * -application_new (char *name, char *desc, char *id) +application_new (AtkObject *app_root) { Application *retval = APPLICATION (g_object_new (application_get_type (), NULL)); - atk_object_set_name (ACCESSIBLE (retval)->atko, CORBA_string_dup (name)); - atk_object_set_description (ACCESSIBLE (retval)->atko, CORBA_string_dup (desc)); - retval->id = CORBA_string_dup (id); + ACCESSIBLE (retval)->atko = app_root; return retval; } diff --git a/libspi/application.h b/libspi/application.h index c4a9de2..f7b76ac 100644 --- a/libspi/application.h +++ b/libspi/application.h @@ -49,7 +49,9 @@ typedef struct { } ApplicationClass; GType application_get_type (void); -Application *application_new (char *name, char *desc, char *id); +gboolean *application_set_id (AtkObject *app, char *id); +Application *application_new (AtkObject *app_root); + #ifdef __cplusplus } diff --git a/libspi/atksimpleobject.c b/libspi/atksimpleobject.c deleted file mode 100644 index 66a1fc1..0000000 --- a/libspi/atksimpleobject.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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 -#include "atksimpleobject.h" - -static void atk_simple_object_class_init (AtkSimpleObjectClass *klass); - -static gpointer parent_class = NULL; - -GType -atk_simple_object_get_type (void) -{ - static GType type = 0; - - if (!type) - { - static const GTypeInfo tinfo = - { - sizeof (AtkSimpleObjectClass), - (GBaseInitFunc) NULL, /* base init */ - (GBaseFinalizeFunc) NULL, /* base finalize */ - (GClassInitFunc) atk_simple_object_class_init, /* class init */ - (GClassFinalizeFunc) NULL, /* class finalize */ - NULL, /* class data */ - sizeof (AtkSimpleObject), /* instance size */ - 0, /* nb preallocs */ - (GInstanceInitFunc) NULL, /* instance init */ - NULL /* value table */ - }; - - type = g_type_register_static (ATK_TYPE_OBJECT, - "AtkSimpleObject", &tinfo, 0); - } - return type; -} - -static void -atk_simple_object_set_name (AtkObject *o, const gchar *name) -{ - printf("set name to %s\n", name); - o->name = name; -} - -static G_CONST_RETURN gchar * -atk_simple_object_get_name (AtkObject *o) -{ - printf("get name: %s\n", o->name); - return (o->name); -} - - -static void -atk_simple_object_set_description (AtkObject *o, const gchar *desc) -{ - printf("set description to %s\n", desc); - o->description = desc; -} - -static G_CONST_RETURN gchar * -atk_simple_object_get_description (AtkObject *o) -{ - printf("get description: %s\n", o->description); - return (o->description); -} - -static void -atk_simple_object_class_init (AtkSimpleObjectClass *klass) -{ - AtkObjectClass *oc = ATK_OBJECT_CLASS (klass); - parent_class = g_type_class_ref (ATK_TYPE_OBJECT); - oc->set_name = atk_simple_object_set_name; - oc->get_name = atk_simple_object_get_name; - oc->set_description = atk_simple_object_set_description; - oc->get_description = atk_simple_object_get_description; -} - -AtkObject* -atk_simple_object_new () -{ - GObject *object; - AtkObject* accessible; - - object = g_object_new (ATK_TYPE_SIMPLE_OBJECT, NULL); - accessible = ATK_OBJECT (object); - - return accessible; -} - diff --git a/libspi/atksimpleobject.h b/libspi/atksimpleobject.h deleted file mode 100644 index 70905d9..0000000 --- a/libspi/atksimpleobject.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -#ifndef __ATK_SIMPLE_OBJECT_H__ -#define __ATK_SIMPLE_OBJECT_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include -#include - -#define ATK_TYPE_SIMPLE_OBJECT (atk_simple_object_get_type ()) -#define ATK_SIMPLE_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_SIMPLE_OBJECT, AtkSimpleObject)) -#define ATK_SIMPLE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_SIMPLE_OBJECT, AtkSimpleObjectClass)) -#define ATK_IS_SIMPLE_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_SIMPLE_OBJECT)) -#define ATK_IS_SIMPLE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_SIMPLE_OBJECT)) -#define ATK_SIMPLE_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_SIMPLE_OBJECT, AtkSimpleObjectClass)) - -typedef struct _AtkSimpleObject AtkSimpleObject; -typedef struct _AtkSimpleObjectClass AtkSimpleObjectClass; - -struct _AtkSimpleObject -{ - AtkObject parent; -}; - -GType atk_simple_object_get_type (void); - -struct _AtkSimpleObjectClass -{ - AtkObjectClass parent_class; -}; - -AtkObject *atk_simple_object_new (); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __ATK_SIMPLE_OBJECT_H__ */ - diff --git a/libspi/desktop.c b/libspi/desktop.c index b21fdfe..55b9b63 100644 --- a/libspi/desktop.c +++ b/libspi/desktop.c @@ -53,7 +53,7 @@ static AccessibleClass *parent_class; static void desktop_init (Desktop *desktop) { - ACCESSIBLE (desktop)->atko = atk_simple_object_new(); + ACCESSIBLE (desktop)->atko = g_object_new (atk_object_get_type(), NULL); atk_object_set_name (ATK_OBJECT (ACCESSIBLE (desktop)->atko), "main"); } diff --git a/libspi/desktop.h b/libspi/desktop.h index a0d3680..87866e7 100644 --- a/libspi/desktop.h +++ b/libspi/desktop.h @@ -29,7 +29,6 @@ extern "C" { #include #include -#include #include #include #include diff --git a/libspi/registry.c b/libspi/registry.c index 4e767ad..c24eb37 100644 --- a/libspi/registry.c +++ b/libspi/registry.c @@ -51,6 +51,20 @@ */ static ListenerClass *registry_parent_class; +typedef enum { + ETYPE_FOCUS, + ETYPE_WINDOW, + ETYPE_TOOLKIT, + ETYPE_LAST_DEFINED +} EventTypeMajor; + +typedef struct { + EventTypeMajor major; + char * minor; + char * detail; +} EventTypeStruct; + + /* * Implemented GObject::finalize */ @@ -83,13 +97,32 @@ impl_accessibility_registry_register_application (PortableServer_Servant servant #ifdef SPI_DEBUG fprintf (stderr, "registering app %p\n", application); #endif + ORBit_register_objref (application); + registry->desktop->applications = g_list_append (registry->desktop->applications, + CORBA_Object_duplicate (application, ev)); + + /* TODO: create unique string here (with libuuid call ?) */ + Accessibility_Application__set_id (application, "test-some-unique-string", ev); - registry->desktop->applications = g_list_append (registry->desktop->applications, CORBA_Object_duplicate (application, ev)); /* * TODO: change the implementation below to a WM-aware one; * e.g. don't add all apps to the Desktop */ - /* registry->desktop->applications = registry->applications;*/ +} + +static gint +compare_object_hash (gconstpointer p1, gconstpointer p2) +{ + CORBA_Environment ev; + long long diff = ((CORBA_Object_hash ((CORBA_Object) p2, (CORBA_unsigned_long) 0, &ev)) - + (CORBA_Object_hash ((CORBA_Object) p1, (CORBA_unsigned_long) 0, &ev))); + return ((diff < 0) ? -1 : ((diff > 0) ? 1 : 0)); +} + +static void +parse_event_type (EventTypeStruct *etype, char *event_name) +{ + etype->major = ETYPE_FOCUS; } /** @@ -107,7 +140,12 @@ impl_accessibility_registry_deregister_application (PortableServer_Servant serva CORBA_Environment * ev) { Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - registry->applications = g_list_remove (registry->applications, application); + GList *list = g_list_find_custom (registry->applications, application, compare_object_hash); + if (list) + { + fprintf (stderr, "deregistering application\n"); + registry->applications = g_list_delete_link (registry->applications, list); + } } /* @@ -132,6 +170,22 @@ impl_accessibility_registry_register_global_event_listener Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); /* fprintf(stderr, "registering %x/%x\n", listener, *listener); */ + EventTypeStruct etype; + parse_event_type (&etype, event_name); + + /* parse, check major event type */ + switch (etype.major) + { + case (ETYPE_FOCUS) : + break; + case (ETYPE_WINDOW) : + break; + case (ETYPE_TOOLKIT) : + break; + default: + break; + } + registry->listeners = g_list_append (registry->listeners, CORBA_Object_duplicate(listener, ev)); /* fprintf(stderr, "there are now %d listeners registered.\n", g_list_length(registry->listeners)); */ /* should use hashtable and CORBA_Object_hash (...) */ diff --git a/registryd/desktop.c b/registryd/desktop.c index b21fdfe..55b9b63 100644 --- a/registryd/desktop.c +++ b/registryd/desktop.c @@ -53,7 +53,7 @@ static AccessibleClass *parent_class; static void desktop_init (Desktop *desktop) { - ACCESSIBLE (desktop)->atko = atk_simple_object_new(); + ACCESSIBLE (desktop)->atko = g_object_new (atk_object_get_type(), NULL); atk_object_set_name (ATK_OBJECT (ACCESSIBLE (desktop)->atko), "main"); } diff --git a/registryd/desktop.h b/registryd/desktop.h index a0d3680..87866e7 100644 --- a/registryd/desktop.h +++ b/registryd/desktop.h @@ -29,7 +29,6 @@ extern "C" { #include #include -#include #include #include #include diff --git a/registryd/registry-main.c b/registryd/registry-main.c index f2d4f38..d99c72c 100644 --- a/registryd/registry-main.c +++ b/registryd/registry-main.c @@ -43,7 +43,7 @@ main (int argc, registry = registry_new (); - oaf_active_server_register ( + bonobo_activation_active_server_register ( obj_id, bonobo_object_corba_objref (bonobo_object (registry))); diff --git a/registryd/registry.c b/registryd/registry.c index 4e767ad..c24eb37 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -51,6 +51,20 @@ */ static ListenerClass *registry_parent_class; +typedef enum { + ETYPE_FOCUS, + ETYPE_WINDOW, + ETYPE_TOOLKIT, + ETYPE_LAST_DEFINED +} EventTypeMajor; + +typedef struct { + EventTypeMajor major; + char * minor; + char * detail; +} EventTypeStruct; + + /* * Implemented GObject::finalize */ @@ -83,13 +97,32 @@ impl_accessibility_registry_register_application (PortableServer_Servant servant #ifdef SPI_DEBUG fprintf (stderr, "registering app %p\n", application); #endif + ORBit_register_objref (application); + registry->desktop->applications = g_list_append (registry->desktop->applications, + CORBA_Object_duplicate (application, ev)); + + /* TODO: create unique string here (with libuuid call ?) */ + Accessibility_Application__set_id (application, "test-some-unique-string", ev); - registry->desktop->applications = g_list_append (registry->desktop->applications, CORBA_Object_duplicate (application, ev)); /* * TODO: change the implementation below to a WM-aware one; * e.g. don't add all apps to the Desktop */ - /* registry->desktop->applications = registry->applications;*/ +} + +static gint +compare_object_hash (gconstpointer p1, gconstpointer p2) +{ + CORBA_Environment ev; + long long diff = ((CORBA_Object_hash ((CORBA_Object) p2, (CORBA_unsigned_long) 0, &ev)) - + (CORBA_Object_hash ((CORBA_Object) p1, (CORBA_unsigned_long) 0, &ev))); + return ((diff < 0) ? -1 : ((diff > 0) ? 1 : 0)); +} + +static void +parse_event_type (EventTypeStruct *etype, char *event_name) +{ + etype->major = ETYPE_FOCUS; } /** @@ -107,7 +140,12 @@ impl_accessibility_registry_deregister_application (PortableServer_Servant serva CORBA_Environment * ev) { Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - registry->applications = g_list_remove (registry->applications, application); + GList *list = g_list_find_custom (registry->applications, application, compare_object_hash); + if (list) + { + fprintf (stderr, "deregistering application\n"); + registry->applications = g_list_delete_link (registry->applications, list); + } } /* @@ -132,6 +170,22 @@ impl_accessibility_registry_register_global_event_listener Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); /* fprintf(stderr, "registering %x/%x\n", listener, *listener); */ + EventTypeStruct etype; + parse_event_type (&etype, event_name); + + /* parse, check major event type */ + switch (etype.major) + { + case (ETYPE_FOCUS) : + break; + case (ETYPE_WINDOW) : + break; + case (ETYPE_TOOLKIT) : + break; + default: + break; + } + registry->listeners = g_list_append (registry->listeners, CORBA_Object_duplicate(listener, ev)); /* fprintf(stderr, "there are now %d listeners registered.\n", g_list_length(registry->listeners)); */ /* should use hashtable and CORBA_Object_hash (...) */ diff --git a/registryd/registryd.c b/registryd/registryd.c index f2d4f38..d99c72c 100644 --- a/registryd/registryd.c +++ b/registryd/registryd.c @@ -43,7 +43,7 @@ main (int argc, registry = registry_new (); - oaf_active_server_register ( + bonobo_activation_active_server_register ( obj_id, bonobo_object_corba_objref (bonobo_object (registry))); diff --git a/test/app.c b/test/app.c index 9092841..1dfafdc 100644 --- a/test/app.c +++ b/test/app.c @@ -26,7 +26,6 @@ #include #include #include "accessible.h" -#include "atksimpleobject.h" #include "application.h" int @@ -53,11 +52,12 @@ main(int argc, char **argv) /* Create the accesssible application server object */ /* TODO: get app name and pid */ sprintf(sbuf, "application-%s", argv[1]); - app = application_new(sbuf, "test application for accessibility SPI", "0001"); + atko = g_object_new (atk_object_get_type(), NULL); + atk_object_set_name (atko, "sbuf"); + atk_object_set_description( atko, "test application for accessibility SPI"); + app = application_new(atko); /* Create the Accessible 'source' for the event */ - atko = atk_simple_object_new (); - atk_object_set_name (atko, "dummy"); accessible = accessible_new (atko); fprintf(stderr, "accessible created.\n"); @@ -67,7 +67,7 @@ main(int argc, char **argv) obj_id = "OAFIID:Accessibility_Registry:proto0.1"; - oclient = oaf_activate_from_id (obj_id, 0, NULL, &ev); + 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"), diff --git a/test/at.c b/test/at.c index 53ff0cf..ba3702d 100644 --- a/test/at.c +++ b/test/at.c @@ -53,7 +53,7 @@ main(int argc, char **argv) obj_id = "OAFIID:Accessibility_Registry:proto0.1"; - oclient = oaf_activate_from_id (obj_id, 0, NULL, &ev); + 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"), -- 2.7.4