Table of contents
- 1. Plug-in Basics
- 2. Plug-in Development Overview
- 3. Initialization and Destruction
- 4. Drawing and Event Handling
- 5. Streams
- 6. URLs
- 7. Memory
- 8. Version, UI, and Status Information
- 9. Plug-in Side Plug-in API
- 10. Browser Side Plug-in API
- 11. Scripting plugins
- 12. Structures
- 13. Constants
- 14. External Resources
- 15. Original Document Information
Plug-in Basics
Plug-in Development Overview
- Writing Plug-ins
- Registering Plug-ins
- Drawing a Plug-in Instance
- Handling Memory
- Sending and Receiving Streams
- Working with URLs
- Getting Version and UI Information
- Displaying Messages on the Status Line
- Making Plug-ins Scriptable
- Building Plug-ins
- Installing Plug-ins
- Plug-in Installation and the Windows Registry
Drawing and Event Handling
Streams
- Receiving a Stream
- Telling the Plug-in When a Stream Is Created
- Telling the Plug-in When a Stream Is Deleted
- Finding Out How Much Data the Plug-in Can Accept
- Writing the Stream to the Plug-in
- Sending the Stream in Random-Access Mode
- Sending the Stream in File Mode
- Sending a Stream
- Creating a Stream
- Pushing Data into the Stream
- Deleting the Stream
- Example of Sending a Stream
Plug-in Side Plug-in API
This chapter describes methods in the plug-in API that are available from the plug-in object. The names of all of these methods begin with NPP_ to indicate that they are implemented by the plug-in and called by the browser. For an overview of how these two sides of the plug-in API interact, see the
How Plug-ins Work
and
Overview of Plug-in Structure
sections in the introduction.
Browser Side Plug-in API
This chapter describes methods in the plug-in API that are available from the browser. The names of all of these methods begin with NPN_ to indicate that they are implemented by the browser and called by the plug-in. For an overview of how these two sides of the plug-in API interact, see the
How Plug-ins Work
and
Overview of Plug-in Structure
sections in the introduction.
- NPN_DestroyStream
- Closes and deletes a stream.
- NPN_ForceRedraw
- Forces a paint message for a windowless plug-in.
- NPN_GetAuthenticationInfo
- Requires Gecko 1.9 This function is called by plugins to get HTTP authentication information from the browser.
- NPN_GetURL
- Asks the browser to create a stream for the specified URL.
- NPN_GetURLNotify
- Requests creation of a new stream with the contents of the specified URL; gets notification of the result.
- NPN_GetValue
- Allows the plug-in to query the browser for information.
- NPN_GetValueForURL
- Requires Gecko 1.9 Provides information to a plugin which is associated with a given URL, for example the cookies or preferred proxy.
- NPN_InvalidateRect
- Invalidates specified drawing area prior to repainting or refreshing a windowless plug-in.
- NPN_InvalidateRegion
- Invalidates specified drawing region prior to repainting or refreshing a windowless plug-in.
- NPN_MemAlloc
- Allocates memory from the browser's memory space.
- NPN_MemFlush
- Requests that the browser free a specified amount of memory.
- NPN_MemFree
- Deallocates a block of allocated memory.
- NPN_NewStream
- Requests the creation of a new data stream produced by the plug-in and consumed by the browser.
- NPN_PluginThreadAsyncCall
- Requires Gecko 1.9 Thread-safe way to request that the browser calls a plugin function on the browser or plugin thread (the thread on which the plugin was initiated).
- NPN_PopPopupsEnabledState
- Requires Gecko 1.8 Pops the popups-enabled state.
- NPN_PostURL
- Posts data to a URL.
- NPN_PostURLNotify
- Posts data to a URL, and receives notification of the result.
- NPN_PushPopupsEnabledState
- Requires Gecko 1.8 Pushes the popups-enabled state.
- NPN_ReloadPlugins
- Reloads all plug-ins in the Plugins directory.
- NPN_RequestRead
- Requests a range of bytes for a seekable stream.
- NPN_SetValue
- Sets windowless plug-in as transparent or opaque.
- NPN_SetValueForURL
- Requires Gecko 1.9 Allows a plugin to change the stored information associated with a URL, in particular its cookies.
- NPN_Status
- Displays a message on the status line of the browser window.
- NPN_UserAgent
- Returns the browser's user agent field.
- NPN_Version
- Returns version information for the Plug-in API.
- NPN_Write
- Pushes data into a stream produced by the plug-in and consumed by the browser.
Scripting plugins
External Resources
Original Document Information
- Copyright Information: Netscape Communication


Mozilla Developer Network