[gtk+/rendering-cleanup-next: 21/199] image: Port to draw vfunc
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 21/199] image: Port to draw vfunc
- Date: Thu, 23 Sep 2010 21:20:51 +0000 (UTC)
commit c94ba9625020e1d312d5dff693c661a72aad9b79
Author: Benjamin Otte <otte redhat com>
Date: Fri Sep 3 18:22:59 2010 +0200
image: Port to draw vfunc
gtk/gtkimage.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index df611b5..367e44c 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -155,8 +155,8 @@ struct _GtkImagePrivate
#define DEFAULT_ICON_SIZE GTK_ICON_SIZE_BUTTON
-static gint gtk_image_expose (GtkWidget *widget,
- GdkEventExpose *event);
+static gint gtk_image_draw (GtkWidget *widget,
+ cairo_t *cr);
static void gtk_image_unmap (GtkWidget *widget);
static void gtk_image_unrealize (GtkWidget *widget);
static void gtk_image_size_request (GtkWidget *widget,
@@ -219,7 +219,7 @@ gtk_image_class_init (GtkImageClass *class)
widget_class = GTK_WIDGET_CLASS (class);
- widget_class->expose_event = gtk_image_expose;
+ widget_class->draw = gtk_image_draw;
widget_class->size_request = gtk_image_size_request;
widget_class->unmap = gtk_image_unmap;
widget_class->unrealize = gtk_image_unrealize;
@@ -1569,20 +1569,18 @@ ensure_pixbuf_for_gicon (GtkImage *image,
}
static gint
-gtk_image_expose (GtkWidget *widget,
- GdkEventExpose *event)
+gtk_image_draw (GtkWidget *widget,
+ cairo_t *cr)
{
GtkImage *image;
GtkImagePrivate *priv;
g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
image = GTK_IMAGE (widget);
priv = image->priv;
- if (gtk_widget_get_mapped (widget) &&
- priv->storage_type != GTK_IMAGE_EMPTY)
+ if (priv->storage_type != GTK_IMAGE_EMPTY)
{
GtkAllocation allocation;
GtkMisc *misc;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]