Is there any mechanism to embed and control qc from inside of a
dashboard widget? The embedding part is pretty straightforward by
just using a quicktime embedded object, but I was wondering if it's
possible to bind to any of the qc variables from javascript in safari?
You basically have three possibilities to integrate Quartz Composer
with Dashboard:
1) Embed the composition in a QuickTime movie. It's the easiest, but
doesn't provide control on the frame rate or any possible interaction
with the composition
2) Write a plug-in for the widget that would add a QCView to the
widget's window. From the widget plug-in, you can get the WebKit view
and should be able to add subviews to it. Then the widget plug-in can
also provide javascript extensions to control the composition. That's
still quite a bit of work and "hacky" too.
3) Write a WebKit Cocoa plug-in: subclass QCView, make it respond to
the informal WebPlugIn protocol, put that in a .webplugin bundle in
Library/Internet Plug-Ins. At the same time, thanks to the new
JavaScript / Cocoa bindings, you can expose the QCView methods through
JavaScript. This is the best approach but I'm not sure you can put a
WebKit plug-in inside a widget: you might have to install it
separately. Everything you need should be in the documentation: http://developer.apple.com/documentation/InternetWeb/Conceptual/
WebKit_PluginProgTopic/index.html#//apple_ref/doc/uid/TP40001521
Unfortunately, I don't have any sample code available for that right
now, so you're on your own. Good luck :)