[gtk+/refactor: 122/145] tests/testcairo.c: Use accessor functions to access GtkWidget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 122/145] tests/testcairo.c: Use accessor functions to access GtkWidget
- Date: Tue, 17 Aug 2010 18:13:42 +0000 (UTC)
commit 04bbce5249a9d7659d9937c7b817fced95c5c06f
Author: Javier Jardón <jjardon gnome org>
Date: Mon Aug 16 00:34:48 2010 +0200
tests/testcairo.c: Use accessor functions to access GtkWidget
tests/testcairo.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tests/testcairo.c b/tests/testcairo.c
index b2a232b..dc3a27c 100644
--- a/tests/testcairo.c
+++ b/tests/testcairo.c
@@ -195,11 +195,13 @@ on_expose_event (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
+ GtkAllocation allocation;
cairo_t *cr;
- cr = gdk_cairo_create (widget->window);
+ cr = gdk_cairo_create (gtk_widget_get_window (widget));
- draw (cr, widget->allocation.width, widget->allocation.height);
+ gtk_widget_get_allocation (widget, &allocation);
+ draw (cr, allocation.width, allocation.height);
cairo_destroy (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]