With all the fuss over Disco and it’s smoke effect, Jonathan Wight decided to take a deeper look. The result of his labor - anyone can integrate smoking windows into their apps. Stick around and let me show you how.
If you’re like me, one of the first things you do when you see a cool app is dig straight into the resources folder. Well, right-clicking on Disco.app and hitting “Show package contents” is pretty revealing. Charge straight into the Contents folder, and you’ll see a nice little folder bearing the name “Frameworks”. Need I say any more? Just like all you need for Core Graphics is contained within my Core Graphics Framework, so the smoking windows code is contained in this little folder. It’s a simple matter of doing a class-dump to build some headers (or if you got in early, the headers are already there), and you have access to all the smoke you need. So, are you interested? Download the Disco beta and drag it to your applications folder. Then, you may proceed to grab a copy of my (modified) version of the smoking windows project and play around with it at your leisure! I quote from Toxic Software:
If your hardware is capable enough you should be able to see the smoke effect rising from the top of the window. (It might take 10 to 20 seconds for the smoke to appear). You can change the smoke parameters by using the smoke settings window (dialog? pane? view?) within Disco. Then just copy Disco’s prefs (com.discoapp.Disco.plist) to SecondHandSmoke’s prefs (com.example.SecondHandSmoke.plist).
Obviously, this way of setting preferences isn’t very flash, so you can just set the specific preference keys from within your code, and it’ll still run fine. Don’t expect that done from me, though, I’ve got a lot of work to catch up on. Then again, if someone wants to make their window smoke and can’t get their head around the preferences, I can always take a little break and help you out.
Have fun, and try not to get addicted to smoking.
Update: This smoke no longer works with the version 1.0 release of Disco. Updated smoking instructions here.

![[RSS feed for this tag]](http://lipidity.com/wordpress/wp-content/themes/virtuoso/res/img/feed_tag.png)