package provide Freetype::ftcid 0.1

if {![info exists _source([file tail [info script]])]} {
package require Freetype::ft2build
package require $FT_FREETYPE

if {[catch {::ffidl::symbol $::ft::lib FT_Get_CID_Registry_Ordering_Supplement} _symbol] == 0} {
::ffidl::callout _FT_Get_CID_Registry_Ordering_Supplement \
        {pointer pointer-var pointer-var pointer-var} int $_symbol
proc FT_Get_CID_Registry_Ordering_Supplement {face registryVarName orderingVarName supplementVarName} {
    upvar $registryVarName registry
    upvar $orderingVarName ordering
    upvar $supplementVarName supplement
    set p1 [::ft::_bytearray_from_pointer 0]
    set p2 [::ft::_bytearray_from_pointer 0]
    set p3 [::ft::_bytearray_from_pointer 0]
    set result [_FT_Get_CID_Registry_Ordering_Supplement [$face getPointer] 0 0 0]

    if {$result == 0} {
        set registry [::ffidl::new-string [::ft::_bytearray_to_pointer $p1] -1]
        set ordering [::ffidl::new-string [::ft::_bytearray_to_pointer $p2] -1]
        set supplement [::ft::_bytearray_to_pointer $p3]
    }
    return $result
}
}

if {[catch {::ffidl::symbol $::ft::lib FT_Get_CID_Is_Internally_CID_Keyed} _symbol] == 0} {
::ffidl::callout _FT_Get_CID_Is_Internally_CID_Keyed {pointer pointer-var} int $_symbol
proc FT_Get_CID_Is_Internally_CID_Keyed {face is_cidVarName} {
    upvar $is_cidVarName is_cid
    set p [::ft::_bytearray_from FT_Bool 0]
    set result [_FT_Get_CID_Is_Internally_CID_Keyed [$face getPointer] p]
    set is_cid [::ft::_bytearray_to FT_Bool $p]
    return $result
}
}

set _source([file tail [info script]]) 1
}
