Re: Get Mozilla Browser window handle and GTK widget reference

Brian Smith <[email protected]>
Newsgroups gmane.comp.mozilla.devel.gtk
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Raju Pallath wrote:
> Hi folks
> 
>  Is there a way that I could get GTKWidget reference (for all widgets
> on mozilla browser) when the browser is invoked on Unix platforms.
> 
>  For NS4.x browser which is Motif based, I could Query the window
> hierarchy using XLib calls, and compare the window title and get a
> window handle for a particualr window.
>  Then  using XtWindowToWidget call, I  can convert that window to a
> widget reference.
>  
>  How do I use it?
>  Say  I have to click on a menu item.
>  I would first find window reference based on  window title, 
>  convert to widget and then traverse the widget heirarchy to find menu
> item
>  ans send in a click event.
> 
> 
>  Netscape6/Mozilla browsers however use GTK.
>  I could not find an equivalent way to do the same in GTK/GDK.
>  Is there an equivalent to XtWindowToWidget in GTK or
>  can someone give me some pointers to a solution?

Are you looking for gtk_container_children()?  This is what I use to 
traverse GTK widget hierarchies.  I am not entirely clear what the end 
goal is though so I am not sure if this is what you want.  Hope it is 
helpful though.

Brian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.