unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* webkit integration in the xwidget branch
@ 2011-06-28 20:00 joakim
  2011-06-28 20:12 ` joakim
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: joakim @ 2011-06-28 20:00 UTC (permalink / raw)
  To: emacs-devel

I did a proof of concept webkit xwidget in the xwidget branch.

It loads www.fsf.org, moves about in the buffer like an image, and you
can click on links and so on. (there are display glitches still)

pros:
- shows tighter webkit integration is indeed possible and that the
xwidget branch is a pretty cool playground

cons:
- well, webkit doesnt have an out of the box mvc model. I find it
perplexing that state of the art web engines in 2011 cant even do a 1990s
type split pane view. I did some brief research around this mysterious
ommission and found odd references in wikipedia that this might be
covered by a patent or something. I hope I'm just having a bad dream.

Links like these:
http://www.chromeplugins.org/plugins/google-chrome-dual-view/
makes me think time stands still. Which is good news for us Emacsers I
suppose.

Anyway, if proper real MVC can't be had, kludges can still be made, like
copying DOM trees betwen views and stuff. But I'd prefer there to be
something nice. 

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: webkit integration in the xwidget branch
  2011-06-28 20:00 webkit integration in the xwidget branch joakim
@ 2011-06-28 20:12 ` joakim
  2011-06-29  8:33 ` Julien Danjou
  2011-07-09 22:19 ` haawda
  2 siblings, 0 replies; 6+ messages in thread
From: joakim @ 2011-06-28 20:12 UTC (permalink / raw)
  To: emacs-devel

joakim@verona.se writes:

> I did a proof of concept webkit xwidget in the xwidget branch.
>
> It loads www.fsf.org, moves about in the buffer like an image, and you
> can click on links and so on. (there are display glitches still)
>
> pros:
> - shows tighter webkit integration is indeed possible and that the
> xwidget branch is a pretty cool playground
>
> cons:
> - well, webkit doesnt have an out of the box mvc model. I find it
> perplexing that state of the art web engines in 2011 cant even do a 1990s
> type split pane view. I did some brief research around this mysterious
> ommission and found odd references in wikipedia that this might be
> covered by a patent or something. I hope I'm just having a bad dream.
>
> Links like these:
> http://www.chromeplugins.org/plugins/google-chrome-dual-view/makes me think time stands still. Which is good news for us Emacsers I
> suppose.
>
> Anyway, if proper real MVC can't be had, kludges can still be made, like
> copying DOM trees betwen views and stuff. But I'd prefer there to be
> something nice. 

The readme might be of interest:
http://bzr.savannah.gnu.org/lh/emacs/xwidget/annotate/head:/README.xwidget

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: webkit integration in the xwidget branch
  2011-06-28 20:00 webkit integration in the xwidget branch joakim
  2011-06-28 20:12 ` joakim
@ 2011-06-29  8:33 ` Julien Danjou
  2011-06-29 23:37   ` joakim
  2011-07-09 22:19 ` haawda
  2 siblings, 1 reply; 6+ messages in thread
From: Julien Danjou @ 2011-06-29  8:33 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]

On Tue, Jun 28 2011, joakim@verona.se wrote:

> I did a proof of concept webkit xwidget in the xwidget branch.

I'm glad to read that.

> pros:
> - shows tighter webkit integration is indeed possible and that the
> xwidget branch is a pretty cool playground

:-)

> cons:
> - well, webkit doesnt have an out of the box mvc model. I find it
> perplexing that state of the art web engines in 2011 cant even do a 1990s
> type split pane view. I did some brief research around this mysterious
> ommission and found odd references in wikipedia that this might be
> covered by a patent or something. I hope I'm just having a bad dream.

What does that means when using it, concretely? I don't know what model
WebKit uses if it's not MVC, so what's wrong conretely?
(maybe I should take a look at the WebKit API :-)

> Links like these:
> http://www.chromeplugins.org/plugins/google-chrome-dual-view/
> makes me think time stands still. Which is good news for us Emacsers I
> suppose.

In such a context, I tend to argue that this kind of the work of the
window manager to organize windows.

