Luis Nell
Luis Nell

Reputation: 544

Retrieving an app's DockTile (view)

I'm getting my hands dirty with a bit of ObjC by trying to write something Dock-like, with a little less visual bells and whistles. It's going pretty well. However I've stumbled over a problem which I can't quiet solve:

Retrieving an app's icon via NSRunningApplication is easy. However, some apps don't use their icon as DockTile, they use a custom view because their DockTiles are dynamic (f.e. most torrent apps display their current up/down speeds in the dock).

Is there any way to get this DockTile and display it in my own app?

Thanks

Upvotes: 0

Views: 155

Answers (1)

user149341
user149341

Reputation:

No, there is not. The methods which set a custom dock tile end up communicating the contents of the view directly to the Dock; it is not made available to other processes.

For what it's worth, writing a replacement for the Dock is going to be a kind of hopeless task -- Apple's Dock.app uses numerous private, undocumented APIs to interact with the WindowServer, some of which simply cannot be used by any process which is not the Dock.

Upvotes: 1

Related Questions