Re: [webkit-dev] Pushing data to plugin

2009-03-24 Thread Jack Wootton
-Original Message- From: webkit-dev-boun...@lists.webkit.org on behalf of Jack Wootton Sent: Fri 3/20/2009 9:35 AM To: Alexey Proskuryakov Cc: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] Pushing data to plugin So I would have thought this would work inside the plugin

Re: [webkit-dev] Pushing data to plugin

2009-03-24 Thread Darin Adler
On Mar 24, 2009, at 2:36 AM, Jack Wootton wrote: But I have one question. Looking at the following structure: typedef struct _NPP { void*pdata;/* plug-in private data */ void*ndata;/* netscape private data */ } NPP_t; From reading the documentation

Re: [webkit-dev] Pushing data to plugin

2009-03-24 Thread Jack Wootton
OK, thanks for the clarification. On Tue, Mar 24, 2009 at 4:12 PM, Darin Adler da...@apple.com wrote: On Mar 24, 2009, at 2:36 AM, Jack Wootton wrote: But I have one question. Looking at the following structure: typedef struct _NPP {   void*    pdata;            /* plug-in private data */

Re: [webkit-dev] Pushing data to plugin

2009-03-20 Thread Jack Wootton
The functions you mention are NPP functions, which mean they are implemented by the plugin and invoked by the browser. this is the opposite of what my post was about. I am looking for functions that are implemented by the browser and can be called by the plugin to send data to the web page.

Re: [webkit-dev] Pushing data to plugin

2009-03-20 Thread Alexey Proskuryakov
20.03.2009, в 17:23, Jack Wootton написал(а): Does anyone have any experience with these functions? I am trying to use them but am getting link errors. Which library to i need to link against to use them? A plug-in gets pointers to these functions in an NPNetscapeFuncs structure passed

Re: [webkit-dev] Pushing data to plugin

2009-03-20 Thread Jack Wootton
Ah, I forgot about that. I have populated the Browser function pointer table with NPP_New, Destroy and GetValue, but not the others I need. Thank you for alerting me to this. Hopefully this should do it. 2009/3/20 Alexey Proskuryakov a...@webkit.org: 20.03.2009, в 17:23, Jack Wootton

Re: [webkit-dev] Pushing data to plugin

2009-03-20 Thread Jack Wootton
Hi, I'm unsure about how I can access the Browser functions. Assuming control is in a plugin instance object, and a plugin instance object is created using New. The parameter of type NPP is passed into the New method of the plugin instance object. Using this parameter I can access two pointers

Re: [webkit-dev] Pushing data to plugin

2009-03-20 Thread Alexey Proskuryakov
20.03.2009, в 18:15, Jack Wootton написал(а): I'm unsure about how I can access the Browser functions. You can see how this works in one of our example plug-ins. E.g., form TestNetscapePlugin: NPNetscapeFuncs *browser; // Mach-o entry points extern C { NPError

Re: [webkit-dev] Pushing data to plugin

2009-03-20 Thread Mugdha Jain
Wootton Sent: Fri 3/20/2009 9:35 AM To: Alexey Proskuryakov Cc: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] Pushing data to plugin So I would have thought this would work inside the plugin instance object method New (aInstance is of type NPP) NPNetscapeFuncs* browser

Re: [webkit-dev] Pushing data to plugin

2009-03-20 Thread Jack Wootton
/20/2009 9:35 AM To: Alexey Proskuryakov Cc: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] Pushing data to plugin So I would have thought this would work inside the plugin instance object method New (aInstance is of type NPP) NPNetscapeFuncs* browser = static_castNPNetscapeFuncs

[webkit-dev] Pushing data to plugin

2009-03-19 Thread Jack Wootton
Hi all, I have written a plugin which represents a new MIME type I wish the browser to be capable of handling. It runs fine is only used to provide an API. So, for example the plugin is used like this: /**/ embed type=application/my-new-mime-type HIDDEN=YES/embed var

Re: [webkit-dev] Pushing data to plugin

2009-03-19 Thread Sriram Neelakandan
myObj.HelloWorld(); U must register a NPAPI method Identifier with the browser using browser-getstringidentifiers and later implement the method in your NPP-Invoke. Invoke's NPVariant *result is the JS return value. Please read about all this and much more @