-- 
Julien Danjou
❱ http://julien.danjou.info

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: webkit integration in the xwidget branch
  2011-06-29  8:33 ` Julien Danjou
@ 2011-06-29 23:37   ` joakim
  0 siblings, 0 replies; 6+ messages in thread
From: joakim @ 2011-06-29 23:37 UTC (permalink / raw)
  To: emacs-devel

Julien Danjou <julien@danjou.info> writes:

> On Tue, Jun 28 2011, joakim@verona.se wrote:
>
>> I did a proof of concept webkit xwidget in the xwidget branch.
>
> I'm glad to read that.
>
>> pros:
>> - shows tighter webkit integration is indeed possible and that the
>> xwidget branch is a pretty cool playground
>
> :-)
>
>> cons:
>> - well, webkit doesnt have an out of the box mvc model. I find it
>> perplexing that state of the art web engines in 2011 cant even do a 1990s
>> type split pane view. I did some brief research around this mysterious
>> ommission and found odd references in wikipedia that this might be
>> covered by a patent or something. I hope I'm just having a bad dream.
>
> What does that means when using it, concretely? I don't know what model
> WebKit uses if it's not MVC, so what's wrong conretely?
> (maybe I should take a look at the WebKit API :-)

I made an alternate xwidget called webkit-osr.

It creates a separate offscreen window and renders the webkit component
there. the onscreen views are separate gtk drawing areas and the
offscreen webkit gets copied onscreen through a cairo pixmap blitting
operation.

its just a proof of concept, there are worse drawing glitches than
usual. To make it usable the following is needed:

- handle damage events from the offscreen window so the onscreen window
  is redrawn
- optimize clipping area
- propagate onscreen mouse events to the offscreen webkit

This technique should be visualy correct and have acceptable performance
most of the time, if one gets the clipping right. its also a textbook
type solution so it shouldnt bitrot too fast either.



>
>> Links like these:
>> http://www.chromeplugins.org/plugins/google-chrome-dual-view/> makes me think time stands still. Which is good news for us Emacsers I
>> suppose.
>
> In such a context, I tend to argue that this kind of the work of the
> window manager to organize windows.

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: webkit integration in the xwidget branch
  2011-06-28 20:00 webkit integration in the xwidget branch joakim
  2011-06-28 20:12 ` joakim
  2011-06-29  8:33 ` Julien Danjou
@ 2011-07-09 22:19 ` haawda
  2011-07-10 17:43   ` joakim
  2 siblings, 1 reply; 6+ messages in thread
From: haawda @ 2011-07-09 22:19 UTC (permalink / raw)
  To: Emacs-devel


I got a build problem with the emacs xwidget branch under Arch Linux x86_64
with gcc4.6.1 and gtk 2.24.5.

