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

int zebra_processor_user_wait ( zebra_processor_t processor,
int  timeout 
)

wait for input to the display window from the user (via mouse or keyboard).

Returns:
>0 when input is received, 0 if timeout ms expired with no input or -1 in case of an error

Definition at line 645 of file processor.c.

References ZEBRA_ERR_CLOSED, and zebra_processor_user_wait().

Referenced by zebra::Processor::user_wait(), and zebra_processor_user_wait().

{
    if(proc_lock(proc) < 0)
        return(-1);
    int rc = -1;
    if(proc->visible || proc->active || timeout > 0)
        rc = proc_event_wait(proc, EVENT_INPUT, timeout);
    if(rc > 0)
        rc = proc->input;
    proc_unlock(proc);
    if(!proc->visible)
        return(err_capture(proc, SEV_WARNING, ZEBRA_ERR_CLOSED, __func__,
                           "display window not available for input"));
    return(rc);
}


Generated by  Doxygen 1.6.0   Back to index