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

int zbar_processor_set_visible ( zbar_processor_t processor,
int  visible 
)

show or hide the display window owned by the library. the size will be adjusted to the input size

Definition at line 524 of file processor.c.

References ZBAR_ERR_INVALID, zbar_processor_set_visible(), zbar_video_get_height(), and zbar_video_get_width().

Referenced by zbar::Processor::set_visible(), and zbar_processor_set_visible().

{
    proc_enter(proc);
    _zbar_mutex_unlock(&proc->mutex);

    int rc = 0;
    if(proc->window) {
        if(proc->video)
            rc = _zbar_processor_set_size(proc,
                                          zbar_video_get_width(proc->video),
                                          zbar_video_get_height(proc->video));
        if(!rc)
            rc = _zbar_processor_set_visible(proc, visible);

        if(!rc)
            proc->visible = (visible != 0);
    }
    else if(visible)
        rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_INVALID, __func__,
                         "processor display window not initialized");

    _zbar_mutex_lock(&proc->mutex);
    proc_leave(proc);
    return(rc);
}


Generated by  Doxygen 1.6.0   Back to index