Re: Fwd: Hooking

2005-09-09 Thread Tim Roberts

ramalingareddy bommalapura wrote:


 Can anybody please suggest how hooking can be done
in the xserver functions. XServer needs to invoke my function before
the call is passed to the XServer original function. I have found that
this is the procedure in windows for doing hooking:
 



X is entirely different from Windows.  The same internal concepts simply 
do not apply.  What are you REALLY trying to do?  If you tell us your 
real task, instead of how you think you need to solve it, perhaps one of 
us can offer a real solution.


There are two aspects to X: client and server.  GUI programs (X clients) 
call routines in Xlib to do drawing.  These are things like XDrawArc and 
so on.  Xlib exists in the process of the GUI program.  It converts the 
calls into messages that are transmitted over a socket to the X server, 
which does the actual drawing.  The X server is a completely separate 
process.  The messages are parsed, and eventually handed down to some 
driver that does the drawing.


It is possible to insert a tee into the socket stream and split off a 
second copy for yourself, but that means parsing the X protocol, not 
handling APIs.


--
Tim Roberts, [EMAIL PROTECTED]
Providenza  Boekelheide, Inc.

___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel


Re: Fwd: Hooking

2005-09-09 Thread Russell Shaw

Tim Roberts wrote:

ramalingareddy bommalapura wrote:


 Can anybody please suggest how hooking can be done
in the xserver functions. XServer needs to invoke my function before
the call is passed to the XServer original function. I have found that
this is the procedure in windows for doing hooking:


X is entirely different from Windows.  The same internal concepts simply 
do not apply.  What are you REALLY trying to do?  If you tell us your 
real task, instead of how you think you need to solve it, perhaps one of 
us can offer a real solution.


There are two aspects to X: client and server.  GUI programs (X clients) 
call routines in Xlib to do drawing.  These are things like XDrawArc and 
so on.  Xlib exists in the process of the GUI program.  It converts the 
calls into messages that are transmitted over a socket to the X server, 
which does the actual drawing.  The X server is a completely separate 
process.  The messages are parsed, and eventually handed down to some 
driver that does the drawing.


It is possible to insert a tee into the socket stream and split off a 
second copy for yourself, but that means parsing the X protocol, not 
handling APIs.


Page 583 of Xlib Programming Manual ISBN: 1565920023 explains hooking
into Xlib. Xlib is the client-side, not the X server side.
___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel