# Module sdl_ttf

# Imports

sdl

# Types

    PFont = ptr TFont

# Consts

    MAJOR_VERSION = 2

    MINOR_VERSION = 0

    PATCHLEVEL = 8

    STYLE_NORMAL = 0x00000000

    STYLE_BOLD = 0x00000001

    STYLE_ITALIC = 0x00000002

    STYLE_UNDERLINE = 0x00000004

    UNICODE_BOM_NATIVE = 0x0000FEFF

    UNICODE_BOM_SWAPPED = 0x0000FFFE

# Procs

    proc Linked_Version(): Pversion {.cdecl, importc: "TTF_Linked_Version",
                                      dynlib: ttfLibName.}

    proc ByteSwappedUNICODE(swapped: cint) {.cdecl,
        importc: "TTF_ByteSwappedUNICODE", dynlib: ttfLibName.}

    proc Init(): cint {.cdecl, importc: "TTF_Init", dynlib: ttfLibName.}

    proc OpenFont(filename: cstring; ptsize: cint): PFont {.cdecl,
        importc: "TTF_OpenFont", dynlib: ttfLibName.}

    proc OpenFontIndex(filename: cstring; ptsize: cint; index: int32): PFont {.
        cdecl, importc: "TTF_OpenFontIndex", dynlib: ttfLibName.}

    proc OpenFontRW(src: PRWops; freesrc: cint; ptsize: cint): PFont {.cdecl,
        importc: "TTF_OpenFontRW", dynlib: ttfLibName.}

    proc OpenFontIndexRW(src: PRWops; freesrc: cint; ptsize: cint; index: int32): PFont {.
        cdecl, importc: "TTF_OpenFontIndexRW", dynlib: ttfLibName.}

    proc GetFontStyle(font: PFont): cint {.cdecl, importc: "TTF_GetFontStyle",
                                           dynlib: ttfLibName.}

    proc SetFontStyle(font: PFont; style: cint) {.cdecl,
        importc: "TTF_SetFontStyle", dynlib: ttfLibName.}

    proc FontHeight(font: PFont): cint {.cdecl, importc: "TTF_FontHeight",
                                         dynlib: ttfLibName.}

    proc FontAscent(font: PFont): cint {.cdecl, importc: "TTF_FontAscent",
                                         dynlib: ttfLibName.}

    proc FontDescent(font: PFont): cint {.cdecl, importc: "TTF_FontDescent",
                                          dynlib: ttfLibName.}

    proc FontLineSkip(font: PFont): cint {.cdecl, importc: "TTF_FontLineSkip",
                                           dynlib: ttfLibName.}

    proc FontFaces(font: PFont): int32 {.cdecl, importc: "TTF_FontFaces",
                                         dynlib: ttfLibName.}

    proc FontFaceIsFixedWidth(font: PFont): cint {.cdecl,
        importc: "TTF_FontFaceIsFixedWidth", dynlib: ttfLibName.}

    proc FontFaceFamilyName(font: PFont): cstring {.cdecl,
        importc: "TTF_FontFaceFamilyName", dynlib: ttfLibName.}

    proc FontFaceStyleName(font: PFont): cstring {.cdecl,
        importc: "TTF_FontFaceStyleName", dynlib: ttfLibName.}

    proc GlyphMetrics(font: PFont; ch: uint16; minx: var cint; maxx: var cint;
                      miny: var cint; maxy: var cint; advance: var cint): cint {.
        cdecl, importc: "TTF_GlyphMetrics", dynlib: ttfLibName.}

    proc SizeText(font: PFont; text: cstring; w: var cint; y: var cint): cint {.
        cdecl, importc: "TTF_SizeText", dynlib: ttfLibName.}

    proc SizeUTF8(font: PFont; text: cstring; w: var cint; y: var cint): cint {.
        cdecl, importc: "TTF_SizeUTF8", dynlib: ttfLibName.}

    proc SizeUNICODE(font: PFont; text: PUInt16; w: var cint; y: var cint): cint {.
        cdecl, importc: "TTF_SizeUNICODE", dynlib: ttfLibName.}

    proc RenderUTF8_Solid(font: PFont; text: cstring; fg: TColor): PSurface {.cdecl,
        importc: "TTF_RenderUTF8_Solid", dynlib: ttfLibName.}

    proc RenderUNICODE_Solid(font: PFont; text: PUInt16; fg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderUNICODE_Solid", dynlib: ttfLibName.}

    proc RenderGlyph_Solid(font: PFont; ch: uint16; fg: TColor): PSurface {.cdecl,
        importc: "TTF_RenderGlyph_Solid", dynlib: ttfLibName.}

    proc RenderText_Shaded(font: PFont; text: cstring; fg: TColor; bg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderText_Shaded", dynlib: ttfLibName.}

    proc RenderUTF8_Shaded(font: PFont; text: cstring; fg: TColor; bg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderUTF8_Shaded", dynlib: ttfLibName.}

    proc RenderUNICODE_Shaded(font: PFont; text: PUInt16; fg: TColor; bg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderUNICODE_Shaded", dynlib: ttfLibName.}

    proc RenderGlyph_Shaded(font: PFont; ch: uint16; fg: TColor; bg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderGlyph_Shaded", dynlib: ttfLibName.}

    proc RenderText_Blended(font: PFont; text: cstring; fg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderText_Blended", dynlib: ttfLibName.}

    proc RenderUTF8_Blended(font: PFont; text: cstring; fg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderUTF8_Blended", dynlib: ttfLibName.}

    proc RenderUNICODE_Blended(font: PFont; text: PUInt16; fg: TColor): PSurface {.
        cdecl, importc: "TTF_RenderUNICODE_Blended", dynlib: ttfLibName.}

    proc RenderGlyph_Blended(font: PFont; ch: uint16; fg: TColor): PSurface {.cdecl,
        importc: "TTF_RenderGlyph_Blended", dynlib: ttfLibName.}

    proc CloseFont(font: PFont) {.cdecl, importc: "TTF_CloseFont",
                                  dynlib: ttfLibName.}

    proc Quit() {.cdecl, importc: "TTF_Quit", dynlib: ttfLibName.}

    proc WasInit(): cint {.cdecl, importc: "TTF_WasInit", dynlib: ttfLibName.}

    proc VERSION(X: var Tversion) {.raises: [], tags: [].}

    proc RenderText_Solid(font: PFont; text: cstring; fg: TColor): PSurface {.cdecl,
        importc: "TTF_RenderText_Solid", dynlib: ttfLibName.}

Generated: 2013-05-21 09:55:05 UTC