Exemplo n.º 1
0
static void gui_drawingarea_cb_expose (Picture me, GuiDrawingArea_ExposeEvent event) {
	#if gtk
		/*
		 * The size of the viewable part of the drawing area may have changed.
		 */
		Melder_assert (event -> widget);
		#if ALLOW_GDK_DRAWING
			gdk_cairo_reset_clip ((cairo_t *) Graphics_x_getCR (my graphics.get()),          GDK_DRAWABLE (GTK_WIDGET (event -> widget -> d_widget) -> window));
			gdk_cairo_reset_clip ((cairo_t *) Graphics_x_getCR (my selectionGraphics.get()), GDK_DRAWABLE (GTK_WIDGET (event -> widget -> d_widget) -> window));
		#endif
	#else
		(void) event;
	#endif
	drawMarkers (me);
	Graphics_play (my graphics.get(), my graphics.get());
	drawSelection (me, 1);
}
static void gui_drawingarea_cb_expose (I, GuiDrawingAreaExposeEvent event) {
	if (theLogo.graphics == NULL)
		theLogo.graphics = Graphics_create_xmdrawingarea (theLogo.drawingArea);
#if gtk
	Graphics_x_setCR (theLogo.graphics, gdk_cairo_create (GDK_DRAWABLE (GTK_WIDGET (event -> widget -> d_widget) -> window)));
	cairo_rectangle ((cairo_t *) Graphics_x_getCR (theLogo.graphics), (double) event->x, (double) event->y, (double) event->width, (double) event->height);
	cairo_clip ((cairo_t *) Graphics_x_getCR (theLogo.graphics));
	theLogo.draw (theLogo.graphics);
	cairo_destroy ((cairo_t *) Graphics_x_getCR (theLogo.graphics));
#elif motif
	(void) void_me;
	(void) event;
	if (theLogo.graphics == NULL)
		theLogo.graphics = Graphics_create_xmdrawingarea (theLogo.drawingArea);
	theLogo.draw (theLogo.graphics);
#endif
}
Exemplo n.º 3
0
static void gui_drawingarea_cb_expose (Thing /* me */, GuiDrawingArea_ExposeEvent event) {
	if (! theLogo.graphics)
		theLogo.graphics = Graphics_create_xmdrawingarea (theLogo.drawingArea);
	#if gtk
		#if ALLOW_GDK_DRAWING
			Graphics_x_setCR (theLogo.graphics, gdk_cairo_create (GDK_DRAWABLE (GTK_WIDGET (event -> widget -> d_widget) -> window)));
		#else
			Graphics_x_setCR (theLogo.graphics, gdk_cairo_create (gtk_widget_get_window (GTK_WIDGET (event -> widget -> d_widget))));
		#endif
		cairo_rectangle ((cairo_t *) Graphics_x_getCR (theLogo.graphics), (double) event->x, (double) event->y, (double) event->width, (double) event->height);
		cairo_clip ((cairo_t *) Graphics_x_getCR (theLogo.graphics));
		theLogo.draw (theLogo.graphics);
		cairo_destroy ((cairo_t *) Graphics_x_getCR (theLogo.graphics));
	#elif motif || cocoa
		(void) event;
		if (! theLogo.graphics)
			theLogo.graphics = Graphics_create_xmdrawingarea (theLogo.drawingArea);
		theLogo.draw (theLogo.graphics);
	#endif
}