[gtk+/rendering-cleanup-next: 74/155] combobox: Port to draw vfunc
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 74/155] combobox: Port to draw vfunc
- Date: Wed, 15 Sep 2010 03:03:08 +0000 (UTC)
commit 11bb2361f7ee6a57a18d80330c20ab90afcfac2d
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 7 20:17:39 2010 +0200
combobox: Port to draw vfunc
gtk/gtkcombobox.c | 42 +++++++++++++++++++-----------------------
1 files changed, 19 insertions(+), 23 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 6059e1e..347bb67 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -286,8 +286,8 @@ static void gtk_combo_box_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
-static gboolean gtk_combo_box_expose_event (GtkWidget *widget,
- GdkEventExpose *event);
+static gboolean gtk_combo_box_draw (GtkWidget *widget,
+ cairo_t *cr);
static gboolean gtk_combo_box_scroll_event (GtkWidget *widget,
GdkEventScroll *event);
static void gtk_combo_box_set_active_internal (GtkComboBox *combo_box,
@@ -514,7 +514,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
widget_class = (GtkWidgetClass *)klass;
widget_class->size_allocate = gtk_combo_box_size_allocate;
- widget_class->expose_event = gtk_combo_box_expose_event;
+ widget_class->draw = gtk_combo_box_draw;
widget_class->scroll_event = gtk_combo_box_scroll_event;
widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate;
widget_class->grab_focus = gtk_combo_box_grab_focus;
@@ -2480,39 +2480,35 @@ gtk_combo_box_child_hide (GtkWidget *widget,
}
static gboolean
-gtk_combo_box_expose_event (GtkWidget *widget,
- GdkEventExpose *event)
+gtk_combo_box_draw (GtkWidget *widget,
+ cairo_t *cr)
{
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
GtkComboBoxPrivate *priv = combo_box->priv;
- if (gtk_widget_is_drawable (widget) &&
- GTK_SHADOW_NONE != priv->shadow_type)
+ if (priv->shadow_type != GTK_SHADOW_NONE)
{
- GtkAllocation allocation;
-
- gtk_widget_get_allocation (widget, &allocation);
-
- gtk_paint_shadow (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
+ gtk_cairo_paint_shadow (gtk_widget_get_style (widget),
+ cr,
GTK_STATE_NORMAL, priv->shadow_type,
- NULL, widget, "combobox",
- allocation.x, allocation.y,
- allocation.width, allocation.height);
+ widget, "combobox",
+ 0, 0,
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget));
}
- gtk_container_propagate_expose (GTK_CONTAINER (widget),
- priv->button, event);
+ gtk_container_propagate_draw (GTK_CONTAINER (widget),
+ priv->button, cr);
if (priv->tree_view && priv->cell_view_frame)
{
- gtk_container_propagate_expose (GTK_CONTAINER (widget),
- priv->cell_view_frame, event);
+ gtk_container_propagate_draw (GTK_CONTAINER (widget),
+ priv->cell_view_frame, cr);
}
- gtk_container_propagate_expose (GTK_CONTAINER (widget),
- gtk_bin_get_child (GTK_BIN (widget)),
- event);
+ gtk_container_propagate_draw (GTK_CONTAINER (widget),
+ gtk_bin_get_child (GTK_BIN (widget)),
+ cr);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]