mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
examples: Make demos -DSEAL safe to fix build with GTK+ 3.0
This commit is contained in:
parent
0df55f42e6
commit
496ed42bbd
3 changed files with 18 additions and 12 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue