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

Next Page > Hide TOC

WebPlugIn Protocol Reference

(informal protocol)

Framework
/System/Library/Frameworks/WebKit.framework
Availability
Available in Mac OS X v10.3.9 and later.
Declared in
WebPlugin.h
Companion guides

Overview

WebPlugIn is an informal protocol that enables interaction between an application using the Web Kit and any Web Kit-based plug-ins it may use.

Tasks

Accessing the Scripting Environment

Using Plug-in State Information

Controlling the Plug-in

Instance Methods

objectForWebScript

Returns an object that exposes the plug-in’s scripting interface.

- (id)objectForWebScript

Discussion

The methods of the object are exposed to the script environment. Messages sent to the returned object will be invoked in the scripting environment. See the WebScripting informal protocol for more details.

Availability
Declared In
WebPlugin.h

webPlugInDestroy

Prepares the plug-in for deallocation.

- (void)webPlugInDestroy

Discussion

Typically, this method releases the memory and other resources used by the plug-in. For example, if the receiver retained a WebPlugInContainer, this method should release that object. Do not send any other messages to the receiver after invoking this method—invoking this method destroys the receiver. No other methods in this interface may be called after the application has called this method.

Availability
Declared In
WebPlugin.h

webPlugInInitialize

Initializes the receiver.

- (void)webPlugInInitialize

Discussion

Tells the plug-in to perform one-time initialization. This method must be only called once per instance of the plug-in object and must be called before any other methods in this protocol.

Availability
Declared In
WebPlugin.h

webPlugInSetIsSelected:

Controls plug-in behavior based on its selection.

- (void)webPlugInSetIsSelected:(BOOL)selected

Discussion

Tells the plug-in whether or not it is currently selected. This may be used, for example, to change the plug-in’s appearance when it is selected by the user.

Availability
Declared In
WebPlugin.h

webPlugInStart

Tells the plug-in to start normal operation.

- (void)webPlugInStart

Discussion

The plug-in usually begins its primary task (such as drawing, playing sounds, or animating) in this method. This method may called more than once, provided that the application has already called webPlugInInitialize and that each call to this method is followed later by a call to webPlugInStop.

Availability
Declared In
WebPlugin.h

webPlugInStop

Tells the plug-in to stop normal operation.

- (void)webPlugInStop

Discussion

This method may be called more than once, provided that the application has already called webPlugInInitialize and that each call to this method is preceded by a call to webPlugInStart.

Availability
Declared In
WebPlugin.h

Next Page > Hide TOC


Last updated: 2006-05-23




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