예제 #1
0
static int tm_check( unsigned short *status, MOUSEORD *row,
                     MOUSEORD *col, unsigned long *the_time )
/**********************************************/
{

    if( !MouseInstalled ) {
         uisetmouse(*row, *col);
         return 0;
    }
    UIDebugPrintf1( "mouse_string = '%s'", buf );
    if( new_sample ) {
        switch( MouseType ) {
        case M_XT:
            XT_parse();
            break;
#ifdef __LINUX__
        case M_GPM:
            GPM_parse();
            break;
#endif
        case M_NONE:
            break;
        }
        new_sample = 0;
    }
    *row        = last_row;
    *col        = last_col;
    *status     = last_status;
    *the_time   = (long)time( NULL ) * 1000L;
    uisetmouse(*row, *col);
    return 0;
}
예제 #2
0
static int tm_check( unsigned short *status, unsigned short *row, unsigned short *col, unsigned long *time )
/**********************************************************************************************************/
{
    if( !MouseInstalled ) {
         uisetmouse( *row, *col );
         return( 0 );
    }
    QNXDebugPrintf1("mouse_string = '%s'", buf);
    if( new_sample ) {
        switch( MouseType ) {
        case M_QW:
        case M_AW:
            QW_parse();
            break;
        case M_XT:
            XT_parse();
            break;
        }
        new_sample = 0;
    }
    *row = last_row;
    *col = last_col;
    *status = last_status;
    *time = GET_MSECS;
    uisetmouse( *row, *col );
    return( 0 );
}
예제 #3
0
void intern checkmouse( unsigned short *pstatus, MOUSEORD *prow, MOUSEORD *pcol, unsigned long *ptime )
{
    *pstatus = currMouseStatus;
    *prow = currMouseRow;
    *pcol = currMouseCol;
    *ptime = uiclock();
    uisetmouse( *prow, *pcol );
}
예제 #4
0
static bool cm_check( MOUSESTAT *status, MOUSEORD *row, MOUSEORD *col, MOUSETIME *time )
/**************************************************************************************/
{
    struct  mouse_event    event;
    struct  itimerspec     timer;

    if( MouseInstalled ) {
        if( mouse_read( MouseCtrl, &event, 1, UIRemProxy, 0 ) > 0 ) {
            ScaledRow -= event.dy;
            if( ScaledRow < 0 )
                ScaledRow = 0;
            if( ScaledRow > ( UIData->height - 1 ) * MOUSE_SCALE ) {
                ScaledRow = ( UIData->height - 1 ) * MOUSE_SCALE;
            }
            ScaledCol += event.dx;
            if( ScaledCol < 0 )
                ScaledCol = 0;
            if( ScaledCol > ( UIData->width - 1 ) * MOUSE_SCALE ) {
                ScaledCol = ( UIData->width - 1 ) * MOUSE_SCALE;
            }
            MyStatus = 0;
            if( event.buttons & _MOUSE_LEFT )
                MyStatus |= UI_MOUSE_PRESS;
            if( event.buttons & _MOUSE_MIDDLE )
                MyStatus |= UI_MOUSE_PRESS_MIDDLE;
            if( event.buttons & _MOUSE_RIGHT )
                MyStatus |= UI_MOUSE_PRESS_RIGHT;
            timer.it_value.tv_sec = 0;
            timer.it_value.tv_nsec = 0;
        } else if( (MyStatus & UI_MOUSE_PRESS_ANY) == 0 ) {
            timer.it_value.tv_sec = 0;
            timer.it_value.tv_nsec = 0;
        } else {
            timer.it_value.tv_sec = 0;
            timer.it_value.tv_nsec = UIData->mouse_rpt_delay * 1000000UL;
            if( timer.it_value.tv_nsec == 0 ) {
                timer.it_value.tv_nsec = 1;
            }
        }
        timer.it_interval.tv_sec = 0;
        timer.it_interval.tv_nsec = 0;
        reltimer( MouseTimer, &timer, NULL );
        *status = MyStatus;
        *time = uiclock();
        *row = ScaledRow / MOUSE_SCALE;
        *col = ScaledCol / MOUSE_SCALE;
    }
    uisetmouse( *row, *col );
    return( false );
}
예제 #5
0
void UIAPI uisetmouseposn( ORD row, ORD col )
{
    uisetmouse( row, col );
}
예제 #6
0
void global uisetmouseposn( ORD row, ORD col )
{
    uisetmouse( row, col );
}