Logo Search packages:      
Sourcecode: zbar version File versions  Download package

int zbar_window_attach ( zbar_window_t window,
void *  x11_display_w32_hwnd,
unsigned long  x11_drawable 
)

associate reader with an existing platform window. This can be any "Drawable" for X Windows or a "HWND" for windows. input images will be scaled into the output window. pass NULL to detach from the resource, further input will be ignored

Definition at line 49 of file window.c.

References zbar_window_attach(), and zbar_window_draw().

Referenced by zbar::Window::attach(), zbar_window_attach(), and zbar_window_destroy().

{
    /* release image */
    zbar_window_draw(w, NULL);
    if(w->cleanup) {
        w->cleanup(w);
        w->cleanup = NULL;
        w->draw_image = NULL;
    }
    if(w->formats) {
        free(w->formats);
        w->formats = NULL;
    }
    w->src_format = 0;
    w->src_width = w->src_height = 0;
    w->scaled_size.x = w->scaled_size.y = 0;
    w->dst_width = w->dst_height = 0;
    w->max_width = w->max_height = 1 << 15;
    w->scale_num = w->scale_den = 1;
    return(_zbar_window_attach(w, display, drawable));
}


Generated by  Doxygen 1.6.0   Back to index