May 31, 2003

APE & Carbon & Pure Fear

So Neosiris and I have been doing the talking about OS 9 and OS X and which is better and which is worse. And I point to Popup windows, and how elite they are. So he reminds me that he wrote an email to Unsanity asking them for popup windows, and that he only got a lame automated response back.

So I said, hey, I'll take a look at the APE SDK, and see what needs to be done. I understand the basics of APE now, and it's quite interesting. The core of APE is the APECreatePatch function, which allows you to patch any function. Usually you patch a function by 'doing something extra' and than calling the original function. So anyway, I've got that part down pat, or so I think.

Next, I want to figure out how the Finder ticks. When I click on a title bar, what function goes off? How can I tell if a window is only visible by it's title bar. So I launch the old fashioned otool (thanks to Feanor) and take a look at the hundreds of functions called by Finder.app. Holy hell, there are a lot. I have no idea which ones I want, either. OK, so that's fun.
Next, I need to find the darn prototypes for these functions. I mess around in GDB for the longest time, and find nothing. Roysna suggests that I look in MacWindows.h, so I do, and I find something perhaps. Actually, I don't, but I played around in that file for a long time.
So now, I've decided to just TEST patching. I will try to patch the "SetWTitle" function. All I want to do is print "it worked" to the console, and then return whatever SetWTitle returns. Something is going wrong, and it's iether that no application uses SetWTitle OR that the patch isn't working.

If anyone knows how you'd go about anything mentioned here, PLEASE mail me. This stuff is hella confusing, I wish Unsanity just made everything opensource.

Posted by Stevos at May 31, 2003 03:50 AM | TrackBack
  Comments
  Post a comment









Remember personal info?