ick   -I/usr/include/libxml2   -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include   -DORBIT2=1 -pthread -I/usr/include/gconf/2
-I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
-I/usr/include/freetype2      -MMD -MF deps/xwidget.d  
-Wimplicit-function-declaration -Wold-style-definition
-Wdeclaration-after-statement  -march=x86-64 -mtune=generic -O2 -pipe
xwidget.c
xwidget.c: In function 'webkit_osr_redraw_child':
xwidget.c:284:3: warning: passing argument 1 of
'gtk_offscreen_window_get_pixmap' from incompatible pointer type [enabled by
default]
/usr/include/gtk-2.0/gtk/gtkoffscreenwindow.h:55:12: note: expected 'struct
GtkOffscreenWindow *' but argument is of type 'struct GtkContainer *'
xwidget.c:321:2: error: invalid preprocessing directive #elseif
xwidget.c:322:12: error: redeclaration of 'cr' with no linkage
xwidget.c:280:12: note: previous declaration of 'cr' was here
xwidget.c:322:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
xwidget.c:323:22: error: conflicting types for 'src_pixmap'
xwidget.c:283:14: note: previous declaration of 'src_pixmap' was here
xwidget.c:324:3: warning: implicit declaration of function
'gtk_offscreen_window_get_surface' [-Wimplicit-function-declaration]
xwidget.c:324:14: warning: assignment makes pointer from integer without a
cast [enabled by default]
xwidget.c:349:3: warning: passing argument 2 of 'cairo_set_source_surface'
from incompatible pointer type [enabled by default]
/usr/include/cairo/cairo.h:561:1: note: expected 'struct cairo_surface_t *'
but argument is of type 'struct cairo_surface_t **'
xwidget.c: In function 'xwidget_osr_draw_callback':
xwidget.c:403:3: warning: passing argument 2 of 'gtk_widget_draw' from
incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkwidget.h:883:9: note: expected 'const struct
GdkRectangle *' but argument is of type 'struct cairo_t *'
xwidget.c: In function 'xwidget_osr_button_callback':
xwidget.c:417:32: warning: initialization from incompatible pointer type
[enabled by default]
xwidget.c:424:3: warning: passing argument 1 of 'gtk_main_do_event' from
incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkmain.h:143:10: note: expected 'union GdkEvent *'
but argument is of type 'struct GdkEventButton *'
xwidget.c: In function 'x_draw_xwidget_glyph_string':
xwidget.c:687:5: warning: passing argument 1 of 'gtk_widget_queue_draw' from
incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkwidget.h:864:9: note: expected 'struct GtkWidget
*' but argument is of type 'struct GtkContainer *'
xwidget.c: In function 'syms_of_xwidget':
xwidget.c:944:13: error: 'Sxwidget_webkit_goto_uri' undeclared (first use in
this function)
xwidget.c:944:13: note: each undeclared identifier is reported only once for
each function it appears in
xwidget.c:945:13: error: 'Sxwidget_webkit_execute_script' undeclared (first
use in this function)
xwidget.c:946:13: error: 'Sxwidget_webkit_get_title' undeclared (first use
in this function)
xwidget.c: In function 'xwidget_view_delete_all_in_window':
xwidget.c:1058:9: warning: passing argument 1 of 'gtk_widget_destroy' from
incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkwidget.h:837:9: note: expected 'struct GtkWidget
*' but argument is of type 'struct GtkContainer *'
make[2]: *** [xwidget.o] Error 1
make[2]: Leaving directory
`/home/haawda/paketierung/maintained_by_me/emacs-xwidget/src/emacs-xwidget-build/src'
make[1]: *** [src] Error 2
make[1]: Leaving directory
`/home/haawda/paketierung/maintained_by_me/emacs-xwidget/src/emacs-xwidget-build'
make: *** [bootstrap] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
-- 
View this message in context: http://old.nabble.com/webkit-integration-in-the-xwidget-branch-tp31949621p32029464.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: webkit integration in the xwidget branch
  2011-07-09 22:19 ` haawda
@ 2011-07-10 17:43   ` joakim
  0 siblings, 0 replies; 6+ messages in thread
From: joakim @ 2011-07-10 17:43 UTC (permalink / raw)
  To: haawda; +Cc: Emacs-devel

The configure support for the xwidget branch is not begun yet.
If you want to try it read README.xwidget.

On fedora 15 this works for me:

export CFLAGS="`pkg-config --cflags webkitgtk-3.0 ` -DHAVE_WEBKIT_OSR -g"
export LDFLAGS=`pkg-config --libs webkitgtk-3.0 `
./configure   --with-x-toolkit=gtk3
make


haawda <stefan-husmann@t-online.de> writes:

