The Shape of Everything
A website mostly about Mac stuff, written by August "Gus" Mueller
» Acorn
» Retrobatch
» Mastodon
» Instagram
» Github
» Maybe Pizza?
» Archives
» Feed
» Micro feed
July 4, 2004
(This post is from my old, old, super old site. My views have changed over the years, hopefully my writing has improved, and there is now more than a handful of folks reading my site. Enjoy.)

Sunday, July 4th, 2004

Happy 4th of July everyone, and happy birthday to my friend Jill, who has a birth date that's hard to forget (today obviously).

Well, I'm back from WWDC- it was great. I learned lots of new things, and I think I might have even influenced one of the sessions by accident (more on that later). I've got lots of things I need to share, mostly silly little things that I or others found super-amusing. But I'll start with this:

Did you notice, when looking at some of the Tiger preview pages, that certain windows had a new look to them? It's a nice gradient from the top of the window bar, that fades into the toolbar. I thought that was pretty nice looking. Even Spotlight uses it. So I thought I would try it out in VoodooPad to see what it looks like. I check out the documentation on how to do it, and ... found nothing. Looks like it's private window mask that Apple doesn't want the common folk to use.

But when does something like that ever stop a happy little osx programmer, especially when he's got all his friends and peers around to impress?

So I opened up the source to my fancy little input manager (which is starting to get a cool list of features, one of which Mike wants me to talk about) and performed a little method swizzling on NSWindow's initWithContentRect:styleMask:backing:defer: to print out the style mask when a certain app was launched.

AHA! It's x! (where x is a technically NDA'd piece of information. I leave the exercise on figuring out what it is to the reader.). Well, it's mostly x. I had to end up |'ing it with NSResizableWindowMask,but I got what I was after. VoodooPad had fancy smoth-shaded windows.

I don't plan on keeping it that way, but it was fun to do.

-- posted 8:38 am