diff options
Diffstat (limited to 'src/xwidget.c')
| -rw-r--r-- | src/xwidget.c | 57 |
1 files changed, 0 insertions, 57 deletions
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 |