webkit subsystem for WebGadget

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
CSAUER
Enthusiast
Enthusiast
Posts: 188
Joined: Mon Oct 18, 2004 7:23 am
Location: Germany

webkit subsystem for WebGadget

Post 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PB4.1 - Win: MacBook black 2008 2,4 GHz, 4 GB RAM, MacOSX 10.5/VMWare/WinXP
PB4.1 - Mac: MacMini G4 1,4 GHz, 512 MB RAM, MacOSX 10.4
Seymour Clufley
Addict
Addict
Posts: 1264
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Post 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?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

WebKit is way too big and too complex to be compiled and integrated in PureBasic.
CSAUER
Enthusiast
Enthusiast
Posts: 188
Joined: Mon Oct 18, 2004 7:23 am
Location: Germany

Post 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:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PB4.1 - Win: MacBook black 2008 2,4 GHz, 4 GB RAM, MacOSX 10.5/VMWare/WinXP
PB4.1 - Mac: MacMini G4 1,4 GHz, 512 MB RAM, MacOSX 10.4
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post 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.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

WebKit for GTK is very easy to use from PB Linux. You just use it like a normal GTK widget.
Seymour Clufley
Addict
Addict
Posts: 1264
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Post by Seymour Clufley »

But of what benefit would it be for us, programming?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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_()

Seymour Clufley
Addict
Addict
Posts: 1264
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Post 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?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.
Post Reply