Page 1 of 1

webkit subsystem for WebGadget

Posted: Thu Apr 03, 2008 11:33 am
by CSAUER
As subjected, I would prefer to have a option to select the subsystem "webkit" for web-rendering. This is open source and available on all PB supported platforms as well as it is much growing and ACID3 conform.

With this together I would like to see a enhanced access and control of the content of the WebGadget.

Best Regards
CSAUER

Posted: Thu Apr 03, 2008 12:14 pm
by Seymour Clufley
I've taken a look at the WebKit website but I can't work out how having it implemented in PB would improve the situation.

What benefits would PB programmers have if the webgadget was powered by WebKit?

Posted: Thu Apr 03, 2008 9:02 pm
by Mistrel

Posted: Thu Apr 03, 2008 9:25 pm
by Fred
WebKit is way too big and too complex to be compiled and integrated in PureBasic.

Posted: Mon Apr 07, 2008 2:19 pm
by CSAUER
They get it run on mobile devices like iPhone, Android, NOKIA S60 series, etc. Additional it will be implemented into Qt 4.4 and GNOME, Epiphany. I think market share will grow significant within next 12 months and is passes already ACID, ACID2 and ACID3.

I thought it is lightweight, if it runs on mobile devices. Shouldn't it be possible?
Maybe we can access natively a precompiled library we can download from webkit sources, we just need an standardized interface to the lib integrated into PB. This would ensure a always proofed rendering.

Actually you cannot ensure how it looks like on your customers computer, as it depends on OS and browser version.

Maybe this is a topic for the next mayor release... :roll:

Posted: Thu Apr 10, 2008 5:28 pm
by Rescator
Isn't Webkit a suite of tech?
I suspect that when peeps say Webkit they assume the whole thing.
A PB lib with just the Webkit layout engine and some hooks to allow PB code to react/act so the behavior would not be that different from the current Webgadget would be great as control/interaction would be higher, no dependency on atl.dll (luckily this is installed on W2K and later by default though) would make it interesting.

What I suggest is that somebody here take a look at Webkit, find out what minimum of includes/source files are needed to turn it into a PB lib and add functionality needed to emulate/improve upon what the current Webgadget has. Then hand it to the PureBasic team and say "see? it's possible and not that big" :) Do that and Fred and Co. might change their mind!

I have no idea how big Webkit is or how big the Webkit layout engine etc is either. But I'm guessing a few MB? So obviously very small apps may not want to use it, but medium and larger apps might.

Posted: Thu Apr 10, 2008 5:31 pm
by Trond
WebKit for GTK is very easy to use from PB Linux. You just use it like a normal GTK widget.

Posted: Fri Apr 11, 2008 12:52 am
by Seymour Clufley
But of what benefit would it be for us, programming?

Posted: Mon Apr 28, 2008 8:31 pm
by Trond
Example: (you need webkit-gtk)

Code: Select all


ProcedureC quit()
  gtk_main_quit_()
EndProcedure

ImportC "/usr/local/lib/libwebkit-1.0.so"
  webkit_web_view_new()
  webkit_web_view_open(webview.l, *uri.l)
EndImport


gtk_init_(0, 0)

window = gtk_window_new_(#GTK_WINDOW_TOPLEVEL)
gtk_window_set_title_(window, "PureBrowser")
gtk_widget_set_name_(window, "PureBrowser")
gtk_window_set_default_size_(window, 800, 600)
g_signal_connect_data_(window, "destroy", @quit(), 0, 0, 0)

scrolled_window = gtk_scrolled_window_new_(0, 0)
gtk_scrolled_window_set_policy_(scrolled_window, #GTK_POLICY_AUTOMATIC, #GTK_POLICY_AUTOMATIC)

web_view = webkit_web_view_new ()
gtk_container_add_(scrolled_window, web_view)

gtk_container_add_(window, scrolled_window)

webkit_web_view_open(web_view, @"http://www.google.com/")

gtk_widget_show_all_(window)
gtk_main_()


Posted: Tue Jan 06, 2009 11:55 pm
by Seymour Clufley
Trond, I'd like to try out the code you posted, so I downloaded the WebKit GTK for Windows. It doesn't contain the "libwebkit-1.0.so" file you specify.

I don't know if this is because the .so file is for a different platform, or because it is obsolete (you posted the code last April!).

Can you tell me what file I should use on Windows?

Posted: Wed Jan 07, 2009 11:28 am
by Trond
It's a source package that must be compiled first. Webkit for Windows isn't really usable without a lot of effort yet.