Adobe 65061456 Programming Guide - Page 7

Anatomy of a plug-in - flash 10

Page 7 highlights

CHAPTER 1: Overview Anatomy of a plug-in 7 Illustrator 9.0 in Mac OS stopped loading plug-ins containing Motorola 68K code. While early plug-in APIs from Adobe would run 68K plug-ins from a PowerPC application or vice-versa, this mechanism was not provided to Illustrator 9 plug-ins. Only plug-ins with the Illustrator 9 version information in the PiPL were recognized and included in Illustrator 9's initial start-up process; however, Illustrator 6 and 5.5 plug-ins were supported by adapters. The Illustrator 10.0 API changed API structures in Mac OS to use PowerPC alignment (four-byte aligned). Earlier APIs used 68K alignment (two-byte aligned). Illustrator plug-ins in Mac OS had to be rebuilt with the Illustrator 10 SDK, to be compatible with Illustrator 10. Illustrator plug-ins for Windows built with the Illustrator 9 SDK or earlier were not affected and remained compatible with Illustrator 10. NOTE: Originally, Illustrator was a 68K application. When Apple moved to the PowerPC platform, the Illustrator API maintained 68K alignment for backward compatibility. This caused a small performance loss, so the alignment was changed; this change broke backward compatibility. Illustrator CS1 (Illustrator version 11.0) integrated a new text engine, the Adobe Text Engine (ATE). The text API was revised completely. The text API from Illustrator 10.0 and earlier was obsoleted (AIText, AITextFaceStyle, AITextPath, AITextRun, AITextStream, AITextStyle, etc.). The new ATE API provided increased functionality and control over typography to Illustrator plug-ins (see IText and ATESuites). This change broke backward compatibility. Illustrator plug-ins that used the obsolete text API had to be rebuilt with the Illustrator 11 SDK and ported to use the new ATE API. The Illustrator CS2 API (Illustrator version 12.0) introduced Unicode support. Unicode encoding should be used for any strings displayed in the user interface. In Mac OS, the object-file format for Illustrator plug-ins changed to Mach-O. The old format was PEF, a preferred executable format. Moving forward, Mach-O is Apple's preferred object-file format for the Mac OS X platform. The Illustrator CS3 API (Illustrator version 13.0) introduced support for universal binary plug-ins in Mac OS. Universal binaries run in Mac OS computers using PowerPC or Intel microprocessors and deliver optimal performance for both architectures in one package. The Apple Xcode development tool is the most convenient way to produce universal binaries; therefore, Adobe switched to Xcode from CodeWarrior for the development of Illustrator CS3 plug-ins. The Illustrator CS4 API (Illustrator version 14.0) introduced support for multiple artboards and the FXG file format, among other things. The multiple-artboards feature has been requested by many Illustrator users. The FXG file format improves support for integrated designer-developer workflows and paves the way for closer interaction between Illustrator and XML-based applications. In Illustrator CS5 API (Illustrator version 15.0) the most significant change is that Adobe Dialog Manager (ADM) has been deprecated. It is recommended that you replace any UI based on ADM with one based on Adobe Flash® and Flex®-based controls, or another 3rd-party or platform-specific UI framework; see Chapter 3, "Creating a Flash UI for Plug-ins for more infomation. This release also introduces a new suite for working with the new Beautiful Strokes feature, and many existing features, such as perspective grids, have been improved or enhanced. For documentation on these changes and other API changes, see the Adobe Illustrator CS5 Porting Guide. Anatomy of a plug-in Like most programs, Illustrator plug-ins contain both code and data. The Illustrator plug-in manager loads and executes a plug-in's code when required, sending various messages to the plug-in. The plug-in manager also unloads plug-ins that are no longer needed. See the following figure.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38

C
HAPTER
1: Overview
Anatomy of a plug-in
7
Illustrator 9.0 in Mac OS stopped loading plug-ins containing Motorola 68K code. While early plug-in APIs
from Adobe would run 68K plug-ins from a PowerPC application or vice-versa, this mechanism was not
provided to Illustrator 9 plug-ins. Only plug-ins with the Illustrator 9 version information in the PiPL were
recognized and included in Illustrator 9’s initial start-up process; however, Illustrator 6 and 5.5 plug-ins
were supported by adapters.
The Illustrator 10.0 API changed API structures in Mac OS to use PowerPC alignment (four-byte aligned).
Earlier APIs used 68K alignment (two-byte aligned). Illustrator plug-ins in Mac OS had to be rebuilt with the
Illustrator 10 SDK, to be compatible with Illustrator 10. Illustrator plug-ins for Windows built with the
Illustrator 9 SDK or earlier were not affected and remained compatible with Illustrator 10.
N
OTE
:
Originally, Illustrator was a 68K application. When Apple moved to the PowerPC platform, the
Illustrator API maintained 68K alignment for backward compatibility. This caused a small performance loss,
so the alignment was changed; this change broke backward compatibility.
Illustrator CS1 (Illustrator version 11.0) integrated a new text engine, the Adobe Text Engine (ATE). The text
API was revised completely. The text API from Illustrator 10.0 and earlier was obsoleted (
AIText
,
AITextFaceStyle
,
AITextPath
,
AITextRun
,
AITextStream
,
AITextStyle
, etc.). The new ATE API
provided increased functionality and control over typography to Illustrator plug-ins (see
IText
and
ATESuites
). This change broke backward compatibility. Illustrator plug-ins that used the obsolete text API
had to be rebuilt with the Illustrator 11 SDK and ported to use the new ATE API.
The Illustrator CS2 API (Illustrator version 12.0) introduced Unicode support. Unicode encoding should be
used for any strings displayed in the user interface. In Mac OS, the object-file format for Illustrator plug-ins
changed to Mach-O. The old format was PEF, a preferred executable format. Moving forward, Mach-O is
Apple’s preferred object-file format for the Mac OS X platform.
The Illustrator CS3 API (Illustrator version 13.0) introduced support for universal binary plug-ins in Mac OS.
Universal binaries run in Mac OS computers using PowerPC or Intel microprocessors and deliver optimal
performance for both architectures in one package. The Apple Xcode development tool is the most
convenient way to produce universal binaries; therefore, Adobe switched to Xcode from CodeWarrior for
the development of Illustrator CS3 plug-ins.
The Illustrator CS4 API (Illustrator version 14.0) introduced support for multiple artboards and the FXG file
format, among other things. The multiple-artboards feature has been requested by many Illustrator users.
The FXG file format improves support for integrated designer-developer workflows and paves the way for
closer interaction between Illustrator and XML-based applications.
In Illustrator CS5 API (Illustrator version 15.0) the most significant change is that Adobe Dialog Manager
(ADM) has been deprecated. It is recommended that you replace any UI based on ADM with one based on
Adobe Flash® and Flex®-based controls, or another 3rd-party or platform-specific UI framework; see
Chapter 3, “
Creating a Flash UI for Plug-ins
for more infomation. This release also introduces a new suite for
working with the new Beautiful Strokes feature, and many existing features, such as perspective grids,
have been improved or enhanced. For documentation on these changes and other API changes, see the
Adobe Illustrator CS5 Porting Guide
.
Anatomy of a plug-in
Like most programs, Illustrator plug-ins contain both code and data. The
Illustrator plug-in manager
loads
and executes a plug-in’s code when required, sending various messages to the plug-in. The plug-in
manager also unloads plug-ins that are no longer needed. See the following figure.