[g-a-devel]Re: gail patch ...
- From: "Padraig O'Briain" <Padraig Obriain Sun COM>
- To: michael ximian com
- Cc: gnome-accessibility-devel gnome org
- Subject: [g-a-devel]Re: gail patch ...
- Date: Fri, 18 Jan 2002 13:07:10 +0000 (GMT)
Michael,
I note that the functions gnome_accessibility_module_init() and
gnome_accessibility_module_shutdown() are not defined as static.
Does this mean that they are being exported from libgail? If so, should they be
defined in an include file and how will the functions be used?
Padraig
> Subject: gail patch ...
> To: "Padraig O'Briain" <Padraig Obriain sun com>
> Cc: accessibility mailing list <gnome-accessibility-devel gnome org>
> Content-Transfer-Encoding: 7bit
> Mime-Version: 1.0
>
> Hi Padraig,
>
> This adds support for the (pending) gnome program hooks for
> accessibility so we can dynamically enable / disable it on the fly and
> avoid GTK_MODULES hacks.
>
> May I commit ?
>
> Also; I'm concerned that work is going into 'ferret' inside gail, but
> that this would be best placed to test the hierarchy inside at-spi or
> even libgail-gnome, since then we can fully test the framework. Are
> there any plans to move it there ? it looks like it duplicates and
> out-classes the festival support in simple-at.
>
> Regards,
>
> Michael.
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/gail/ChangeLog,v
> retrieving revision 1.367
> diff -u -p -u -r1.367 ChangeLog
> --- ChangeLog 2002/01/17 15:59:02 1.367
> +++ ChangeLog 2002/01/18 12:02:03
> @@ -1,4 +1,11 @@
> (top)
> +2002-01-14 Michael Meeks <michael ximian com>
> +
> + * gail/gail.c (gtk_module_init): split out into
> + (gnome_accessibility_module_init): here.
> + (gnome_accessibility_module_shutdown): stub.
> + guard against double inits.
> +
> 2002-01-17 Padraig O'Briain <padraig obriain sun com>
>
> * gail/gailwidget.c:
> Index: configure.in
> ===================================================================
> RCS file: /cvs/gnome/gail/configure.in,v
> retrieving revision 1.14
> diff -u -p -u -r1.14 configure.in
> --- configure.in 2002/01/11 21:03:31 1.14
> +++ configure.in 2002/01/18 12:02:03
> @@ -80,7 +80,9 @@ ATK_REQUIRED_VERSION=0.7
> GTK_REQUIRED_VERSION=1.3.11
> LIBGNOMECANVAS_REQUIRED_VERSION=1.105.0
>
> -PKG_CHECK_MODULES(DEPS, $ATK_PACKAGES >= $ATK_REQUIRED_VERSION $GTK_PACKAGES
>= $GTK_REQUIRED_VERSION $LIBGNOMECANVAS_PACKAGES >=
$LIBGNOMECANVAS_REQUIRED_VERSION)
> +PKG_CHECK_MODULES(DEPS, $ATK_PACKAGES >= $ATK_REQUIRED_VERSION \
> + $GTK_PACKAGES >= $GTK_REQUIRED_VERSION \
> + $LIBGNOMECANVAS_PACKAGES >= $LIBGNOMECANVAS_REQUIRED_VERSION)
>
> old_LIBS="$LIBS"
> dnl Checks for inet libraries:
> Index: gail/gail.c
> ===================================================================
> RCS file: /cvs/gnome/gail/gail/gail.c,v
> retrieving revision 1.53
> diff -u -p -u -r1.53 gail.c
> --- gail/gail.c 2002/01/15 10:40:29 1.53
> +++ gail/gail.c 2002/01/18 12:02:03
> @@ -269,15 +269,26 @@ gail_focus_tracker_init ()
> }
> }
>
> -int
> -gtk_module_init(gint *argc, char** argv[])
> +/* For automatic libgnome init */
> +extern void gnome_accessibility_module_init (void);
> +extern void gnome_accessibility_module_shutdown (void);
> +
> +static int gail_initialized = FALSE;
> +
> +void
> +gnome_accessibility_module_init (void)
> {
> - AtkRegistry* default_registry;
> - gpointer data;
> + AtkRegistry *default_registry;
>
> - g_print("GTK Accessibilty Module loaded\n");
> + if (gail_initialized)
> + {
> + return;
> + }
> + gail_initialized = TRUE;
>
> - default_registry = atk_get_default_registry();
> + g_print("GTK Accessibilty Module initialized\n");
> +
> + default_registry = atk_get_default_registry ();
> atk_registry_set_factory_type (default_registry, GTK_TYPE_WIDGET,
> GAIL_TYPE_WIDGET_FACTORY);
> atk_registry_set_factory_type (default_registry, GTK_TYPE_CONTAINER,
> @@ -370,8 +381,27 @@ gtk_module_init(gint *argc, char** argv[
> atk_focus_tracker_init (gail_focus_tracker_init);
>
> /* Initialize the GailUtility class */
> - data = g_type_class_ref (GAIL_TYPE_UTIL);
> - g_type_class_unref (data);
> + g_type_class_unref (g_type_class_ref (GAIL_TYPE_UTIL));
> +}
> +
> +void
> +gnome_accessibility_module_shutdown (void)
> +{
> + if (!gail_initialized)
> + {
> + return;
> + }
> + gail_initialized = FALSE;
> +
> + g_print("Gtk Accessibilty Module shutdown\n");
> +
> + /* FIXME: de-register the factory types so we can unload ? */
> +}
> +
> +int
> +gtk_module_init (gint *argc, char** argv[])
> +{
> + gnome_accessibility_module_init ();
>
> return 0;
> }
>
> --
> mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]