Gnash
0.8.10
|
#include <plugin.h>
Public Member Functions | |
nsPluginInstance (nsPluginCreateData *) | |
Constructor. | |
virtual | ~nsPluginInstance () |
Destructor. | |
NPBool | init (NPWindow *aWindow) |
Initialize an instance of the plugin object. | |
NPBool | isInitialized () |
void | shut () |
Shutdown an instantiated object. | |
NPError | GetValue (NPPVariable variable, void *value) |
NPError | SetWindow (NPWindow *aWindow) |
Set the window to be used to render in. | |
NPError | NewStream (NPMIMEType type, NPStream *stream, NPBool seekable, uint16_t *stype) |
Open a new stream. THis is called every time there is swf content. | |
NPError | DestroyStream (NPStream *stream, NPError reason) |
Destroy the stream. | |
int32_t | WriteReady (NPStream *stream) |
Can the stream be written to yet ? | |
int32_t | Write (NPStream *stream, int32_t offset, int32_t len, void *buffer) |
Read the data stream from Mozilla/Firefox. | |
NPObject * | getScriptableObject () |
const char * | getEmbedURL () const |
GnashPluginScriptObject * | getScriptObject () |
nsPluginInstance::nsPluginInstance | ( | nsPluginCreateData * | data | ) |
Constructor.
References gnash::key::i, gnash::key::n, gnash::HasScripting(), NPN_CreateObject(), and gnash::GnashPluginScriptObject::marshalGetNPClass().
nsPluginInstance::~nsPluginInstance | ( | ) | [virtual] |
Destructor.
References NPN_ReleaseObject(), gnash::gnashSleep(), and gnash::cleanup_childpid().
NPError nsPluginInstance::DestroyStream | ( | NPStream * | stream, |
NPError | reason | ||
) |
Destroy the stream.
Destroy the data stream we've been reading.
const char* gnash::nsPluginInstance::getEmbedURL | ( | ) | const |
NPObject* gnash::nsPluginInstance::getScriptableObject | ( | ) |
GnashPluginScriptObject* gnash::nsPluginInstance::getScriptObject | ( | ) | [inline] |
NPError nsPluginInstance::GetValue | ( | NPPVariable | variable, |
void * | value | ||
) |
References test::v, NPN_RetainObject(), and NS_PluginGetValue().
NPBool nsPluginInstance::init | ( | NPWindow * | aWindow | ) |
Initialize an instance of the plugin object.
This methods initializes the plugin object, and is called for every movie that gets played. This is where the movie playing specific initialization goes.
NPBool gnash::nsPluginInstance::isInitialized | ( | void | ) | [inline] |
References gnash::plugInitialized.
NPError nsPluginInstance::NewStream | ( | NPMIMEType | type, |
NPStream * | stream, | ||
NPBool | seekable, | ||
uint16_t * | stype | ||
) |
Open a new stream. THis is called every time there is swf content.
Open a new data stream.
Opens a new incoming data stream, which is the flash movie we want to play. A URL can be pretty ugly, like in this example: http://www.shockwave.com/swf/navbar/navbar_sw.swf?atomfilms=http%3a//www.atomfilms.com/af/home/&shockwave=http%3a//www.shockwave.com&gameblast=http%3a//gameblast.shockwave.com/gb/gbHome.jsp&known=0 ../flash/gui.swf?ip_addr=foobar.com&ip_port=3660&show_cursor=true&path_prefix=../flash/&trapallkeys=true"
NPError nsPluginInstance::SetWindow | ( | NPWindow * | aWindow | ) |
Set the window to be used to render in.
This sets up the window the plugin is supposed to render into. This calls passes in various information used by the plugin to setup the window. This may get called multiple times by each instantiated object, so it can't do much but window specific setup here.
References __FUNCTION__.
void nsPluginInstance::shut | ( | void | ) |
Shutdown an instantiated object.
This shuts down an object, and is called for every movie that gets played. This is where the movie playing specific shutdown code goes.
int32_t nsPluginInstance::Write | ( | NPStream * | stream, |
int32_t | offset, | ||
int32_t | len, | ||
void * | buffer | ||
) |
Read the data stream from Mozilla/Firefox.
References gnash::amf::write().
int32_t nsPluginInstance::WriteReady | ( | NPStream * | stream | ) |
Can the stream be written to yet ?
Return how many bytes we can read into the buffer.