[webkit-dev] How to get window/view reference with NSAPI on Mac OS X 10.6 [Snow Leopard]?

Doug Hill doughill at grouplogic.com
Fri Jul 17 13:11:23 PDT 2009

   Thanks for the quick reply and, good point.   I'm trying to register drag/drop handlers so my plugin can receive drops from another process, e.g. the Finder.  Under Carbon, I get the windowRef and attach DragManager handlers and hey presto it works since Drag Manager tracking, etc. is global to the application.   I've got it working with a WebKit plugin by calling registerForDraggedTypes() on the NSView I create and return to WebKit in response to plugInViewWithArguments.  I was assuming that I could do something similar inside a Netscape plugin once I managed to acquire a suitable NSView*.    And thus began my quest and reading of WebKit and Moz source....

I should mention that I am only targeting FF and WebKit at the moment and with my business requirements that's unlikely to change anytime soon.


On 7/17/09 3:44 PM, "Avi Drissman" <avi at google.com> wrote:

On Fri, Jul 17, 2009 at 3:35 PM, Doug Hill <doughill at grouplogic.com> wrote:
In a Netscape plugin, if NPDrawingModelQuickDraw and NPEventModelCarbon are not available   :-)   how does one get a reference to the window or NSView that a plugin is contained in?

It is a bad assumption to make that you are in a window or NSView in the first place.

Using Chromium as an example (a browser I work on), plugins are hosted in a separate process. The window in which the user sees their drawing is in an entirely different process and wouldn't be accessible to the plugin anyway.

What are you trying to do?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090717/30f0c8c9/attachment.html>

More information about the webkit-dev mailing list