Mac OS X Reference Library Apple Developer
Search

NSDockTilePlugIn Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.6 and later.
Companion guide
Declared in
NSDockTile.h

Overview

The NSDockTilePlugIn protocol defines the methods implemented by plug-ins that allow an application’s Dock tile to be customized while the application is not running.

Customizing an application’s Dock tile when the application itself is not running requires that you write a plug-in. The plug-in’s principal class must implement the NSDockTilePlugIn protocol.

The name of the plugin is indicated by a NSDockTilePlugIn key in the application's Info.plist file.

The plugin is loaded in a system process at login time or when the application tile is added to the Dock. When the plugin is loaded, the principal class' implementation of setDockTile: is invoked, passing an NSDockTile for the plug-in to customize. If the principal class implements dockMenu it is invoked whenever the user causes the application's dock menu to be shown. When the dock tile is no longer valid (for example,. the application has been removed from the dock) -setDockTile: is invoked with nil.

Tasks

Setting the Dock Tile

Getting the Dock Tile Menu

Instance Methods

dockMenu

Invoked when the user causes the application's dock menu to be shown.

- (NSMenu*)dockMenu

Return Value

The menu the dock tile displays.

Availability
  • Available in Mac OS X v10.6 and later.
Declared In
NSDockTile.h

setDockTile:

Invoked when the plug-in is first loaded and when the application is removed from the Dock. (required)

- (void)setDockTile:(NSDockTile*)dockTile

Parameters
dockTile

The dock tile associated with the application, or nil if the application has been removed from the Dock.

Discussion

The plugin is loaded in a system process at login time or when the application tile is added to the Dock.

The principal class of the plug-in must implement the NSDockTilePlugIn protocol.

Availability
  • Available in Mac OS X v10.6 and later.
Declared In
NSDockTile.h



Last updated: 2009-05-28

Did this document help you? Yes It's good, but... Not helpful...