IoEvDNSRequest *IoEvDNSRequest_rawClone(IoEvDNSRequest *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, 0x0); return self; }
IoCFFIFunction *IoCFFIFunction_rawClone(IoCFFIFunction *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoCFFIFunctionData))); return self; }
IoClutterStage *IoClutterStage_newWithActor(void *state, ClutterActor *actor) { IoClutterStage *self = IoClutterStage_new(state); IoObject_setDataPointer_(self, actor); return self; }
IoObject* IoMySQL_rawClone(IoObject* proto) { IoObject* self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoMySQLData))); return self; }
IoList *IoList_proto(void *state) { IoMethodTable methodTable[] = { {"with", IoList_with}, // access {"indexOf", IoList_indexOf}, {"contains", IoList_contains}, {"containsIdenticalTo", IoList_containsIdenticalTo}, {"capacity", IoList_capacity}, {"size", IoList_size}, // mutation {"setSize", IoList_setSize}, {"removeAll", IoList_removeAll}, {"appendSeq", IoList_appendSeq}, {"append", IoList_append}, {"prepend", IoList_prepend}, {"push", IoList_append}, {"appendIfAbsent", IoList_appendIfAbsent}, {"remove", IoList_remove}, {"pop", IoList_pop}, {"atInsert", IoList_atInsert}, {"at", IoList_at}, {"atPut", IoList_atPut}, {"removeAt", IoList_removeAt}, {"swapIndices", IoList_swapIndices}, {"preallocateToSize", IoList_preallocateToSize}, {"first", IoList_first}, {"last", IoList_last}, {"slice", IoList_slice}, {"sliceInPlace", IoList_sliceInPlace}, {"sortInPlace", IoList_sortInPlace}, {"sortInPlaceBy", IoList_sortInPlaceBy}, {"foreach", IoList_foreach}, {"reverseInPlace", IoList_reverseInPlace}, {"reverseForeach", IoList_reverseForeach}, {"asEncodedList", IoList_asEncodedList}, {"fromEncodedList", IoList_fromEncodedList}, {"join", IoList_join}, {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoObject_tag_(self, IoList_newTag(state)); IoObject_setDataPointer_(self, List_new()); IoState_registerProtoWithId_((IoState *)state, self, protoId); IoObject_addMethodTable_(self, methodTable); return self; }
IoClutterInputDevice *IoClutterInputDevice_newWithDevice(void *state, ClutterInputDevice *device) { IoClutterInputDevice *self = IoClutterInputDevice_new(state); IoObject_setDataPointer_(self, device); return self; }
IoSecureServer *IoSecureServer_proto(void *state) { initSSL(); IoObject *self = IoObject_new(state); IoObject_tag_(self, IoSecureServer_newTag(state)); IoObject_setDataPointer_(self, (SecureServerData *)calloc(1, sizeof(SecureServerData))); SSL_CTX *ctx = SSL_CTX_new(TLSv1_server_method()); DATA(self)->ssl_ctx = ctx; SSL_CTX_set_default_passwd_cb(ctx, IoSecureSockets_Password_Callback); SSL_CTX_set_default_passwd_cb_userdata(ctx, self); SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, IoSecureSockets_Verify_Callback); #ifdef DTLS_IMPLEMENTED IoObject_setSlot_to_(self, IOSYMBOL("supportsDTLS"), IOTRUE(self)); #else IoObject_setSlot_to_(self, IOSYMBOL("supportsDTLS"), IOFALSE(self)); #endif //doc SecureServer supportsDTLS Returns true if server supports DTLS, false otherwise. IoState_registerProtoWithFunc_((IoState *)state, self, IoSecureServer_proto); { IoMethodTable methodTable[] = { {"setKeyFile", IoSecureServer_setKeyFile}, //doc SecureServer setKeyFile(path) Sets the key file. Returns self. {"setCertFile", IoSecureServer_setCertFile}, //doc SecureServer setCertFile(path) Sets the certificate file. Returns self. {"setCAFile", IoSecureServer_setCAFile}, //doc SecureServer setCAFile(path) Sets the CA file. Returns self. {"setCRLFile", IoSecureServer_setCRLFile}, //doc SecureServer setCRLFile(path) Sets the CRL file. Returns self. {"useTLS", IoSecureServer_useTLS}, //doc SecureServer useTLS Returns useTLS value. {"useDTLS", IoSecureServer_useDTLS}, //doc SecureServer useDTLS Returns useDTLS value. {"setRequiresClientCertificate", IoSecureServer_setRequiresClientCertificate}, //doc SecureServer setRequiresClientCertificate(aBool) Sets the requires client certificate attribute. Returns self. {"tlsWrap", IoSecureServer_tlsWrap}, //doc SecureServer tlsWrap Returns tlsWrap value. #ifdef DTLS_IMPLEMENTED {"dtlsWrap", IoSecureServer_dtlsWrap}, //doc SecureServer dtlsWrap Returns dtlsWrap value. {"udpRecvIP", IoSecureServer_udpRecvIP}, //doc SecureServer udpRecvIP Returns udpRecvIP value. {"dispatchUdp", IoSecureServer_dispatchUDP}, //doc SecureServer dispatchUdp Returns dispatchUdp value. #endif {NULL, NULL} }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoFile *IoFile_proto(void *state) { IoMethodTable methodTable[] = { {"descriptor", IoFile_descriptor}, {"descriptorId", IoFile_descriptor}, // compatible with Socket // standard I/O {"standardInput", IoFile_standardInput}, {"standardOutput", IoFile_standardOutput}, {"standardError", IoFile_standardError}, // path {"setPath", IoFile_setPath}, {"path", IoFile_path}, {"name", IoFile_lastPathComponent}, {"temporaryFile", IoFile_temporaryFile}, // info {"exists", IoFile_exists}, {"size", IoFile_size}, // open and close {"openForReading", IoFile_openForReading}, {"openForUpdating", IoFile_openForUpdating}, {"openForAppending", IoFile_openForAppending}, {"mode", IoFile_mode}, {"open", IoFile_open}, {"reopen", IoFile_reopen}, {"popen", IoFile_popen}, {"close", IoFile_close}, {"isOpen", IoFile_isOpen}, // reading {"contents", IoFile_contents}, {"asBuffer", IoFile_asBuffer}, {"readLine", IoFile_readLine}, {"readLines", IoFile_readLines}, {"readStringOfLength", IoFile_readStringOfLength_}, {"readBufferOfLength", IoFile_readBufferOfLength_}, {"readToBufferLength", IoFile_readToBufferLength}, {"at", IoFile_at}, {"foreach", IoFile_foreach}, {"foreachLine", IoFile_foreachLine}, // writing {"write", IoFile_write}, {"atPut", IoFile_atPut}, {"flush", IoFile_flush}, // positioning {"rewind", IoFile_rewind}, {"setPosition", IoFile_position_}, {"position", IoFile_position}, {"positionAtEnd", IoFile_positionAtEnd}, {"isAtEnd", IoFile_isAtEnd}, // other {"remove", IoFile_remove}, {"moveTo", IoFile_moveTo_}, {"truncateToSize", IoFile_truncateToSize}, /* {"makeUnbuffered", IoFile_makeUnbuffered}, {"makeLineBuffered", IoFile_makeLineBuffered}, {"makeFullyBuffered", IoFile_makeFullyBuffered}, */ {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoObject_tag_(self, IoFile_newTag(state)); IoObject_setDataPointer_(self, io_calloc(1, sizeof(IoFileData))); DATA(self)->path = IOSYMBOL(""); DATA(self)->mode = IOSYMBOL("r+"); DATA(self)->flags = IOFILE_FLAGS_NONE; IoState_registerProtoWithId_((IoState *)state, self, protoId); IoObject_addMethodTable_(self, methodTable); IoFile_statInit(self); return self; }
IoMessage *IoMessage_proto(void *state) { IoMethodTable methodTable[] = { {"clone", IoMessage_clone}, {"name", IoMessage_protoName}, {"setName", IoMessage_protoSetName}, {"next", IoMessage_next}, {"setNext", IoMessage_setNext}, {"isEndOfLine", IoMessage_isEOL}, {"nextIgnoreEndOfLines", IoMessage_nextIgnoreEOLs}, {"last", IoMessage_last}, {"lastBeforeEndOfLine", IoMessage_lastBeforeEOL}, {"argAt", IoMessage_argAt}, {"arguments", IoMessage_arguments}, {"setArguments", IoMessage_setArguments}, {"appendArg", IoMessage_appendArg}, {"appendCachedArg", IoMessage_appendCachedArg}, {"argCount", IoMessage_argCount_}, {"cachedResult", IoMessage_cachedResult}, {"setCachedResult", IoMessage_setCachedResult}, {"removeCachedResult", IoMessage_removeCachedResult}, {"hasCachedResult", IoMessage_hasCachedResult}, {"lineNumber", IoMessage_lineNumber}, {"setLineNumber", IoMessage_setLineNumber}, {"characterNumber", IoMessage_characterNumber}, {"setCharacterNumber", IoMessage_setCharacterNumber}, {"label", IoMessage_label}, {"setLabel", IoMessage_setLabel}, {"code", IoMessage_descriptionString}, {"doInContext", IoMessage_doInContext}, {"fromString", IoMessage_fromString}, {"argsEvaluatedIn", IoMessage_argsEvaluatedIn}, {"asString", IoMessage_asString}, {"asMessageWithEvaluatedArgs", IoMessage_asMessageWithEvaluatedArgs}, {"opShuffle", IoMessage_opShuffle}, {"opShuffleC", IoMessage_opShuffle}, #ifdef IOMESSAGE_HASPREV {"previous", IoMessage_previous}, #endif {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoMessageData *d; IoObject_setDataPointer_(self, io_calloc(1, sizeof(IoMessageData))); d = IoObject_dataPointer(self); IoObject_tag_(self, IoMessage_newTag(state)); d->args = List_new(); d->name = IOSYMBOL("[unnamed]"); d->label = IOSYMBOL("[unlabeled]"); //d->charNumber = -1; d->lineNumber = -1; IoState_registerProtoWithId_((IoState *)state, self, protoId); IoObject_addMethodTable_(self, methodTable); return self; }
IoSyslog *IoSyslog_rawClone(IoSyslog *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(IoObject_dataPointer(proto), sizeof(IoSyslogData))); return self; }
IoTagDB *IoTagDB_rawClone(IoTagDB *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, TagDB_new()); return self; }
IoCurses *IoCurses_proto(void *state) { IoObject *self = IoObject_new(state); IoObject_tag_(self, IoCurses_newTag(state)); IoObject_setDataPointer_(self, calloc(1, sizeof(IoCursesData))); IoState_registerProtoWithFunc_(state, self, IoCurses_proto); { IoMethodTable methodTable[] = { {"begin", IoCurses_begin}, {"end", IoCurses_end}, //{"nodelay", IoCurses_nodelay}, //{"cBreak", IoCurses_cBreak}, //{"noCBreak", IoCurses_noCBreak}, //{"echo", IoCurses_echo}, //{"noEcho", IoCurses_noEcho}, {"move", IoCurses_move}, {"write", IoCurses_print}, {"writeCharacter", IoCurses_writeCharacter}, //{"insert", IoCurses_insert}, //{"delete", IoCurses_delete}, //{"get", IoCurses_get}, {"asyncReadCharacter", IoCurses_getCh}, //{"input", IoCurses_input}, //{"erase", IoCurses_erase}, {"clear", IoCurses_clear}, //{"clearToEndOfLine", IoCurses_clearToEndOfLine}, {"refresh", IoCurses_refresh}, {"x", IoCurses_x}, {"y", IoCurses_y}, {"width", IoCurses_width}, {"height", IoCurses_height}, {"hasColors", IoCurses_hasColors}, {"setBackgroundBlack", IoCurses_setBackgroundBlack}, {"setBackgroundBlue", IoCurses_setBackgroundBlue}, {"setBackgroundGreen", IoCurses_setBackgroundGreen}, {"setBackgroundCyan", IoCurses_setBackgroundCyan}, {"setBackgroundRed", IoCurses_setBackgroundRed}, {"setBackgroundMagenta", IoCurses_setBackgroundMagenta}, {"setBackgroundYellow", IoCurses_setBackgroundYellow}, {"setBackgroundWhite", IoCurses_setBackgroundWhite}, {"setForegroundBlack", IoCurses_setForegroundBlack}, {"setForegroundBlue", IoCurses_setForegroundBlue}, {"setForegroundGreen", IoCurses_setForegroundGreen}, {"setForegroundCyan", IoCurses_setForegroundCyan}, {"setForegroundRed", IoCurses_setForegroundRed}, {"setForegroundMagenta", IoCurses_setForegroundMagenta}, {"setForegroundYellow", IoCurses_setForegroundYellow}, {"setForegroundWhite", IoCurses_setForegroundWhite}, {NULL, NULL}, }; IoObject_addMethodTable_(self, methodTable); } return self; }
IoCurses *IoCurses_rawClone(IoCurses *proto) { IoCurses *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(DATA(proto), sizeof(IoCursesData))); return self; }
IoCairoGlyph *IoCairoGlyph_rawClone(IoCairoGlyph *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(IoObject_dataPointer(proto), sizeof(cairo_glyph_t))); return self; }
IoDirectory *IoDirectory_rawClone(IoDirectory *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(IoObject_dataPointer(proto), sizeof(IoDirectoryData))); return self; }
IoDate *IoDate_proto(void *state) { IoMethodTable methodTable[] = { {"asSerialization", IoDate_asSerialization}, {"fromSerialization", IoDate_fromSerialization}, {"now", IoDate_now}, {"clock", IoDate_clock}, {"copy", IoDate_copy}, {"cpuSecondsToRun", IoDate_cpuSecondsToRun}, {"year", IoDate_year}, {"setYear", IoDate_setYear}, {"month", IoDate_month}, {"setMonth", IoDate_setMonth}, {"day", IoDate_day}, {"setDay", IoDate_setDay}, {"hour", IoDate_hour}, {"setHour", IoDate_setHour}, {"minute", IoDate_minute}, {"setMinute", IoDate_setMinute}, {"second", IoDate_second}, {"setSecond", IoDate_setSecond}, {"isDaylightSavingsTime", IoDate_isDaylightSavingsTime}, {"zone", IoDate_zone}, {"isDST", IoDate_isDST}, {"setGmtOffset", IoDate_setGmtOffset}, {"gmtOffset", IoDate_gmtOffset}, {"gmtOffsetSeconds", IoDate_gmtOffsetSeconds}, {"convertToUTC", IoDate_convertToUTC}, {"convertToZone", IoDate_convertToZone}, {"convertToLocal", IoDate_convertToLocal}, {"setToUTC", IoDate_setToUTC}, {"isValidTime", IoDate_isValidTime}, {"secondsSince", IoDate_secondsSince_}, {"secondsSinceNow", IoDate_secondsSinceNow}, {"isPast", IoDate_isPast}, //{"dateAfterSeconds", IoDate_dateAfterSeconds_}, {"asString", IoDate_asString}, {"asNumber", IoDate_asNumber}, {"fromNumber", IoDate_fromNumber}, {"fromString", IoDate_fromString}, {"print", IoDate_printDate}, {"+", IoDate_add}, {"-", IoDate_subtract}, {"+=", IoDate_addInPlace}, {"-=", IoDate_subtractInPlace}, {NULL, NULL}, }; IoObject *self = IoObject_new(state); IoObject_tag_(self, IoDate_newTag(state)); IoObject_setDataPointer_(self, Date_new()); /*doc Date format Returns the format string for the receiver. The default is "%Y-%m-%d %H:%M:%S %Z". */ IoObject_setSlot_to_(self, IOSYMBOL("format"), IOSYMBOL("%Y-%m-%d %H:%M:%S %Z")); IoState_registerProtoWithFunc_((IoState *)state, self, IoDate_proto); IoObject_addMethodTable_(self, methodTable); return self; }
IoCairoRectangle *IoCairoRectangle_rawClone(IoCairoRectangle *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(IoObject_dataPointer(proto), sizeof(cairo_rectangle_t))); return self; }
IoBlowfish *IoBlowfish_rawClone(IoBlowfish *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoBlowfishData))); return self; }
IoIPAddress *IoIPAddress_rawClone(IoIPAddress *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, IPAddress_new()); return self; }
IoCairoFontFace *IoCairoFontFace_newWithRawFontFace_(void *state, cairo_font_face_t *face) { IoCairoFontFace *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoFontFace_proto)); IoObject_setDataPointer_(self, face); return self; }
IoAsyncRequest *IoAsyncRequest_rawClone(IoAsyncRequest *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(struct aiocb))); return self; }
IoLZOEncoder *IoLZOEncoder_rawClone(IoLZOEncoder *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoLZOData))); return self; }
IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_newWithDB_(void *state, void *bdb) { IoObject *self = IoTokyoCabinetPrefixCursor_new(state); IoObject_setDataPointer_(self, tcbdbcurnew((TCBDB *)bdb)); return self; }
IoCairoFontExtents *IoCairoFontExtents_rawClone(IoCairoFontExtents *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(EXTENTS(proto), sizeof(cairo_font_extents_t))); return self; }