IRC Log Viewer » #firebreath » 2012-07-06

IRC Nick Time (GMT-7) Message
taxilian 09:07 emicastro: it should be absolute
emicastro 10:07 thank you
bharath 11:07 Hi Richard
gm
taxilian 11:07 hello
bharath 11:07 i hope you remember me
the guy with NSView problem
taxilian 11:07 ahh
bharath 11:07 try to do some screen scraping
and then paint it using coregraphics or coreanimation
we talked last week
taxilian 11:07 right
bharath 11:07 i am close to solving that problem
as i am new to mac
i am able to do the screen scraping stuff
taxilian 11:07 cool
bharath 11:07 the only problem is how to generate NPP_Redraw
taxilian 11:07 I'd love to see a code sample of that
bharath 11:07 continually
sure i will send it accross
in fact i am doing it with a very crude method
there are some nifty ways such as sharedcontexts
in opengl
it was giving me some problems
so shifted so crude way of doing it
anyway back to the problem
i am one step away from drawing the image on the browser
i am not knowing how to generate a NPP_Redraw continually
once i am able to do it i can access virtual memory and read the image from VM and paint it
i am using CG
any suggestion
?
taxilian 11:07 hang on
bharath 11:07 sure
taxilian 11:07 okay,you're using FireBreath? and PluginWindowMacCG?
bharath 11:07 right
no
i am using normal NPAPI
tho' i have tinkered with Firebreath
taxilian 11:07 well, that makes it a lot harder
bharath 11:07 ok
ok
taxilian 11:07 easiest way would probably be to set up a NSTimer and call NPN_InvalidateRect from the timer
FireBreath has a function built-in to do that: https://github.com/firebreath/FireBreath/blob/master/src/PluginAuto/Mac/PluginWindowMac.mm
bharath 11:07 ok
ok
i will look in to it
the problem with NSTimer is target
taxilian 11:07 like I said; there is an example of how FireBreath does it
bharath 11:07 ok
sure i will look at it thnx
once gain
again
taxilian 11:07 good luck
bharath 11:07 thanks a lot
once i am able to do it with shared contexts i will share that as well
taxilian 11:07 awesome
bharath 12:07 Hi Richard
taxilian 12:07 hello
bharath 12:07 just one last question
taxilian 12:07 ok
bharath 12:07 In CoreAnimation
we create CALayer
and hand it over to the browser
is there no way to attach a view or get a view from CALayer
just create a view attach a layer and handover the attached layer to browser
taxilian 12:07 no idea
bharath 12:07 ok
ok
taxilian 12:07 most NSViews are backed by a CALayer, so it might be possible
but I just don't know
bharath 12:07 ok
thx
taxilian 12:07 yw
Mari_ 14:07 I have an AcvtiveX DLL, I want to create plugin to work in safari. Is it possible to create Plugin with existing DLL?
taxilian 14:07 Mari_: technically yes
it may be a pain, though
you just have to write a wrapper with FireBreath (or otherwise NPAPI) that loads the ActiveX DLL etc
Mari_ 14:07 ok, thanks for your answer
If it is possible, Plugin created in Windows will work in MAC-safari browser?
taxilian 14:07 no
windows DLLs only work on windows
however if you create a plugin using FireBreath then all of the code you use that is cross-platform will work on Mac
for example, a plugin created with fbgen with no changes builds and runs on all three platforms without changes
but when you start doing drawing or using any system APIs you'll have to write it for each platform
Mari_ 14:07 ok
I will create plugin (wrapper) with existing DLL, will it work in MAC-safari?
taxilian 14:07 no
but it will work on windows safari
Mari_ 14:07 means Plugin?
taxilian 14:07 what?
Mari_ 14:07 oh ok
thanks for your valuable answers