// Public types from fontconfig/fontconfig.h. The C header owns the ABI; // constants are generated into constants.v. module fontconfig #pkgconfig fontconfig #include #include "@VMODROOT/fontconfig/types.h" #include "@VMODROOT/fontconfig/bridge.h" pub type FcChar8 = u8 pub type FcChar16 = u16 pub type FcChar32 = u32 pub type FcBool = i32 pub type FcObject = i32 // C enums are int-sized; enum output pointers cross typed adapters in bridge.h. pub type FcType = i32 pub type FcResult = i32 pub type FcValueBinding = i32 pub type FcMatchKind = i32 pub type FcLangResult = i32 pub type FcSetName = i32 pub type FcEndian = i32 // Callbacks for config_set_font_set_filter. Exact C widths: FcBool is C int. pub type FcDestroyFunc = fn (data voidptr) pub type FcFilterFontSetFunc = fn (font &FcPattern, user_data voidptr) FcBool @[typedef] pub struct C.FcMatrix { pub mut: xx f64 xy f64 yx f64 yy f64 } pub type FcMatrix = C.FcMatrix @[typedef] pub struct C.FcObjectType { pub mut: object &char @type FcType } pub type FcObjectType = C.FcObjectType @[typedef] pub struct C.FcConstant { pub mut: name &u8 object &char value i32 } pub type FcConstant = C.FcConstant // Opaque handles; use them only through pointers. @[typedef] pub struct C.FcCharSet {} pub type FcCharSet = C.FcCharSet @[typedef] pub struct C.FcPattern {} pub type FcPattern = C.FcPattern @[typedef] pub struct C.FcLangSet {} pub type FcLangSet = C.FcLangSet @[typedef] pub struct C.FcRange {} pub type FcRange = C.FcRange @[typedef] pub struct C.FcAtomic {} pub type FcAtomic = C.FcAtomic @[typedef] pub struct C.FcConfig {} pub type FcConfig = C.FcConfig @[typedef] pub struct C.FcFileCache {} pub type FcFileCache = C.FcFileCache @[typedef] pub struct C.FcBlanks {} pub type FcBlanks = C.FcBlanks @[typedef] pub struct C.FcStrList {} pub type FcStrList = C.FcStrList @[typedef] pub struct C.FcStrSet {} pub type FcStrSet = C.FcStrSet @[typedef] pub struct C.FcCache {} pub type FcCache = C.FcCache // FcPatternIter is caller-allocated state for the pattern_iter_* calls. @[typedef] pub struct C.FcPatternIter { pub mut: dummy1 voidptr dummy2 voidptr } pub type FcPatternIter = C.FcPatternIter // FcValueUnion is FcValue's anonymous union, named in types.h. Read the member // that matches FcValue.type. @[typedef] pub union C.vx11_FcValueUnion { pub mut: s &u8 i i32 b FcBool d f64 m &FcMatrix c &FcCharSet f voidptr l &FcLangSet r &FcRange } pub type FcValueUnion = C.vx11_FcValueUnion // FcValue borrows the data its pointers reference, except values returned by // value_save, which value_destroy releases. @[typedef] pub struct C.FcValue { pub mut: @type FcType u FcValueUnion } pub type FcValue = C.FcValue @[typedef] pub struct C.FcFontSet { pub mut: nfont i32 sfont i32 fonts &&FcPattern } pub type FcFontSet = C.FcFontSet // The object name fields are deprecated by Fontconfig. @[typedef] pub struct C.FcObjectSet { pub mut: nobject i32 sobject i32 objects &&char nobjIds i32 objIds &FcObject } pub type FcObjectSet = C.FcObjectSet // FcConfigFileInfoIter is caller-allocated state for config_file_info_iter_*. @[typedef] pub struct C.FcConfigFileInfoIter { pub mut: dummy1 voidptr dummy2 voidptr dummy3 voidptr } pub type FcConfigFileInfoIter = C.FcConfigFileInfoIter