npapi

Hosting Flash won't load swf ressources (xml, image, etc.)

馋奶兔 提交于 2019-12-30 05:11:26
问题 I tried to achieve at first a swf reader with gtk2 on my unix machine. Worked, I could render simple swf files. Now, I'm trying to add a configuration to my flash file with xml configuration, add image, etc. Failed, won't get pass geturlnotify(). Here's my code: #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> #include <string.h> #include <unistd.h> #include <ctype.h> #include <gtk/gtk.h> #include <gdk/gdkx.h> #include "npupp.h" #define FLASH_PLUGIN_SO "./libflashplayer.so" void

Google Chrome Extension: Print the page silently

守給你的承諾、 提交于 2019-12-29 04:14:07
问题 I'm developing an internal Google Chrome Extension that needs a way to initiate print the current page to the printer. I do not want the default Print dialog to come up (so, javascript:window.print() is out of question). As far as I understand, this is not possible just with the JS + HTML plug-in, so I'm also open to using the NPAPI plugin also (with a dummy mime-type). And I'm concerned for Windows platform only. I'm also open for various hacks / workarounds if possible, though a standard

Embedded Webkit - script callbacks how?

江枫思渺然 提交于 2019-12-28 10:10:32
问题 On windows, when the "Shell.Explorer" ActiveX control is embedded in an application it is possible to register an "external" handler - on object that implements IDispatch, such that scripts on the web page can call out to the hosting application. <button onclick="window.external.Test('called from script code')">test</button> Now, ive moved to Mac development and thought I could get something similar working from WebKit embedded in my Cocoa application. But, there really doesn't seem to be any

How to write a browser plugin?

╄→尐↘猪︶ㄣ 提交于 2019-12-27 10:31:09
问题 I'm curious as to the procedure for writing browser plugins for browsers like Chrome, Safari, and Opera. I'm thinking specifically of Windows here and would prefer working with C++. Are there any tools or tutorials that detail the process? Note : I am not referring to extensions or 'addons'. I'm referring to a plugin similar to how Flash and Adobe Reader have plugins to handle specific content-types. 回答1: As others point out, plugins for those browser are written using the NPAPI. Note: Both

Can a plugin(for safari on mac) be made windowed or windowless programmatically?

馋奶兔 提交于 2019-12-25 16:09:11
问题 We are making a plugin for safari browser on mac. After browsing over internet, i found that generally plugins on mac are windowless but i want a windowed plugin. Even in function NPP_SetWindow i tried to print the value of variable type (which is of type NPWindowType ) as following: NPError NPP_SetWindow(NPP instance, NPWindow * pNPWindow) { ... printf("....: %d",pNPWindow->type); ... } It prints 2 i.e its value is NPWindowTypeDrawable means windowless. Moreover, I read the following code

Scriptable plugin: Error calling method on NPObject

﹥>﹥吖頭↗ 提交于 2019-12-25 05:11:09
问题 I am getting a JavaScript error: Error calling method on NPObject when calling a method in my NPAPI plugin in Chrome & Firefox on XP. Running the same code on Windows 7 with the same browsers was successful. I have built a Scriptable plugin using the NPAPI, so far I can debug into the Invoke method of my scriptable object. But I don't believe I have any control after it's finished. Does anyone have any ideas? Is this an issue only in Windows XP? bool MY_ScriptableObject::Invoke(NPObject*

NPAPI: Basic usage of NPN_RequestRead

余生长醉 提交于 2019-12-25 03:58:22
问题 I am trying to understand how NPN_RequestRead should be used when writing an NPAPI plugin. The documentation looked at first pretty clear but I still cannot make the plugin work so far. Here is my goal: implement a JPEG 2000 plugin using NPAPI. To have a proper implementation I need to access the JPEG 2000 stream using random access. In my case images are huge (100000x100000 RGB), but can efficiently be displayed using the first few bytes (thanks to multiresolution !). As far I can tell I

How to create a new JS object using NPAPI?

馋奶兔 提交于 2019-12-25 03:46:31
问题 I'm writing an NPAPI plugin. In C++ code, I can't create a JS object using NPAPI. I tried this method: Foo.js function Foo(p) { this.a=p; } Foo.prototype.get=function() { return this.a; } C++ code (I want to create the Foo object. Just link what we can do in JS . var s=new Foo(2);) int newJSObject(const NPP instance,const NPNetscapeFuncs* npnfuncs,const string objectName, const NPVariant* args,const int argsCount,NPVariant& result) { int status; NPObject *winobj; npnfuncs->getvalue(instance

mac10.8 NPAPI plugin not load on opera

半城伤御伤魂 提交于 2019-12-25 03:28:19
问题 I write a web plugin on mac10.8 with Xcode4.5,it can work on safari,firefox, but it can't work on opera,the question is opera can't load my plugin,the easy question is it can'n execute the function "NP_GetEntryPoints" and "NP_Initialize", and i don't know how to resolve the problems. somebody can help me,thank you very much. 回答1: It wouldn't surprise me if you are building it 64 bit and Opera may not support 64 bit plugins (but both firefox and Safari do). Make sure you're building it 32 bit

mac10.8 NPAPI plugin not load on opera

寵の児 提交于 2019-12-25 03:28:09
问题 I write a web plugin on mac10.8 with Xcode4.5,it can work on safari,firefox, but it can't work on opera,the question is opera can't load my plugin,the easy question is it can'n execute the function "NP_GetEntryPoints" and "NP_Initialize", and i don't know how to resolve the problems. somebody can help me,thank you very much. 回答1: It wouldn't surprise me if you are building it 64 bit and Opera may not support 64 bit plugins (but both firefox and Safari do). Make sure you're building it 32 bit