static gboolean bacon_video_osd_actor_draw (ClutterCanvas *canvas, cairo_t *cr, int width, int height, BaconVideoOsdActor *osd) { GsdOsdDrawContext *ctx; ctx = osd->priv->ctx; cairo_save (cr); cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); cairo_paint (cr); cairo_restore (cr); cairo_set_operator (cr, CAIRO_OPERATOR_OVER); ctx->width = width; ctx->height = height; ctx->icon_name = osd->priv->icon_name; ctx->message = osd->priv->message; gsd_osd_window_draw (ctx, cr); return FALSE; }
static gboolean draw_box (ClutterCanvas *canvas, cairo_t *cr, int width, int height, GsdOsdDrawContext *ctx) { cairo_save (cr); cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); cairo_paint (cr); cairo_restore (cr); cairo_set_operator (cr, CAIRO_OPERATOR_OVER); ctx->size = MIN(width, height); ctx->action = GSD_OSD_WINDOW_ACTION_CUSTOM; ctx->icon_name = "touchpad-disabled-symbolic"; gsd_osd_window_draw (ctx, cr); return FALSE; }