<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Vacuous Virtuoso &#187; framework</title>
	<link>http://lipidity.com</link>
	<description>Despotic Development</description>
	<pubDate>Tue, 23 Dec 2008 06:24:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Digg API Cocoa framework</title>
		<link>http://lipidity.com/apple/digg-api-cocoa-framework/</link>
		<comments>http://lipidity.com/apple/digg-api-cocoa-framework/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 08:02:45 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[API]]></category>

		<category><![CDATA[Digg]]></category>

		<category><![CDATA[Download]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/digg-api-cocoa-framework</guid>
		<description><![CDATA[I have been secretly preparing in my evil laboratory, a Cocoa framework that makes it ridiculously easy to use the recently-released <a href="http://dev.lipidity.com/apple/national-api-week">Digg API</a>.]]></description>
			<content:encoded><![CDATA[<p>A little sneak preview of some of the stuff you can do with it:</p>

<pre>
- (DiggObject *)fetchStoryWithID:(int)ID;
- (DiggObject *)fetchStoryWithTitle:(NSString *)name;
- (DiggObject *)fetchStoryWithURL:(NSString *)url;
- (NSMutableArray *)fetchStoriesForDomain:(NSString *)domain;
- (NSMutableArray *)fetchStoriesForTopic:(NSString *)topic;
- (NSMutableArray *)fetchStoriesForContainer:(NSString *)container;
- (NSMutableArray *)fetchStoriesSubmittedBy:(NSString *)user;
- (NSMutableArray *)fetchPopular;
- (NSMutableArray *)fetchRecent;
- (NSMutableArray *)fetchStories;
- (NSMutableArray *)fetchUpcoming;
</pre>

<p>It&#8217;s also just as easy to set the options or parameters that you would like to call the query with:</p>

<pre>
-(void)setAppkey:(NSString *)newAppkey;
-(NSString *)appkey;

-(NSString *)proxy;
-(void)setProxy:(NSString *)newProxy;

-(BOOL)single;
-(void)setSingle:(BOOL)newSingle;

-(int)count;
-(void)setCount:(int)newCount;

-(int)offset;
-(void)setOffset:(int)newOffset;

-(int)total;

-(NSString *)domain;
-(void)setDomain:(NSString *)newDomain;

-(NSString *)sortBy;
-(void)setSortBy:(NSString *)newSort;

-(NSString *)status;
- (void)setStatus:(NSString *)newStatus;

- (NSString *)minSubmitDate;
- (void)setMinSubmitDate:(NSString *)newMinSubmitDate;

- (NSString *)maxSubmitDate;
- (void)setMaxSubmitDate:(NSString *)newMaxSubmitDate;

- (NSString *)minPromoteDate;
- (void)setMinPromoteDate:(NSString *)newMinPromoteDate;

- (NSString *)maxPromoteDate;
- (void)setMaxPromoteDate:(NSString *)newMaxPromoteDate;
</pre>

<p>Currently the focus is on fetching stories, but fetching information for users, events (Diggs and comments), topics and containers will be written in shortly.</p>

<p>The only major thing lacking now is people to use the framework!</p>

<p>If you&#8217;re interested, drop a comment below and I&#8217;ll provide you with the necessary ammunition to create, fetch, parse and utilize Digg API calls with the ease of regular Objective-C Cocoa methods.</p>

<p>The official release date will depend on the response from the initial testers, so what are you waiting for? Ask me for a copy!</p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/digg-api-cocoa-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Shiira 2 released, offers HUD framework</title>
		<link>http://lipidity.com/apple/shiira-2-released-offers-hud-framework/</link>
		<comments>http://lipidity.com/apple/shiira-2-released-offers-hud-framework/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 13:43:47 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[GUI]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Review]]></category>

		<category><![CDATA[shiira]]></category>

		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/shiira-2-released-offers-hud-framework</guid>
		<description><![CDATA[If you haven&#8217;t already heard, Shiira 2 has been released. Shiira is a web browser written in Cocoa and based on Webkit that aims to provide a better browsing alternative than Safari.

A sub-project of Shiira is a HUD-type window class. While they&#8217;re not completely accurate to the specifications used by Apple, these are probably the [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t already heard, Shiira 2 has been released. <a href="http://shiira.jp/en.php">Shiira</a> is a web browser written in Cocoa and based on Webkit that aims to provide a better browsing alternative than Safari.</p>

<p>A sub-project of Shiira is a HUD-type window class. While they&#8217;re not completely accurate to the specifications used by Apple, these are probably the best HUD windows I&#8217;ve seen from a third party developer by a long shot.</p>

<p><a href='http://dev.lipidity.com/wp-content/uploads/2007/04/hud-window.png' title='HUD window from Shiira'><img src='http://dev.lipidity.com/wp-content/uploads/2007/04/hud-window.thumbnail.png' alt='HUD window from Shiira' height="64" width="128" /></a></p>

<p>The HUD Windows have the funny name of <a href="http://shiira.jp/hmblkappkit/en.html">HMBLBlkAppKit</a>. The Shiira team has really done a great job!</p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/shiira-2-released-offers-hud-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>National API week</title>
		<link>http://lipidity.com/apple/national-api-week/</link>
		<comments>http://lipidity.com/apple/national-api-week/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 08:01:06 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[API]]></category>

		<category><![CDATA[Digg]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/national-api-week</guid>
		<description><![CDATA[Two very important APIs were released this week. One is web-based, the other is Mac-based.]]></description>
			<content:encoded><![CDATA[<h3>Digg</h3>

<p>There have been <a href="http://serverboy.net/wiki/Digg">attempts</a> at figuring out the usage of the still-unreleased Digg <abbr title="Application Programming Interface">API</abbr>. However, Digg are yet to release their official <abbr title="Application Programming Interface">API</abbr>.</p>

<p>The staff at Digg were very kind in letting certain people have a play with the <abbr title="Application Programming Interface">API</abbr> before its release, and it&#8217;s looking to be, to put it bluntly, quite excellent. A lot of Digg plugins and services are going to be either made obsolete, or very happy with all the new possibilities that will be&#8230; well, possible!<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p>For example, Lorelle talks about <a href="http://lorelle.wordpress.com/2007/02/24/digg-this-feature-on-wordpresscom-blogs/">keeping track</a> of your Dugg posts by subscribing to the search results RSS. This is only possible if you search for the past 7 or 30 days, and it doesn&#8217;t give you much information about the status, comments or diggs received on your posts. With the Digg <abbr title="Application Programming Interface">API</abbr>, this&#8217;ll be figuratively (because too many people use the word &#8216;literally&#8217; figuratively) a breeze.</p>

<p><abbr title="Application Programming Interface">API</abbr>&#8217;s are important, because they give people the opportunity to extend and use an application or service in a way that they like. A world without <abbr title="Application Programming Interface">API</abbr> is like Xcode without Cocoa or Carbon, or like the Mac without Applescript. An <abbr title="Application Programming Interface">API</abbr> helps to let the user do what they like, and it&#8217;s fun!</p>

<p>So web developers, start your engines for the Digg <abbr title="Application Programming Interface">API</abbr>&#8230;</p>

<h3>Google &amp; Cocoa</h3>

<p>It may be <abbr title="Application Programming Interface">API</abbr> week or something, because Google have also conjured up an open source <abbr title="Application Programming Interface">API</abbr> for Mac developers to use Google data. The <a href="http://code.google.com/p/gdata-objectivec-client/">Google Data APIs Objective-C Library</a> is a framework<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup> that enables the use of Google data <abbr title="Application Programming Interface">API</abbr>&#8217;s within Objective C.</p>

<p>Greg Robbins posted some examples of this <abbr title="Application Programming Interface">API</abbr> at the <a href="http://googlemac.blogspot.com/2007/04/google-data-apis-connect-cocoa.html">Google Mac blog</a>. Currently you can work with Google Calendar, Google Base, Google Spreadsheets and access to more services is in development. It seems to be a very nice framework, and I&#8217;m looking forward to seeing third party use of this.</p>

<p>That seems to round off <abbr title="Application Programming Interface">API</abbr> week. Any thoughts?</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>As you can probably tell, it&#8217;s hard to talk about something like this without giving too much away. You&#8217;ll get it when you see it.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>It claims to support <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/"><abbr title="Key-Value Coding">KVC</abbr></a> as well. I&#8217;m glad Google are getting into Mac development.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/national-api-week/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Now this is hot Cocoa</title>
		<link>http://lipidity.com/apple/now-this-is-hot-cocoa/</link>
		<comments>http://lipidity.com/apple/now-this-is-hot-cocoa/#comments</comments>
		<pubDate>Sun, 15 Apr 2007 12:43:08 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Download]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[smoke]]></category>

		<category><![CDATA[Source Code]]></category>

		<category><![CDATA[Tutorial]]></category>

		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/feature/tutorial/now-this-is-hot-cocoa</guid>
		<description><![CDATA[It's finished. The real craze and controversy over <a href="http://discoapp.com" title="Disco App">Disco</a>'s smoke is over. <a href="http://toxicsoftware.com/blog/second-hand-smoke/" title="Disco smoke">Jonathan Wight</a> was the first to write up an article on integrating the smoke effects into a third party Cocoa application. Times have changed, and the smoke framework bundled with the more recent versions of the application no longer produce the desired results by using the same code.

So how do you get any Cocoa application to start smoking? <a href="http://www.austinsarner.com/" title="Austin Sarner">Austin Sarner</a> was kind enough to reveal the usage and implementation of the changes to the Disco framework which allow a wider variety of Macs to experience the entertaining effect.]]></description>
			<content:encoded><![CDATA[<h2>The Framework</h2>

<p>The framework (in more ways than one) for our smoking window is the Smoke framework embedded inside the Disco app. In your Xcode project, you can reference the framework straight from within the application. You&#8217;ll have to press Cmd-Shift-G and type in the path as you can&#8217;t navigate into bundles using the standard open file dialog. Normally the location is &#8220;/Applications/Disco.app/Frameworks/&#8221; inside which is the Smoke.framework bundle which we&#8217;re interested in.</p>

<p>Alternatively, you can copy the framework to /Library/Frameworks/ and reference it from there. If you need to modify the framework (more on that later) it&#8217;s best to choose this option so you leave the contents of the Disco application alone.</p>

<h2>Head to the headers</h2>

<p><a href='http://dev.lipidity.com/wp-content/uploads/2007/04/smoke.h' title='Download Smoke.h'><img src='http://dev.lipidity.com/wp-content/uploads/2007/04/obj-c-header.png' alt='Header icon' class='fright' /></a>Before we can use the framework, we need to have a valid header or header files for the framework, which tell Xcode (and us) mainly about the classes and methods in Smoke.framework. The headers aren&#8217;t included in the framework anymore, but to <a href="http://dev.lipidity.com/apple/exposing-those-private-frameworks" title="Generate header for framework">generate a header</a> file is a simple matter of using a utility like class-dump on the framework.</p>

<p><a class='callout' href='http://dev.lipidity.com/wp-content/uploads/2007/04/smoke.h' title='Download Smoke.h'>
Download Smoke.h:</a></p>

<p>You can take a look inside the header and see a bit of what&#8217;s possible with the framework. When you&#8217;re ready, we&#8217;ll move onto the&#8230;</p>

<h2>Setup</h2>

<p>Now we&#8217;ve got the framework and header in place, we need to code to actually get a window to smoke. On the surface, this is astonishingly simple.</p>

<p>In your Xcode project, make sure you&#8217;ve added Smoke.framework and Smoke.h as well as Quartz.framework as the smoke needs to use this. Now create a new Objective-C subclass. In this example we&#8217;ve used an NSWindow subclass, but you could just as easily subclass NSObject and only apply smoke on selected outlets. If you really wanted to start a bonfire, you could add a category to NSWindow just for smoking!</p>

<p>Firstly, we define everything in our header file. Our class is called SmokingWindow (SmokeWindow is taken by Smoke.framework) and we have four methods.</p>

<p>The header file will look something like this:</p>

<pre><code>//
//  SmokingWindow.h
//  Smoke
//
//  Created by Ankur Kothari on 13/04/07.
//  Copyright 2007 Vacuous Virtuoso. All rights reserved.
//

#import &lt;Cocoa/Cocoa.h&gt;
#import &lt;Quartz/Quartz.h&gt;
#import "Smoke.h"

@interface SmokingWindow : NSWindow {
    SmokeController *theSmokeController;
    int smoking;
}
-(int)smoking;
-(IBAction)startSmoking:(id)sender;
-(IBAction)stopSmoking:(id)sender;
-(IBAction)toggleSmoke:(id)sender;
@end
</code></pre>

<ul>
<li><code>-smoking</code> returns whether (1) or not (0) the window is currently smoking. It&#8217;s not needed to smoke, but it&#8217;s good practice.</li>
<li><code>-startSmoking</code> obviously starts the window smoking, and</li>
<li><code>-stopSmoking</code> stop the window smoking</li>
<li><code>-toggleSmoke</code> will stop the window smoking if it is, or start it smoking if it isn&#8217;t.</li>
</ul>

<p>We&#8217;re storing the current state of the window for use by the <code>-smoking</code> method in the int smoking, and <code>theSmokeController</code> is a pointer to a <code>SmokeController</code> which will be doing most of the work.</p>

<hr />

<p>Ok, now to the implementation.</p>

<pre><code>//
//  SmokingWindow.m
//  Smoke
//
//  Created by Ankur Kothari on 13/04/07.
//  Copyright 2007 Vacuous Virtuoso. All rights reserved.
//

#import "SmokingWindow.h"


@implementation SmokingWindow

-(void)awakeFromNib
{
    SmokeCapabilities *smokeCapabilities = [SmokeCapabilities sharedCapabilities];
    theSmokeController = [[SmokeController alloc] init];
    [theSmokeController doExpensiveThreadedInitializations];
    [theSmokeController setSmokeAlgorithm:[smokeCapabilities smokeAlgorithm]];
    [theSmokeController attachToWindow:self];
    smoking = 0;
    [theSmokeController showWindow:self];
}

-(IBAction)toggleSmoke:(id)sender{
    if(smoking){
        [self stopSmoking:sender];
    } else {
        [self startSmoking:sender];
    }
}

-(IBAction)startSmoking:(id)sender
{
    if(!smoking){
        [theSmokeController startSmoking:self];
        smoking = 1;
    }
}

-(IBAction)stopSmoking:(id)sender
{
    if(smoking){
        [theSmokeController stopSmoking:self];
        smoking = 0;
    }
}

-(int)smoking{
    return smoking;
}
@end
</code></pre>

<hr />

<p>The first few lines in <code>-awakeFormNib</code> get the SmokeController do some initialization.</p>

<pre><code>SmokeCapabilities *smokeCapabilities = [SmokeCapabilities sharedCapabilities];
theSmokeController = [[SmokeController alloc] init];
[theSmokeController doExpensiveThreadedInitializations];
[theSmokeController setSmokeAlgorithm:[smokeCapabilities smokeAlgorithm]];
</code></pre>

<p><br />
To tell the SmokeController which window to &#8216;burn&#8217;, the <code>-attachToWindow:</code> method is used. Since we&#8217;re using an NSWindow subclass in this example, we can just set it to <code>self</code>, otherwise you&#8217;ll need a pointer or outlet to an instance of NSWindow.</p>

<pre><code>[theSmokeController attachToWindow:self];
</code></pre>

<p><br />
To just make extra sure that the position of the smoke wont be offset if the window is dragged around during initialization, we call the <code>-showWindow</code> method. This isn&#8217;t completely necessary.</p>

<pre><code>[theSmokeController showWindow:self];
</code></pre>

<p><br />
To heat or cool the window, theSmokeController responds to <code>-startSmoking</code> and <code>-stopSmoking</code>. Easy enough!</p>

<h2>More fun!</h2>

<p>For extra smoking fun, you can add bindings to your application to control many aspects of the smoke. You can adjust the initial temperature, the amount of pressure exerted by the mouse, the <abbr title="Frames per second">FPS</abbr>, and many more. Just check the UserDefaults.plist file located in the Resources folder in Smoke.framework.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<h2>Hacking the smoke framework</h2>

<p>To get even more out of the smoke framework, you can edit various files within the framework itself. Most of the files are in the &#8220;Resources&#8221; folder. One of the most useful ones to edit is called boundary.cikernal. In the first two lines you can specify the height and width of the OpenGL view that the smoke appears in.</p>

<h3>Enjoy the smoke!</h3>

<h2>Sample project</h2>

<p><a href='http://pub.lipidity.com/Smoke.tar.bz2' title='Smoke project'><img src='http://dev.lipidity.com/wp-content/uploads/2007/04/xcode-project.png' alt='Xcode icon' /></a></p>

<hr />

<p><ins><strong>Developments</strong></ins></p>

<p>Austin has also graciously agreed to let me develop <a href="http://dev.lipidity.com/fumo" title="Fumo Quicksilver interface">Fumo</a>, the smoking Quicksilver interface.</p>

<p>Although there is still some talk about the <abbr title="Human Interface Guidelines">HIG</abbr>, usability, eye candy and so on, the controversy phase is mostly over. Speaking of which, you can call me what you like, but I  think the <abbr title="Human Interface Guidelines">HIG</abbr> is definitely <em>not</em> dead. Outdated perhaps, but there needs to be a standard. There are many aspects to the existing <abbr title="Human Interface Guidelines">HIG</abbr> that developers need to follow in order to make the Mac experience enjoyable. I&#8217;ll talk about this in detail later. <a href="http://dev.lipidity.com/apple/apple-hig-still-relevant">My rant about the <abbr title="Human Interface Guidelines">HIG</abbr></a>.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>One of the really good ones is MouseSmokeRadius, which makes smoke comes out of your mouse. I like to call them &#8220;fireballs&#8221;.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/now-this-is-hot-cocoa/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Exposing those private frameworks</title>
		<link>http://lipidity.com/apple/exposing-those-private-frameworks/</link>
		<comments>http://lipidity.com/apple/exposing-those-private-frameworks/#comments</comments>
		<pubDate>Fri, 16 Mar 2007 12:57:06 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/exposing-those-private-frameworks</guid>
		<description><![CDATA[Don't we all just love <a href="http://dev.lipidity.com/feature/tutorial/ebook-xcode-animations-core-graphics">undocumented goodness</a>? Some people spend a lot of time exploring and experimenting with APIs and functions to see what they can accomplish. I get a fair amount of email of people asking how exactly these private, undocumented goodies are discovered. You only need two things. The appropriate tools, and <em>lots</em> of spare time.]]></description>
			<content:encoded><![CDATA[<h3>MagicHat</h3>

<p><a href="http://homepage.mac.com/petite_abeille/MagicHat/" title="MagicHat" rel="external"><img src="http://dev.lipidity.com/wp-content/uploads/2007/03/magichat.png" alt="MagicHat" height="100" width="100" /></a></p>

<blockquote><p><a href="http://homepage.mac.com/petite_abeille/MagicHat/">MagicHat</a> is a programmer&#8217;s research and reference tool. With MagicHat, you navigate through Cocoa&#8217;s application programming interface (API); review the declarations of language elements such as methods, functions, and constants; and retrieve relevant passages from the Cocoa developer documentation.  MagicHat helps you unravel unfamiliar code, whether building blocks from the Cocoa software kits, programming examples, or programs written by your own development team.</p></blockquote>

<p>MagicHat lets you look at the declarations of public, private and local (installed) frameworks. This is a good graphical way to look at the structure of a framework, but is limited to Objective-C; which shouldn&#8217;t matter much for general use.
<a href="http://homepage.mac.com/petite_abeille/MagicHat/" title="Go to MagicHat's homepage"><img src="http://dev.lipidity.com/wp-content/uploads/2007/03/smokehat.png" alt="MagicHat: observing Smoke.framework" /></a></p>

<p class="caption">Above: MagicHat in action, displaying Disco.app&#8217;s <a href="http://dev.lipidity.com/apple/passive-smokin">Smoke.framework</a></p>

<p><a href="http://www.codethecode.com/Projects/class-dump/">
</a></p>

<h3>Class-Dump</h3>

<p><a href="http://www.codethecode.com/Projects/class-dump/" rel="external">Class-Dump</a> is one of the easiest to use command line utilities to look at the Objective-C portions of Mach-O files. The command is immediately available after moving the downloaded file to /usr/bin/ (you may need to use <code>sudo mv</code>). Executing it involves a running a simple &#8220;class-dump nameoffile&#8221; command in Terminal and the output is a nicely formatted Objective-C header. Objective-C output is the feature that makes this tool unique. It is especially useful if you need header files for frameworks which don&#8217;t include them, but it also gives you an idea as to the classes and methods present in the framework.</p>

<h3>otool</h3>

<p><a href="http://www.hmug.org/man/1/otool.php" rel="external">otool</a> provides one of the most comprehensive feature-sets - its primary role being to display parts of object files or libraries. You&#8217;ll generally find that using otool gives you access to frameworks such as CoreGraphics, which don&#8217;t contain Objective-C classes. The <code>-v</code> command will give you verbose output; <code>-o</code> displays the Objective-C and <code>-t</code> the text sections.</p>

<h3>Take &#8216;em apart</h3>

<p>Using these tools, you are now equipped to examine in detail most frameworks and libraries. Be aware that searching though and discovering new functions takes a lot of experimentation and trial and error - which the primary reason I leave it to people like <a href="http://www.cocoadev.com/index.pl?WildWindows" rel="external">Wade Tregaskis</a> (who, like me, lives in Melbourne. Never met him, though).</p>

<p>Obligatory disclaimer: The private frameworks are probably private for a reason. Meddle with them at your own risk.</p>

<p>(For those adventurous souls, the Core Graphics framework is located at <samp>/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework</samp> but there are plenty of other private frameworks besides this one; Core Graphics just happens to have the <a href="http://dev.lipidity.com/feature/tutorial/xcode-transitions-core-graphics-image-2">window transition effects</a>.</p>

<p>Ok, did this help, and what did I miss?</p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/exposing-those-private-frameworks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Warp, bend, squeeze and transform windows with CGSSetWindowWarp</title>
		<link>http://lipidity.com/apple/warp-bend-squeeze-and-transform-windows-with-cgssetwindowwarp/</link>
		<comments>http://lipidity.com/apple/warp-bend-squeeze-and-transform-windows-with-cgssetwindowwarp/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 08:40:38 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Animation]]></category>

		<category><![CDATA[CoreGraphics]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Source Code]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/warp-bend-squeeze-and-transform-windows-with-cgssetwindowwarp</guid>
		<description><![CDATA[How would you like to have the power to squish, warp and transform windows to your liking? With the private Core Graphics function CGSSetWindowWarp, you can!]]></description>
			<content:encoded><![CDATA[<p><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/warps/Warped.png" style="width: 100%" title="Warped clocks" alt="Warped clocks" /></p>

<p>The function CGSSetWindowWarp is part of the private portion of <a href="http://dev.lipidity.com/feature/tutorial/ebook-xcode-animations-core-graphics" title="Core Graphics tutorial ebook">Core Graphics</a>. Although its just as obscure and undocumented as the rest of the <ins>private parts of the</ins> framework, there has been some discovery and progress into its <a href="http://kevin.sb.org/articles/2006/07/23/cgssetwindowwarp-explained" rel="external">usage</a>.  Erling Ellingsen has written (a while ago) about CGSSetWindowWarp on <a href="http://blog.medallia.com/2006/05/windowwarp.html" rel="external">his blog</a>, and he also shows some very interesting screenshots of what&#8217;s possible.</p>

<p><img src="http://blog.medallia.com/images/warp/full-3d-fancy-thumb.jpg" alt="transformed windows" /><img src="http://blog.medallia.com/images/warp/full-3d-slash-thumb.jpg" alt="transformed windows" /></p>

<p>So, how do you use this incredible function in your Cocoa (<a href="http://paste.lisp.org/display/2717">or Carbon</a>) application?
<!--more--></p>

<h2>CGSSetWindowWarp Usage</h2>

<h3>Including the header</h3>

<p>Whenever you use private Core Graphics functions, you generally need to <code>#import </code> either one of CoreGraphicsServices.h or CGSPrivate.h (available for download with my <a href="http://dev.lipidity.com/feature/tutorial/ebook-xcode-animations-core-graphics" title="Core Graphics tutorial ebook">Core Graphics ebook</a>). However, if you&#8217;re not interested in using the rest of the Core Graphics API, you can get away with simply adding the following to your main class&#8217; header file:</p>

<pre class="code"><code>
typedef struct CGPointWarp {
        CGPoint local;
        CGPoint global;
}CGPointWarp;

typedef int CGSConnectionID;
typedef int CGSWindowID;

extern CGSConnectionID _CGSDefaultConnection();

extern CGError CGSSetWindowWarp(CGSConnectionID, CGSWindowID, int w, int h, CGPointWarp mesh[w][h]);
extern OSStatus CGSGetScreenRectForWindow(CGSConnectionID cid, CGSWindowID wid, CGRect *outRect);
extern OSStatus CGSGetWindowBounds(CGSConnectionID cid, CGSWindowID wid, CGRect *bounds);</code></pre>

<p>As you&#8217;ve probably guessed, the function that actually applies the mesh transform is <code>CGSSetWindowWarp</code>. You can create a mesh in two different ways.</p>

<h3>Creating the mesh</h3>

<p>To create a mesh, we need to specify how many points we&#8217;re going to take for our grid length-wise and width-wise. Something like this:</p>

<pre class="code"><code>#define H 64
#define W 5</code></pre>

<p>We&#8217;ll also need to refer to the position and size of the frame so the following code in the method you&#8217;re writing this will give us access to the frame of the NSWindow:</p>

<pre class="code"><code>CGRect frame;
CGSGetWindowBounds(cid, [window windowNumber], &amp;frame);</code></pre>

<p>The use of CGSGetWindowBounds ensures we get the apparent frame rather than just the frame computed by our code as we&#8217;ll be applying various transformations.</p>

<p>The first way to create a mesh requires more labor (yes, its tiring to code) but gives you greater control over the mesh and the transformations applied to the NSWindow.</p>

<h4>Manual mesh</h4>

<pre class="code"><code>CGPointWarp meshes[H][W] =
{
{ {{0, 0},{10, 10}}, {{200,0},{180,12}} },
{ {{0, 50},{0,50}}, {{200,50},{200,50}} },
{ {{0,100},{0,100}}, {{200,100},{200,100}} },
{ {{0,150},{0,150}}, {{200,150},{200,150}} },
{ {{0,200},{0,200}}, {{200,200},{200,200}} },
};</code></pre>

<p>Here, you specify firstly the coordinates of the point which you&#8217;re taking, and where you want to move that point. The first line in the above code takes (0,0) and moves it to (10,10) and moves (200,0) to (180,12). However, the first set of coordinates are local coordinates, and the second set are global. (ie., the first set are on the plane of the window, while the second set use the screen as the plane. This is to allow the window to be stretched out beyond the scope of the current frame.) We could solve this issue by using:</p>

<pre class="code"><code>
int x = frame.origin.x;
int y = frame.origin.y;
CGPointWarp meshes2[H][W] =
{
{ {{0, 0},{x, y}}, {{200,0},{x+200,y}} },
{ {{0, 50},{x,y+50}}, {{200,50},{x+200,y+50}} },
{ {{0,100},{x,y+100}}, {{200,100},{x+200,y+100}} },
{ {{0,150},{x,y+150}}, {{200,150},{x+200,y+150}} },
{ {{0,200},{x,y+200}}, {{200,200},{x+200,y+200}} },
};</code></pre>

<p>The preceding code just warps the window of size 200&#215;200 to its current position so no change is observable. If we wanted to stretch out the middle of the window horizontally, we could use a mesh in the form:</p>

<pre class="code"><code>
int x = frame.origin.x;
int y = frame.origin.y;
CGPointWarp stretchThroughMiddleMesh[H][W] =
{
{ {{0, 0},{x, y}}, {{200,0},{x+200,y}} },
{ {{0, 50},{x-10,y+50}}, {{200,50},{x+200+10,y+50}} },
{ {{0,100},{x-20,y+100}}, {{200,100},{x+200+20,y+100}} },
{ {{0,150},{x-10,y+150}}, {{200,150},{x+200+10,y+150}} },
{ {{0,200},{x,y+200}}, {{200,200},{x+200+10,y+200}} },
};</code></pre>

<p>We&#8217;ve taken the side where x=0 and moved x further back along the middle, and done the opposite on the opposite side (where x=200). This results in the NSWindow being warped to have a bulge in the middle.
<a href="http://dev.lipidity.com/wp-content/uploads/2007/02/warpbulge.png" title="warp bulge" rel="lightbox"><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/warpbulge.thumbnail.png" alt="warp bulge" /></a></p>

<p>Again, this would only look like the screenshot on a window with a height and width of 200. For a window that&#8217;s a different size, you&#8217;ll need to change the values to match the height and width of the window. For the y-values in the mesh (x, x+50, x+100, etc. in the different rows), the numbers are determined by how many points you&#8217;ve taken (your value for <var>H</var>) and the width of the window. The general formula you would use would be <code>x + ( frame.size.height / (W-1) )</code>. You&#8217;ll see this more clearly in the second method.</p>

<h4>Mesh through iterative formulae</h4>

<p>The second method to create a mesh is to run a loop to configure your individual points. Here&#8217;s a basic example that creates a mesh that would be identical to the current state of the window:</p>

<pre class="code"><code>
int h;
int w;
CGPointWarp meshes[H][W];
for (h = 0; h &lt; H; h++) {
    for (w = 0; w &lt; W; w++) {
        CGPointWarp point;
        point.local.x = w * (frame.size.width / (W - 1));
        point.local.y = h * (frame.size.height / (H - 1));
        point.global.x = point.local.x + frame.origin.x;
        point.global.y = point.local.y + frame.origin.y;

        meshes[h][w] = point;
    }
}</code></pre>

<p>Obviously we want to transform the window somehow. We need to apply some sort of mathematical function to the points to make them deviate from their original positions or coordinates. (This is the part where you start to wish you&#8217;d paid more attention in math class).</p>

<p>Lets say we want to skew the window using the x-axis. Each successive x-value needs to be greater than the previous one. Since we&#8217;re looping through each point, at any time in the inner for loop, the values of the current point are (w,h). (In <a href="http://www.google.com/search?q=Cartesian+coordinates">Cartesian coordinates</a> the x value is first, followed by the y value) In order to increase each successive value for x, we need to add something. But, we need to add more than what we did the previous time. The easiest way to do this without adding any new variables is to use the value that we&#8217;re incrementing each time - the x value itself. So, for a skewed window, we have the following mesh:</p>

<pre class="code"><code>
int h;
int w;
CGPointWarp meshes[H][W];
for (h = 0; h &lt; H; h++) {
    for (w = 0; w &lt; W; w++) {
        CGPointWarp point;
        point.local.x = w * (frame.size.width / (W - 1));
        point.local.y = h * (frame.size.height / (H - 1));
        point.global.x = point.local.x + frame.origin.x + <span style="color: black">15*h</span>;
        point.global.y = point.local.y + frame.origin.y;

        meshes[h][w] = point;
    }
}</code></pre>

<p>The skewed window would like this when the mesh was applied:
<a href="http://dev.lipidity.com/wp-content/uploads/2007/02/skew.png" title="Skews CGSWarp" rel="lightbox"><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/skew.thumbnail.png" alt="Skews CGSWarp" /></a></p>

<h3>Applying the mesh</h3>

<p>The transform mesh was really the hard part. Applying the transformation mesh (or grid) to a window is as easy as:</p>

<pre class="code"><code>
CGSSetWindowWarp(_CGSDefaultConnection(), [window windowNumber], W, H, meshes);</code></pre>

<p>The possibilities of this are really amazing. I&#8217;ve always wanted to write an NSWindow subclass that bent and reduced in opacity as it was dragged, imitating <a href="http://static.flickr.com/72/221355329_a7dc022e74.jpg" rel="external">XGL</a>. With CGSSetWindowWarp and Core Graphics, I&#8217;m sure it&#8217;ll be a breeze. Or what about an virtual universe-style Finder cross Desktop, sort of like <a href="http://www.acm.uiuc.edu/macwarriors/projects/oldprojects/3dosx/screenshots.html" rel="external">3DOSX</a>? You could even imitate other effects with this, such as the cube, but still get live updating in your windows - a limitation present in the Core Graphics transition effects.</p>

<p>For a source code, and a further explanation, see Kevin Ballard&#8217;s post on the subject of <a href="http://kevin.sb.org/articles/2006/07/23/cgssetwindowwarp-explained" rel="external">CGSSetWindowWarp</a>.</p>

<p><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/warps/right.png" title="Warped clocks" alt="Warped using CGSSetWindowWarp" /><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/warps/squish.png" title="Warped clocks" alt="Warped clocks" /><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/warps/left.png" title="Warped clocks" alt="Warped clocks" /></p>

<p><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/warps/control.png" title="Warped clocks" alt="Warped clocks" /><img src="http://dev.lipidity.com/wp-content/uploads/2007/02/warps/blur.png" title="Warped clocks" alt="Warped clocks" /></p>

<p>Did you find this useful? Or do you have any other method that you use for eye candy?</p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/warp-bend-squeeze-and-transform-windows-with-cgssetwindowwarp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iLife Controls; HUD windows and more</title>
		<link>http://lipidity.com/apple/ilife-controls-hud-windows-and-more/</link>
		<comments>http://lipidity.com/apple/ilife-controls-hud-windows-and-more/#comments</comments>
		<pubDate>Fri, 10 Nov 2006 12:15:01 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[GUI]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/ilife-controls-hud-windows-and-more</guid>
		<description><![CDATA[Sean Patrick O&#8217;Brien, a fairly new Cocoa developer has recently released an iLife Controls framework. This allows you to create HUD Windows and controls such as buttons, sliders, popup menus etc. and also a smooth metal type window (again with controls such as buttons and frames).


Heads-up-display with a window, subclassed with the framework.

With everyone trying [...]]]></description>
			<content:encoded><![CDATA[<p>Sean Patrick O&#8217;Brien, a fairly new Cocoa developer has recently released an <a rel="external" href="http://www.seanpatrickobrien.com/2006/09/28/ilifecontrols-10/">iLife Controls framework</a>. This allows you to create HUD Windows and controls such as buttons, sliders, popup menus etc. and also a smooth metal type window (again with controls such as buttons and frames).</p>

<p class='centre'><img src='http://dev.lipidity.com/wp-content/uploads/2007/05/ilifecontrols.png' alt='iLife Controls and HUD Window' class='feature' /><br />
<small>Heads-up-display with a window, subclassed with the framework.</small></p>

<p>With everyone trying to keep up with Apple&#8217;s interface additions, this isn&#8217;t a bad way to go about it. The framework includes a lot of subclasses and some of them needed to be added to Interface Builder in order for the hierarchy to show, so I&#8217;ve uploaded a simple project to show what this framework can do. It&#8217;s not completely bug-free; in fact, there are quite a number of creepy-crawlies, but the idea is there, and this looks to be the beginning of quite a handsome project.</p>

<p class="download"><a href="http://dev.lipidity.com/wp-content/uploads/2006/11/hud-project.zip">Download sample project</a></p>

<p class="download"><a href="http://dev.lipidity.com/wp-content/uploads/2006/11/ilifecontrols.zip">Download just the framework source</a></p>

<p>And while you&#8217;re at it, don&#8217;t forget to thank Sean <img src='http://lipidity.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/ilife-controls-hud-windows-and-more/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Passive smokin&#8217;</title>
		<link>http://lipidity.com/apple/passive-smokin/</link>
		<comments>http://lipidity.com/apple/passive-smokin/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 06:09:34 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Download]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[smoke]]></category>

		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/passive-smokin</guid>
		<description><![CDATA[With all the fuss over Disco and it&#8217;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&#8217;re like me, one of the first things you do when you see a cool [...]]]></description>
			<content:encoded><![CDATA[<p>With all the fuss over <a href="http://discoapp.com" title="Disco is a CD burning shareware program for OS X created by the author of AppZapper and friends." rel="external">Disco</a> and it&#8217;s <a href="http://discoapp.com/blog/?p=23" title="The story behind the complex smoke effect as seen in Disco" rel="external">smoke effect</a>, Jonathan Wight decided to take a <a href="http://toxicsoftware.com/blog/second-hand-smoke/" rel="external" title="Using smoking windows in Xcode">deeper look</a>. The result of his labor - anyone can integrate smoking windows into their apps. Stick around and let me show you how.</p>

<p><a href="http://toxicsoftware.com/wordpress/uploads/SecondHandSmoke.png" title="Screenshot of a window smoking" class="imagelink" rel="lightbox"><img src="http://toxicsoftware.com/wordpress/uploads/SecondHandSmoke.png" alt="The smoke effect in action" /></a></p>

<p>If you&#8217;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 &#8220;Show package contents&#8221; is pretty revealing. Charge straight into the Contents folder, and you&#8217;ll see a nice little folder bearing the name &#8220;Frameworks&#8221;. 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&#8217;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:</p>

<blockquote><p>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).</p></blockquote>

<p>Obviously, this way of setting preferences isn&#8217;t very flash, so you can just set the specific preference keys from within your code, and it&#8217;ll still run fine. Don&#8217;t expect that done from me, though, I&#8217;ve got a lot of work to catch up on. Then again, if someone wants to make their window smoke and can&#8217;t get their head around the preferences, I can always take a little break and help you out.</p>

<p class="download"><a href="http://dev.lipidity.com/wp-content/uploads/2006/11/secondhandsmoke21.zip" title="Download the example project for smoking windows.">Second Hand Smoke</a></p>

<p>Have fun, and try not to get addicted to smoking.</p>

<p><ins class='block'><strong>Update:</strong> This smoke no longer works with the version 1.0 release of Disco. Updated smoking instructions <a href="http://dev.lipidity.com/feature/tutorial/now-this-is-hot-cocoa" title="Disco smoke with Cocoa and Xcode">here</a>.</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/passive-smokin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CGS Framework now Universal! Tremendous power&#8230;</title>
		<link>http://lipidity.com/apple/cgs-framework-now-universal-tremendous-power/</link>
		<comments>http://lipidity.com/apple/cgs-framework-now-universal-tremendous-power/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 12:18:45 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[CoreGraphics]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/cgs-framework-now-universal-tremendous-power</guid>
		<description><![CDATA[The fabled Core Graphics Framework is now released!

All the PPC / Intel specific bugs have been found, caught, and eradicated. The framework should now be ready for developer consumption for use in commercial apps, or for experimentation and utter bewilderment. Be amazed. Be very amazed, and download the framework straight from here or read and [...]]]></description>
			<content:encoded><![CDATA[<p class="callout">The fabled <a href="http://dev.lipidity.com/apple/the-ultimate-core-graphics-resource" title="The Core Graphics Framework for everything Core Graphics.">Core Graphics Framework</a> is now released!</p>

<p>All the PPC / Intel specific bugs have been found, caught, and eradicated. The framework should now be ready for developer consumption for use in commercial apps, or for experimentation and utter bewilderment. <strong>Be amazed</strong>. Be very amazed, and download the framework straight from <a href="http://pub.lipidity.com/CGSFramework.tar.bz2" title="Download the Core Graphics framework straight away (direct link)">here</a> or read and download it from <a href="http://dev.lipidity.com/apple/the-ultimate-core-graphics-resource" title="The Core Graphics Framework for everything Core Graphics.">the original post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/cgs-framework-now-universal-tremendous-power/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The ultimate Core Graphics resource</title>
		<link>http://lipidity.com/apple/the-ultimate-core-graphics-resource/</link>
		<comments>http://lipidity.com/apple/the-ultimate-core-graphics-resource/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 13:39:37 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[CoreGraphics]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dev.lipidity.com/apple/the-ultimate-core-graphics-resource</guid>
		<description><![CDATA[Liberate your application

Now works on all architectures, and without hiccups!

Can&#8217;t get enough of window transitions? Love a little eye candy? Well, you&#8217;re in luck. The Core Graphics Framework and Xcode Project Template make adding the fantastic Core Graphics function to your app a breeze. In fact, it&#8217;s even more complete than the tutorial, and already [...]]]></description>
			<content:encoded><![CDATA[<h2>Liberate your application</h2>

<p class="blue_hilite">Now works on all architectures, and without hiccups!</p>

<p>Can&#8217;t get enough of window transitions? Love a little eye candy? Well, you&#8217;re in luck. The Core Graphics Framework and Xcode Project Template make adding the fantastic Core Graphics function to your app a breeze. In fact, it&#8217;s even more complete than the <a href="http://dev.lipidity.com/tutorial/xcode-transitions-core-graphics-image-2" title="The complete Core Graphics tutorial for beginners">tutorial</a>, and already has more features in it before you write a single line of code! It doesn&#8217;t stop there, however. This framework powerful enough to use the <strong>genie effect</strong>. That&#8217;s right. That awesome Mac OS X transform you can get when you minimize an application. Core Graphics contains a wealth of resources. You really have to check it out.</p>

<!--more-->

<h3>Point. Click. Zoom!</h3>

<p>The <acronym title="Core Graphics">CGS</acronym> Framework is a an implementation of transitions, transforms and everything Core Graphics. It includes the definitions and implementations for the methods, so that using a transition or transform is as simple as calling a single method! For example, scaling a window is as simple as a &#8220;- scale: about:&#8221; call on the window, and rotating it just requires a single &#8220;- rotate: about:&#8221;. In the same way, Core Graphics is laid bare with this framework, for you to utilize at your pleasure!</p>

<h3>Don&#39;t lift a finger</h3>

<p>The framework does all the work for you, but even then, it gets simpler. Source for a  sample app is included which means that you can create Core Graphics projects straight away by building on top of it. This saves you, the developer time in adding and linking the Framework, and reading and implementing the Core Graphics class in Interface Builder, as well as adding the framework to your project. A single double-click on the sample project and it&#8217;s all done for you. What more could you ask? Download a copy and check it out today. You&#8217;ll be surprised how powerful it is.</p>

<h3>Gimme already!</h3>

<p><strong>Now a universal binary for your developing pleasure!</strong></p>

<p class="download"><a id="p23" href="http://pub.lipidity.com/CoreGFX.tar.bz2" title="CGS Framework / Project">CGS Framework + Sample App</a></p>

<p>Once downloaded, open CoreGFX.app to view some of the possible effects. You can copy the source folder to hard drive if you need to build a Core Graphics enabled app. Enjoy the wonderfulness, and I hope you have fun!</p>

<hr />

<p>Any queries, <a title="Jump straight to the comment form to leave a reply." href="http://dev.lipidity.com/apple/the-ultimate-core-graphics-resource#comment-form">fire away.</a> </p>

<p>Make sure you understand that some of the functions of Core Graphics used in this framework are undocumented, internal APIs that Apple haven&#8217;t released. (Calm down. It&#8217;s not illegal). Having said that, apps like <a href="http://quicksilver.blacktree.com/" title="Quicksilver is an essential application for Mac OS X. It is a lot more than an application launcher; it gives you control over your entire Mac and will definitely increase your productivity. The eye candy is great too, courtesy of Core Graphics.">Quicksilver</a> would be quite bland without the use of the undocumented Core Graphics functions, so exercise your discretion.</p>

<p>This project relies heavily on work by <a href="http://homepage.cs.latrobe.edu.au/wjtregaskis/" title="Wade's stuff. Little bland, but contains a gem in the form of Rotated Windows.">Wade Tregaskis</a> and his Rotating Windows.</p>

<p>&copy; 2006 Ankur Kothari.</p>
]]></content:encoded>
			<wfw:commentRss>http://lipidity.com/apple/the-ultimate-core-graphics-resource/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
