void wf_uninit(wfInfo * wfi) { if (wfi->hwnd) CloseWindow(wfi->hwnd); wf_bitmap_free(wfi->backstore); if (wfi->palette != 0) free(wfi->palette); }
static void l_ui_paint_bitmap(struct rdp_inst * inst, int x, int y, int cx, int cy, int width, int height, uint8 * data) { wfInfo * wfi; struct wf_bitmap * bm; wfi = GET_WFI(inst); //printf("ui_paint_bitmap x %d y %d cx %d cy %d width %d height %d\n", x, y, cx, cy, width, height); bm = (struct wf_bitmap *) l_ui_create_bitmap(inst, width, height, data); BitBlt(wfi->backstore->hdc, x, y, cx, cy, bm->hdc, 0, 0, SRCCOPY); wf_bitmap_free(bm); wf_invalidate_region(wfi, x, y, x + cx, y + cy); }
static void l_ui_destroy_surface(struct rdp_inst * inst, RD_HBITMAP surface) { wfInfo * wfi = GET_WFI(inst); if (wfi->drw == surface) { l_ui_warning(inst, "ui_destroy_surface: freeing active surface!\n"); wfi->drw = wfi->backstore; } if (surface != 0) { wf_bitmap_free((struct wf_bitmap *)surface); } }
void wf_uninit(rdpInst * inst) { wfInfo * wfi; wfi = GET_WFI(inst); /* Inform the main thread to destroy the window */ SetWindowLongPtr(wfi->hwnd, GWLP_USERDATA, -1); CloseWindow(wfi->hwnd); wf_bitmap_free(wfi->backstore); if (wfi->colormap != 0) { free(wfi->colormap); } free(wfi); }
static RD_HBITMAP l_ui_create_surface(struct rdp_inst * inst, int width, int height, RD_HBITMAP old_surface) { wfInfo * wfi; struct wf_bitmap * bm; struct wf_bitmap * old_bm; wfi = GET_WFI(inst); bm = wf_bitmap_new(wfi, width, height, 0, 0, NULL); old_bm = (struct wf_bitmap *) old_surface; if (old_bm != 0) { BitBlt(bm->hdc, 0, 0, width, height, old_bm->hdc, 0, 0, SRCCOPY); wf_bitmap_free(old_bm); } if (wfi->drw == old_bm) { wfi->drw = bm; } return (RD_HBITMAP)bm; }
static void l_ui_destroy_bitmap(struct rdp_inst * inst, RD_HBITMAP bmp) { wf_bitmap_free((struct wf_bitmap *) bmp); }
static void l_ui_destroy_glyph(struct rdp_inst * inst, RD_HGLYPH glyph) { wf_bitmap_free((struct wf_bitmap *) glyph); }