We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
[Mac] DockTile Lib (Read 885 times)
[Mac] DockTile Lib
May 2nd, 2008, 8:28pm
 
derDoc Studios proudly presents: The best and biggest release yet!

This time, I made a library that implements a renderer that draws into the application's docktile, i.e. the app's icon in the dock.

After only 2 weeks of fighting with: [objective-c, java, JNI, cocoa, NSImageRep, undocumented OSX APIs and pixel values] I actually managed to get it working.
It is a subclass of P3D again, so feel free to use any functions from it.

Check it out @ http://web.mac.com/derDoc/pub/dock.zip

-V
Update
Reply #1 - May 4th, 2008, 3:46am
 
I found a memory management issue that prevented the previous version from rendering the image to the docktile, when it was bigger than 128x128 and another one that kicked in on images > 355x355.
Both are fixed now and I uploaded the new version.

In the hope that somebody will find this useful,
-V
Docktile sensor
Reply #2 - May 7th, 2008, 9:34am
 
Folks,

finally after I have all the libraries in place, I could throw the program together that I had originally intended to do.
It is a sketch that builds on both my libraries and the SMS sketch to display readings from the Apple SMS in an icon in the dock.

It is available here: http://web.mac.com/derDoc/pub/SMSdock.zip.
And a screenshot of it in action can be seen here:
http://web.mac.com/derDoc/pub/screencap1.png

Unfortunately I could not get the sketch's main windows to hide, all that I got from trying was a kernelpanic.
So, I resolved to just iconify it upon startup.

Note that with 10 FPS (as shown) it uses ~33% CPU on my 2.6Ghz Core2Duo system, and still ~20% at 5fps.

Have fun with it,
-V
Page Index Toggle Pages: 1