aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac26
-rw-r--r--src/Makefile.in3
-rw-r--r--src/xwidget.c57
3 files changed, 1 insertions, 85 deletions
diff --git a/configure.ac b/configure.ac
index e750ffeba96..a518bf75254 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2193,8 +2193,6 @@ fi
2193 2193
2194HAVE_XWIDGETS=no 2194HAVE_XWIDGETS=no
2195HAVE_WEBKIT=no 2195HAVE_WEBKIT=no
2196HAVE_GOOCANVAS=no
2197HAVE_CLUTTER=no
2198HAVE_GIR=no 2196HAVE_GIR=no
2199 2197
2200if test "${with_xwidgets}" != "no"; then 2198if test "${with_xwidgets}" != "no"; then
@@ -2204,7 +2202,7 @@ if test "${with_xwidgets}" != "no"; then
2204#xwidgets 2202#xwidgets
2205#TODO 2203#TODO
2206# - enable only if gtk/gtk3 enabled 2204# - enable only if gtk/gtk3 enabled
2207# - webkit, goocanvas, clutter 2205# - webkit
2208# - only webkit_osr is good so remove plain webkit laterish 2206# - only webkit_osr is good so remove plain webkit laterish
2209 2207
2210#webkit version for gtk3. 2208#webkit version for gtk3.
@@ -2218,26 +2216,6 @@ if test "${with_xwidgets}" != "no"; then
2218 fi 2216 fi
2219 fi 2217 fi
2220 2218
2221 if test "${with_xwdemo}" = "yes"; then
2222#clutter and goocanvas are just proof of concept so disable for now
2223 CLUTTER_REQUIRED=1.0.0
2224 CLUTTER_MODULES="clutter-gtk-1.0 >= $CLUTTER_REQUIRED"
2225
2226 PKG_CHECK_MODULES(CLUTTER, $CLUTTER_MODULES, HAVE_CLUTTER=yes, HAVE_CLUTTER=no)
2227 if test $HAVE_CLUTTER = yes; then
2228 AC_DEFINE(HAVE_CLUTTER, 1, [Define to 1 if you have clutter support.])
2229 fi
2230
2231
2232 GOOCANVAS_REQUIRED=1.4.0
2233 GOOCANVAS_MODULES="goocanvasgtk-3.0 >= $GOOCANVAS_REQUIRED"
2234
2235 PKG_CHECK_MODULES(GOOCANVAS, $GOOCANVAS_MODULES, HAVE_GOOCANVAS=yes, HAVE_GOOCANVAS=no)
2236 if test $HAVE_GOOCANVAS = yes; then
2237 AC_DEFINE(HAVE_GOOCANVAS, 1, [Define to 1 if you have goocanvas support.])
2238 fi
2239 fi
2240
2241 GIR_REQUIRED=1.32.1 2219 GIR_REQUIRED=1.32.1
2242 GIR_MODULES="gobject-introspection-1.0 >= $GIR_REQUIRED" 2220 GIR_MODULES="gobject-introspection-1.0 >= $GIR_REQUIRED"
2243 PKG_CHECK_MODULES(GIR, $GIR_MODULES, HAVE_GIR=yes, HAVE_GIR=no) 2221 PKG_CHECK_MODULES(GIR, $GIR_MODULES, HAVE_GIR=yes, HAVE_GIR=no)
@@ -4757,8 +4735,6 @@ echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SC
4757echo " Does Emacs support Xwidgets? ${HAVE_XWIDGETS}" 4735echo " Does Emacs support Xwidgets? ${HAVE_XWIDGETS}"
4758echo " Does xwidgets support webkit(requires gtk3)? ${HAVE_WEBKIT}" 4736echo " Does xwidgets support webkit(requires gtk3)? ${HAVE_WEBKIT}"
4759echo " Does xwidgets support gobject introspection? ${HAVE_GIR}" 4737echo " Does xwidgets support gobject introspection? ${HAVE_GIR}"
4760echo " Does xwidgets support clutter(demo code)? ${HAVE_CLUTTER}"
4761echo " Does xwidgets support goocanvas(demo code)? ${HAVE_GOOCANVAS}"
4762echo 4738echo
4763 4739
4764if test -n "${EMACSDATA}"; then 4740if test -n "${EMACSDATA}"; then
diff --git a/src/Makefile.in b/src/Makefile.in
index bf3c9bf3b6b..74a5bbcdd1b 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -227,9 +227,6 @@ CFLAGS_SOUND= @CFLAGS_SOUND@
227RSVG_LIBS= @RSVG_LIBS@ 227RSVG_LIBS= @RSVG_LIBS@
228RSVG_CFLAGS= @RSVG_CFLAGS@ 228RSVG_CFLAGS= @RSVG_CFLAGS@
229 229
230CLUTTER_LIBS= @CLUTTER_LIBS@
231CLUTTER_CFLAGS= @CLUTTER_CFLAGS@
232
233WEBKIT_LIBS= @WEBKIT_LIBS@ 230WEBKIT_LIBS= @WEBKIT_LIBS@
234WEBKIT_CFLAGS= @WEBKIT_CFLAGS@ 231WEBKIT_CFLAGS= @WEBKIT_CFLAGS@
235 232
diff --git a/src/xwidget.c b/src/xwidget.c
index d7c219f6cfd..69e2923d0f0 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -79,18 +79,6 @@
79#include "emacsgtkfixed.h" 79#include "emacsgtkfixed.h"
80#endif 80#endif
81 81
82
83
84#ifdef HAVE_GOOCANVAS
85#include <goocanvas.h>
86#endif
87
88#ifdef HAVE_CLUTTER
89#include <librsvg/rsvg.h>
90#include <clutter/clutter.h>
91#include <clutter-gtk/clutter-gtk.h>
92#endif
93
94#include <wchar.h> 82#include <wchar.h>
95 83
96#ifdef HAVE_WEBKIT_OSR 84#ifdef HAVE_WEBKIT_OSR
@@ -995,51 +983,6 @@ xwidget_init_view (struct xwidget *xww,
995 //Cairo view 983 //Cairo view
996 //uhm cairo is differentish in gtk 3. 984 //uhm cairo is differentish in gtk 3.
997 //gdk_cairo_create (gtk_widget_get_window (FRAME_GTK_WIDGET (s->f))); 985 //gdk_cairo_create (gtk_widget_get_window (FRAME_GTK_WIDGET (s->f)));
998#ifdef HAVE_GOOCANVAS
999 xv->widget = goo_canvas_new();
1000 GooCanvasItem *root, *rect_item, *text_item;
1001 goo_canvas_set_bounds (GOO_CANVAS (xv->widget), 0, 0, 1000, 1000);
1002 root = goo_canvas_get_root_item (GOO_CANVAS (xv->widget));
1003 rect_item = goo_canvas_rect_new (root, 100, 100, 400, 400,
1004 "line-width", 10.0,
1005 "radius-x", 20.0,
1006 "radius-y", 10.0,
1007 "stroke-color", "yellow",
1008 "fill-color", "red",
1009 NULL);
1010
1011 text_item = goo_canvas_text_new (root, "Hello World", 300, 300, -1,
1012 GTK_ANCHOR_CENTER,
1013 "font", "Sans 24",
1014 NULL);
1015 goo_canvas_item_rotate (text_item, 45, 300, 300);
1016
1017#endif
1018#ifdef HAVE_CLUTTER
1019 xv->widget = gtk_clutter_embed_new ();;
1020 ClutterActor *stage = NULL;
1021 stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED ( xv->widget));
1022 ClutterColor stage_color = { 0xaa, 0xaa, 0xaa, 0xff }; /* Black */
1023 clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
1024
1025 ClutterActor * texture = clutter_cairo_texture_new (1000, 1000);
1026 clutter_container_add_actor(stage, texture);
1027 clutter_actor_set_position(texture, 0,0);
1028 clutter_actor_show(texture);
1029
1030 cairo_t *cr;
1031 cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (texture));
1032
1033 /* draw on the context */
1034 RsvgHandle *h = rsvg_handle_new_from_file ("/tmp/tst.svg",
1035 NULL);
1036
1037 rsvg_handle_render_cairo(h, cr);
1038 cairo_destroy (cr);
1039
1040 /* Show the stage: */
1041 clutter_actor_show (stage);
1042#endif /* HAVE_CLUTTER */
1043 } else if (EQ(xww->type, Qwebkit_osr)|| 986 } else if (EQ(xww->type, Qwebkit_osr)||
1044 EQ(xww->type, Qsocket_osr)|| 987 EQ(xww->type, Qsocket_osr)||
1045 (Fget(xww->type, Qcxwgir_class) != Qnil))//xwgir widgets are OSR 988 (Fget(xww->type, Qcxwgir_class) != Qnil))//xwgir widgets are OSR