Example #1
0
int drv_object(int drvid, void *a0, void* a1, void* a2, void* a3, void* a4, void* a5, void* a6, void* a7, void* a8, void* a9)
{
    handle_head* head = (handle_head*)a0;
    QObject *self = (QObject*)head->native;
    switch (drvid) {
    case OBJECT_DESTROY: {
        drvDelObj(a0,self);
        break;
    }
    case OBJECT_STARTTIMER: {
        drvSetInt(a2,self->startTimer(drvGetInt(a1)));
        break;
    }
    case OBJECT_KILLTIMER: {
        self->killTimer(drvGetInt(a1));
        break;
    }
    case OBJECT_ONTIMEREVENT: {
        drvNewEvent(QEvent::Timer,a0,a1,a2);
        break;
    }
    default:
        return 0;
    }
    return 1;
}