IRC Log Viewer » #firebreath » 2011-09-15

IRC Nick Time (GMT-7) Message
donho 01:09 Hi there
FireBreathBot 01:09 JIRA issue issue created by hasa
Fb 03:09 anyone there?
linearray 03:09 "For the web to move forward and for consumers to get the most out of touch-first browsing, the Metro style browser in Windows 8 is as HTML5-only as possible, and plug-in free."
what's up, fb?
taxilian 09:09 !find evaluateJavascript
FireBreathBot 09:09 Could not find any tags matching evaluateJavascript
taxilian 09:09 !findfile NpapiBrowserHost
FireBreathBot 09:09 Found 4 matching file(s) in the master branch. First 4 are:
Jega 09:09 Hi there. I am looking for some tips to render PDF files inside a plugin window. Perhaps MuPDF. any thoughts?
taxilian 09:09 which OS?
Jega 09:09 Windows
Liminting to chrome and FF is okey
No support needed for IE
taxilian 09:09 well, I've never used MuPDF (or any other PDF rendering lib on windows) but I don't know of a reason it wouldn't work; keep in mind that if you distribute it you'd have to license the whole thing under the GPL, though
Jega 09:09 spoke to MuPDF team and ready to get a commercial license
the pb is they do have a NPAPI plug in which is very stale and no longer supported
its been removed from their latest revision
taxilian 09:09 ahh. well, like I said; it may very possibly work. I'd test it with the GPL version and get it working before you pay, just in case
one thing to note
Jega 09:09 pls
taxilian 09:09 FireBreath does not currently support full page mode; i.e. the mode that acrobat uses when you load a PDF and it displays it in a browser and there is no page? we don't have support for that
mostly because I've never needed it and because we don't know how to do it in IE
however, if you want it to display in an object tag that should be doable; alternately, you could add support for full page mode
probably not hard, if you don't care about IE
Jega 09:09 true.
i have seen you replying to some one or like that, worked on pdf on stackoverflow. could you share your experience?
taxilian 09:09 I thought I just did
Jega 09:09 thx.
taxilian 09:09 good luck =]
Jega 09:09 btw, the work you did. amazing. keep it up
I enjoyed my time with FB
taxilian 09:09 glad you like it; please feel free to contribute back in whatever way you can =] the documentation needs particular work, and examples are always good
Jega 09:09 Of course. I will do
chris2_ 10:09 hey, does anyone know if NPN_PluginThreadAsyncCall is suppost to work in safari?
taxilian 10:09 yes, it is supposed to
it doesn't always, but it is supposed to
chris2_ 10:09 hmmm I'm getting an undefined symbol linker error, so i guess its likely just my environment
i guess the alternative is to raise your own custom event and have the main thread act on it
taxilian 10:09 no no no no
undefined linker error means you haven't defined the function
you don't link in NPN_ functions
you get them in a function pointer struct
if you watn the actual NPN_PluginThreadAsyncCall function to work you need to create a wrapper
chris2_ 10:09 ok I'll check the struct, your saying to add an entry to function pointer map for NPN_PluginThreadAsyncCall?
_marks 11:09 Having a problem adding a framework to my mac plugin. Followed ...
but I don't see the framework in the link command.
taxilian 11:09 chris2_: find in your project wherever the other NPN_ functions are defined; then add another one
the entry in the function pointer map is already there
alternately, just use FireBreath which solves that and about a dozen other closely related issues
_marks: pastebin me the cmake files you changed
FireBreathBot 11:09 When you need to share code, logs, or anything else longer than a couple of lines, use a pastebin.,, and are all good options
_marks 11:09 @taxilian thx. i added CoreAudio and AudioUnit.
taxilian 11:09 _marks: no commas in cmake commands
lines 34 adn 35
_marks 11:09 haha nice
taxilian 11:09 also, sometimes in xcode things show up in unusual places
so I'd build it before I assumed that it wasn't there
cmake often does things a little oddly in xcode, as far as finding the changes it made in the UI
_marks 11:09 thx. i knew it wasn't there; undefined symbols
taxilian 11:09 okay
chris2_ 11:09 taxilian: thanks I can see what I was doing wrong. Just read the tutorial, finally some good documentation on NPAPI
taxilian 11:09 … which is sad, since I wrote that, like, 3 years ago and it's still about the best out there.
_marks 11:09 @taxilian thx, totally working now. FB is helping me a lot.
taxilian 11:09 if it's helpful, please contribute back in any way that you can; documentation could still use a lot of love, for example, and we can always use more example code for new users
you're also welcome to contribute monetarily to support server costs as well, of course =]
_marks 11:09 i'll keep an eye out for a way to contribute
chris2_ 11:09 agreed, i think a clean, up to date, well documented plugin example would be great. I've just started with NPAPI and have put together a plugin by reading snippets here and there.
taxilian 11:09 chris2_: any reason you're doing it by hand instead of using FireBreath?
chris2_ 11:09 size
taxilian 11:09 heh. let me know how much smaller it is, I'll be curious
chris2_ 11:09 and also a bit for understanding whats going on
taxilian 11:09 make sure you test it a lot on 64 bit safari; I've had issues with PluginThreadAsyncCall randomly not working (not being provided by the browser) in Safari
chris2_ 11:09 i started out building firebreath and that went pretty painlessly, got it compiling pretty quick
taxilian 11:09 we finally changed things so that we're not even using that function on Mac
because it kept causing crashes
FireBreath has a lot of workarounds for strange browser behaviors
chris2_ 11:09 so your sending your own event? i'm guessing not using window style events and loop
taxilian 11:09 !findfile OneShotManager
FireBreathBot 11:09 Found 2 matching file(s) in the master branch. First 2 are:
taxilian 11:09 we're using that
chris2_ 11:09 k thx
right so it looks like a boost protected queue
taxilian 11:09 you can implement the queue in several different ways; the key here is that you need to be able to handle things if the plugin shuts down after you schedule the task and before it runs
chris2_ 11:09 "performSelectorOnMainThread" so this is a cocoa framework
taxilian 11:09 yes
incidently NPN_PluginThreadAsyncCall works similarly; it does not guarantee that the callback will occur if the plugin shuts down after scheduling it
cross thread calls are about the most complex problem that we had to solve in FireBreath; doesn't seem like it would be that hard, but most crashes that have been fixed over the last 3 or 4 versions were related to that
chris2_ 11:09 does it work (performSelectorOnMainThread) in 10.5?
taxilian 11:09 I think so, but you'll have to check yourself
chris2_ 11:09 ok, just to clarify, in your experience NPN_PluginThreadAsyncCall was flaky (sometimes not working) on OSX 64 bit. Did it also crash above and beyond this?
taxilian 11:09 "flaky" in this case meant either a NULL pointer provided for PluginThreadAsyncCall or a pointer that would crash if you tried to call it
if memory serves, it was particularly bad for 32 bit plugins running in 64 bit safari
but other combinations occurred as well
chris2_ 11:09 ahhh thats terrible, so not even much you can do about it.
taxilian 11:09 exactly
which is why we finally ditched it entirely for a workaround
chris2_ 11:09 alright, i guess its shot for me too
taxilian 11:09 recent browsers may have fixed it
I don't know
but these are some of the reasons that I don't recommend doing it yourself =]
chris2_ 11:09 i need to support legacy, so i'm out of luck
taxilian 11:09 particularly just to gain a couple hundred K of size
chris2_ 11:09 i understand :(
I'm using pthreads and getting approval for boost would invovle time
taxilian 11:09 no reason that you can't use both in the same project
_marks 11:09 i get the distinct impression that there is much arcane knowledge assimilated into FB :)
taxilian 11:09 so using pthreads in your own code isn't an issue
that is unfortunately somewhat true
I've been doing plugins for about 3 years now; FireBreath is nearly 2 years old since I started it. I still keep learning new things or clarifying things I had previously not completely understood
chris2_ 11:09 thanks for your time taxilian
taxilian 11:09 good luck
_marks 14:09 another basic do i force a redraw? i'm trying to do some rudimentary animation; this is mac/cocoa/CG.
taxilian 14:09 call InvalidateWindow on the PluginWindow
FireBreathBot 14:09 Found 1 matching file(s) in the master branch. First 1 are:
_marks 14:09 ah so i could jsut do that on a timer?
taxilian 14:09 heh. you could just use the included timer
cast it to a PluginWindowMac pointer, then use win->StartAutoInvalidate(30) to have it invalidate 30 times / sec
_marks 14:09 ah yes. i seemed to have missed this in the docs or examples. thx!
taxilian 14:09 eh, it probably isn't in the docs
please add it =]
_marks 14:09 :)
taxilian 14:09 only works on Mac currently
probably should make it work on Windows w/ windowless as well, I suppose
also, make sure you StopAutoInvalidate on DetachedEvent
_marks 14:09 cool
regarding the docs, would this be the correct place for it:
taxilian 14:09 hmm. probably as good a place as any
the mac drawing docs need a serious overhaul, I'm afraid
but I just don't have time
so unless someone else decides to do it, it will continue as it is
_marks 14:09 understood
i can add at least what you've told me
taxilian 14:09 I appreciate that
_marks 14:09 that will help the next me.
taxilian 14:09 exactly
_marks 14:09 great, that is working.
taxilian 14:09 excelent
amackera 14:09 finally got homebrew to compile irssi for me
linearray 14:09 now you can IRC on your Wii?
taxilian 14:09 heh. I think he's talking about the mac package manager
linearray 14:09 ah ok
taxilian 14:09 be back in a bit
amackera 14:09 irc on wii would be sweet though
taxilian 17:09 !find getChildNodesCount
FireBreathBot 17:09 Could not find any tags matching getChildNodesCount
lins 23:09 hi. can i use dynamic link libraries in firebreath?
taxilian 23:09 yes
!wiki Libraries