[g-a-devel](no subject)



Hi, Bill

I plan to make the atk implementation of  the Gal and gtkhtml module.
 
I read the "GNOME Accessibilityf or Developers(CVS draft)". ( I could
not find it at gnome website now, is it deleted?) . It is said that
"programs that make sue of GAIL are written as GTK modules". And I found
that the exsting a11y codes of Gal and gtkhtml are built as  modules. 
 
But I found two kind of modules. One is GTK module with its init entry.
And other is as I name it Accessibilty module which has an different
entry .
  
The following is from libgnome/gnome-program.c
======================================
 static gboolean
accessibility_invoke_module (GnomeProgram *program,
			     const char   *libname,
			     gboolean      init)
{
	GModule    *handle;
	void      (*invoke_fn) (void);
	const char *method;
	gboolean    retval = FALSE;
	char       *module_name;

	if (init)
		method = "gnome_accessibility_module_init";
	else
		method = "gnome_accessibility_module_shutdown";

	module_name = find_accessibility_module (program, libname);

	if (!module_name) {
		g_warning ("Accessibility: failed to find module '%s' which "
			   "is needed to make this application accessible",
			   libname);

	} else if (!(handle = g_module_open (module_name, G_MODULE_BIND_LAZY)))
{
		g_warning ("Accessibility: failed to load module '%s': '%s'",
			   libname, g_module_error ());

	} else if (!g_module_symbol (handle, method, (gpointer *)&invoke_fn)) {
		g_warning ("Accessibility: error library '%s' does not include "
			   "method '%s' required for accessibility support",
			   libname, method);
		g_module_close (handle);

	} else {
		retval = TRUE;
		invoke_fn ();
	}

	g_free (module_name);

	return retval;
}
=================
It seems the accessibility module should have the
"gnome_accessibility_module_init" function as the entry function.


Then what is the better one? Which way should I do for the future?


Thanks a lot.
Gilbert 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]