[Gtk-sharp-list] Help on getting Webkit Widget in Monodevelop?

osirisgothra osirisgothra at hotmail.com
Wed Sep 11 12:21:22 UTC 2013


Jacek Rużyczka <stacheldraht <at> interia.pl> writes:

> 
> Am Montag 25 Juli 2011, 00:17:39 schrieb rygoody:
> > I am trying to do the very basic thing of just making a web browser. I want
> > to use WebKit Sharp, but am having a hell of a time figuring out exactly
> > how.
> > 
> > I found my way to here:
> > https://github.com/mono/webkit-sharp
> > 
> > I downloaded all the stuff on there, and am now looking at it wondering,
> > what do I do with it?! Do I compile this somehow? Do I compile it with mono
> > in some way? I've not ever had to do something like this with c# in VS. I
> > am admiteddly fairly new to mono and monodevelop...
> > 
> > Could anyone help me here and explain what to do in more detail?
> > 
> Well, the problem is that there are no MonoDevelop bindings for the webkit-
> sharp widgets. This means you have to implant a webkit-sharp based web
browser 
> by hand, like this:
> 
> 		/* instance variable */
> 		private WebView             overviewBrowser;
> 
> 		/* In your GUI designer, define an HBox or VBox named 
> overviewBrowserBox. */
> 
> 		private void Init () {
> 				overviewBrowser = new WebView();
> 				overviewBrowser.Editable = false;
> 				overviewBrowser.HoveringOverLink +=	
> this.OnHoveringOverLinkInBrowser;
> 				overviewBrowser.LoadHtmlString(this.ReadOverviewPage(), null);
> 				overviewBrowserBox.Add(overviewBrowser);
> 				Gtk.Box.BoxChild w = ((Gtk.Box.BoxChild) 
> overviewBrowserBox[overviewBrowser]);
> 				w.Position = 0;
> 				w.Expand = true;
> 				w.Fill = true;
> 				overviewBrowserBox.ShowAll();
> 				overviewBrowser.NavigationRequested += 
> this.OnLinkActivatedInBrowser;
> 	}
> 
> 		protected virtual void OnLinkActivatedInBrowser (object sender, 
> NavigationRequestedArgs args)
> 		{
> 			string uri = args.Request.Uri;
> 			/* Do something with your click event. */
> 		}
> 
> 		protected virtual void OnHoveringOverLinkInBrowser (object sender, 
> HoveringOverLinkArgs args)
> 		{
> 			/* Do something with your hover event. */
> 		}
> 
> I hope this will help you.
> 
> Kind regards
> Jacek
> 
> ----------------------------------------------------------------
> Najwieksza baza samochodow nowych i uzywanych
> Sprawdz >> http://linkint.pl/f29e3
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list <at> lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 
> 

Hey guys, I very much appriciate this post, I was about to throw
webkit_sharp out the window (seriously) then I came upon this post and was
able to fix it. Had installed MonoDevelop 3.0.3.2 on Ubuntu Studio 13.04
amd64, I then downloaded the webkit_sharp from Git, it built fine, the
assemblies were there, the compile went ok, but like the above, i got the
nasty Missing Dll Exception when running the application, plus wasnt sure
just what and where I was supposed to add the WebView class to also.
Following suit, I found that in the ./sources/webkit-sharp.dll.config and
the webkit-sharp.dll.config.in the libraries were called "webkit-1.0.so.2"
which was way off for me, mine were called "webkitgtk-1.0.so.0", so I had to
make the appropriate changes.. possible it would have been better to do this
in the configure.in, but i hate dealing with it so I just ran 'make clean'
and then 'make' again in that directory, copied the webkit-sharp.dll over
the faulty ones in my system, and BAM!! everything works! Words cannot tell
how much I appreciate this post. I'll see about writing a suitable tutorial
for Ubuntu users once I figure out what went wrong and verify that it
happens on other machines of the same OS type, with different
configurations. so again, thanks. Btw, the link to my blog where I post
tutorials is : 
http://cowsthatgomoo.blogspot.com
my website is :
http://paradisim.tk
Mt email is:
osirisgothra at hotmail dot com (antispam)





More information about the Gtk-sharp-list mailing list