Commit 496ed42b authored by Guido Günther's avatar Guido Günther Committed by Sebastian Dröge

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

parent 0df55f42
......@@ -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 */
......
......@@ -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 */
......
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment