[Glade-devel] reverse-libglade

Archit Baweja bighead@users.sourceforge.net
Wed, 22 Dec 2004 13:35:35 -0500


Hey

See this. http://e98cuenc.free.fr/edalg/

Archit

On Wed, 2004-12-22 at 15:52 +0000, Jon Dowland wrote:
> Hi,
> 
> I've been thinking about the following for some time now, but I doubt
> I'll really ever make any progress on it, so I thought I'd share my
> plans and ask for feedback from the list.
> 
> I was interested in writing a 'reverse libglade', that is, a library
> which would extract from a traditional GTK program a .glade file.
> 
> It would be loaded via LD_PRELOAD and have wrappers around all the main
> GTK procedures. These would then construct in memory a structure
> representing the UI (perhaps directly using the data structures from the
> glade code, although I never got as far as looking at it for
> suitability) before passing over control to the 'proper' GTK procedure
> in each case.
> 
> Output and various options would be controlled via environment
> variables.
> 
> I'm attaching proxy.c, which is a 10 minute attempt at generalising the
> wrapper stuff, and the Makefile used to build and apply it, and a small
> dummy gtk program which can be used in conjunction. This really doesn't
> amount to much.
> 
> The point of such a tool would be to aid in refactoring old programs
> which implemented their UI's directly in GTK. I also intended to use it
> in order to convert a Java/SWT program to a native/GTK program.
> 
> Has anyone attempted anything similar, or is anyone interested in
> persuing this work?
> 
> Many thanks,
>