Thank your reply. Actually I want to implement one GTK application can simulate user input for other application, for example, my application can "fill" the editbox of B window, then "press" the OK button of B window, such actions are implemented by sending GTK event to them from my application, just like the user input to B.
I've tried many ways to get the GtkWidget of editbox and button but no result, can I use gnome API or windows manager(such as sawfish) to do it, Or other method? I use C/C++.
Thanks again!
James Henstridge <james daa com au> wrote:
sarge Chris wrote:
> Hi experts,
>
> Here I met a problem:
>
> Suppose there are two GTK apps A and B,
>
> A can get B's window ID by XQueryTree, but how can A get the GtkWidget
> of B by its Xlib's WindowID?
>
> Is it possible? If so, pls give me a hand!
>
> Thanks a lot!
>
X windows are a server resources, which is why one app can see the
windows of another. However, the GtkWidget structures are client side,
so you can't access them, so what you ask isn't really possible.
Without knowing what you are trying to do, it is a bit difficult to
recommend an alternative. For some problems, Bonobo might be the answer.
James.
--
Email: james daa com au | Linux.conf.au http://linux.conf.au/
WWW: http://www.daa.com.au/~~james/ | Jan 22-25 Perth, Western Australia.