equal
deleted
inserted
replaced
299 // Query the associated PluginInst for information. |
299 // Query the associated PluginInst for information. |
300 // ----------------------------------------------------------------------------- |
300 // ----------------------------------------------------------------------------- |
301 // |
301 // |
302 NPError NpnGetValue(NPP aInstance, NPNVariable aVariable, void *aRetValue) |
302 NPError NpnGetValue(NPP aInstance, NPNVariable aVariable, void *aRetValue) |
303 { |
303 { |
|
304 TInt err = NPERR_NO_ERROR; |
304 |
305 |
305 switch (aVariable) { |
306 switch (aVariable) { |
306 |
307 |
307 case NPNVjavascriptEnabledBool: // Tells whether JavaScript is enabled; true=JavaScript enabled, false=not enabled |
308 case NPNVjavascriptEnabledBool: // Tells whether JavaScript is enabled; true=JavaScript enabled, false=not enabled |
308 // NEEDS IMPLEMENTATION |
309 // NEEDS IMPLEMENTATION |
352 PluginWin* pluginWin = (PluginWin*)aInstance->ndata; |
353 PluginWin* pluginWin = (PluginWin*)aInstance->ndata; |
353 NPObject* windowObject = pluginWin->windowScriptNPObject(); |
354 NPObject* windowObject = pluginWin->windowScriptNPObject(); |
354 if (windowObject) { |
355 if (windowObject) { |
355 void **v = (void **)aRetValue; |
356 void **v = (void **)aRetValue; |
356 *v = windowObject; |
357 *v = windowObject; |
357 return NPERR_NO_ERROR; |
358 } |
358 } |
359 else { |
359 return NPERR_GENERIC_ERROR; |
360 err = NPERR_GENERIC_ERROR; |
|
361 } |
|
362 break; |
360 } |
363 } |
361 case NPNVDOMWindow: |
364 case NPNVDOMWindow: |
362 case NPNVxDisplay: // Unix only: Returns the current Display |
365 case NPNVxDisplay: // Unix only: Returns the current Display |
363 case NPNVxtAppContext: // Unix only: Returns the application's XtAppContext |
366 case NPNVxtAppContext: // Unix only: Returns the application's XtAppContext |
364 case NPNVasdEnabledBool: // Tells whether SmartUpdate (former name: ASD) is enabled; |
367 case NPNVasdEnabledBool: // Tells whether SmartUpdate (former name: ASD) is enabled; |
375 *((TInt*) aRetValue) = apId; |
378 *((TInt*) aRetValue) = apId; |
376 break; |
379 break; |
377 |
380 |
378 |
381 |
379 default: |
382 default: |
|
383 { |
380 *((TBool*) aRetValue) = EFalse; |
384 *((TBool*) aRetValue) = EFalse; |
|
385 err = NPERR_INVALID_PARAM; |
|
386 } |
381 break; |
387 break; |
382 } // end of switch |
388 } // end of switch |
383 |
389 |
384 return NPERR_NO_ERROR; |
390 return err; |
385 |
391 |
386 } |
392 } |
387 |
393 |
388 // ----------------------------------------------------------------------------- |
394 // ----------------------------------------------------------------------------- |
389 // NpnSetValue |
395 // NpnSetValue |
460 break; |
466 break; |
461 case NPPVpluginFullScreenBool: |
467 case NPPVpluginFullScreenBool: |
462 { |
468 { |
463 NPBool* isFullScreen = (NPBool*)aSetValue; |
469 NPBool* isFullScreen = (NPBool*)aSetValue; |
464 PluginWin* pluginWin = (PluginWin*)aInstance->ndata; |
470 PluginWin* pluginWin = (PluginWin*)aInstance->ndata; |
465 pluginWin->TogleScreenMode(*isFullScreen); |
471 pluginWin->ToggleScreenMode(*isFullScreen); |
466 break; |
472 break; |
467 } |
473 } |
468 case NPPVPluginZoom: |
474 case NPPVPluginZoom: |
469 { |
475 { |
470 PluginWin* pluginWin = (PluginWin*)aInstance->ndata; |
476 PluginWin* pluginWin = (PluginWin*)aInstance->ndata; |