Exemplo n.º 1
0
IoCairoFontOptions *IoCairoFontOptions_newWithRawFontOptions_(void *state, IoMessage *m, cairo_font_options_t *options)
{
	IoCairoFontOptions *self = IOCLONE(IoState_protoWithId_(state, proto));
	IoObject_setDataPointer_(self, options);
	CHECK_STATUS(self);
	return self;
}
Exemplo n.º 2
0
IoCairoSurface *IoCairoSurface_newWithRawSurface_(void *state, IoMessage *m, cairo_surface_t *surface)
{
	IoObject *self = 0;
	IoStateProtoFunc *initFunc = 0;

	checkStatus_(state, m, cairo_surface_status(surface));

	switch(cairo_surface_get_type(surface))
	{
		case CAIRO_SURFACE_TYPE_IMAGE:
			initFunc = IoCairoImageSurface_proto;
			break;
		case CAIRO_SURFACE_TYPE_PS:
			initFunc = IoCairoPSSurface_proto;
			break;
		case CAIRO_SURFACE_TYPE_PDF:
			initFunc = IoCairoPDFSurface_proto;
			break;
		case CAIRO_SURFACE_TYPE_SVG:
			initFunc = IoCairoSVGSurface_proto;
			break;
	default:
			IoState_error_(state, 0, "Unsupported surface type");
	}

	self = IOCLONE(IoState_protoWithId_(state, protoId));
	IoObject_setDataPointer_(self, surface);
	return self;
}
Exemplo n.º 3
0
Arquivo: IoODEBody.c Projeto: ADTSH/io
IoODEBody *IoODEBody_newBodyProtoWithWorld(void *state, IoODEWorld *world)
{
	IoODEBody *proto = IoState_protoWithId_(state, protoId);
	IoODEBody *self = IOCLONE(proto);
	WORLD = world;
	return self;
}
Exemplo n.º 4
0
IoRegexMatch *IoRegexMatch_newWithRegex_subject_captureRanges_(void *state, IoRegex *regex, IoSymbol *subject, IoList *captureRanges)
{
	IoRegexMatch *self = IOCLONE(IoState_protoWithId_(state, protoId));
	DATA(self)->regex = IOREF(regex);
	DATA(self)->subject = IOREF(subject);
	DATA(self)->ranges = captureRanges;
	return self;
}
Exemplo n.º 5
0
Arquivo: IoODEBox.c Projeto: ADTSH/io
IoODEBox *IoODEBox_new(void *state, dGeomID geomId)
{
	IoODEBox *proto = IoState_protoWithId_(state, protoId);
	IoODEBox *self = IOCLONE(proto);
	GEOMID = geomId;
	dGeomSetData(GEOMID, self);
	return self;
}
Exemplo n.º 6
0
IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_new(void *state)
{
	IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 7
0
IoImage *IoImage_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 8
0
Arquivo: IoUUID.c Projeto: ADTSH/io
IoUUID *IoUUID_new(void *state)
{
	IoUUID *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 9
0
IoObject *IoObject_protoFinish(void *state)
{
	IoMethodTable methodTable[] = {
	{"clone", IoObject_clone},
	{"cloneWithoutInit", IoObject_cloneWithoutInit},
	{"shallowCopy", IoObject_shallowCopy},
	{"write", IoObject_protoWrite},
	{"writeln", IoObject_protoWriteLn},
	{"type", IoObject_type},

	// logic

	{"compare", IoObject_protoCompare},
	{"<", IoObject_isLessThan_},
	{">", IoObject_isGreaterThan_},
	{">=", IoObject_isGreaterThanOrEqualTo_},
	{"<=", IoObject_isLessThanOrEqualTo_},

	// comparison

	{"isIdenticalTo", IoObject_isIdenticalTo},
	{"==", IoObject_equals},
	{"!=", IoObject_notEquals},

	// introspection

	//{"self", IoObject_self},
	{"setSlot", IoObject_protoSet_to_},
	{"setSlotWithType", IoObject_protoSetSlotWithType},
	{"updateSlot", IoObject_protoUpdateSlot_to_},
	{"getSlot", IoObject_protoGetSlot_},
	{"getLocalSlot", IoObject_protoGetLocalSlot_},
	{"hasLocalSlot", IoObject_protoHasLocalSlot},
	{"hasProto", IoObject_protoHasProto_},
	{"removeSlot", IoObject_protoRemoveSlot},
	{"removeAllSlots", IoObject_protoRemoveAllSlots},
	{"slotNames", IoObject_protoSlotNames},
	{"slotValues", IoObject_protoSlotValues},

	// method invocation

	{"perform", IoObject_protoPerform},
	{"performWithArgList", IoObject_protoPerformWithArgList},
	{"ancestorWithSlot", IoObject_ancestorWithSlot},
	{"contextWithSlot", IoObject_contextWithSlot},

	// control

	{"block", IoObject_block},
	{"method", IoBlock_method},
	{"for", IoObject_for},
	{"if", IoObject_if},
	{"", IoObject_evalArg},
	//{"truthValueOfArg", IoObject_truthValueOfArg},
	{"evalArg", IoObject_evalArg},
	{"evalArgAndReturnSelf", IoObject_evalArgAndReturnSelf},
	{"evalArgAndReturnNil", IoObject_evalArgAndReturnNil},

	{"return", IoObject_return},
	{"returnIfNonNil", IoObject_returnIfNonNil},
	{"loop", IoObject_loop},
	{"while", IoObject_while},
	{"break", IoObject_break},
	{"continue", IoObject_continue},
	{"stopStatus", IoObject_stopStatus},

	// utility

	{"print", IoObject_lobbyPrint},
	{"do", IoObject_do},
	{"lexicalDo", IoObject_lexicalDo},
	{"message", IoObject_message},
	{"doMessage", IoObject_doMessage},
	{"doString", IoObject_doString},
	{"doFile", IoObject_doFile},

	// reflection

	{"uniqueId", IoObject_uniqueId},

	//{"compact", IoObject_compactMethod},

	{"init", IoObject_self},

	// enumeration

	{"foreachSlot", IoObject_foreachSlot},
	{"-", IoObject_subtract},

	{"thisContext", IoObject_self},
	{"thisMessage", IoObject_thisMessage},
	{"thisLocalContext", IoObject_locals},

	// protos

	{"setProto", IoObject_setProto},
	{"setProtos", IoObject_setProtos},
	{"appendProto", IoObject_appendProto},
	{"prependProto", IoObject_prependProto},
	{"removeProto", IoObject_removeProto},
	{"removeAllProtos", IoObject_removeAllProtos},
	{"protos", IoObject_protosMethod},
	{"proto", IoObject_objectProto},
	{"setIsActivatable", IoObject_setIsActivatableMethod},
	{"isActivatable", IoObject_isActivatableMethod},
	{"argIsActivationRecord", IoObject_argIsActivationRecord},
	{"argIsCall", IoObject_argIsCall},
	{"become", IoObject_become},

	{"ownsSlots", IoObject_protoOwnsSlots}, // a debug method
	{"memorySize", IoObject_memorySizeMethod},


	{"hasDirtySlot", IoObject_hasDirtySlot_},
	{"markClean", IoObject_markClean},

	{NULL, NULL},
	};

	IoObject *self = IoState_protoWithId_((IoState *)state, protoId);

	IoObject_addTaglessMethodTable_(self, methodTable);
	return self;
}
Exemplo n.º 10
0
IoEvConnection *IoEvConnection_new(void *state)
{
	IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 11
0
Arquivo: IoSHA1.c Projeto: ADTSH/io
IoSHA1 *IoSHA1_new(void *state)
{
	IoSHA1 *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 12
0
IoMessage *IoMessage_new(void *state)
{
	IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
	IoObject *self = IOCLONE(proto);
	return self;
}
Exemplo n.º 13
0
IoVorbisBlock *IoVorbisBlock_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 14
0
IoObject *IoDrawStuff_rawClone(IoDrawStuff *self)
{
    return IoState_protoWithId_(IOSTATE, protoId);
}
Exemplo n.º 15
0
IoDrawStuff *IoDrawStuff_new(void *state)
{
    return IoState_protoWithId_(state, protoId);
}
Exemplo n.º 16
0
IoDuration *IoDuration_new(void *state)
{
	IoDuration *proto = IoState_protoWithId_((IoState *)state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 17
0
IoRegexMatches *IoRegexMatches_new(void *state)
{
	IoRegexMatches *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 18
0
Arquivo: IoYajlGen.c Projeto: ADTSH/io
IoYajlGen *IoYajlGen_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 19
0
IoODEWorld *IoODEWorld_new(void *state)
{
	IoODEWorld *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 20
0
IoSQLite3 *IoSQLite3_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 21
0
IoList *IoList_new(void *state)
{
	IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 22
0
IoDynLib *IoDynLib_new(void *state)
{
	IoDynLib *proto = IoState_protoWithId_((IoState *)state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 23
0
IoClutterActorBox *IoClutterActorBox_new(void *state) {
  IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);

  return IOCLONE(proto);
}
Exemplo n.º 24
0
IoTheoraDecodeContext *IoTheoraDecodeContext_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 25
0
IoZlibEncoder *IoZlibEncoder_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 26
0
IoObject *IoMemcached_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 27
0
IoCairoTextExtents *IoCairoTextExtents_newWithRawTextExtents(void *state, cairo_text_extents_t *extents)
{
	IoCairoTextExtents *self = IOCLONE(IoState_protoWithId_(state, protoId));
	memcpy(EXTENTS(self), extents, sizeof(cairo_text_extents_t));
	return self;
}
Exemplo n.º 28
0
IoAppleSensors *IoAppleSensors_new(void *state)
{
	IoObject *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 29
0
IoODEMass *IoODEMass_new(void *state)
{
	IoODEMass *proto = IoState_protoWithId_(state, protoId);
	return IOCLONE(proto);
}
Exemplo n.º 30
0
Arquivo: IoRegex.c Projeto: ADTSH/io
IoRegex *IoRegex_newWithPattern_(void *state, IoSymbol *pattern)
{
	IoRegex *self = IOCLONE(IoState_protoWithId_(state, protoId));
	DATA(self)->pattern = IOREF(pattern);
	return self;
}