IoAppleSensors *IoAppleSensors_proto(void *state) { IoAppleSensors *self = IoObject_new(state); IoObject_tag_(self, IoAppleSensors_newTag(state)); //IoObject_setDataPointer_(self, calloc(1, sizeof(IoAppleSensorsData))); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"getLeftLightSensor", IoAppleSensors_getLeftLightSensor}, {"getRightLightSensor", IoAppleSensors_getRightLightSensor}, {"getDisplayBrightness", IoAppleSensors_getDisplayBrightness}, {"setDisplayBrightness", IoAppleSensors_setDisplayBrightness}, {"getKeyboardBrightness", IoAppleSensors_getKeyboardBrightness}, {"setKeyboardBrightness", IoAppleSensors_setKeyboardBrightness}, {"getCPUTemperature", IoAppleSensors_getCPUTemperature}, {"getGPUTemperature", IoAppleSensors_getGPUTemperature}, {"getPalmTemperature", IoAppleSensors_getPalmTemperature}, {"getBatteryTemperature", IoAppleSensors_getBatteryTemperature}, {"getPowerTemperature", IoAppleSensors_getPowerTemperature}, {"getPCHTemperature", IoAppleSensors_getPCHTemperature}, {"getRAMTemperature", IoAppleSensors_getRAMTemperature}, //{"smsDetect", IoAppleSensors_smsDetect}, {"smsVector", IoAppleSensors_smsVector}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoYajlGen *IoYajlGen_proto(void *state) { IoYajlGen *self = IoObject_new(state); IoObject_tag_(self, IoYajlGen_newTag(state)); yajl_gen g = yajl_gen_alloc(NULL); //yajl_gen_config(g, yajl_gen_beautify, 0); IoObject_setDataPointer_(self, g); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"pushNull", IoYajlGen_pushNull}, {"pushString", IoYajlGen_pushString}, {"pushInteger", IoYajlGen_pushInteger}, {"pushDouble", IoYajlGen_pushDouble}, {"pushNumberString", IoYajlGen_pushNumberString}, {"pushBool", IoYajlGen_pushBool}, {"openMap", IoYajlGen_openMap}, {"closeMap", IoYajlGen_closeMap}, {"openArray", IoYajlGen_openArray}, {"closeArray", IoYajlGen_closeArray}, {"generate", IoYajlGen_generate}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoTagDB *IoTagDB_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoTagDB_newTag(state)); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"setPath", IoTagDB_setPath}, {"open", IoTagDB_open}, {"close", IoTagDB_close}, {"atKeyPutTags", IoTagDB_atKeyPutTags}, {"tagsAtKey", IoTagDB_tagsAtKey}, {"removeKey", IoTagDB_removeKey}, {"keysForTags", IoTagDB_keysForTags}, {"size", IoTagDB_size}, {"symbolForId", IoTagDB_symbolForId}, {"idForSymbol", IoTagDB_idForSymbol}, {"keyAtIndex", IoTagDB_keyAtIndex}, {"delete", IoTagDB_delete}, {"allUniqueTagIds", IoTagDB_allUniqueTagIds}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } IoObject_setDataPointer_(self, TagDB_new()); return self; }
IoFont *IoFont_proto( void *state ) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoFont_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoFontData))); DATA(self)->path = IOSYMBOL("."); DATA(self)->font = GLFont_new(); DATA(self)->isProto = 1; IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"open", IoFont_open}, {"setPath", IoFont_setPath}, {"path", IoFont_path}, {"setPixelSize", IoFont_setPixelSize}, {"pixelSize", IoFont_pixelSize}, {"drawString", IoFont_drawString}, {"widthOfString", IoFont_lengthOfString}, {"widthOfCharacter", IoFont_lengthOfCharacter}, {"pixelHeight", IoFont_fontHeight}, {"isTextured", IoFont_isTextured}, {"error", IoFont_error}, {"stringIndexAtWidth", IoFont_stringIndexAtWidth}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } GLFont_init(); return self; }
IoODEBox *IoODEBox_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoODEBox_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoODEBoxData))); GEOMID = 0; IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"geomId", IoODEBox_geomId}, {"lengths", IoODEBox_lengths}, {"setLengths", IoODEBox_setLengths}, {"pointDepth", IoODEBox_pointDepth}, {"body", IoODEBox_body}, {"setBody", IoODEBox_setBody}, {"collide", IoODEGeom_collide}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_proto(void *state) { IoMethodTable methodTable[] = { {"close", IoTokyoCabinetPrefixCursor_close}, {"first", IoTokyoCabinetPrefixCursor_first}, {"last", IoTokyoCabinetPrefixCursor_last}, {"previous", IoTokyoCabinetPrefixCursor_previous}, {"next", IoTokyoCabinetPrefixCursor_next}, {"jump", IoTokyoCabinetPrefixCursor_jump}, {"key", IoTokyoCabinetPrefixCursor_key}, {"value", IoTokyoCabinetPrefixCursor_value}, {"put", IoTokyoCabinetPrefixCursor_put}, {"remove", IoTokyoCabinetPrefixCursor_remove}, {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoObject_tag_(self, IoTokyoCabinetPrefixCursor_newTag(state)); IoObject_setDataPointer_(self, NULL); IoState_registerProtoWithId_((IoState *)state, self, protoId); IoObject_addMethodTable_(self, methodTable); return self; }
IoObject *IoDynLib_proto(void *state) { IoMethodTable methodTable[] = { {"setPath", IoDynLib_setPath}, {"path", IoDynLib_path}, {"setInitFuncName", IoDynLib_setInitFuncName}, {"initFuncName", IoDynLib_initFuncName}, {"setFreeFuncName", IoDynLib_setFreeFuncName}, {"freeFuncName", IoDynLib_freeFuncName}, {"open", IoDynLib_open}, {"close", IoDynLib_close}, {"isOpen", IoDynLib_isOpen}, {"call", IoDynLib_call}, {"voidCall", IoDynLib_voidCall}, {"callPluginInit", IoDynLib_callPluginInitFunc}, //{"returnsString", IoDynLib_returnsString}, {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoObject_tag_(self, IoDynLib_newTag(state)); IoObject_setDataPointer_(self, DynLib_new()); DynLib_setInitArg_(DATA(self), state); DynLib_setFreeArg_(DATA(self), state); IoState_registerProtoWithId_((IoState *)state, self, protoId); IoObject_addMethodTable_(self, methodTable); return self; }
IoODEHinge *IoODEHinge_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoODEHinge_newTag(state)); IoODEJoint_protoCommon(self); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { ODE_COMMON_JOINT_METHODS #define PARAM(X, _N, _SETN) \ {#_N, IoODEHinge_##_N}, \ {#_SETN, IoODEHinge_##_SETN}, PARAMS #undef PARAM {"anchor", IoODEHinge_anchor}, {"setAnchor", IoODEHinge_setAnchor}, {"anchor2", IoODEHinge_anchor2}, {"axis", IoODEHinge_axis}, {"setAxis", IoODEHinge_setAxis}, {"angle", IoODEHinge_angle}, {"angleRate", IoODEHinge_angleRate}, {"addTorque", IoODEHinge_addTorque}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoDrawStuff *IoDrawStuff_proto(void *state) { IoObject *self = IoObject_new(state); proto = self; IoObject_tag_(self, IoDrawStuff_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoDrawStuffData))); DATA(self)->coroutine = IoCoroutine_new(state); //printf("DrawStuff coro = %p\n", DATA(self)->coroutine); DATA(self)->eventTarget = NULL; DATA(self)->keyboardMessage = DRAWMESSAGE("keyboard"); DATA(self)->startMessage = DRAWMESSAGE("start"); DATA(self)->stepMessage = DRAWMESSAGE("step"); DATA(self)->stopMessage = DRAWMESSAGE("stop"); IoState_retain_(state, DATA(self)->coroutine); IoState_retain_(state, DATA(self)->keyboardMessage); IoState_retain_(state, DATA(self)->startMessage); IoState_retain_(state, DATA(self)->stepMessage); IoState_retain_(state, DATA(self)->stopMessage); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"dsSimulationLoop", IoDrawStuff_dsSimulationLoop}, {"dsSetViewpoint", IoDrawStuff_dsSetViewpoint}, {"dsGetViewpoint", IoDrawStuff_dsGetViewpoint}, {"dsElapsedTime", IoDrawStuff_dsElapsedTime}, {"dsStop", IoDrawStuff_dsStop}, {"dsSetTexture", IoDrawStuff_dsSetTexture}, {"dsSetColor", IoDrawStuff_dsSetColor}, {"dsSetColorAlpha", IoDrawStuff_dsSetColorAlpha}, {"dsDrawBox", IoDrawStuff_dsDrawBox}, {"dsDrawSphere", IoDrawStuff_dsDrawSphere}, {"dsDrawTriangle", IoDrawStuff_dsDrawTriangle}, {"dsDrawCylinder", IoDrawStuff_dsDrawCylinder}, {"dsDrawCapsule", IoDrawStuff_dsDrawCapsule}, {"dsDrawLine", IoDrawStuff_dsDrawLine}, {"dsDrawConvex", IoDrawStuff_dsDrawConvex}, {"dsSetSphereQuality", IoDrawStuff_dsSetSphereQuality}, {"dsSetCapsuleQuality", IoDrawStuff_dsSetCapsuleQuality}, {"dsSetDrawMode", IoDrawStuff_dsSetDrawMode}, {"eventTarget", IoDrawStuff_eventTarget}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } //IoDrawStuff_protoInit(self); return self; }
IoObject *IoObject_proto(void *state) { IoObject *self = IoObject_justAlloc(state); IoObject_tag_(self, IoObject_newTag(state)); IoObject_slots_(self, PHash_new()); IoObject_ownsSlots_(self, 1); //IoObject_state_(self, state); IoState_registerProtoWithId_((IoState *)state, self, protoId); return self; }
IoRegex *IoRegex_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoRegex_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoRegexData))); DATA(self)->pattern = IOSYMBOL(""); printf("Registering Regex: %s\n", protoId); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"with", IoRegex_with}, {"pattern", IoRegex_pattern}, {"captureCount", IoRegex_captureCount}, {"namedCaptures", IoRegex_namedCaptures}, {"version", IoRegex_version}, /* Options */ {"caseless", IoRegex_caseless}, {"notCaseless", IoRegex_notCaseless}, {"isCaseless", IoRegex_isCaseless}, {"dotAll", IoRegex_dotAll}, {"notDotAll", IoRegex_notDotAll}, {"isDotAll", IoRegex_isDotAll}, {"extended", IoRegex_extended}, {"notExtended", IoRegex_notExtended}, {"isExtended", IoRegex_isExtended}, {"multiline", IoRegex_multiline}, {"notMultiline", IoRegex_notMultiline}, {"isMultiline", IoRegex_isMultiline}, {0, 0}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoODEBody *IoODEBody_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoODEBody_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoODEBodyData))); BODYID = 0; WORLD = 0L; IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"bodyId", IoODEBody_bodyId}, {"world", IoODEBody_world}, {"mass", IoODEBody_mass}, {"setMass", IoODEBody_setMass}, {"position", IoODEBody_position}, {"setPosition", IoODEBody_setPosition}, {"force", IoODEBody_force}, {"setForce", IoODEBody_setForce}, {"addForce", IoODEBody_addForce}, {"addRelForce", IoODEBody_addRelForce}, {"torque", IoODEBody_torque}, {"setTorque", IoODEBody_setTorque}, {"addTorque", IoODEBody_addTorque}, {"addRelTorque", IoODEBody_addRelTorque}, {"linearVelocity", IoODEBody_linearVelocity}, {"setLinearVelocity", IoODEBody_setLinearVelocity}, {"quaternion", IoODEBody_quaternion}, //{"setQuaternion", IoODEBody_setQuaternion}, {"rotation", IoODEBody_rotation}, {"setRotation", IoODEBody_setRotation}, {"glMultMatrix", IoODEBody_glMultMatrix}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoUUID *IoUUID_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoUUID_newTag(state)); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"uuid", IoUUID_uuid}, {"uuidRandom", IoUUID_uuidRandom}, {"uuidTime", IoUUID_uuidTime}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoCairoPDFSurface *IoCairoPDFSurface_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoCairoPDFSurface_newTag(state)); IoState_registerProtoWithId_(state, self, protoId); IoCairoSurface_addMethods(self); { IoMethodTable methodTable[] = { {"create", IoCairoPDFSurface_create}, {"setSize", IoCairoPDFSurface_setSize}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoBox *IoBox_proto(void *state) { vec3f o = {0, 0, 0}; IoBox *self = IoObject_new(state); IoObject_tag_(self, IoBox_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoBoxData))); DATA(self)->origin = IoSeq_newVec3f(state, o); DATA(self)->size = IoSeq_newVec3f(state, o); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"set", IoBox_set}, {"origin", IoBox_origin}, {"size", IoBox_size}, {"width", IoBox_width}, {"height", IoBox_height}, {"depth", IoBox_depth}, {"setOrigin", IoBox_setOrigin}, {"setSize", IoBox_setSize}, {"Union", IoBox_Union}, {"print", IoBox_print}, {"containsPoint", IoBox_containsPoint}, {"intersectsBox", IoBox_intersectsBox}, /* {"asString", IoBox_asString}, {"Min", IoBox_Min}, {"Max", IoBox_Max}, */ {"resizeBy", IoBox_resizeBy}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoRegexMatches *IoRegexMatches_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoRegexMatches_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoRegexMatchesData))); DATA(self)->regex = IONIL(self); DATA(self)->string = IOSYMBOL(""); DATA(self)->captureArray = UArray_new(); UArray_setItemType_(DATA(self)->captureArray, CTYPE_uint32_t); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"setRegex", IoRegexMatches_setRegex}, {"regex", IoRegexMatches_regex}, {"setString", IoRegexMatches_setString}, {"string", IoRegexMatches_string}, {"setPosition", IoRegexMatches_setPosition}, {"position", IoRegexMatches_position}, {"setEndPosition", IoRegexMatches_setEndPosition}, {"endPosition", IoRegexMatches_endPosition}, {"next", IoRegexMatches_next}, {"anchored", IoRegexMatches_anchored}, {"allowEmptyMatches", IoRegexMatches_allowEmptyMatches}, {"disallowEmptyMatches", IoRegexMatches_disallowEmptyMatches}, {"allowsEmptyMatches", IoRegexMatches_allowsEmptyMatches}, {0, 0}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoSandbox *IoSandbox_proto(void *state) { IoMethodTable methodTable[] = { {"messageCount", IoSandbox_messageCount}, {"setMessageCount", IoSandbox_setMessageCount}, {"timeLimit", IoSandbox_timeLimit}, {"setTimeLimit", IoSandbox_setTimeLimit}, {"doSandboxString", IoSandbox_doSandboxString}, {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoObject_tag_(self, IoSandbox_newTag(state)); IoState_registerProtoWithId_((IoState *)state, self, protoId); IoObject_addMethodTable_(self, methodTable); return self; }
IoLinker *IoLinker_proto(void *state) { IoObject *self = IoObject_new(state); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"makeCFunction", IoLinker_makeCFunction}, {"bytesToHexSeq", IoLinker_bytesToHexSeq}, {"hexSeqToBytes", IoLinker_hexSeqToBytes}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } IoObject_setSlot_to_(self, IOSYMBOL("IoState_numberWithDouble_"), IONUMBER(fptrToDouble(IoState_numberWithDouble_))); IoObject_setSlot_to_(self, IOSYMBOL("IoMessage_locals_valueArgAt_"), IONUMBER(fptrToDouble(IoMessage_locals_valueArgAt_))); return self; }
IoODEFixed *IoODEFixed_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoODEFixed_newTag(state)); IoODEJoint_protoCommon(self); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { ODE_COMMON_JOINT_METHODS {"fix", IoODEFixed_fix}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoTheoraComment *IoTheoraComment_proto(void *state) { IoTheoraComment *self = IoObject_new(state); IoObject_tag_(self, IoTheoraComment_newTag(state)); th_comment* data = calloc(1, sizeof(th_comment)); // th_comment_init(data); IoObject_setDataPointer_(self, data); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"count", IoTheoraComment_count}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoVorbisBlock *IoVorbisBlock_proto(void *state) { IoVorbisBlock *self = IoObject_new(state); IoObject_tag_(self, IoVorbisBlock_newTag(state)); vorbis_block* data = calloc(1, sizeof(vorbis_block)); IoObject_setDataPointer_(self, data); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"setup", IoVorbisBlock_setup}, {"synthesis", IoVorbisBlock_synthesis}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoSHA1 *IoSHA1_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoSHA1_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoSHA1Data))); SHA1Init(&(DATA(self)->context)); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"appendSeq", IoSHA1_appendSeq}, {"sha1", IoSHA1_sha1}, {"sha1String", IoSHA1_sha1String}, {"hmac", IoSHA1_hmac}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoBlowfish *IoBlowfish_proto(void *state) { IoBlowfish *self = IoObject_new(state); IoObject_tag_(self, IoBlowfish_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoBlowfishData))); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"setIsEncrypting", IoBlowfish_setIsEncrypting}, {"beginProcessing", IoBlowfish_beginProcessing}, {"process", IoBlowfish_process}, {"endProcessing", IoBlowfish_endProcessing}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoCairoTextExtents *IoCairoTextExtents_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoCairoTextExtents_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(cairo_text_extents_t))); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"height", IoCairoTextExtents_height}, {"width", IoCairoTextExtents_width}, {"xAdvance", IoCairoTextExtents_xAdvance}, {"xBearing", IoCairoTextExtents_xBearing}, {"yAdvance", IoCairoTextExtents_yAdvance}, {"yBearing", IoCairoTextExtents_yBearing}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoZlibEncoder *IoZlibEncoder_proto(void *state) { IoZlibEncoder *self = IoObject_new(state); IoObject_tag_(self, IoZlibEncoder_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoZlibEncoderData))); DATA(self)->strm = calloc(1, sizeof(z_stream)); DATA(self)->level = 9; IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"beginProcessing", IoZlibEncoder_beginProcessing}, {"process", IoZlibEncoder_process}, {"endProcessing", IoZlibEncoder_endProcessing}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoTheoraDecodeContext *IoTheoraDecodeContext_proto(void *state) { IoTheoraDecodeContext *self = IoObject_new(state); IoObject_tag_(self, IoTheoraDecodeContext_newTag(state)); IoTheoraDecodeContextData* data = calloc(1, sizeof(IoTheoraDecodeContextData)); IoObject_setDataPointer_(self, data); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"setup", IoTheoraDecodeContext_setup}, {"headerin", IoTheoraDecodeContext_headerin}, {"packetin", IoTheoraDecodeContext_packetin}, {"ycbcr", IoTheoraDecodeContext_ycbcr}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoSQLite3 *IoSQLite3_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoSQLite3_newTag(state)); IoObject_setDataPointer_(self, io_calloc(1, sizeof(IoSQLite3Data))); DATA(self)->path = IOSYMBOL("."); IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"setPath", IoSQLite3_setPath}, {"path", IoSQLite3_path}, {"open", IoSQLite3_open}, {"close", IoSQLite3_close}, {"exec", IoSQLite3_exec}, {"error", IoSQLite3_errorMessage}, {"version", IoSQLite3_version}, {"setTimeoutSeconds", IoSQLite3_setTimeoutSeconds}, {"timeoutSeconds", IoSQLite3_timeoutSeconds}, {"rowsChangedCount", IoSQLite3_changes}, {"lastInsertRowId", IoSQLite3_lastInsertRowId}, {"tableNames", IoSQLite3_tableNames}, {"viewNames", IoSQLite3_viewNames}, {"columnNamesOfTable", IoSQLite3_columnNamesOfTable}, {"debugOn", IoSQLite3_debugOn}, {"debugOff", IoSQLite3_debugOff}, {"isOpen", IoSQLite3_isOpen}, {"escapeString", IoSQLite3_escapeString}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoDuration *IoDuration_proto(void *state) { IoMethodTable methodTable[] = { {"years", IoDuration_years}, {"setYears", IoDuration_setYears}, {"days", IoDuration_days}, {"setDays", IoDuration_setDays}, {"hours", IoDuration_hours}, {"setHours", IoDuration_setHours}, {"minutes", IoDuration_minutes}, {"setMinutes", IoDuration_setMinutes}, {"seconds", IoDuration_seconds}, {"setSeconds", IoDuration_setSeconds}, {"totalSeconds", IoDuration_asNumber}, {"asString", IoDuration_asString}, {"asNumber", IoDuration_asNumber}, {"fromNumber", IoDuration_fromNumber}, /*Tag_addMethod(tag, "fromString", IoDuration_fromString),*/ {"print", IoDuration_printDuration}, {"+=", IoDuration_add}, {"-=", IoDuration_subtract}, {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoObject_setDataPointer_(self, Duration_new()); IoObject_tag_(self, IoDuration_newTag(state)); IoState_registerProtoWithId_((IoState *)state, self, protoId); IoObject_addMethodTable_(self, methodTable); return self; }
IoEvConnection *IoEvConnection_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoEvConnection_newTag(state)); IoObject_setDataPointer_(self, 0x0); IoState_registerProtoWithId_((IoState *)state, self, protoId); { IoMethodTable methodTable[] = { {"connect", IoEvConnection_connect}, {"disconnect", IoEvConnection_disconnect}, {"setRetries", IoEvConnection_setRetries_}, {"setTimeout", IoEvConnection_setTimeout_}, {"setLocalAddress", IoEvConnection_setLocalAddress_}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoODEWorld *IoODEWorld_proto(void *state) { dInitODE(); IoObject *self = IoObject_new(state); IoObject_tag_(self, IoODEWorld_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoODEWorldData))); WORLDID = 0; DATA(self)->bodies = 0L; DATA(self)->jointGroups = 0L; IoState_registerProtoWithId_(state, self, protoId); { IoMethodTable methodTable[] = { {"worldId", IoODEWorld_worldId}, {"bodies", IoODEWorld_bodies}, {"jointGroups", IoODEWorld_jointGroups}, {"gravity", IoODEWorld_gravity}, {"setGravity", IoODEWorld_setGravity}, {"erp", IoODEWorld_erp}, {"setErp", IoODEWorld_setErp}, {"cfm", IoODEWorld_cfm}, {"setCfm", IoODEWorld_setCfm}, {"step", IoODEWorld_step}, {"quickStep", IoODEWorld_quickStep}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }