IRC Log Viewer » #firebreath » 2012-02-24

IRC Nick Time (GMT-7) Message
markh_ 04:02 Hello. I'm new to FireBreath. I am wanting to convert my standard NPAPI plugin to the FireBreath framework.
My plugin's functionalilty is all contained within a custom window class (and it's child windows) the moment. Let's call this "myPluginWindowClass". This window class is created and owned by the nsPluginInstanceBase derived class and uses it's NPWindow as a parent.
My question is that in the FireBreath framework, which class should own myPluginWindowClass? Should it be the PluginCore derived class or the JSAPIAuto derived class. I was initially thinking it should be PluginCore. However, the BasicMediaPlayer example effectively seems to have the actual plugin functionality owned by JSAPIAuto.
Jake__ 04:02 hey guys... how can I use the boost tokenizer in firebreath?
linearray 05:02 markh_: plugincore
basicmediaplayer is not a good example unfortunately
markh_ 05:02 thanks linearray
I will obviously maintain a reference to myPluginWindowClass in the JSAPIAuto derived class. Presumably I will need to make this invalid in onWindowDetached?
ch 06:02 yeah
linearray 06:02 you can also go via the weak_ptr to the PluginCore class
reichi 06:02 mmh is there a straight-forward way to get notified about window-size changes?
dougma 06:02 reichi: you are windowless presumably?
it calls setWindowPosition
it = Firebreath
reichi 06:02 mmh
in PluginCore?
well yes
it's a little bit tricky here
basically i am windowsless
but i need to know the window position and dimensions to cut a whole at that place
but that happens even outside the browser
dougma 06:02 so you're saying you want your screen-relative position?
reichi 06:02 that doesn't matter
i know the browser dimensions etc
i can calculate the absolute position
but in my case the browser is always 0,0,100%,100%
(fullscreen if you want to call it so)
dougma 06:02 so is setWindowPosition not useful?
reichi 06:02 if you tell me where setWindowPosition is hidden ;9
i may be
dougma 06:02 !find setWindowPosition
FireBreathBot 06:02 Found 3 possible matches. Displaying 3
/^void PluginWindowlessWin::setWindowPosition(FB::Rect pos) {$/ (f) found in src/PluginAuto/Win/PluginWindowlessWin.cpp:
/^void PluginWindowlessWin::setWindowPosition(int32_t x, int32_t y, uint32_t width, uint32_t height) {$/ (f) found in src/PluginAuto/Win/PluginWindowlessWin.cpp:
/^void PluginWindowX11::setWindowPosition(int32_t x, int32_t y, uint32_t w, uint32_t h)$/ (f) found in src/PluginAuto/X11/PluginWindowX11.cpp:
reichi 06:02 ah
well it's gets better
because i have my own platform-classes for that ;)
dougma 06:02 so you ca solve it then! :)
reichi 06:02 without interfering with FB, yes
or messing with...
ty :)
dougma 06:02 np! :)
reichi 06:02 oh
there's a ResizedEvent
dougma 06:02 oh yeah... i guess that's what i was trying to get to :/
reichi 06:02 well i just have to see how i can attach to those
MBarni 06:02 can someone guide to an example of using an windows dll over a browser plugin?
dougma 06:02 MBarni: have you looked at the firebreath examples? and, do yo know c++?
MBarni 06:02 my knowledge in c++ if very poor.
dougma 06:02 then you'll find firebreath tricky because it's a c++ framework, but maybe you'll find the examples a good starting point to hack on
MBarni 06:02 is there any particular example closer to the aproach I want to follow?
is firebreath the best aproach?
reichi 06:02 i think FB rocks
native NPAPI is really painful
dougma 06:02 browser plugins are not easy. FB helps a lot!
if you can do it without a plugin, pursue that route.
MBarni 06:02 =/
no way... my website will need to acess a Windows Pocket PC
dougma 06:02 whoa!
windows pocket pc? windows ce?
MBarni 06:02 that is done by using a dll... rapi.dll
windows mobile 4, 5 and 6
dougma 06:02 right... does the browser on win mobile 4,5,6 even support activex?
MBarni 06:02 that`s not the flow
i`ll connect the PocketPC
on the Desktop PC
dougma 06:02 oh!
MBarni 06:02 and the desktop will acess the website and give the permission
to acess the mobile...
too hard to do that?
dougma 06:02 well. hard for me to answer that.
do you know this rapi.dll?
have you programmed against it before?
what browsers do you want to support?
MBarni 06:02 yes... there`s also a better API called OpenNETCF
dougma 06:02 will your plugin do any drawing?
MBarni 06:02 firefox, chrome.
no drawings...
dougma 06:02 if you stick to making a pure invisible plugin it's easier
MBarni 06:02 just allow the website to push some files into the pocket pc
dougma 06:02 and that's where FB rocks - in abstracting the scripting interface between browser and plugin
MBarni 06:02 ok...
dougma 06:02 look at FBTestPlugin, it shows off the scripting interface. but if you're not into c++ it may not mean much.
still... it's hard. :)
MBarni 06:02 :/
reichi 07:02 mmh
it seems I am not getting any WindowAttached/Resized/Whatsoever Events at all
don't like :/
reichi 07:02 dougma: shouldn't SetWindow be called in ANY case?
because it doesn't seem to be called at all
taxilian 07:02 reichi: what browser, OS?
reichi 07:02 oh, that's tricky ;9
qtwebkit, linux
taxilian 07:02 then who knows? I have no idea
reichi 07:02 :)
taxilian 07:02 I'd add some logging to NpapiPluginX11
and see what is being called
reichi 07:02 i guess i'd have to :)
i'll check isWindowsLess, too
taxilian 08:02 SetWindow on that should be getting called, but it's possible that QTWebKit does things differently; it may not support XEmbed, for example, and FireBreath currently only supports XEmbed windows
reichi 08:02 mmh
maybe i am misinterpreting the thing...
yes i am...
taxilian: it seems to be my fault ;)
taxilian 08:02 oh, good ;-)
reichi 08:02 well it thought the "Window" is the part where my plugin is palced
placed even
within the page
but from what i'm reading right now i am wrong there
ch 10:02 taxilian: do you have any ideas why LINK would run twice when building my plugin from within VS2010?
(both times it says npmyplugin.lib/exp)
taxilian 10:02 twice for the same target?
reichi 12:02 hmm taxilian, as it is still miraculous for me...
what's the actual correct way to determine position and size of my plugin
taxilian 12:02 ->getWindowSize()
I think
position isn't there
just size
hmm. or is it? It depends on the drawing model and such
reichi 12:02 well
i guess there's too much of my stuff in there to bother you with that ;)
taxilian 12:02 !find Window
FireBreathBot 12:02 Found 11 possible matches. Displaying 5
/^Window::Window(FB::JSObjectPtr obj, IWebBrowser2 *web)$/ (f) found in src/ActiveXCore/AXDOM/Window.cpp:
/^ class Window : public virtual FB::DOM::Window, public virtual Node$/ (c) found in src/ActiveXCore/AXDOM/Window.h:
/^Window::Window(const FB::JSObjectPtr& element) : Node(element)$/ (f) found in src/ScriptingCore/DOM/Window.cpp:
/^ class Window : public virtual Node$/ (c) found in src/ScriptingCore/DOM/Window.h:
/^ WindowContextWin(HWND handle) $/ (f) found in src/PluginCore/Win/WindowContextWin.h:
umesh 13:02 Can anyone help me in reading the minidump files on windows which are of plugin process using firebreath
EL45 15:02 Hi all. Quick question. I have noticed that while using firefox, the plugin-container.exe doesn't close after exiting the page that uses my plugin. I this normal, or am I holding on to resources and preventing things from shutting down?
This causes me to have to manually end the process to re-compile while in development.
taxilian 15:02 that's normal
EL45 15:02 Ok great. Is StaticDeinitialize called when it is finally cleaned up?
taxilian 15:02 hypothetically? yes
EL45 15:02 Haha. Ok. Thank you.
ch 16:02 taxilian: yeah, same target
taxilian 17:02 referring to...?
ch 17:02 LINK running twice