Papilio API Reference

One of the more annoying things that I noticed while programming Papilio is the lack of documentation on the APIs Bowtie exposes to developers. Most of my knowledge of the Bowtie APIs comes from reading source code from various Bowlets; I give you an API reference of the Bowtie APIs Papilio implements, as well Papilio's own private APIs.

Tracks

Tracks are passed in as the argument to the trackUpdate callback. Behind the scenes in Papilio, this is a singleton instance you can access called singletonTrack. Tracks are wrappers around the public MPMediaItem class from the MediaPlayer framework.

iTunes

While the iTunes object refers to iTunes in Bowtie, in Papilio it refers to the iPod application (MobileMusicPlayer). It is accessible globally with the variable iTunes.

Bowtie

The Bowtie object is a mix of window management functions and other things that don't fit in into either the iTunes or track categories. These are mostly implemented for compatibility reasons, as Papilio does not really care what its container is.

LCD API

This is unique to Papilio, and it's more of a convenience class than anything else. Cydget currently does not let you display the system's LCD in a native manner, so you have to fake it through HTML, CSS, and JavaScript. This expects you have a div with the ID of lcd. You can get the CSS to make it match with the system's LCD (even when themed) here.

Private APIs

I want to get this released by the end of the night so I won't write this part up just yet; besides, if you look at the source code it should be fairly evident. (Still, I do plan on writing it up for openness.)

Back to Sakurina's iPhone Hacks
Back to r-ch.net