First page Back Continue Last page Overview Graphics
KineTcl - Tools
Example:
critcl::class def ::kinetcl::CapFramesync {
::kt_abstract_class
method can-sync-with proc {XnNodeHandle other} bool {
return xnCanFrameSyncWith (instance->handle, other);
}
method start-sync-with proc {XnNodeHandle other} XnStatus {
return xnFrameSyncWith (instance->handle, other);
}
method stop-sync-with proc {XnNodeHandle other} XnStatus {
return xnStopFrameSyncWith (instance->handle, other);
}
method synced-with proc {XnNodeHandle other} bool {
return xnIsFrameSyncedWith (instance->handle, other);
}
kt_callback framesync \
xnRegisterToFrameSyncChange \
xnUnregisterFromFrameSyncChange \
{} {}
}
critcl::argtype XnNodeHandle {
if (kinetcl_validate(interp, @@, &@A) != TCL_OK) return TCL_ERROR;
}
critcl::resulttype XnStatus {
if (rv != XN_STATUS_OK) {
Tcl_AppendResult (interp, xnGetStatusString (rv), NULL);
return TCL_ERROR;
}
return TCL_OK;
}