emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An Emacs plug-in for a browser (Firefox?)


From: David Hansen
Subject: Re: An Emacs plug-in for a browser (Firefox?)
Date: Sat, 06 Sep 2008 22:20:57 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Sat, 06 Sep 2008 18:58:48 +0200 address@hidden wrote:

> The thing that actually stopped me from demoing browser embedding,
> rather that video etc, is that I didnt find a browser which supported
> being embedded with xembed. It shouldnt be a big problem, though, to
> modify a gnome based browser to use a xembeddable widget as main
> window.

Not tested, but it's about that easy:

#include <gtk/gtk.h>
#include <webkit/webkit.h>

#define URI "http://www.gnu.org/";

int
main (int argc, gchar **argv)
{
  GtkWidget *plug, *scroll, *webview;

  gtk_init (&argc, &argv);

  plug    = gtk_plug_new (0);
  scroll  = gtk_scrolled_window_new (NULL, NULL);
  webview = webkit_web_view_new ();

  gtk_container_add (GTK_CONTAINER (plug)  , scroll);
  gtk_container_add (GTK_CONTAINER (scroll), webview);

  gtk_widget_show_all (plug);
  webkit_web_view_open (WEBKIT_WEB_VIEW (webview), URI);

  gtk_main ();

  return 0;
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]