Adobe 65061456 Programmer's Manual
Adobe 65061456 Programmer's Manual

Adobe 65061456 Programmer's Manual

Programming guide
Table of Contents

Advertisement

Quick Links

ADOBE® ILLUSTRATOR® CS5
ADOBE ILLUSTRATOR CS5
PROGRAMMER'S GUIDE

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 65061456 and is the answer not in the manual?

Questions and answers

Summary of Contents for Adobe 65061456

  • Page 1 ADOBE® ILLUSTRATOR® CS5 ADOBE ILLUSTRATOR CS5 PROGRAMMER’S GUIDE...
  • Page 2 Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement.
  • Page 3: Table Of Contents

    A brief history of the Adobe Illustrator API ....... . .
  • Page 4 About the Adobe Creative Suite SDK ........
  • Page 5: Preface

    Adobe Illustrator CS5 Porting Guide — Describes issues related to porting plug-ins across different versions of the Illustrator API. See /docs/guides/porting-guide.pdf Adobe Illustrator API Reference — Describes the suites and functions in the Illustrator API in detail. See folder. /docs/references/ Using the Adobe Text Engine with Illustrator CS5 —...
  • Page 6: Overview

    The Illustrator API first appeared in version 5.0. It supported one type of plug-in, filters. This was extended in Adobe Illustrator 5.5 to include file formats. The 5.x APIs displayed characteristics of many early API design efforts: the interface was monolithic, incorporating enough function to achieve its intended purpose, but not allowing for future expansion.
  • Page 7: Anatomy Of A Plug-In

    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 , etc.).
  • Page 8: Types Of Plug-Ins

    1: Overview Types of plug-ins 8 HAPTER Required plug-ins Adobe Illustrator Additional plug-ins Plug-ins are notified by Illustrator when they have just been loaded or are about to be unloaded, permitting them to restore or save any state information. Types of plug-ins This section describes the different types of Illustrator plug-ins you can create.
  • Page 9: Action Plug-Ins

    JPEG files). In Illustrator, these are called file-format plug-ins. Illustrator uses the term “filter plug-in” in a way similar to Adobe Photoshop: a filter plug-in modifies the artwork in an algorithmic fashion. Illustrator updates the Repeat and Undo menus automatically, making filters one of the simplest plug-in types to create.
  • Page 10: Plugin-Group Plug-Ins

    HAPTER A timer plug-in is notified at regular time intervals. For example, a timer plug-in may request to be notified once a second. For more information, see in Adobe Illustrator API Reference. AINotifierSuite AITimerSuite Plugin-group plug-ins Plugin-group plug-ins maintain one or more plug-in groups. A plug-in group is a special art object that contains editable art as well as art that is displayed but not editable.
  • Page 11: What Defines A Plug-In

    1: Overview What defines a plug-in? 11 HAPTER In general, each plug-in type is in a specific subfolder; for example, tool plug-ins are in a folder named Tools What defines a plug-in? On Windows, an Illustrator plug-in is a DLL (dynamic-link library). In Mac OS, an Illustrator plug-in is a bundle that contains a shared library.
  • Page 12: Plug-In Entry Point And Messages

    “SP. ” Illustrator message actions are used to indicate events in which a plug-in has interest. Information on the callers and selectors supported by the API is given by the Plug-in Callers and Plug-in Selectors pages in Adobe Illustrator API Reference.
  • Page 13: Core Message Actions

    1: Overview Plug-in entry point and messages 13 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 Selector Action to perform Restore any state information (globals). kSPAccessCaller kSPAccessReloadSelector (“SP Access”)
  • Page 14: Notifiers

    1: Overview Plug-in entry point and messages 14 HAPTER your plug-in implements a preferences suite that other plug-ins use, they may call you in their shut-down handlers after you already shut down. Notifiers Some message actions also are referred to as notifiers, indicating something in Illustrator was changed by the user;...
  • Page 15: Illustrator Api

    1: Overview Illustrator API 15 HAPTER struct SPBasicSuite *basic; } SPMessageData; If this is a valid message, the field contains SPCheck kSPValidSPMessageData field is a reference to the plug-in being called. The reference to the running plug-in’s is used self self to add plug-in suites, adapters, and other plug-in data to Illustrator.
  • Page 16: Acquiring And Releasing Suites

    Illustrator’s suite architecture, known as the Plug-in Component Architecture (PICA), also is found in the latest versions of Adobe Photoshop and other Adobe applications. The former term for PICA was Suite Pea (SP). Suites that are part of PICA all start with the suffix SP; for example,...
  • Page 17: Publishing Suites

    PIExportsProperty depend on exported suites can load and start up successfully on the first try. For more information on how to publish suites, see in Adobe Illustrator API SPSuitesSuite::AddSuite Reference and “Export property” on page Binary compatibility Illustrator makes its best effort to support binary compatibility across two previous product versions.
  • Page 18: Illustrator's Artwork As Seen By A Plug-In

    On Windows and Mac OS, byte alignment is to four-byte boundaries. System requirements The platforms supported for Illustrator plug-in development are documented in Getting Started with Adobe Illustrator CS5 Development. Platform requirements for Illustrator are defined in the product release notes.
  • Page 19: Helper Classes

    To fix this override the Create/Use Precompiled Header setting to be Not Using Precompiled Headers for the helper-class source file. For documentation on the classes provided, see Adobe Illustrator API Reference > Helper classes. Plug-in adapters Support for older plug-ins, as well as for Photoshop plug-ins, is provided through plug-in adapters, plug-ins that map API calls between Illustrator and the older or non-native APIs of the other plug-ins.
  • Page 20: Next Steps

    As of Illustrator CS3, the About Plug-ins dialog was removed. Next steps In this chapter, we introduced plug-ins for Adobe Illustrator, and defined several key concepts, including: Plug-in manager Plug-in types...
  • Page 21: Tutorial

    Tutorial This chapter describes the fundamentals of Illustrator plug-in programming, using as an example a plug-in called Tutorial that is provided on the SDK. Look for the sample project in the sample code folder on the SDK, and browse the source code while reading this chapter. The core characteristics of an Illustrator plug-in were introduced in Chapter 1, “Overview.
  • Page 22: Acquiring And Releasing Suites And Calling Suite Functions

    2: Tutorial Callers and selectors 22 HAPTER Acquiring and releasing suites and calling suite functions When your plug-in is first called, it knows about only one suite. The message data structure passed to all plug-ins has a member variable named , which points to the Basic suite (see ).
  • Page 23 2: Tutorial Callers and selectors 23 HAPTER typedef struct { AIFilterHandle filterVariation1; AIToolHandle toolVariation1; AIMenuItemHandle aboutPluginMenu; } Globals; Globals* g = nil; static AIErr StartupPlugin ( SPInterfaceMessage* message ) AIErr error = kNoErr; error = AcquireSuites( message->d.basic ); if (!error) { // Allocate our globals - Illustrator will keep track of these.
  • Page 24: Caller: Kspinterfacecaller, Selector: Kspinterfaceshutdownselector

    2: Tutorial Callers and selectors 24 HAPTER The options specify plug-in behavior to be provided by Illustrator. Filters do not have any special behavior but could use some default behavior options, like the kPluginWantsResultsAutoSelectedOption constant, which is used to control how artwork is selected when the plug-in returns control to Illustrator. The final argument is returned to the plug-in by Illustrator.
  • Page 25: Caller: Kspaccesscaller, Selector: Kspaccessunloadselector

    2: Tutorial Plug-in type-specific messages 25 HAPTER static AIErr ReloadPlugin( SPAccessMessage *message ) AIErr error = kNoErr; g = ( Globals* )message->d.globals; return error; Caller: kSPAccessCaller, selector: kSPAccessUnloadSelector The opposite of the reload selector is . This is an opportunity for the plug-in to kSelectorAIUnloadPlugin save any state information before being removed from memory.
  • Page 26: Tool Plug-Ins

    2: Tutorial Plug-in type-specific messages 26 HAPTER else if ( strcmp( selector, kSelectorAIGoFilter ) == 0 ) error = GoFilter( ( AIFilterMessage* )message ); When the user chooses your filter in the Object menu, your plug-in is first called with .
  • Page 27: Action Plug-Ins

    . This function draws path segments to each mouse-down ToolMouseDown Tutorial.cpp location. The location of the mouse is passed in the tool-message structure; see in Adobe AIToolMessage Illustrator API Reference. The tool message contains the basic plug-in data and a reference to the tool being used. The...
  • Page 28 The message struct sent DoAction Tutorial.cpp along with the . Documentation for this structure is in Adobe kDoActionSelector DoActionMessage Illustrator API Reference. It contains the recorded parameter values the action must replay. The DoAction function extracts the parameter values into its own data structure.
  • Page 29: Menu Plug-Ins

    Next steps To learn more about Illustrator plug-in programming, explore the samples provided in the SDK and the documentation in Adobe Illustrator API Reference. Instructions on running and debugging plug-ins are in Getting Started with Adobe Illustrator CS5 Development.
  • Page 30: Creating A Flash Ui For Plug-Ins

    C++ plug-in together with the program logic. To use a Flash UI, separate out the program logic into a C++ plug-in, and put the user-interface code into an Adobe Creative Suite extension. This is a set of files, delivered as a compiled Flash (SWF) file, that extends the capabilities of one or more Adobe Creative Suite applications.
  • Page 31: Communication Between Plug-Ins And Extensions

    The Adobe Creative Suite SDK provides developers with a consistent platform in which to develop and deploy extensions across the suite. Adobe Creative Suite extensions run in much the same way in all Adobe Creative Suite products, providing users with a rich and uniform experience.
  • Page 32: Using The Plugplug Api

    SDKPlugPlug::AddEventListener() static void OkClickedFunc (const csxs::event::Event* const event, void* const context); AddEventListener("com.adobe.csxs.events.OkClicked", OkClickedFunc, NULL); The first parameter is the event type, the second is the callback function, and the third is a user-specific context pointer or NULL. When the extension sends an event to the plug-in, it passes relevant data as a .
  • Page 33: Using The Csxs Api

    The CSXS ActionScript library provides an API that your Flash extension uses to interact with C++ plug-ins. For complete reference details, see the documentation provided with the Adobe Creative Suite SDK. To receive CSXS Events of a certain type in ActionScript, register a callback function for that event type using .
  • Page 34: Build The Flash Extension

    2. Accept the Extension disclaimer. 3. If the certificate does not belong to Adobe or a verified company, you are warned that the publisher cannot be verified. Click OK to proceed with the installation. 4. When the installation is complete, check that the FreeGridUI extension appears under Illustrator.
  • Page 35: Plug-In Property Lists

    Plug–in Property Lists A PiPL resource contains a list of properties that store information about a plug-in. Illustrator considers only those files with valid PiPL resources to be potential plug-ins. PiPL samples Sample PiPL resource files are provided on the SDK in source code form. All sample plug-ins in the SDK define their PiPLs in a resource source-code form.
  • Page 36: Optional Pipl Properties

    4: Plug–in Property Lists Optional PiPL properties 36 HAPTER Your plug-in also must have at least one code-descriptor property that tells Illustrator the entry point of your code. Code descriptors are available for Intel-based Mac OS, PowerPC-based Mac OS, and Windows-based plug-ins: Property key Description...
  • Page 37: For More Information

    /** The version of the suite to be exported. */ long fVersion; } MyExportDesc; For more information Adobe Illustrator API Reference describes the property names and associated data structures, such as . The sample plug-ins on the SDK show how to define a PiPL using native platform PIPropertyList resources.
  • Page 38: Index

    PICA (Plug-in Component Architecture), 16 action plug-ins, 27 PiPL (Plug-in property list) resources, 11 ActionScript, 30 plug-in types, 8 Adobe Creative Suite SDK, 30 publishing suites, 17 C++ plug-ins, integrating with Flash extensions, 30 releasing suites, 16, 22 callers, 12, 14...

This manual is also suitable for:

Illustrator cs5

Table of Contents