[gimp/gtk3-port: 105/236] plug-ins: port sphere-designer to GtkWidget::draw()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 105/236] plug-ins: port sphere-designer to GtkWidget::draw()
- Date: Sat, 24 Sep 2011 21:44:28 +0000 (UTC)
commit 589ea3378ecb585117c5e51fd4204d0d8044a37c
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 31 16:07:24 2010 +0100
plug-ins: port sphere-designer to GtkWidget::draw()
plug-ins/common/sphere-designer.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/plug-ins/common/sphere-designer.c b/plug-ins/common/sphere-designer.c
index 9b8f2d8..1e3f788 100644
--- a/plug-ins/common/sphere-designer.c
+++ b/plug-ins/common/sphere-designer.c
@@ -2292,22 +2292,13 @@ initworld (void)
}
static gboolean
-expose_event (GtkWidget *widget,
- GdkEventExpose *event)
+draw (GtkWidget *widget,
+ cairo_t *cr)
{
- cairo_t *cr;
-
- cr = gdk_cairo_create (gtk_widget_get_window (widget));
-
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
-
cairo_set_source_surface (cr, buffer, 0.0, 0.0);
cairo_paint (cr);
- cairo_destroy (cr);
-
return TRUE;
}
@@ -2593,8 +2584,8 @@ makewindow (void)
gtk_widget_set_size_request (drawarea, PREVIEWSIZE, PREVIEWSIZE);
gtk_widget_show (drawarea);
- g_signal_connect (drawarea, "expose-event",
- G_CALLBACK (expose_event), NULL);
+ g_signal_connect (drawarea, "draw",
+ G_CALLBACK (draw), NULL);
hbox = gtk_hbox_new (TRUE, 0);
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]