LWN.net Logo

McGrath: Proposal for a new Fedora project

McGrath: Proposal for a new Fedora project

Posted Oct 11, 2010 17:53 UTC (Mon) by tux21b (guest, #70576)
Parent article: McGrath: Proposal for a new Fedora project

I think I had a similar idea some weeks ago. My idea was to provide an alternate GTK implementation. So, what do I mean by that? Simplified I would like to change 3 things:

(1) Drawing of GTK Objects. Each element in GTK knows how it is drawn. I would like that so that each element simply outputs is HTML equivalent (or just a HTML5 canvas and a special drawing routine for more complex ones).

(2) I would like to replace the GTK main() loop to a simple HTTP server.

(3) I would like to implement all events in JS.

But the main point should be, that all those changes are only done in the alternative GTK library and not in the application. After that, I could decide if I start any GTK program with the original GTK library to get a desktop application or to modify the LD_LIBRARY_PATH so, that the webgtk library is loaded, which then starts an HTTP server in it's main loop. After that I can access the application with any browser (even remote).

This way, nearly all applications will be runnable as web application too (ok, some custom widgets might not work directly and the application might leak memory which isn't a trouble for a desktop application, but fatal for web applications...) but still most of the apps will work (hopefully). Later, an alternative cairo library based on the HTML5 canvas and so on might follow.

After that, we might be able to integrate such web applications back in the desktop, e.g. by automating the task of starting the application as web application and open a window with the right URL automatically, which looks like the native window before.

And then the last step would be to provide additional features for the web application by adding additional scripts and additional callbacks between GTK and the HTML5 application and to tune the HTML5 application a bit (e.g. by adding more caching with the localstorage and things like that).

The benefit of this approach would be that existing GTK applications won't be lost, and that we don't have to re-implement everything...

I am neither a GTK ninja nor I've any time to become one. In fact I am just dreaming loudly... So feel free to implement something like that if you are optimistic enough :)

Regards,
Christoph


(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds