Important: The information in this document is obsolete and should not be used for new development.
Much of the communication between iMovie and your plug-in during the initialization phase is accomplished by passing settings information in a predefined HYPluginGetInfo structure. See “The HYPluginGetInfo Data Structure,” for more detail on this structure.
When the user selects a service from the menu in the Titles, Transitions, or Effects pane, iMovie calls the plug-in with the kPlugGetInfo selector. It is assumed that the plug-in has set the information in the HYPluginGetInfo data structure identified by HYPluginParams.getInfo. If, for some reason, the plug-in cannot run, it can return an error code and/or fill in 0 for the framesToBeRendered field of the HYPluginGetInfo structure.
A plug-in informs iMovie as to what type it is by setting HYPluginGetInfo.pluginType to one of the type constants shown in Table 1-1.
Constant name |
Notes |
|---|---|
|
Value: 0. Default value—no valid plug-in available. |
|
Value: 101. A title plug-in |
|
An effect plug-in |
|
A transition performed between two clips |
|
A transition performed before the current clip |
|
A transition performed after the current clip |
A transition is considered to be one of three types: before, between, or after. A between-type transition, the most common type, is displayed between two clips. An example of a before-type transition is a fade-in; it is displayed before the clip it fades in (and doesn’t require another clip in front of it). A fade-out is an example of an after-type transition.
iMovie then calls the plug-in with the kPlugInitialize selector. At this time the plug-in should set up any required data structures. The plug-in can attach arbitrary data to the HYPluginParams structure using the pointer in that structure’s clientData field. That pointer is then returned with each subsequent call. The plug-in is responsible for destroying such data during the termination phase of the session.
Part of the initialization phase is to set the default state of the user interface (UI) elements in the plug-in pane. The plug-in sets plug-in choice flags (HYPluginGetInfo.pluginFlags) to specify user interface elements to be enabled to accept user data, settings, and selections. Plug-in choice flags applicable to the Title, Transition, and Effects panes are shown in Table 1-2. (Flags for UI elements specific to a plug-in type are described below in a section for that plug-in type.)
Constant name |
Notes |
|---|---|
|
Value: |
|
Value: |
|
Value: |
|
Value: |
|
Value: |
|
Value: |
|
|
|
Value: |
The arrows in the directional button cluster on the left side in the Title, Transition, and Effects panes are enabled using the vertical and horizontal plug-in choice flags listed in Table 1-2. They can be ORed together to achieve the desired combinations.
If the plug-in enables the XYLocation flag, the iMovie small preview rectangle provides a cross-hair that the user can drag to specify an XY location. This feature was introduced in iMovie 2.1.1 and is ignored by prior versions
Last updated: 2007-09-04