Beispiel #1
0
FcBool
FcObjectValidType (FcObject object, FcType type)
{
    const FcObjectType    *t = FcObjectFindById (object);

    if (t) {
	switch ((int) t->type) {
	case FcTypeUnknown:
	    return FcTrue;
	case FcTypeDouble:
	case FcTypeInteger:
	    if (type == FcTypeDouble || type == FcTypeInteger)
		return FcTrue;
	    break;
	case FcTypeLangSet:
	    if (type == FcTypeLangSet || type == FcTypeString)
		return FcTrue;
	    break;
	default:
	    if (type == t->type)
		return FcTrue;
	    break;
	}
	return FcFalse;
    }
    return FcTrue;
}
Beispiel #2
0
const char *
FcObjectName (FcObject object)
{
    FcObjectType    *o = FcObjectFindById (object);

    if (o)
	return o->object;
    return NULL;
}
Beispiel #3
0
const char *
FcObjectName (FcObject object)
{
    const FcObjectType   *o = FcObjectFindById (object);

    if (o)
	return o->object;

    return FcObjectLookupOtherNameById (object);
}