IO_METHOD(IoObject, protoOwnsSlots) { /*doc Object ownsSlots A debug method. */ return IOBOOL(self, IoObject_ownsSlots(self)); }
IoObject *IoRegex_isExtended(IoRegex *self, IoObject *locals, IoMessage *m) { /*doc Regex isExtended Returns true if the receiver is in extended mode, false if not. */ return IOBOOL(self, DATA(self)->options & PCRE_EXTENDED); }
IoObject *IoBox_containsPoint(IoBox *self, IoObject *locals, IoMessage *m) { /*doc Box containsPoint(aPoint) Returns true if aPoint is within the receiver's bounds, false otherwise. */ int result; IoVector *otherPoint = IoMessage_locals_pointArgAt_(m, locals, 0); UArray *bo = IoSeq_rawUArray(IoBox_rawOrigin(self)); UArray *bs = IoSeq_rawUArray(IoBox_rawSize(self)); UArray *p = IoSeq_rawUArray(otherPoint); // do a malloc since the vectors might be large UArray *b1 = UArray_clone(bo); UArray *b2 = UArray_clone(bs); // make bo2 the box endpoint UArray_add_(b2, b1); // ensure bo1 is on the left bottom and bo2 is on the top right UArray_Min(b1, b2); UArray_Max(b2, bo); result = UArray_greaterThanOrEqualTo_(p, b1) && UArray_greaterThanOrEqualTo_(b2, p); UArray_free(b1); UArray_free(b2); return IOBOOL(self, result); }
IoObject *IoRegexMatches_allowsEmptyMatches(IoRegexMatches *self, IoObject *locals, IoMessage *m) { /*doc RegexMatches allowsEmptyMatches Returns true if the receiver allows empty matches, false if not. */ return IOBOOL(self, DATA(self)->options & PCRE_NOTEMPTY); }
//doc ClutterUnits ==(otherUnit) IO_METHOD(IoClutterUnits, equals) { IoClutterUnits *other = IoMessage_locals_clutterUnitsArgAt_(m, locals, 0); int self_in_pixels = clutter_units_to_pixels(&IOCUNITS(self)), other_in_pixels = clutter_units_to_pixels(&IOCUNITS(other)); return IOBOOL(self, self_in_pixels == other_in_pixels); }
//doc ClutterActorBox contains(x1, y1) IO_METHOD(IoClutterActorBox, contains) { float x = IoMessage_locals_floatArgAt_(m, locals, 0), y = IoMessage_locals_floatArgAt_(m, locals, 1); int contains = clutter_actor_box_contains(IOCABOX(self), x, y); return IOBOOL(self, contains); }
IoObject *IoObject_protoOwnsSlots(IoObject *self, IoObject *locals, IoMessage *m) { /*doc Object ownsSlots A debug method. */ return IOBOOL(self, IoObject_ownsSlots(self)); }
//doc Loudmouth sendRaw(body) Sends raw text over XMPP stream. Returns <code>true</code> if no errors occur. IoObject *IoLoudmouth_sendRaw(IoLoudmouth *self, IoObject *locals, IoMessage *m) { char *seq = IoMessage_locals_cStringArgAt_(m, locals, 0); int success = lm_connection_send_raw(LMCONN(self), seq, NULL); free(seq); return IOBOOL(self, success); }
IoObject* IoMySQL_connected(IoObject* self, IoObject* locals, IoMessage* m) { /*doc MySQL connected Returns true if connected to the database, false otherwise. */ return IOBOOL(self, DATA(self)->connected); }
IoObject *IoSQLite3_isOpen(IoSQLite3 *self, IoObject *locals, IoMessage *m) { /*doc SQLite3 isOpen Returns true if the database is open, false otherwise. */ return IOBOOL(self, DATA(self)->db != NULL); }
IoObject *IoFile_isSocket(IoFile *self, IoObject *locals, IoMessage *m) { /*doc File isSocket Returns true if the receiver's file descriptor is a Socket, false otherwise. */ return IOBOOL(self, S_ISSOCK(IoFile_statPointer(self, locals, m)->st_mode)); }
IoObject *IoFile_isRegularFile(IoFile *self, IoObject *locals, IoMessage *m) { /*doc File isRegularFile Returns true if the receiver's file descriptor is a regular file, false otherwise. */ return IOBOOL(self, S_ISREG(IoFile_statPointer(self, locals, m)->st_mode)); }
IoObject *IoImage_isRGBA8(IoImage *self, IoObject *locals, IoMessage *m) { /*doc Image isRGBA8 Returns true if the receiver is in RGBA8 format, false otherwise. */ return IOBOOL(self, Image_isRGBA8(DATA(self)->image)); }
IoDynLib *IoDynLib_isOpen(IoDynLib *self, IoObject *locals, IoMessage *m) { /*doc DynLib isOpen Returns true if the library is open, or false otherwise. */ return IOBOOL(self, DynLib_isOpen(DATA(self))); }
IO_METHOD(IoSeq, isEmpty) { /*doc Sequence isEmpty Returns true if the size of the receiver is 0, false otherwise. */ return IOBOOL(self, UArray_size(DATA(self)) == 0); }
IoObject *IoAudioDevice_writeBufferIsEmpty(IoAudioDevice *self, IoObject *locals, IoMessage *m) { /*doc AudioDevice writeBufferIsEmpty Returns the true if the audio buffer is empty, false otherwise. */ return IOBOOL(self, DATA(self)->audioDevice->writeBufferIsEmpty); }
IoObject *IoAudioDevice_needsData(IoAudioDevice *self, IoObject *locals, IoMessage *m) { /*doc AudioDevice needsData Returns true if the receiver can read more data. */ return IOBOOL(self, DATA(self)->audioDevice->needsData == 1); }
IO_METHOD(IoDate, isPast) { /*doc Date isPast Returns true if the receiver is a date in the past. */ return IOBOOL(self, Date_secondsSinceNow(DATA(self)) > 0); }
IO_METHOD(IoDate, isDaylightSavingsTime) { /*doc Date isDaylightSavingsTime Returns self if Daylight Saving Time is in effect for the receiver, otherwise returns Nil. */ return IOBOOL(self, Date_isDaylightSavingsTime(DATA(self))); }
IoObject *IoImage_isLA8(IoImage *self, IoObject *locals, IoMessage *m) { /*doc Image isLA8 Returns true if the receiver is in LA8 (8bit Luminance-Alpha) format, false otherwise. */ return IOBOOL(self, Image_componentCount(DATA(self)->image) == 2); }
IoObject *IoImage_isL8(IoImage *self, IoObject *locals, IoMessage *m) { /*doc Image isL8 Returns true if the receiver is in L8 (8bit Luminance) format, false otherwise. */ return IOBOOL(self, Image_isL8(DATA(self)->image)); }
IO_METHOD(IoCoroutine, isCurrent) { /*doc Coroutine isCurrent Returns true if the receiver is currently running coroutine. */ IoObject *v = IOBOOL(self, self == IoState_currentCoroutine(IOSTATE)); return v; }
IO_METHOD(IoSeq, isMutable) { /*doc Sequence isMutable Returns true if the receiver is a mutable Sequence or false otherwise. */ return IOBOOL(self, !ISSYMBOL(self)); }
IoObject *IoCurses_hasColors(IoCurses *self, IoObject *locals, IoMessage *m) { /*doc Curses hasColors Returns true if the terminal supports color, false otherwise. */ return IOBOOL(self, has_colors()); }
IO_METHOD(IoSeq, isZero) { /*doc Sequence isZero Returns true if all elements are 0, false otherwise. */ return IOBOOL(self, UArray_isZero(DATA(self))); }
IoObject *IoFile_isDirectory(IoFile *self, IoObject *locals, IoMessage *m) { /*doc File isDirectory Returns true if the receiver's path points to a directory, false otherwise. */ return IOBOOL(self, S_ISDIR(IoFile_statPointer(self, locals, m)->st_mode)); }
IoObject *IoRandom_flip(IoObject *self, IoObject *locals, IoMessage *m) { /*doc Random flip Returns a random bit as a true or false object. */ int r = RandomGen_randomInt(DATA(self)); return IOBOOL(self, r & 0x1); }
IoObject *IoFile_isPipe(IoFile *self, IoObject *locals, IoMessage *m) { /*doc File isPipe Returns true if the receiver is a pipe, false otherwise. */ return IOBOOL(self, S_ISFIFO(IoFile_statPointer(self, locals, m)->st_mode)); }
IO_METHOD(IoMessage, isEOL) { /*doc Message isEndOfLine Returns true if the message marks the end of the line. A ';' message. */ return IOBOOL(self, IoMessage_rawIsEOL(self)); }
//doc ClutterActor event(clutterEvent, capture) IO_METHOD(IoClutterActor, event) { int success = clutter_actor_event( IOCACTOR(self), IOCEVENT(IoMessage_locals_clutterEventArgAt_(m, locals, 0)), IoMessage_locals_boolArgAt_(m, locals, 1)); return IOBOOL(self, success); }