On Mon, 24 Jun 2002, Zhicong Liang wrote:

> Hi all:
>     I am a newbie for XFREE86 programming, now I am doing something with 
> XFree86 in my project(software design recovery)... Can someone give me some 
> hints to start my XFree programming career :) .
>     Here is what I need to do, it sounds simple......
>     I run an application, this application pops up a window.
>     1.I have the process ID for this application, how can convert this 
> process ID to the windowsID of X??(I can get that window id from xwininfo 
> though..)

   You can't.  There is no correlation between the process ID and
the window ID.  A process can create any number of windows and any
process can render to any window.


>     2.I want to capture the screenshot of a given window (ID), it is easy by 
> using xwd. However, any api can help me capture the screenshot in my 
> code(rather than doing system call for xwd?)

   The Xlib function used to copy image data from a drawable to system
memory is XGetImage or XShmGetImage.  It is very low-level though.  
There may be other functions in toolkits based on Xlib, but I'm 
not familiar with them.



                                Mark.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to