IRC Log Viewer » #firebreath » 2013-05-23

IRC Nick Time (GMT-7) Message
pratikp2891991 02:05 Can anybody just tell me how to make a window and windowless plugin using firebreath...Does the onWindowAttached event doesn't get hit in windowless plugin?
pratikp2891991 04:05 Hey how do u Step into c++/CLI wrapper dll and c# dll during debug while making plugins on firebreath. My logic of plugin is all inside c# dll. so at runtime, I wanted to check the logic also
Bor0 04:05 does anyone have an example of using firebreath with ffmpeg and sdl to make a video player?
cshu 11:05 Hi, Does anyone know how to support object constructor in firebreath's JS API? Basically, I'd like to do JS binding in the plugin for something like "new objectA()". Thanks!
taxilian 12:05 there is a Construct method in FB::JSAPI
you need to handle that
not 100% sure it'll work on IE
but it shoudl work on other browsers
cahu: ^
bleh. cshu I mean
cshu 12:05 taxilian, thanks!
taxilian, what i found in the code is that the construct function only throws an exception. i am looking at JSAPIAuto::Construct
taxilian 12:05 that is correct
you need to override it so it doesn't throw an exception
in your API class
cshu 12:05 taxilian, i see.
taxilian, shall i call anything like registerMethod or registerProperty for "ObjectA"?
in its parent class?
taxilian 12:05 sorry, I don't understand the question
cshu 12:05 hmm, maybe i should go back to read the code more before i ask any question. :) thanks very much!
taxilian 12:05 not that the constructor will itself be an object
so you'll likely have ot create a jsapi object that will just act as a contructor
and will return a new instance of another jsapi object
cshu 12:05 taxilian, right.
taxilian, my question was how to hook "ObjectAConstructor" to an existing object, such as plugin()
taxilian 12:05 I'd probably expose it as a property
so yeah, registerProperty with the getter returning an instance of the contructor object
probably the same instance each time
cshu 12:05 taxilian, nice!
taxilian 12:05 as a thanks, you could document the process on firebreath.org once you get it working
most don't know that's possible
few bother to ask
cshu 12:05 taxilian, sure. i will do it if i figure out the whole thing
MindCalamity 13:05 Hello guys, any examples on implementing a text event function ?
I have this: http://pastebin.com/EgyCBXT5
But my function never gets called.
taxilian 13:05 this is on mac, I assume?
MindCalamity 13:05 Nope
Windows/Firefox
taxilian 13:05 I dont' know if text events are even implemented there
you'll have to look
MindCalamity 13:05 Oh
taxilian 13:05 it'd be in PluginWindowWin.cpp I think
honestly I don't even know what text events do on windows =]
MindCalamity 13:05 taxilian: I need some way to get input for the text keys, not just the function keys
Any alternative to text event ?
taxilian 13:05 are you using a windowless plugin?
or windowed?
MindCalamity 13:05 Windowed
taxilian 13:05 then you can use the WindowsEvent type, which will just give you the event exactly as it came to the winproc
MindCalamity 13:05 will that work for all platforms ? or just windows ?
taxilian 13:05 or you could fix the text event (whatever it is) in PluginWindowWin and submit a pull request
just windows
if you want to use the abstraction you'll probably have to fix it
MindCalamity 13:05 how do I handle the same thing on unix ?
taxilian 13:05 not a clue
MindCalamity 13:05 I see
I'll look into it then
Looks like a simple enough fix
taxilian 13:05 probably is
MindCalamity 13:05 Yeah, but making a crossplatform implementation would require adding FB::KeyCode entry for each letter, would you accept such an implementation as a patch ?
taxilian 13:05 I'd prefer an implementation that just returned the character as a char or string
in the case of text
MindCalamity 13:05 in that case we have ToAscii on windows, which should do the trick
http://msdn.microsoft.com/en-us/library/ms646316(VS.85).aspx
Is text event meant to be called for every key, or just the letter keys ?
taxilian 13:05 I haven't a clue
the text event currently is whatever the text event is on mac
which I dont' actually understand
I just plumbed in for the webview library
MindCalamity 13:05 what do you think about adding a string parameter to KeyEvent ?
taxilian 13:05 could possibly be convinced
cshu 14:05 taxilian, hi, may i bother you again? should be quick. thx
taxilian 14:05 whats up?
cshu 14:05 taxilian, i am trying to figure out how to pass a pointer back to the browser. shall i convert it to JSAPIPtr?
taxilian, i was using objA->shared_from_this() but the plugin crashed
taxilian 14:05 cshu: you shouldn't *ever* touch a pointer to a class except as a shared_ptr
to one of the JSAPI objects
except inside the class you can use this->
but you should instantiate it using boost::make_shared<ObjectAPI>(…) to create it
and you should only keep it inside a JSAPI object
you can return any JSAPI-derived object back to the browser as a boost::shared_ptr<ObjectAPI> (where ObjectAPI is the name of the class of course)
cshu 14:05 taxilian, i see an example MyTestPlugin::createJSAPI().
taxilian 14:05 you'll see things like FB::JSAPIPtr are actually just typedefs for boost::shared_ptr<FB::JSAPI>
cshu 14:05 taxilian, do i always need a class for ClassA and another class for ClassAAPI?
taxilian, never mind. :)
dougma 18:05 just noticed a wayward .svn dir in https://github.com/firebreath/firebreath-boost/tree/1.50.0/boost/process/detail
will fix when i'm back in front of my github app :)
taxilian 20:05 heh
dougma: I wonder how that got there
dougma 20:05 noticed when i tried to import it into my svn repo :)
taxilian 20:05 ugh =]