examples: Make demos -DSEAL safe to fix build with GTK+ 3.0

This commit is contained in:
Guido Günther 2010-06-26 20:12:25 +02:00 committed by Sebastian Dröge
parent 0df55f42e6
commit 496ed42bbd
3 changed files with 18 additions and 12 deletions

View file

@ -83,14 +83,16 @@ draw_spectrum (gfloat * data)
if (!drawingarea)
return;
gdk_window_begin_paint_rect (drawingarea->window, &rect);
gdk_draw_rectangle (drawingarea->window, drawingarea->style->black_gc,
gdk_window_begin_paint_rect (gtk_widget_get_window (drawingarea), &rect);
gdk_draw_rectangle (gtk_widget_get_window (drawingarea),
gtk_widget_get_style (drawingarea)->black_gc,
TRUE, 0, 0, spect_bands, spect_height);
for (i = 0; i < spect_bands; i++) {
gdk_draw_rectangle (drawingarea->window, drawingarea->style->white_gc,
gdk_draw_rectangle (gtk_widget_get_window (drawingarea),
gtk_widget_get_style (drawingarea)->white_gc,
TRUE, i, -data[i], 1, spect_height + data[i]);
}
gdk_window_end_paint (drawingarea->window);
gdk_window_end_paint (gtk_widget_get_window (drawingarea));
}
/* receive spectral data from element message */

View file

@ -82,14 +82,16 @@ draw_spectrum (gfloat * data)
if (!drawingarea)
return;
gdk_window_begin_paint_rect (drawingarea->window, &rect);
gdk_draw_rectangle (drawingarea->window, drawingarea->style->black_gc,
gdk_window_begin_paint_rect (gtk_widget_get_window (drawingarea), &rect);
gdk_draw_rectangle (gtk_widget_get_window (drawingarea),
gtk_widget_get_style (drawingarea)->black_gc,
TRUE, 0, 0, spect_bands, spect_height);
for (i = 0; i < spect_bands; i++) {
gdk_draw_rectangle (drawingarea->window, drawingarea->style->white_gc,
gdk_draw_rectangle (gtk_widget_get_window (drawingarea),
gtk_widget_get_style (drawingarea)->white_gc,
TRUE, i, -data[i], 1, spect_height + data[i]);
}
gdk_window_end_paint (drawingarea->window);
gdk_window_end_paint (gtk_widget_get_window (drawingarea));
}
/* process delayed message */

View file

@ -71,14 +71,16 @@ draw_spectrum (gfloat * data)
if (!drawingarea)
return;
gdk_window_begin_paint_rect (drawingarea->window, &rect);
gdk_draw_rectangle (drawingarea->window, drawingarea->style->black_gc,
gdk_window_begin_paint_rect (gtk_widget_get_window (drawingarea), &rect);
gdk_draw_rectangle (gtk_widget_get_window (drawingarea),
gtk_widget_get_style (drawingarea)->black_gc,
TRUE, 0, 0, spect_bands, spect_height);
for (i = 0; i < spect_bands; i++) {
gdk_draw_rectangle (drawingarea->window, drawingarea->style->white_gc,
gdk_draw_rectangle (gtk_widget_get_window (drawingarea),
gtk_widget_get_style (drawingarea)->white_gc,
TRUE, i, -data[i], 1, spect_height + data[i]);
}
gdk_window_end_paint (drawingarea->window);
gdk_window_end_paint (gtk_widget_get_window (drawingarea));
}
/* process delayed message */