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 }
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 }