Exemplo n.º 1
0
static NPObject *pluginAllocate(NPP npp, NPClass *theClass)
{
    PluginObject* newInstance = (PluginObject*)malloc(sizeof(PluginObject));

    if (!identifiersInitialized) {
        identifiersInitialized = true;
        initializeIdentifiers();
    }

    newInstance->npp = npp;
    newInstance->testObject = browser->createobject(npp, getTestClass());
    newInstance->rememberedObject = 0;
    newInstance->eventLogging = FALSE;
    newInstance->onStreamLoad = 0;
    newInstance->onStreamDestroy = 0;
    newInstance->onDestroy = 0;
    newInstance->onURLNotify = 0;
    newInstance->onSetWindow = 0;
    newInstance->logDestroy = FALSE;
    newInstance->logSetWindow = FALSE;
    newInstance->returnErrorFromNewStream = FALSE;
    newInstance->stream = 0;

    newInstance->firstUrl = NULL;
    newInstance->firstHeaders = NULL;
    newInstance->lastUrl = NULL;
    newInstance->lastHeaders = NULL;

    newInstance->testDocumentOpenInDestroyStream = FALSE;
    newInstance->testWindowOpen = FALSE;
    newInstance->testKeyboardFocusForPlugins = FALSE;

    return (NPObject*)newInstance;
}
Exemplo n.º 2
0
// Constructor
GnashPluginScriptObject::GnashPluginScriptObject(NPP npp)
    : nppinstance (npp),
      _controlfd(-1),
      _hostfd(-1)
{
//    log_debug(__PRETTY_FUNCTION__);
    
    initializeIdentifiers();

}
Exemplo n.º 3
0
// Constructor
GnashPluginScriptObject::GnashPluginScriptObject(NPP npp)
    : _nppinstance (npp)
{
//    log_debug(__PRETTY_FUNCTION__);
    
    initializeIdentifiers();

    _sockfds[READFD] = 0;
    _sockfds[WRITEFD] = 0;
}
Exemplo n.º 4
0
static NPObject* testAllocate(NPP /*npp*/, NPClass* /*theClass*/)
{
    TestObject* newInstance = static_cast<TestObject*>(malloc(sizeof(TestObject)));
    newInstance->testObject = 0;
    ++testObjectCount;

    if (!identifiersInitialized) {
        identifiersInitialized = true;
        initializeIdentifiers();
    }

    return reinterpret_cast<NPObject*>(newInstance);
}
NPObject *pluginAllocate(NPP npp, NPClass *theClass)
{
    PluginObject *newInstance = malloc(sizeof(PluginObject));
    
    if (!identifiersInitialized) {
        identifiersInitialized = true;
        initializeIdentifiers();
    }

    newInstance->movieObject = (MovieObject *)browser->createobject(npp, getMovieClass());
    newInstance->npp = npp;

    return &newInstance->header;
}
static NPObject *pluginAllocate(NPP npp, NPClass *theClass)
{
    PluginObject *newInstance = (PluginObject*) malloc(sizeof(PluginObject));
    newInstance->header._class = theClass;
    newInstance->header.referenceCount = 1;
    
    if (!identifiersInitialized) {
        identifiersInitialized = true;
        initializeIdentifiers();
    }
    
    newInstance->npp = npp;

    return &newInstance->header;
}
Exemplo n.º 7
0
NPObject *pluginAllocate (NPP npp, NPClass *aClass)
{
    PluginObject *newInstance = (PluginObject *)malloc (sizeof(PluginObject));
    
    if (!identifiersInitialized) {
        identifiersInitialized = true;
        initializeIdentifiers();
    }

    newInstance->npp = npp;
	newInstance->referenceCount = 1;
	newInstance->port.UTF8Length = 0;
	newInstance->port.UTF8Characters = NULL;
	newInstance->socket = -1;

    return (NPObject *)newInstance;
}
Exemplo n.º 8
0
static NPObject *pluginAllocate(NPP npp, NPClass *theClass)
{
    PluginObject* newInstance = (PluginObject*)malloc(sizeof(PluginObject));

    if (!identifiersInitialized) {
        identifiersInitialized = true;
        initializeIdentifiers();
    }

    newInstance->pluginTest = 0;
    newInstance->npp = npp;
    newInstance->testObject = browser->createobject(npp, getTestClass());
    newInstance->rememberedObject = 0;
    newInstance->eventLogging = FALSE;
    newInstance->onStreamLoad = 0;
    newInstance->onStreamDestroy = 0;
    newInstance->onDestroy = 0;
    newInstance->onURLNotify = 0;
    newInstance->onSetWindow = 0;
    newInstance->onPaintEvent = 0;
    newInstance->logDestroy = FALSE;
    newInstance->logSetWindow = FALSE;
    newInstance->returnErrorFromNewStream = FALSE;
    newInstance->returnNegativeOneFromWrite = FALSE;
    newInstance->stream = 0;

    newInstance->firstUrl = 0;
    newInstance->firstHeaders = 0;
    newInstance->lastUrl = 0;
    newInstance->lastHeaders = 0;

    newInstance->testGetURLOnDestroy = FALSE;
    newInstance->testWindowOpen = FALSE;
    newInstance->testKeyboardFocusForPlugins = FALSE;

    newInstance->mouseDownForEvaluateScript = FALSE;
    newInstance->evaluateScriptOnMouseDownOrKeyDown = 0;

    return (NPObject*)newInstance;
}
Exemplo n.º 9
0
static NPObject *pluginAllocate(NPP npp, NPClass *theClass)
{
    PluginObject *newInstance = (PluginObject*)malloc(sizeof(PluginObject));
    
    if (!identifiersInitialized) {
        identifiersInitialized = true;
        initializeIdentifiers();
    }

    newInstance->npp = npp;
    newInstance->testObject = browser->createobject(npp, getTestClass());
    newInstance->eventLogging = FALSE;
    newInstance->logDestroy = FALSE;
    newInstance->logSetWindow = FALSE;
    newInstance->returnErrorFromNewStream = FALSE;
    newInstance->stream = 0;
    
    newInstance->firstUrl = NULL;
    newInstance->firstHeaders = NULL;
    newInstance->lastUrl = NULL;
    newInstance->lastHeaders = NULL;
    
    return (NPObject *)newInstance;
}