void initSpeechPrimitives () { int base, index; base = nextPrimitiveIndex(); index = 0; s_speechwordAction = getsym("doWordAction"); s_speechdoneAction = getsym("doSpeechDoneAction"); s_speech = getsym("Speech"); definePrimitive(base, index++, "_SpeakText", prSpeakText, 3, 0); definePrimitive(base, index++, "_InitSpeech", prInitSpeech, 2, 0); definePrimitive(base, index++, "_SetSpeechRate", prSetSpeechRate, 3, 0); definePrimitive(base, index++, "_SetSpeechPitch", prSetSpeechPitch, 3, 0); definePrimitive(base, index++, "_SetSpeechPitchMod", prSetSpeechPitchMod, 3, 0); definePrimitive(base, index++, "_SetSpeechVoice", prSetSpeechVoice, 3, 0); definePrimitive(base, index++, "_SetSpeechVolume", prSetSpeechVolume, 3, 0); definePrimitive(base, index++, "_SetSpeechPause", prSetSpeechPause, 3, 0); //0 pause, 1 continue definePrimitive(base, index++, "_SetSpeechStopAt", prSetSpeechStop, 3, 0); //0 kImmediate, 1 kEndOfWord, 2 kEndOfSentence definePrimitive(base, index++, "_SpeechVoiceIsSpeaking", prSpeechVoiceIsSpeaking, 2, 0); for(int i=0; i<kMaxSpeechChannels; ++i){ speechStrings[i] = NULL; if(fCurSpeechChannel[i]) DisposeSpeechChannel(fCurSpeechChannel[i]); fCurSpeechChannel[i] = NULL; } }
void initScIDEPrimitives() { int base = nextPrimitiveIndex(); int index = 0; definePrimitive(base, index++, "_ScIDE_Connect", ScIDE_Connect, 2, 0); definePrimitive(base, index++, "_ScIDE_Connected", ScIDE_Connected, 1, 0); definePrimitive(base, index++, "_ScIDE_Send", ScIDE_Send, 3, 0); definePrimitive(base, index++, "_ScIDE_GetQUuid", ScIDE_GetQUuid, 0, 0); }
void SC_LIDInit() { int base, index; base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_LID_Start", prLID_Start, 1, 0); definePrimitive(base, index++, "_LID_Stop", prLID_Stop, 1, 0); }
void initMIDIPrimitives() { int base, index; base = nextPrimitiveIndex(); index = 0; s_midiin = getsym("MIDIIn"); s_domidiaction = getsym("doAction"); s_midiNoteOnAction = getsym("doNoteOnAction"); s_midiNoteOffAction = getsym("doNoteOffAction"); s_midiTouchAction = getsym("doTouchAction"); s_midiControlAction = getsym("doControlAction"); s_midiPolyTouchAction = getsym("doPolyTouchAction"); s_midiProgramAction = getsym("doProgramAction"); s_midiBendAction = getsym("doBendAction"); s_midiSysexAction = getsym("doSysexAction"); s_midiInvalidSysexAction = getsym("doInvalidSysexAction"); // client can handle incorrect case s_midiSysrtAction = getsym("doSysrtAction"); s_midiSMPTEAction = getsym("doSMPTEaction"); s_numMIDIDev = getsym("prSetNumberOfDevices"); s_midiclient = getsym("MIDIClient"); definePrimitive(base, index++, "_ListMIDIEndpoints", prListMIDIEndpoints, 1, 0); definePrimitive(base, index++, "_InitMIDI", prInitMIDI, 3, 0); definePrimitive(base, index++, "_InitMIDIClient", prInitMIDIClient, 1, 0); definePrimitive(base, index++, "_ConnectMIDIIn", prConnectMIDIIn, 3, 0); definePrimitive(base, index++, "_DisconnectMIDIIn", prDisconnectMIDIIn, 3, 0); definePrimitive(base, index++, "_DisposeMIDIClient", prDisposeMIDIClient, 1, 0); definePrimitive(base, index++, "_RestartMIDI", prRestartMIDI, 1, 0); definePrimitive(base, index++, "_SendMIDIOut", prSendMIDIOut, 9, 0); definePrimitive(base, index++, "_SendSysex", prSendSysex, 3, 0); pthread_mutex_init (&gPmStreamMutex, NULL); midiCleanUp(); }
void SC_TerminalClient::onLibraryStartup() { SC_LanguageClient::onLibraryStartup(); int base, index = 0; base = nextPrimitiveIndex(); definePrimitive(base, index++, "_Argv", &SC_TerminalClient::prArgv, 1, 0); definePrimitive(base, index++, "_Exit", &SC_TerminalClient::prExit, 1, 0); definePrimitive(base, index++, "_AppClock_SchedNotify", &SC_TerminalClient::prScheduleChanged, 1, 0); definePrimitive(base, index++, "_Recompile", &SC_TerminalClient::prRecompile, 1, 0); }
void initArchiverPrimitives() { int base, index; base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_AsArchive", prAsArchive, 1, 0); definePrimitive(base, index++, "_Unarchive", prUnarchive, 1, 0); definePrimitive(base, index++, "_WriteArchive", prWriteArchive, 2, 0); definePrimitive(base, index++, "_ReadArchive", prReadArchive, 2, 0); }
void initScIDEPrimitives() { int base = nextPrimitiveIndex(); int index = 0; definePrimitive(base, index++, "_ScIDE_Connect", ScIDE_Connect, 2, 0); definePrimitive(base, index++, "_ScIDE_Connected", ScIDE_Connected, 1, 0); definePrimitive(base, index++, "_ScIDE_Send", ScIDE_Send, 3, 0); definePrimitive(base, index++, "_ScIDE_GetQUuid", ScIDE_GetQUuid, 0, 0); definePrimitive(base, index++, "_ScIDE_GetDocTextMirror", ScIDE_GetDocTextMirror, 4, 0); definePrimitive(base, index++, "_ScIDE_SetDocTextMirror", ScIDE_SetDocTextMirror, 5, 0); definePrimitive(base, index++, "_ScIDE_GetDocSelectionStart", ScIDE_GetDocSelectionStart, 2, 0); definePrimitive(base, index++, "_ScIDE_GetDocSelectionRange", ScIDE_GetDocSelectionRange, 2, 0); definePrimitive(base, index++, "_ScIDE_SetDocSelectionMirror", ScIDE_SetDocSelectionMirror, 4, 0); }
void initSCDocPrimitives() { int base, index = 0; s_scdoc_node = getsym("SCDocNode"); base = nextPrimitiveIndex(); definePrimitive(base, index++, "_SCDoc_ParseFile", prSCDoc_ParseFile, 3, 0); }
void initPlatformPrimitives() { int base, index = 0; base = nextPrimitiveIndex(); definePrimitive(base, index++, "_Platform_userHomeDir", prPlatform_userHomeDir, 1, 0); definePrimitive(base, index++, "_Platform_systemAppSupportDir", prPlatform_systemAppSupportDir, 1, 0); definePrimitive(base, index++, "_Platform_userAppSupportDir", prPlatform_userAppSupportDir, 1, 0); definePrimitive(base, index++, "_Platform_systemExtensionDir", prPlatform_systemExtensionDir, 1, 0); definePrimitive(base, index++, "_Platform_userExtensionDir", prPlatform_userExtensionDir, 1, 0); definePrimitive(base, index++, "_Platform_userConfigDir", prPlatform_userConfigDir, 1, 0); definePrimitive(base, index++, "_Platform_resourceDir", prPlatform_resourceDir, 1, 0); definePrimitive(base, index++, "_Platform_ideName", prPlatform_ideName, 1, 0); #ifdef _WIN32 definePrimitive(base, index++, "_WinPlatform_myDocumentsDir", prWinPlatform_myDocumentsDir, 1, 0); #endif }
void initSerialPrimitives() { int base, index; base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_SerialPort_Open", prSerialPort_Open, 2+SerialPort::kNumOptions, 0); definePrimitive(base, index++, "_SerialPort_Close", prSerialPort_Close, 1, 0); definePrimitive(base, index++, "_SerialPort_Next", prSerialPort_Next, 1, 0); definePrimitive(base, index++, "_SerialPort_Put", prSerialPort_Put, 2, 0); definePrimitive(base, index++, "_SerialPort_RXErrors", prSerialPort_RXErrors, 1, 0); definePrimitive(base, index++, "_SerialPort_Cleanup", prSerialPort_Cleanup, 1, 0); SerialPort::s_dataAvailable = getsym("prDataAvailable"); SerialPort::s_doneAction = getsym("prDoneAction"); }
void init_OSC_primitives() { int base, index; base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_NetAddr_Connect", prNetAddr_Connect, 1, 0); definePrimitive(base, index++, "_NetAddr_Disconnect", prNetAddr_Disconnect, 1, 0); definePrimitive(base, index++, "_NetAddr_SendMsg", prNetAddr_SendMsg, 1, 1); definePrimitive(base, index++, "_NetAddr_SendBundle", prNetAddr_SendBundle, 2, 1); definePrimitive(base, index++, "_NetAddr_SendRaw", prNetAddr_SendRaw, 2, 0); definePrimitive(base, index++, "_NetAddr_GetBroadcastFlag", prNetAddr_GetBroadcastFlag, 1, 0); definePrimitive(base, index++, "_NetAddr_SetBroadcastFlag", prNetAddr_SetBroadcastFlag, 2, 0); definePrimitive(base, index++, "_NetAddr_BundleSize", prNetAddr_BundleSize, 1, 0); definePrimitive(base, index++, "_NetAddr_MsgSize", prNetAddr_MsgSize, 1, 0); definePrimitive(base, index++, "_NetAddr_UseDoubles", prNetAddr_UseDoubles, 2, 0); definePrimitive(base, index++, "_Array_OSCBytes", prArray_OSCBytes, 1, 0); definePrimitive(base, index++, "_GetHostByName", prGetHostByName, 1, 0); definePrimitive(base, index++, "_GetLangPort", prGetLangPort, 1, 0); definePrimitive(base, index++, "_Exit", prExit, 1, 0); #ifndef NO_INTERNAL_SERVER definePrimitive(base, index++, "_BootInProcessServer", prBootInProcessServer, 1, 0); #endif definePrimitive(base, index++, "_QuitInProcessServer", prQuitInProcessServer, 1, 0); definePrimitive(base, index++, "_AllocSharedControls", prAllocSharedControls, 2, 0); definePrimitive(base, index++, "_SetSharedControl", prSetSharedControl, 3, 0); definePrimitive(base, index++, "_GetSharedControl", prGetSharedControl, 2, 0); //post("initOSCRecs###############\n"); s_call = getsym("call"); s_write = getsym("write"); s_recvoscmsg = getsym("recvOSCmessage"); s_recvoscbndl = getsym("recvOSCbundle"); s_netaddr = getsym("NetAddr"); }
void initSchedPrimitives() { int base, index=0; base = nextPrimitiveIndex(); definePrimitive(base, index++, "_TempoClock_New", prTempoClock_New, 4, 0); definePrimitive(base, index++, "_TempoClock_Free", prTempoClock_Free, 1, 0); definePrimitive(base, index++, "_TempoClock_Clear", prTempoClock_Clear, 1, 0); definePrimitive(base, index++, "_TempoClock_Dump", prTempoClock_Dump, 1, 0); definePrimitive(base, index++, "_TempoClock_Sched", prTempoClock_Sched, 3, 0); definePrimitive(base, index++, "_TempoClock_SchedAbs", prTempoClock_SchedAbs, 3, 0); definePrimitive(base, index++, "_TempoClock_Tempo", prTempoClock_Tempo, 1, 0); definePrimitive(base, index++, "_TempoClock_BeatDur", prTempoClock_BeatDur, 1, 0); definePrimitive(base, index++, "_TempoClock_ElapsedBeats", prTempoClock_ElapsedBeats, 1, 0); definePrimitive(base, index++, "_TempoClock_Beats", prTempoClock_Beats, 1, 0); definePrimitive(base, index++, "_TempoClock_SetTempoAtBeat", prTempoClock_SetTempoAtBeat, 3, 0); definePrimitive(base, index++, "_TempoClock_SetTempoAtTime", prTempoClock_SetTempoAtTime, 3, 0); definePrimitive(base, index++, "_TempoClock_SetAll", prTempoClock_SetAll, 4, 0); definePrimitive(base, index++, "_TempoClock_BeatsToSecs", prTempoClock_BeatsToSecs, 2, 0); definePrimitive(base, index++, "_TempoClock_SecsToBeats", prTempoClock_SecsToBeats, 2, 0); definePrimitive(base, index++, "_SystemClock_Clear", prSystemClock_Clear, 1, 0); definePrimitive(base, index++, "_SystemClock_Sched", prSystemClock_Sched, 3, 0); definePrimitive(base, index++, "_SystemClock_SchedAbs", prSystemClock_SchedAbs, 3, 0); definePrimitive(base, index++, "_ElapsedTime", prElapsedTime, 1, 0); }
void initSymbolPrimitives() { int base, index = 0; base = nextPrimitiveIndex(); definePrimitive(base, index++, "_SymbolIsPrefix", prSymbolIsPrefix, 2, 0); //definePrimitive(base, index++, "_SymbolString", prSymbolString, 1, 0); definePrimitive(base, index++, "_SymbolClass", prSymbolClass, 1, 0); definePrimitive(base, index++, "_SymbolIsClassName", prSymbolIsClassName, 1, 0); definePrimitive(base, index++, "_SymbolIsMetaClassName", prSymbolIsMetaClassName, 1, 0); definePrimitive(base, index++, "_SymbolIsSetter", prSymbolIsSetter, 1, 0); definePrimitive(base, index++, "_SymbolAsSetter", prSymbolAsSetter, 1, 0); definePrimitive(base, index++, "_SymbolAsGetter", prSymbolAsGetter, 1, 0); definePrimitive(base, index++, "_Symbol_AsInteger", prSymbol_AsInteger, 1, 0); definePrimitive(base, index++, "_Symbol_PrimitiveIndex", prSymbol_PrimitiveIndex, 1, 0); definePrimitive(base, index++, "_Symbol_SpecialIndex", prSymbol_SpecialIndex, 1, 0); definePrimitive(base, index++, "_Symbol_AsFloat", prSymbol_AsFloat, 1, 0); }
void initUnixPrimitives() { int base, index = 0; base = nextPrimitiveIndex(); s_unixCmdAction = getsym("doUnixCmdAction"); definePrimitive(base, index++, "_String_System", prString_System, 1, 0); definePrimitive(base, index++, "_String_Basename", prString_Basename, 1, 0); definePrimitive(base, index++, "_String_Dirname", prString_Dirname, 1, 0); definePrimitive(base, index++, "_String_POpen", prString_POpen, 2, 0); definePrimitive(base, index++, "_Unix_Errno", prUnix_Errno, 1, 0); definePrimitive(base, index++, "_LocalTime", prLocalTime, 1, 0); definePrimitive(base, index++, "_GMTime", prGMTime, 1, 0); definePrimitive(base, index++, "_AscTime", prAscTime, 1, 0); definePrimitive(base, index++, "_prStrFTime", prStrFTime, 2, 0); definePrimitive(base, index++, "_TimeSeed", prTimeSeed, 1, 0); definePrimitive(base, index++, "_PidRunning", prPidRunning, 1, 0); definePrimitive(base, index++, "_GetPid", prGetPid, 1, 0); }
void initFilePrimitives() { int base, index; base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_SFOpenRead", prSFOpenRead, 2, 0); definePrimitive(base, index++, "_SFOpenWrite", prSFOpenWrite, 2, 0); definePrimitive(base, index++, "_SFClose", prSFClose, 1, 0); definePrimitive(base, index++, "_SFWrite", prSFWrite, 2, 0); definePrimitive(base, index++, "_SFRead", prSFRead, 2, 0); definePrimitive(base, index++, "_SFSeek", prSFSeek, 3, 0); definePrimitive(base, index++, "_SFHeaderInfoString", prSFHeaderInfoString, 1, 0); definePrimitive(base, index++, "_PipeOpen", prPipeOpen, 3, 0); definePrimitive(base, index++, "_PipeClose", prPipeClose, 2, 0); definePrimitive(base, index++, "_FileDelete", prFileDelete, 2, 0); definePrimitive(base, index++, "_FileMTime", prFileMTime, 2, 0); definePrimitive(base, index++, "_FileExists", prFileExists, 2, 0); definePrimitive(base, index++, "_FileRealPath", prFileRealPath, 2, 0); definePrimitive(base, index++, "_FileMkDir", prFileMkDir, 2, 0); definePrimitive(base, index++, "_FileCopy", prFileCopy, 3, 0); definePrimitive(base, index++, "_FileType", prFileType, 2, 0); definePrimitive(base, index++, "_FileSize", prFileSize, 2, 0); definePrimitive(base, index++, "_FileOpen", prFileOpen, 3, 0); definePrimitive(base, index++, "_FileClose", prFileClose, 1, 0); definePrimitive(base, index++, "_FileFlush", prFileFlush, 1, 0); definePrimitive(base, index++, "_FileSeek", prFileSeek, 3, 0); definePrimitive(base, index++, "_FilePos", prFilePos, 1, 0); definePrimitive(base, index++, "_FileLength", prFileLength, 1, 0); definePrimitive(base, index++, "_FileWrite", prFileWrite, 2, 0); definePrimitive(base, index++, "_FileWriteLE", prFileWriteLE, 2, 0); definePrimitive(base, index++, "_FileReadLine", prFileReadLine, 2, 0); definePrimitive(base, index++, "_File_getcwd", prFileGetcwd, 2, 0); definePrimitive(base, index++, "_FilePutChar", prFilePutChar, 2, 0); definePrimitive(base, index++, "_FilePutInt8", prFilePutInt8, 2, 0); definePrimitive(base, index++, "_FilePutInt16", prFilePutInt16, 2, 0); definePrimitive(base, index++, "_FilePutInt32", prFilePutInt32, 2, 0); definePrimitive(base, index++, "_FilePutFloat", prFilePutFloat, 2, 0); definePrimitive(base, index++, "_FilePutDouble", prFilePutDouble, 2, 0); definePrimitive(base, index++, "_FilePutInt16LE", prFilePutInt16LE, 2, 0); definePrimitive(base, index++, "_FilePutInt32LE", prFilePutInt32LE, 2, 0); definePrimitive(base, index++, "_FilePutFloatLE", prFilePutFloatLE, 2, 0); definePrimitive(base, index++, "_FilePutDoubleLE", prFilePutDoubleLE, 2, 0); definePrimitive(base, index++, "_FileGetChar", prFileGetChar, 1, 0); definePrimitive(base, index++, "_FileGetInt8", prFileGetInt8, 1, 0); definePrimitive(base, index++, "_FileGetInt16", prFileGetInt16, 1, 0); definePrimitive(base, index++, "_FileGetInt32", prFileGetInt32, 1, 0); definePrimitive(base, index++, "_FileGetFloat", prFileGetFloat, 1, 0); definePrimitive(base, index++, "_FileGetDouble", prFileGetDouble, 1, 0); definePrimitive(base, index++, "_FileGetInt16LE", prFileGetInt16LE, 1, 0); definePrimitive(base, index++, "_FileGetInt32LE", prFileGetInt32LE, 1, 0); definePrimitive(base, index++, "_FileGetFloatLE", prFileGetFloatLE, 1, 0); definePrimitive(base, index++, "_FileGetDoubleLE", prFileGetDoubleLE, 1, 0); definePrimitive(base, index++, "_FilePutString", prFilePutString, 2, 0); definePrimitive(base, index++, "_FileReadRaw", prFileReadRaw, 2, 0); definePrimitive(base, index++, "_FileReadRawLE", prFileReadRawLE, 2, 0); #ifdef NOCLASSIC definePrimitive(base, index++, "_Directory_At", prDirectory_At, 3, 0); definePrimitive(base, index++, "_File_GetFile", prFile_GetFile, 2, 0); definePrimitive(base, index++, "_File_PutFile", prFile_PutFile, 3, 0); #endif }
void initListPrimitives() { int base, index; base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_Array_AtIdentityHash", prArray_AtIdentityHash, 2, 0); definePrimitive(base, index++, "_Array_AtIdentityHashInPairs", prArray_AtIdentityHashInPairs, 2, 0); definePrimitive(base, index++, "_IdentDict_Put", prIdentDict_Put, 3, 0); definePrimitive(base, index++, "_IdentDict_PutGet", prIdentDict_PutGet, 3, 0); definePrimitive(base, index++, "_IdentDict_At", prIdentDict_At, 2, 0); definePrimitive(base, index++, "_Symbol_envirGet", prSymbol_envirGet, 1, 0); definePrimitive(base, index++, "_Symbol_envirPut", prSymbol_envirPut, 2, 0); definePrimitive(base, index++, "_ArrayMultiChannelExpand", prArrayMultiChanExpand, 1, 0); definePrimitive(base, index++, "_PriorityQueueAdd", prPriorityQueueAdd, 3, 0); definePrimitive(base, index++, "_PriorityQueuePop", prPriorityQueuePop, 1, 0); definePrimitive(base, index++, "_PriorityQueueTop", prPriorityQueueTop, 1, 0); definePrimitive(base, index++, "_PriorityQueueClear", prPriorityQueueClear, 1, 0); definePrimitive(base, index++, "_PriorityQueueEmpty", prPriorityQueueEmpty, 1, 0); definePrimitive(base, index++, "_PriorityQueuePostpone", prPriorityQueuePostpone, 2, 0); definePrimitive(base, index++, "_Event_Delta", prEvent_Delta, 1, 0); definePrimitive(base, index++, "_Event_IsRest", prEvent_IsRest, 1, 0); }
void SC_LIDInit() { int base, index; s_inputDeviceClass = getsym("LID"); s_inputDeviceInfoClass = getsym("LIDInfo"); s_absInfoClass = getsym("LIDAbsInfo"); s_handleEvent = getsym("prHandleEvent"); s_readError = getsym("prReadError"); base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_LID_Open", prLID_Open, 2, 0); definePrimitive(base, index++, "_LID_Close", prLID_Close, 1, 0); definePrimitive(base, index++, "_LID_EventTypeSupported", prLID_EventTypeSupported, 2, 0); definePrimitive(base, index++, "_LID_EventCodeSupported", prLID_EventCodeSupported, 3, 0); definePrimitive(base, index++, "_LID_GetInfo", prLID_GetInfo, 2, 0); definePrimitive(base, index++, "_LID_GetKeyState", prLID_GetKeyState, 2, 0); definePrimitive(base, index++, "_LID_GetAbsInfo", prLID_GetAbsInfo, 3, 0); definePrimitive(base, index++, "_LID_Grab", prLID_Grab, 2, 0); definePrimitive(base, index++, "_LID_Start", prLID_Start, 1, 0); definePrimitive(base, index++, "_LID_Stop", prLID_Stop, 1, 0); definePrimitive(base, index++, "_LID_SetLedState", prLID_SetLedState, 3, 0); // added by Marije Baalman definePrimitive(base, index++, "_LID_SetMscState", prLID_SetMscState, 3, 0); }
void initHIDAPIPrimitives() { int base, index; close_HID_API_Devices(); s_hidapi = getsym("HID"); base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_HID_API_Initialize", prHID_API_Initialize, 1, 0); // this initializes the hid subsystem definePrimitive(base, index++, "_HID_API_CloseAll", prHID_API_CloseAll, 1, 0); // this also cleans up and closes devices definePrimitive(base, index++, "_HID_API_BuildDeviceList", prHID_API_BuildDeviceList, 1, 0); // this gets device info about the various devices that are attached definePrimitive(base, index++, "_HID_API_OpenDevice", prHID_API_Open, 3, 0); // opens a specific device definePrimitive(base, index++, "_HID_API_CloseDevice", prHID_API_Close, 2, 0); // closes a specific device definePrimitive(base, index++, "_HID_API_GetInfo", prHID_API_GetInfo, 2, 0); // gets info about a specific device definePrimitive(base, index++, "_HID_API_GetNumberOfCollections", prHID_API_GetNumberOfCollections, 2, 0); // gets number of elements of a device definePrimitive(base, index++, "_HID_API_GetCollectionInfo", prHID_API_GetCollectionInfo, 3, 0); // gets info about a specific device element definePrimitive(base, index++, "_HID_API_GetNumberOfElements", prHID_API_GetNumberOfElements, 2, 0); // gets number of elements of a device definePrimitive(base, index++, "_HID_API_GetElementInfo", prHID_API_GetElementInfo, 4, 0); // gets info about a specific device element definePrimitive(base, index++, "_HID_API_SetElementOutput", prHID_API_SetElementOutput, 3, 0); // sets the output value of a specific device element, and sends the report definePrimitive(base, index++, "_HID_API_SetElementRepeat", prHID_API_SetElementRepeat, 3, 0); // sets the repeat property of a specific device element s_hidElementData = getsym("prHIDElementData"); // send back element data s_hidDeviceData = getsym("prHIDDeviceData"); // send back device data s_hidClosed = getsym("prHIDDeviceClosed"); // send back that device was closed }
void initUStringPrimitives() { int base, index = 0; base = nextPrimitiveIndex(); definePrimitive(base, index++, "_String_FindRegexp", prString_FindRegexp, 3, 0); }
void initMathPrimitives() { int base, index; base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_AddInt", prAddInt, 2, 0); definePrimitive(base, index++, "_SubInt", prSubInt, 2, 0); definePrimitive(base, index++, "_MulInt", prMulInt, 2, 0); definePrimitive(base, index++, "_AddFloat", prAddFloat, 2, 0); definePrimitive(base, index++, "_SubFloat", prSubFloat, 2, 0); definePrimitive(base, index++, "_MulFloat", prMulFloat, 2, 0); definePrimitive(base, index++, "_NthPrime", prNthPrime, 1, 0); definePrimitive(base, index++, "_PrevPrime", prPrevPrime, 1, 0); definePrimitive(base, index++, "_NextPrime", prNextPrime, 1, 0); definePrimitive(base, index++, "_IsPrime", prIsPrime, 1, 0); definePrimitive(base, index++, "_IndexOfPrime", prIndexOfPrime, 1, 0); definePrimitive(base, index++, "_As32Bits", prAs32Bits, 1, 0); definePrimitive(base, index++, "_High32Bits", prHigh32Bits, 1, 0); definePrimitive(base, index++, "_Low32Bits", prLow32Bits, 1, 0); definePrimitive(base, index++, "_From32Bits", prFrom32Bits, 2, 0); definePrimitive(base, index++, "_From64Bits", prFrom64Bits, 3, 0); definePrimitive(base, index++, "_ClipInt", mathClipInt, 3, 0); definePrimitive(base, index++, "_ClipFloat", mathClipFloat, 3, 0); definePrimitive(base, index++, "_ClipSignal", mathClipSignal, 3, 0); definePrimitive(base, index++, "_WrapInt", mathWrapInt, 3, 0); definePrimitive(base, index++, "_WrapFloat", mathWrapFloat, 3, 0); definePrimitive(base, index++, "_WrapSignal", mathWrapSignal, 3, 0); definePrimitive(base, index++, "_FoldInt", mathFoldInt, 3, 0); definePrimitive(base, index++, "_FoldFloat", mathFoldFloat, 3, 0); definePrimitive(base, index++, "_FoldSignal", mathFoldSignal, 3, 0); definePrimitive(base, index++, "_SimpleNumberSeries", prSimpleNumberSeries, 3, 0); definePrimitive(base, index++, "_AsFraction", prAsFraction, 3, 0); }
void initHIDPrimitives() { int base, index; releaseHIDDevices(); s_hid = getsym("HIDDeviceService"); s_hidAction = getsym("prHidAction"); s_readError = getsym("prReadError"); base = nextPrimitiveIndex(); index = 0; definePrimitive(base, index++, "_HIDBuildDeviceList", prHIDBuildDeviceList, 3, 0); definePrimitive(base, index++, "_HIDGetElementListSize", prHIDGetElementListSize, 2, 0); definePrimitive(base, index++, "_HIDBuildElementList", prHIDBuildElementList, 3, 0); definePrimitive(base, index++, "_HIDGetValue", prHIDGetValue, 3, 0); definePrimitive(base, index++, "_HIDSetValue", prHIDSetValue, 4, 0); definePrimitive(base, index++, "_HIDReleaseDeviceList", prHIDReleaseDeviceList, 1, 0); definePrimitive(base, index++, "_HIDRunEventLoop", prHIDRunEventLoop, 2, 0); definePrimitive(base, index++, "_HIDStopEventLoop", prHIDStopEventLoop, 1, 0); definePrimitive(base, index++, "_HIDQueueDevice", prHIDQueueDevice, 2, 0); definePrimitive(base, index++, "_HIDDequeueDevice", prHIDDequeueDevice, 2, 0); definePrimitive(base, index++, "_HIDDequeueElement", prHIDDequeueElement, 3, 0); definePrimitive(base, index++, "_HIDQueueElement", prHIDQueueElement, 3, 0); }