package provide Freetype::ftgzip 0.1

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


::ffidl::callout _FT_Stream_OpenGzip {pointer pointer} int \
    [::ffidl::symbol $::ft::lib FT_Stream_OpenGzip]
proc FT_Stream_OpenGzip {stream source} {
    set result [FT_Stream_OpenGzip [$stream getPointer] [$source getPointer]]
    return $result
}

if {[catch {::ffidl::symbol $::ft::lib FT_Gzip_Uncompress} _symbol] == 0} {
::ffidl::callout _FT_Gzip_Uncompress {pointer pointer-var pointer-var 
    pointer-var FT_ULong} int $_symbol
proc FT_Gzip_Uncompress {memory output input} {
    _FT_Gzip_Uncompress [$memory getPointer] 
}
}

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