1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00

Remove old code related to GOOCANVAS and CLUTTER.

* configure.ac: Remove options to enable CLUTTER and GOOCANVAS support.
* src/Makefile.in: Remove CLUTTER_FLAGS and CLUTTER_LIBS
* src/xwidget.c: Remove code protected by preprocessor conditionals.
This commit is contained in:
Grégoire Jadi 2013-06-11 17:22:47 +02:00
parent 5a99554993
commit 64548c82e4
3 changed files with 1 additions and 85 deletions

View File

@ -2193,8 +2193,6 @@ fi
HAVE_XWIDGETS=no
HAVE_WEBKIT=no
HAVE_GOOCANVAS=no
HAVE_CLUTTER=no
HAVE_GIR=no
if test "${with_xwidgets}" != "no"; then
@ -2204,7 +2202,7 @@ if test "${with_xwidgets}" != "no"; then
#xwidgets
#TODO
# - enable only if gtk/gtk3 enabled
# - webkit, goocanvas, clutter
# - webkit
# - only webkit_osr is good so remove plain webkit laterish
#webkit version for gtk3.
@ -2218,26 +2216,6 @@ if test "${with_xwidgets}" != "no"; then
fi
fi
if test "${with_xwdemo}" = "yes"; then
#clutter and goocanvas are just proof of concept so disable for now
CLUTTER_REQUIRED=1.0.0
CLUTTER_MODULES="clutter-gtk-1.0 >= $CLUTTER_REQUIRED"
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_MODULES, HAVE_CLUTTER=yes, HAVE_CLUTTER=no)
if test $HAVE_CLUTTER = yes; then
AC_DEFINE(HAVE_CLUTTER, 1, [Define to 1 if you have clutter support.])
fi
GOOCANVAS_REQUIRED=1.4.0
GOOCANVAS_MODULES="goocanvasgtk-3.0 >= $GOOCANVAS_REQUIRED"
PKG_CHECK_MODULES(GOOCANVAS, $GOOCANVAS_MODULES, HAVE_GOOCANVAS=yes, HAVE_GOOCANVAS=no)
if test $HAVE_GOOCANVAS = yes; then
AC_DEFINE(HAVE_GOOCANVAS, 1, [Define to 1 if you have goocanvas support.])
fi
fi
GIR_REQUIRED=1.32.1
GIR_MODULES="gobject-introspection-1.0 >= $GIR_REQUIRED"
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
echo " Does Emacs support Xwidgets? ${HAVE_XWIDGETS}"
echo " Does xwidgets support webkit(requires gtk3)? ${HAVE_WEBKIT}"
echo " Does xwidgets support gobject introspection? ${HAVE_GIR}"
echo " Does xwidgets support clutter(demo code)? ${HAVE_CLUTTER}"
echo " Does xwidgets support goocanvas(demo code)? ${HAVE_GOOCANVAS}"
echo
if test -n "${EMACSDATA}"; then

View File

@ -227,9 +227,6 @@ CFLAGS_SOUND= @CFLAGS_SOUND@
RSVG_LIBS= @RSVG_LIBS@
RSVG_CFLAGS= @RSVG_CFLAGS@
CLUTTER_LIBS= @CLUTTER_LIBS@
CLUTTER_CFLAGS= @CLUTTER_CFLAGS@
WEBKIT_LIBS= @WEBKIT_LIBS@
WEBKIT_CFLAGS= @WEBKIT_CFLAGS@

View File

@ -79,18 +79,6 @@
#include "emacsgtkfixed.h"
#endif
#ifdef HAVE_GOOCANVAS
#include <goocanvas.h>
#endif
#ifdef HAVE_CLUTTER
#include <librsvg/rsvg.h>
#include <clutter/clutter.h>
#include <clutter-gtk/clutter-gtk.h>
#endif
#include <wchar.h>
#ifdef HAVE_WEBKIT_OSR
@ -995,51 +983,6 @@ xwidget_init_view (struct xwidget *xww,
//Cairo view
//uhm cairo is differentish in gtk 3.
//gdk_cairo_create (gtk_widget_get_window (FRAME_GTK_WIDGET (s->f)));
#ifdef HAVE_GOOCANVAS
xv->widget = goo_canvas_new();
GooCanvasItem *root, *rect_item, *text_item;
goo_canvas_set_bounds (GOO_CANVAS (xv->widget), 0, 0, 1000, 1000);
root = goo_canvas_get_root_item (GOO_CANVAS (xv->widget));
rect_item = goo_canvas_rect_new (root, 100, 100, 400, 400,
"line-width", 10.0,
"radius-x", 20.0,
"radius-y", 10.0,
"stroke-color", "yellow",
"fill-color", "red",
NULL);
text_item = goo_canvas_text_new (root, "Hello World", 300, 300, -1,
GTK_ANCHOR_CENTER,
"font", "Sans 24",
NULL);
goo_canvas_item_rotate (text_item, 45, 300, 300);
#endif
#ifdef HAVE_CLUTTER
xv->widget = gtk_clutter_embed_new ();;
ClutterActor *stage = NULL;
stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED ( xv->widget));
ClutterColor stage_color = { 0xaa, 0xaa, 0xaa, 0xff }; /* Black */
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
ClutterActor * texture = clutter_cairo_texture_new (1000, 1000);
clutter_container_add_actor(stage, texture);
clutter_actor_set_position(texture, 0,0);
clutter_actor_show(texture);
cairo_t *cr;
cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (texture));
/* draw on the context */
RsvgHandle *h = rsvg_handle_new_from_file ("/tmp/tst.svg",
NULL);
rsvg_handle_render_cairo(h, cr);
cairo_destroy (cr);
/* Show the stage: */
clutter_actor_show (stage);
#endif /* HAVE_CLUTTER */
} else if (EQ(xww->type, Qwebkit_osr)||
EQ(xww->type, Qsocket_osr)||
(Fget(xww->type, Qcxwgir_class) != Qnil))//xwgir widgets are OSR