void release_window_dc (XpDCInfo *dc_info) { gdk_win32_hdc_release (dc_info->drawable, dc_info->gc, 0); gdk_win32_end_direct_draw_libgtk_only (dc_info->data); }
/* Handle a draw/expose by finding the paragraphs that intersect * the region and reexposing them. */ void draw (GtkWidget *layout, GdkRectangle *area) { GList *tmp_list; guint height = 0; HDC hdc; const GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_BACKGROUND|GDK_GC_FONT; gdk_draw_rectangle (GTK_LAYOUT (layout)->bin_window, layout->style->base_gc[layout->state], TRUE, area->x, area->y, area->width, area->height); gdk_gc_set_clip_rectangle (layout->style->text_gc[layout->state], area); hdc = gdk_win32_hdc_get (GTK_LAYOUT (layout)->bin_window, layout->style->text_gc[GTK_STATE_NORMAL], mask); tmp_list = paragraphs; while (tmp_list && height < area->y + area->height + GTK_LAYOUT (layout)->yoffset) { Paragraph *para = tmp_list->data; tmp_list = tmp_list->next; if (height + para->height >= GTK_LAYOUT (layout)->yoffset + area->y) pango_win32_render_layout (hdc, para->layout, 0, height - GTK_LAYOUT (layout)->yoffset); height += para->height; } gdk_win32_hdc_release (GTK_LAYOUT (layout)->bin_window, layout->style->text_gc[GTK_STATE_NORMAL], mask); gdk_gc_set_clip_rectangle (layout->style->text_gc[layout->state], NULL); if (highlight_para) xor_char (layout, area, highlight_para, highlight_offset); }