Tuesday, 6 November 2007

I think I just found another dimention

So, I've had some spare time at work today, and thought I might as well tackle an idea that has been floating around OH towers since before Guadec, which was to use the Gtk offscreen rendering patch to embed Gtk widgets within the Clutter stage.

Now, I only go this working today, and it's pretty hacky, but heres where I am so far:

Clutter + Gtk offscreen rendering patch from Neil Patel on Vimeo (if you can't see the video, click through).

Thats a GtkWindow which has been told to also draw to a GdkDrawable, which is then being pushed into a ClutterTexture (did I mention it was hacky?).

However, thanks to Emmanuele (and by proxy Alex), I have an idea of where to go with this, so hopefully we'll able to have some sort of canvas based on Clutter, where you can manipulate real widgets.

Anyway, that's it for Bling Tuesday, some more updates coming soon :-).

Update: The video doesn't seem to work with some flash players, so here is a link to the original ogg. That's what I get for trying out a new video service

15 comments:

aruiz said...

During the video, right from the start of the manipulation, my mouth kept opened.

Cool stuff, keep up the good work!

Gavin said...

Question: The window below is not input redirected (you wouldn't be able to edit it as well), correct?

I'm not really understanding exactly how this is useful, but it's kind of neat (I'm thinking of the "freewins" plugin for compiz fusion right now...)

Perhaps it's useful because it is possible now to rotate single widgets? I'm not a coder really so please explain for those of us who might not understand the point. Thanks! :) keep up the good work.

Hub said...

I wish I could see the video.

blah said...

Your flash or my flash player *9* is broken...

Neil J. Patel said...

@aruiz: Thanks :-)

@gavin: Input redirection doesn't work on this demo, because, as mentioned, I was just starting to play with the code. If everything goes to plan, input redirection will work fine, so it will behave like a proper canvas.

@hubert & urmensch: That's really odd that you can't play the video. If updated the eentry to point to the original.

Jens Fursund said...

How is the performance? Is this something that could be implemented as a general renderer for the desktop , for metacity and inside windows?

Neil J. Patel said...

@dlai: So far, things seem fine performance-wise. However, both my systems are quite beefy, I won't know exactly until I've spent some more time with it and implemented things like clipping etc. Re: Metacity, this is quite interesting, and something that I know a few people have been experimenting with. When there's something that can be tried out, you can be sure I'll post about it :-).

Jens Fursund said...

That sounds sooo exciting!! I wanna play with it as well! Maybe I should take a look at Clutter...

Anonymous said...

the stuff you are making is so nice i just want to sleep with it. all the time. what you do is next generation computing. so.. hmm. why dont you quit that job? :D

Anonymous said...

Blingtastic!

Anonymous said...

Wow that's cool.

"Compiz Inside" or something ;)

wiz said...

Can someone reupload vid to more sane video hosting?

Unknown said...

Check this screencast i did when doing the original offscreen window work:

http://people.redhat.com/alexl/files/offscreen3.html

Wesley said...

This reminds me of the work the Qt team has done (toolkit used for KDE).

I think it's more or less the same idea. You should check it out and see if you can use some stuff or work together:

http://labs.trolltech.com/blogs/2007/11/22/widgets-on-the-canvas-integrated/
http://labs.trolltech.com/blogs/2007/10/30/noises-from-the-crypt-widgets-on-graphics-view-update/

Łukasz Wiśniewski said...

Nice :) I wonder if it would be possible now to embed clutter in awn launcher and have a sort of live preview of opened/minimized windows.

Btw I have been playing around Clutter too, embedded it in Rhythmbox - now I just have to make it useful :]