> I got a build problem with the emacs xwidget branch under Arch Linux x86_64
> with gcc4.6.1 and gtk 2.24.5.
>
> ick   -I/usr/include/libxml2   -I/usr/include/dbus-1.0
> -I/usr/lib/dbus-1.0/include   -DORBIT2=1 -pthread -I/usr/include/gconf/2
> -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
> -I/usr/include/freetype2      -MMD -MF deps/xwidget.d  
> -Wimplicit-function-declaration -Wold-style-definition
> -Wdeclaration-after-statement  -march=x86-64 -mtune=generic -O2 -pipe
> xwidget.c
> xwidget.c: In function 'webkit_osr_redraw_child':
> xwidget.c:284:3: warning: passing argument 1 of
> 'gtk_offscreen_window_get_pixmap' from incompatible pointer type [enabled by
> default]
> /usr/include/gtk-2.0/gtk/gtkoffscreenwindow.h:55:12: note: expected 'struct
> GtkOffscreenWindow *' but argument is of type 'struct GtkContainer *'
> xwidget.c:321:2: error: invalid preprocessing directive #elseif
> xwidget.c:322:12: error: redeclaration of 'cr' with no linkage
> xwidget.c:280:12: note: previous declaration of 'cr' was here
> xwidget.c:322:3: warning: ISO C90 forbids mixed declarations and code
> [-Wdeclaration-after-statement]
> xwidget.c:323:22: error: conflicting types for 'src_pixmap'
> xwidget.c:283:14: note: previous declaration of 'src_pixmap' was here
> xwidget.c:324:3: warning: implicit declaration of function
> 'gtk_offscreen_window_get_surface' [-Wimplicit-function-declaration]
> xwidget.c:324:14: warning: assignment makes pointer from integer without a
> cast [enabled by default]
> xwidget.c:349:3: warning: passing argument 2 of 'cairo_set_source_surface'
> from incompatible pointer type [enabled by default]
> /usr/include/cairo/cairo.h:561:1: note: expected 'struct cairo_surface_t *'
> but argument is of type 'struct cairo_surface_t **'
> xwidget.c: In function 'xwidget_osr_draw_callback':
> xwidget.c:403:3: warning: passing argument 2 of 'gtk_widget_draw' from
> incompatible pointer type [enabled by default]
> /usr/include/gtk-2.0/gtk/gtkwidget.h:883:9: note: expected 'const struct
> GdkRectangle *' but argument is of type 'struct cairo_t *'
> xwidget.c: In function 'xwidget_osr_button_callback':
> xwidget.c:417:32: warning: initialization from incompatible pointer type
> [enabled by default]
> xwidget.c:424:3: warning: passing argument 1 of 'gtk_main_do_event' from
> incompatible pointer type [enabled by default]
> /usr/include/gtk-2.0/gtk/gtkmain.h:143:10: note: expected 'union GdkEvent *'
> but argument is of type 'struct GdkEventButton *'
> xwidget.c: In function 'x_draw_xwidget_glyph_string':
> xwidget.c:687:5: warning: passing argument 1 of 'gtk_widget_queue_draw' from
> incompatible pointer type [enabled by default]
> /usr/include/gtk-2.0/gtk/gtkwidget.h:864:9: note: expected 'struct GtkWidget
> *' but argument is of type 'struct GtkContainer *'
> xwidget.c: In function 'syms_of_xwidget':
> xwidget.c:944:13: error: 'Sxwidget_webkit_goto_uri' undeclared (first use in
> this function)
> xwidget.c:944:13: note: each undeclared identifier is reported only once for
> each function it appears in
> xwidget.c:945:13: error: 'Sxwidget_webkit_execute_script' undeclared (first
> use in this function)
> xwidget.c:946:13: error: 'Sxwidget_webkit_get_title' undeclared (first use
> in this function)
> xwidget.c: In function 'xwidget_view_delete_all_in_window':
> xwidget.c:1058:9: warning: passing argument 1 of 'gtk_widget_destroy' from
> incompatible pointer type [enabled by default]
> /usr/include/gtk-2.0/gtk/gtkwidget.h:837:9: note: expected 'struct GtkWidget
> *' but argument is of type 'struct GtkContainer *'
> make[2]: *** [xwidget.o] Error 1
> make[2]: Leaving directory
> `/home/haawda/paketierung/maintained_by_me/emacs-xwidget/src/emacs-xwidget-build/src'
> make[1]: *** [src] Error 2
> make[1]: Leaving directory
> `/home/haawda/paketierung/maintained_by_me/emacs-xwidget/src/emacs-xwidget-build'
> make: *** [bootstrap] Error 2
> ==> ERROR: A failure occurred in build().
>     Aborting...

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-10 17:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-28 20:00 webkit integration in the xwidget branch joakim
2011-06-28 20:12 ` joakim
2011-06-29  8:33 ` Julien Danjou
2011-06-29 23:37   ` joakim
2011-07-09 22:19 ` haawda
2011-07-10 17:43   ` joakim

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).