title: Hooking Cocoa API?
body: <p>I am trying to Hook Cocoa API. </p>
  
  <p>I know cocoa provides a public api for hooking, so it’s possible to hook the system function and retrieve information like the current font settings of the context.</p>
  
  <p>I am also trying to hook that draw api from cocoa.</p>
  
  <p>Can somebody point me to details on how it can be achieved. Or some references which talks about hooking of Cocoa APIs?</p>
  
  <p>By Hooking , I mean "A fundamental technique of getting control over a particular piece of code execution. It provides an straightforward mechanism that can easily alter the operating system's behavior as well as 3rd party products, without having their source code available."</p>
  
  <p>My requirement is, if any application/system is drawing something, then I want those draw instructions should first come to me. Then I cant to store those commands, for some processing later. </p>