windowless moonlight

toshok | moonlight, mono, geek, journal | Tuesday, February 26th, 2008

A little while ago I committed the first ugly pass at windowless support in moonlight. By ugly I just mean I cut corners wherever I could, just to get it working. The changes to support both windowed and windowless modes, with events coming in as either GdkEvents or Xlib events.. well, they’re a little gross :) but we’ll get them refactored and beautified soon enough.

On to the goods.

Silverlight 1.0 has no built-in text input support, so the conventional wisdom says “use windowless mode, and use an overlayed html form element to allow input.” Many sites use this, such as the weatherwidget:

The vista simulator (which is a pretty crazy body of code. *Tons* of javascript, and an architecture that leads me to believe it wasn’t originally intended for silverlight) uses windowless mode for another reason. It doesn’t hook up events handlers to any of the xaml elements. Instead, it adds JS event handlers to the <object> tag that surrounds the plugin. Since there are no event handlers in the plugin, we return FALSE to signal we didn’t handle the event, which bubbles up the dom hierarchy to the object.

You need svn HEAD of the moonlight code for this to work, and you also need to run it against a build of firefox3.  Unfortunately, given our use of unfrozen apis for dealing with the dom element reflection into managed code, you’ll more than likely run up against undefined C++ symbols for pages that do that sort of thing.  But there are a number of sites which don’t.  So give it a try :)

simulated depth of field using cairo

toshok | geek, journal | Sunday, February 10th, 2008

I went to blue bottle’s new mint plaza cafe today and got some of their kyoto style iced coffee. After the first sip I exclaimed “it tastes like alcohol!” Joelle told me about how the barrista had told her that it had some bourbon flavor. Boy did it ever.

Also, it’s insanely insanely strong. The sort of caffeinated feeling that makes you think that if you *just* knew kung fu, you could kick everyone’s ass in a 2 block radius.

Or, the sort of caffeinated feeling that produces hacks like this:

The youtube size probably isn’t the best for viewing this — try this link for a larger version where you can actually see what’s going on. One thing that still needs fixing is the “popping” of the opacity up to 1 when then surface comes into focus. That and the code doesn’t use an f-stop-like metric now. I want another demo where the focus is on the center surface and the f-stop changes, bringing surfaces in front and behind the focused one closer to focus.

Hopefully I can figure out a way to stick this in moonlight. Maybe a canvas subclass.

Having “focused” mean “in focus” would be a pretty cool UI, and not just in moonlight.

projects projects projects

toshok | flickr, geek | Friday, February 8th, 2008

I finally soldered something last night.  I’m not sure how I made it more than 30 years on this planet (over 20 of them around computers) without ever touching an iron, but I somehow did.  Loads of fun just putting something physical together and having it work.  Now to become comfortable with microcontroller programming and circuit design so that I can bring my dream of a fleet of autonomous personal blimp assistants to life.

Next week is the second Novell Hack Week, so I’m skipping out on all Moonlight/Mono related responsibilities, and will be scratching an itch I’ve had for a while now.  Care to guess what it is?

So many fun things to work on.  So little time.

floored

toshok | geek, journal | Monday, February 4th, 2008

Just got back from my endocrinologist appointment.  They did another A1c, just for kicks (I’ve had 3 done now in the course of roughly 3 months).  First A1c was the very end of October, and was 12.4.  Second was second week in December, and was 8.0.  This most recent A1c was 5.9.

So I’m officially normal now (at least in one small way).

Powered by WordPress | Theme by Roy Tanck