Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Initialization Phase

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.

Table 1-1  Valid plug-in type constants

Constant name

Notes

kPluginUnknownType

Value: 0. Default value—no valid plug-in available.

kPluginTitleType

Value: 101. A title plug-in

kPluginFilterType

An effect plug-in

kPluginTransitionBetweenType

A transition performed between two clips

kPluginTransitionBeforeType

A transition performed before the current clip

kPluginTransitionAfterType

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.

Enabling User Interface Elements

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.)

Table 1-2  Plug-in choice flag constants

Constant name

Notes

kPluginChoiceVertical

Value: 1L. Enable up and down buttons

kPluginChoiceHorizontal

Value: 2L. Enable left and right buttons

kPluginChoiceSpeed

Value: 4L. Enable speed slider

kPluginChoiceAll

Value: 7L. Enable up, down, left, right buttons and speed slider

PLUGIN_COMBO_VERTICAL

Value: 5L. Enable up, down buttons and speed slider

PLUGIN_COMBO_HORIZONTAL

Value: 6L. Enable left, right buttons and speed slider

PLUGIN_COMBO_NOMOTION

kPluginChoiceXYLocation

Value: 1024L. Enable X,Y coordinate selection.

Directional Arrows

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.

X,Y Location

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



< Previous PageNext Page > Hide TOC


Last updated: 2007-09-04




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice