IRC Log Viewer » #firebreath » 2013-07-03

IRC Nick Time (GMT-7) Message
[Outcast] 08:07 taxilian: Yo!
taxilian 08:07 good morning
[Outcast] 08:07 long time no wee
ahahaha
see
taxilian 08:07 lol
whats up?
Hari_ 08:07 From where I will get an example for the usage of webview?
taxilian 08:07 Hari_ AFAIK nobody has created one yet
I might have some sample code for loading it somewhere, I'll look
Hari_ 08:07 ok thanks
taxilian 08:07 Hari_ I can't find one. let me see if I can give you the basics of where to start
Hari_ 08:07 ok
taxilian 08:07 if you would be willing to do a write-up on the wiki of how to use it (and the limitations) when you get it working, that would be a big help
Hari_ 08:07 ok sure I will try
taxilian 08:07 Hari_: The starting point is https://github.com/firebreath/FireBreath/blob/master/src/libs/WebView/WebView.h
add_firebreath_library(WebView) in your PluginConfig.cmake file to include webview in the project
are you on windows or mac? (x11 not supported by webview)
Hari_ 08:07 windows
taxilian 08:07 ok. mac is a bit more limited, so that's probably good
Hari_ 08:07 ok
taxilian 08:07 so you create a FB::View::WebViewPtr ptr(FB::View::WebView::create(shared_from_this(), m_host);
this has to be inside your PluginCore object and probably should be in the AttachedEvent
Hari_ 08:07 ok will try
taxilian 08:07 then you'll do wnd->AttachObserver(ptr);
and in DetachedEvent you need to wnd->DetachObserver(ptr)
and that should do it... of course there are methods you'll use to control other stuff in the webview, but that should make it display
Hari_ 08:07 ok
Thanks Taxilian, I will try this and if it works, I will put it in the Wiki
taxilian 08:07 sounds good
himalayan 10:07 I want to make a plug-in that asks for a URL and then prints the body in the window its embedded in. Is this a realistic goal? are receiving user input and retrieving info from another page realistic things a plug-in can do?
taxilian 11:07 hang on, I'm on the phone
himalayan 11:07 I'm trying to decide if I need to write an extension or plug-in
taxilian 11:07 okay, I'm back
so a plugin only knows about the page it is embedded in
it doesn't know about anything else
you could hypothetically replace the page it is currently in with a different one, but that would shut down the plugin as well
anything you can do with javascript you can do with a plugin (by calling javascript)
that leaves the question of why you would want to do such a thing using a plugin, when you can do it with javascript
himalayan 11:07 ugh, thanks for saving me years of time taxilian. The more I looked into plug-ins the less I felt that it fit my needs.
taxilian 11:07 good rule of thumb: if you don't need a plugin, never use one
himalayan 11:07 Are you one of the head developers? I keep seeing taxilian on stack exchange.
taxilian 11:07 I wrote most of FireBreath, yes