Core Message Actions; Reload And Unload Messages; Start-Up And Shut-Down Messages - Adobe 65061456 Programmer's Manual

Programming guide
Table of Contents

Advertisement

C
1: Overview
HAPTER

Core message actions

The following table contains the set of core message actions received by all plug-ins and corresponding
actions your plug-in should take.
Caller
kSPAccessCaller
("SP Access")
kSPInterfaceCaller
("SP Interface")

Reload and unload messages

Whenever a plug-in is loaded into memory or unloaded from memory, Illustrator sends it an access
message action:
#define kSPAccessCaller
#define kSPAccessUnloadSelector"Unload"
#define kSPAccessReloadSelector"Reload"
The message action contains the access caller and a reload or unload selector. This is your plug-in's
opportunity to set up, restore, or save state information. The access caller/selectors bracket all other callers
and selectors.
Access messages bracket all other messages. Reload is the first message your plug-in receives; Unload, the
last. At these times, your plug-in should not acquire or release suites other than those built into Illustrator.

Start-up and shut-down messages

Illustrator has two core interface message actions, where the plug-in can interact with the application:
#define kSPInterfaceCaller
#define kSPInterfaceStartupSelector
#define kSPInterfaceShutdownSelector
When Illustrator is launched, it sends a "startup" message to each plug-in it finds. This allows your plug-in
to allocate global memory, add user-interface items to Illustrator, register suites, or perform other
initialization. The start-up message action consists of the interface caller (
start-up selector (
When the user quits Illustrator, it sends each plug-in a "shutdown" message. The shut-down message
action comprises the interface caller (
(
kSPInterfaceShutdownSelector
not destruction. A plug-in that exports a suite should not dispose of its plug-in globals or suite
information, since it may be called after its own shut-down by another plug-in's shut-down. For example, if
Selector
kSPAccessReloadSelector
("Reload")
kSPAccessUnloadSelector
("Unload")
kSPInterfaceStartupSelector
("Startup")
kSPInterfaceShutdownSelector
("Shutdown")
"SP Access"
kSPInterfaceStartupSelector
kSPInterfaceCaller
). Shut-down is intended for flushing files and preserving preferences,
Plug-in entry point and messages 13
Action to perform
Restore any state information (globals).
Save any state information (globals).
Initialize globals and add features to the
application.
Free globals, remove features from the
application, and save preferences.
"SP Interface"
"Startup"
"Shutdown"
).
) and shut-down selector
) and
kSPInterfaceCaller

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs5

Table of Contents