0

Is there any way to cast HWND FB::PluginWindowWin::getBrowserHWND to NSWindow *? The reason why I need this, is to interact with Browser window, from my Cocoa app for OSX, (like open sheet on it,etc..). If there is no way, how else it can be done, any idea?

Thanks a lot.

User1234
  • 2,362
  • 4
  • 27
  • 57
  • `PluginWindowWin` is Windows specific. Furthermore, there is no (defined) access to windows for plugins on OS X. – Georg Fritzsche Mar 17 '13 at 21:39
  • Thanks. So there is no other way to open Cocoa app, on browser window? – User1234 Mar 18 '13 at 05:37
  • @taxilian Is there something like PluginWindowWin for OSX? Can I draw something using FireBreath plugin on Browser in OSX? Or there is now way even get plugin window for OSX? I'm new at this, and don't have experience how it can be done. Thanks! – User1234 Mar 18 '13 at 13:06
  • Let me state this very very clearly: There is no way to get the Browser NSWindow from a NPAPI plugin on Mac. – taxilian Mar 18 '13 at 13:41
  • @taxilian Unfortunately.. I was trying to port something to OSX that was already done on Windows..and I'm using FireBreath it's AWESOME. Thanks! – User1234 Mar 18 '13 at 13:44
  • If the answer is correct, please mark it correct. – taxilian Mar 19 '13 at 03:30

1 Answers1

2

You can't get the NSWindow from a Mac NPAPI plugin. Back in the day of carbon it used to be possible to get some of them, but it was never a supported feature, just something that happened to work in some versions.

Sorry for the bad news

taxilian
  • 14,229
  • 4
  • 34
  • 73
  • Thanks for a response. Is there any alternative way to do that? – User1234 Mar 18 '13 at 05:32
  • 1
    What do you mean "alternative"? As he said, you *can't* do it. Pretty much all browsers now run NPAPI plugins in a different process, and it is *impossible* to get an NSWindow* in process A to a window that exists in process B. OS X simply doesn't work that way. It's not a Firebreath limitation, or even an NPAPI limitation, so you can't just work around it. – smorgan Mar 18 '13 at 11:46
  • Ok thanks a lot. With saying "alternative" I mean any workaround to open my Cocoa app as a sheet on Browser Window (modal), (on Windows version we were able to do that). – User1234 Mar 18 '13 at 12:41
  • There is no sure way that I know of that you can find the browser window from a plugin. – taxilian Mar 18 '13 at 13:41