Hooks object



Hello folks,

In X11R6, a 'hooks object' had been added to Xt.  This was a
mechanism which allowed an 'agent' to monitor things like
widget creation and destruction, widget configuration,
and other 'toolkit events'.  The hooks object can be used by
interactive resource editors, assistive/adaptive software for the
disabled, drag and drop servers (I'm aware that GTK is already
capable of drag and drop), and others.

(more about the hooks object in xc/doc/hardcopy/Xt/intrinsics.PS.Z
in the X source distribution.)

The hooks object in Xt is primarily a list of callbacks to be called
when toolkit events occur.  An agent would need to register
callbacks for the events in which it's interested.  There are no
callbacks invoked until an agent registers one.

There are 5 hooks in the hooks object:

XtNcreateHook
XtNchangeHook
XtNconfigureHook
XtNgeometryHook
XtNdestroyHook

Each hook is a list of callbacks for which an agent has
registered.  

The hooks object - along with the 'before-flush-hook', now part
of libX11 - were adopted by the X consortium as part of a larger
effort.  It was the groundwork for inclusion of the Remote Access
Protocol.

I'd like to talk about implementing a hooks object in GTK.
I'm working on a project called Ultrasonix.  It's an adaptive X
application which gives speech and non-speech audio feedback
to blind and visually-impaired X users.  Ultrasonix relies on
access to widget resources, widget creation/destruction
notification, and so on, in order to maintain an accurate model
of the desktop.

I believe that Gnome will be an important part of the future
of X.  As a blind person myself, I'd like to be in
on it :-)

I've been looking at the GTK sources for the past few days, but
although I'm impressed by the design, I'm no expert.
What are the obstacles in GTK's design which would make
a hooks object difficult?  Any comments are welcome.

Regards,

Brian.
-- 
---------------
Brian L. Sellden - brian@henge.com, brians@usa.net
User of Emacspeak 8.0,  making Unix talk.
http://www.henge.com/~brian
	      What on earth would a man do with himself
		if something did not stand in his way?
		-- H.G. Wells



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