[gtk+/rendering-cleanup-next: 53/153] infobar: Port to draw vfunc
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 53/153] infobar: Port to draw vfunc
- Date: Sat, 11 Sep 2010 04:55:53 +0000 (UTC)
commit b0e3779896aefdec05cbe43c7039787305955091
Author: Benjamin Otte <otte redhat com>
Date: Mon Sep 6 19:44:32 2010 +0200
infobar: Port to draw vfunc
gtk/gtkinfobar.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 0415c91..fa0b997 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -159,8 +159,10 @@ static void gtk_info_bar_get_property (GObject *object,
GParamSpec *pspec);
static void gtk_info_bar_style_set (GtkWidget *widget,
GtkStyle *prev_style);
-static gboolean gtk_info_bar_expose (GtkWidget *widget,
- GdkEventExpose *event);
+static gboolean gtk_info_bar_draw (GtkWidget *widget,
+ cairo_t *cr,
+ int width,
+ int height);
static void gtk_info_bar_buildable_interface_init (GtkBuildableIface *iface);
static GObject *gtk_info_bar_buildable_get_internal_child (GtkBuildable *buildable,
GtkBuilder *builder,
@@ -296,8 +298,10 @@ gtk_info_bar_close (GtkInfoBar *info_bar)
}
static gboolean
-gtk_info_bar_expose (GtkWidget *widget,
- GdkEventExpose *event)
+gtk_info_bar_draw (GtkWidget *widget,
+ cairo_t *cr,
+ int width,
+ int height)
{
GtkInfoBarPrivate *priv = GTK_INFO_BAR (widget)->priv;
const char* type_detail[] = {
@@ -310,26 +314,22 @@ gtk_info_bar_expose (GtkWidget *widget,
if (priv->message_type != GTK_MESSAGE_OTHER)
{
- GtkAllocation allocation;
const char *detail;
detail = type_detail[priv->message_type];
- gtk_widget_get_allocation (widget, &allocation);
-
- gtk_paint_box (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
+ gtk_cairo_paint_box (gtk_widget_get_style (widget),
+ cr,
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
- NULL,
widget,
detail,
- allocation.x, allocation.y,
- allocation.width, allocation.height);
+ 0, 0,
+ width, height);
}
- if (GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->expose_event)
- GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->expose_event (widget, event);
+ if (GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->draw)
+ GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->draw (widget, cr, width, height);
return FALSE;
}
@@ -349,7 +349,7 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
object_class->finalize = gtk_info_bar_finalize;
widget_class->style_set = gtk_info_bar_style_set;
- widget_class->expose_event = gtk_info_bar_expose;
+ widget_class->draw = gtk_info_bar_draw;
klass->close = gtk_info_bar_close;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]