gi-harfbuzz-0.0.5: HarfBuzz bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.HarfBuzz.Callbacks

Description

 
Synopsis

Signals

BufferMessageFuncT

type BufferMessageFuncT Source #

Arguments

 = BufferT

buffer: An BufferT to work upon

-> FontT

font: The FontT the buffer is shaped with

-> Text

message: Nothing-terminated message passed to the function

-> IO Int32

Returns: true to perform the shaping step, false to skip it.

A callback method for BufferT. The method gets called with the BufferT it was set on, the FontT the buffer is shaped with and a message describing what step of the shaping process will be performed. Returning false from this method will skip this shaping step and move to the next one.

Since: 1.1.3

type BufferMessageFuncT_WithClosures Source #

Arguments

 = BufferT

buffer: An BufferT to work upon

-> FontT

font: The FontT the buffer is shaped with

-> Text

message: Nothing-terminated message passed to the function

-> Ptr ()

userData: User data pointer passed by the caller

-> IO Int32

Returns: true to perform the shaping step, false to skip it.

A callback method for BufferT. The method gets called with the BufferT it was set on, the FontT the buffer is shaped with and a message describing what step of the shaping process will be performed. Returning false from this method will skip this shaping step and move to the next one.

Since: 1.1.3

type C_BufferMessageFuncT = Ptr BufferT -> Ptr FontT -> CString -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

drop_closures_BufferMessageFuncT :: BufferMessageFuncT -> BufferMessageFuncT_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_BufferMessageFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_BufferMessageFuncT 
-> BufferT

buffer: An BufferT to work upon

-> FontT

font: The FontT the buffer is shaped with

-> Text

message: Nothing-terminated message passed to the function

-> Ptr ()

userData: User data pointer passed by the caller

-> m Int32

Returns: true to perform the shaping step, false to skip it.

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_BufferMessageFuncT :: C_BufferMessageFuncT -> IO (FunPtr C_BufferMessageFuncT) Source #

Generate a function pointer callable from C code, from a C_BufferMessageFuncT.

DestroyFuncT

type C_DestroyFuncT = Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type DestroyFuncT = IO () Source #

A virtual method for destroy user-data callbacks.

type DestroyFuncT_WithClosures Source #

Arguments

 = Ptr ()

userData: the data to be destroyed

-> IO () 

A virtual method for destroy user-data callbacks.

drop_closures_DestroyFuncT :: DestroyFuncT -> DestroyFuncT_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_DestroyFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_DestroyFuncT 
-> Ptr ()

userData: the data to be destroyed

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_DestroyFuncT :: C_DestroyFuncT -> IO (FunPtr C_DestroyFuncT) Source #

Generate a function pointer callable from C code, from a C_DestroyFuncT.

FontGetGlyphAdvanceFuncT

type C_FontGetGlyphAdvanceFuncT = Ptr FontT -> Ptr () -> Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphAdvanceFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> IO Int32

Returns: The advance of glyph within font

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the advance for a specified glyph. The method must return an hb_position_t.

type FontGetGlyphAdvanceFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO Int32

Returns: The advance of glyph within font

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the advance for a specified glyph. The method must return an hb_position_t.

dynamic_FontGetGlyphAdvanceFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphAdvanceFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m Int32

Returns: The advance of glyph within font

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetGlyphAdvancesFuncT

type C_FontGetGlyphAdvancesFuncT = Ptr FontT -> Ptr () -> Word32 -> Word32 -> Word32 -> Ptr Int32 -> Word32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphAdvancesFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

count: The number of glyph IDs in the sequence queried

-> Word32

firstGlyph: The first glyph ID to query

-> Word32

glyphStride: The stride between successive glyph IDs

-> Word32

advanceStride: The stride between successive advances

-> IO Int32 

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the advances for a sequence of glyphs.

type FontGetGlyphAdvancesFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

count: The number of glyph IDs in the sequence queried

-> Word32

firstGlyph: The first glyph ID to query

-> Word32

glyphStride: The stride between successive glyph IDs

-> Word32

advanceStride: The stride between successive advances

-> Ptr ()

userData: User data pointer passed by the caller

-> IO Int32 

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the advances for a sequence of glyphs.

dynamic_FontGetGlyphAdvancesFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphAdvancesFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

count: The number of glyph IDs in the sequence queried

-> Word32

firstGlyph: The first glyph ID to query

-> Word32

glyphStride: The stride between successive glyph IDs

-> Word32

advanceStride: The stride between successive advances

-> Ptr ()

userData: User data pointer passed by the caller

-> m Int32 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetGlyphContourPointFuncT

type C_FontGetGlyphContourPointFuncT = Ptr FontT -> Ptr () -> Word32 -> Word32 -> Ptr Int32 -> Ptr Int32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphContourPointFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Word32

pointIndex: The contour-point index to query

-> IO (Int32, Int32, Int32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the (X,Y) coordinates (in font units) for a specified contour point in a glyph. Each coordinate must be returned as an hb_position_t output parameter.

type FontGetGlyphContourPointFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Word32

pointIndex: The contour-point index to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Int32, Int32, Int32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the (X,Y) coordinates (in font units) for a specified contour point in a glyph. Each coordinate must be returned as an hb_position_t output parameter.

dynamic_FontGetGlyphContourPointFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphContourPointFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Word32

pointIndex: The contour-point index to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Int32, Int32, Int32)

Returns: true if data found, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetGlyphFromNameFuncT

type C_FontGetGlyphFromNameFuncT = Ptr FontT -> Ptr () -> Ptr CString -> Int32 -> Ptr Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphFromNameFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> [Text]

name: The name string to query

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph ID that corresponds to a glyph-name string.

type FontGetGlyphFromNameFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> [Text]

name: The name string to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph ID that corresponds to a glyph-name string.

dynamic_FontGetGlyphFromNameFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphFromNameFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> [Text]

name: The name string to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Int32, Word32)

Returns: true if data found, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetGlyphFuncT

type C_FontGetGlyphFuncT = Ptr FontT -> Ptr () -> Word32 -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Word32

variationSelector: The variation-selector code point to query

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

Deprecated: (Since version 1.2.3)

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph ID for a specified Unicode code point font, with an optional variation selector.

type FontGetGlyphFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Word32

variationSelector: The variation-selector code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph ID for a specified Unicode code point font, with an optional variation selector.

drop_closures_FontGetGlyphFuncT :: FontGetGlyphFuncT -> FontGetGlyphFuncT_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_FontGetGlyphFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Word32

variationSelector: The variation-selector code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Int32, Word32)

Returns: true if data found, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_FontGetGlyphFuncT :: C_FontGetGlyphFuncT -> IO (FunPtr C_FontGetGlyphFuncT) Source #

Generate a function pointer callable from C code, from a C_FontGetGlyphFuncT.

FontGetGlyphKerningFuncT

type C_FontGetGlyphKerningFuncT = Ptr FontT -> Ptr () -> Word32 -> Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphKerningFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

firstGlyph: The glyph ID of the first glyph in the glyph pair

-> Word32

secondGlyph: The glyph ID of the second glyph in the glyph pair

-> IO Int32 

This method should retrieve the kerning-adjustment value for a glyph-pair in the specified font, for horizontal text segments.

type FontGetGlyphKerningFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

firstGlyph: The glyph ID of the first glyph in the glyph pair

-> Word32

secondGlyph: The glyph ID of the second glyph in the glyph pair

-> Ptr ()

userData: User data pointer passed by the caller

-> IO Int32 

This method should retrieve the kerning-adjustment value for a glyph-pair in the specified font, for horizontal text segments.

dynamic_FontGetGlyphKerningFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphKerningFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

firstGlyph: The glyph ID of the first glyph in the glyph pair

-> Word32

secondGlyph: The glyph ID of the second glyph in the glyph pair

-> Ptr ()

userData: User data pointer passed by the caller

-> m Int32 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetGlyphNameFuncT

type C_FontGetGlyphNameFuncT = Ptr FontT -> Ptr () -> Word32 -> Ptr (Ptr CString) -> Ptr Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphNameFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> IO (Int32, [Text])

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph name that corresponds to a glyph ID. The name should be returned in a string output parameter.

type FontGetGlyphNameFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Int32, [Text])

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph name that corresponds to a glyph ID. The name should be returned in a string output parameter.

dynamic_FontGetGlyphNameFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphNameFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Int32, [Text])

Returns: true if data found, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_FontGetGlyphNameFuncT :: C_FontGetGlyphNameFuncT -> IO (FunPtr C_FontGetGlyphNameFuncT) Source #

Generate a function pointer callable from C code, from a C_FontGetGlyphNameFuncT.

FontGetGlyphOriginFuncT

type C_FontGetGlyphOriginFuncT = Ptr FontT -> Ptr () -> Word32 -> Ptr Int32 -> Ptr Int32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetGlyphOriginFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> IO (Int32, Int32, Int32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the (X,Y) coordinates (in font units) of the origin for a glyph. Each coordinate must be returned in an hb_position_t output parameter.

type FontGetGlyphOriginFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Int32, Int32, Int32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the (X,Y) coordinates (in font units) of the origin for a glyph. Each coordinate must be returned in an hb_position_t output parameter.

dynamic_FontGetGlyphOriginFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetGlyphOriginFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

glyph: The glyph ID to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Int32, Int32, Int32)

Returns: true if data found, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetNominalGlyphFuncT

type C_FontGetNominalGlyphFuncT = Ptr FontT -> Ptr () -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetNominalGlyphFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the nominal glyph ID for a specified Unicode code point. Glyph IDs must be returned in a hb_codepoint_t output parameter.

type FontGetNominalGlyphFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the nominal glyph ID for a specified Unicode code point. Glyph IDs must be returned in a hb_codepoint_t output parameter.

dynamic_FontGetNominalGlyphFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetNominalGlyphFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Int32, Word32)

Returns: true if data found, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetNominalGlyphsFuncT

type C_FontGetNominalGlyphsFuncT = Ptr FontT -> Ptr () -> Word32 -> Word32 -> Word32 -> Ptr Word32 -> Word32 -> Ptr () -> IO Word32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetNominalGlyphsFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

count: number of code points to query

-> Word32

firstUnicode: The first Unicode code point to query

-> Word32

unicodeStride: The stride between successive code points

-> Word32

glyphStride: The stride between successive glyph IDs

-> IO (Word32, Word32)

Returns: the number of code points processed

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the nominal glyph IDs for a sequence of Unicode code points. Glyph IDs must be returned in a hb_codepoint_t output parameter.

type FontGetNominalGlyphsFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

count: number of code points to query

-> Word32

firstUnicode: The first Unicode code point to query

-> Word32

unicodeStride: The stride between successive code points

-> Word32

glyphStride: The stride between successive glyph IDs

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Word32, Word32)

Returns: the number of code points processed

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the nominal glyph IDs for a sequence of Unicode code points. Glyph IDs must be returned in a hb_codepoint_t output parameter.

dynamic_FontGetNominalGlyphsFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetNominalGlyphsFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

count: number of code points to query

-> Word32

firstUnicode: The first Unicode code point to query

-> Word32

unicodeStride: The stride between successive code points

-> Word32

glyphStride: The stride between successive glyph IDs

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Word32, Word32)

Returns: the number of code points processed

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

FontGetVariationGlyphFuncT

type C_FontGetVariationGlyphFuncT = Ptr FontT -> Ptr () -> Word32 -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type FontGetVariationGlyphFuncT Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Word32

variationSelector: The variation-selector code point to query

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph ID for a specified Unicode code point followed by a specified Variation Selector code point. Glyph IDs must be returned in a hb_codepoint_t output parameter.

type FontGetVariationGlyphFuncT_WithClosures Source #

Arguments

 = FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Word32

variationSelector: The variation-selector code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO (Int32, Word32)

Returns: true if data found, false otherwise

A virtual method for the FontFuncsT of an FontT object.

This method should retrieve the glyph ID for a specified Unicode code point followed by a specified Variation Selector code point. Glyph IDs must be returned in a hb_codepoint_t output parameter.

dynamic_FontGetVariationGlyphFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FontGetVariationGlyphFuncT 
-> FontT

font: FontT to work upon

-> Ptr ()

fontData: font user data pointer

-> Word32

unicode: The Unicode code point to query

-> Word32

variationSelector: The variation-selector code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m (Int32, Word32)

Returns: true if data found, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

ReferenceTableFuncT

type C_ReferenceTableFuncT = Ptr FaceT -> Word32 -> Ptr () -> IO (Ptr BlobT) Source #

Type for the callback on the (unwrapped) C side.

type ReferenceTableFuncT Source #

Arguments

 = FaceT

face: an FaceT to reference table for

-> Word32

tag: the tag of the table to reference

-> IO BlobT

Returns: A pointer to the tag table within face

Callback function for faceCreateForTables.

Since: 0.9.2

type ReferenceTableFuncT_WithClosures Source #

Arguments

 = FaceT

face: an FaceT to reference table for

-> Word32

tag: the tag of the table to reference

-> Ptr ()

userData: User data pointer passed by the caller

-> IO BlobT

Returns: A pointer to the tag table within face

Callback function for faceCreateForTables.

Since: 0.9.2

drop_closures_ReferenceTableFuncT :: ReferenceTableFuncT -> ReferenceTableFuncT_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_ReferenceTableFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_ReferenceTableFuncT 
-> FaceT

face: an FaceT to reference table for

-> Word32

tag: the tag of the table to reference

-> Ptr ()

userData: User data pointer passed by the caller

-> m BlobT

Returns: A pointer to the tag table within face

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_ReferenceTableFuncT :: C_ReferenceTableFuncT -> IO (FunPtr C_ReferenceTableFuncT) Source #

Generate a function pointer callable from C code, from a C_ReferenceTableFuncT.

UnicodeCombiningClassFuncT

type C_UnicodeCombiningClassFuncT = Ptr UnicodeFuncsT -> Word32 -> Ptr () -> IO CUInt Source #

Type for the callback on the (unwrapped) C side.

type UnicodeCombiningClassFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> IO UnicodeCombiningClassT

Returns: The UnicodeCombiningClassT of unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the Canonical Combining Class (ccc) property for a specified Unicode code point.

type UnicodeCombiningClassFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO UnicodeCombiningClassT

Returns: The UnicodeCombiningClassT of unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the Canonical Combining Class (ccc) property for a specified Unicode code point.

dynamic_UnicodeCombiningClassFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeCombiningClassFuncT 
-> UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m UnicodeCombiningClassT

Returns: The UnicodeCombiningClassT of unicode

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

UnicodeComposeFuncT

type C_UnicodeComposeFuncT = Ptr UnicodeFuncsT -> Word32 -> Word32 -> Ptr Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type UnicodeComposeFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

a: The first code point to compose

-> Word32

b: The second code point to compose

-> IO (Int32, Word32)

Returns: true is a,b composed, false otherwise

A virtual method for the UnicodeFuncsT structure.

This method should compose a sequence of two input Unicode code points by canonical equivalence, returning the composed code point in a hb_codepoint_t output parameter (if successful). The method must return an hb_bool_t indicating the success of the composition.

type UnicodeComposeFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

a: The first code point to compose

-> Word32

b: The second code point to compose

-> Ptr ()

userData: user data pointer passed by the caller

-> IO (Int32, Word32)

Returns: true is a,b composed, false otherwise

A virtual method for the UnicodeFuncsT structure.

This method should compose a sequence of two input Unicode code points by canonical equivalence, returning the composed code point in a hb_codepoint_t output parameter (if successful). The method must return an hb_bool_t indicating the success of the composition.

drop_closures_UnicodeComposeFuncT :: UnicodeComposeFuncT -> UnicodeComposeFuncT_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_UnicodeComposeFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeComposeFuncT 
-> UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

a: The first code point to compose

-> Word32

b: The second code point to compose

-> Ptr ()

userData: user data pointer passed by the caller

-> m (Int32, Word32)

Returns: true is a,b composed, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_UnicodeComposeFuncT :: C_UnicodeComposeFuncT -> IO (FunPtr C_UnicodeComposeFuncT) Source #

Generate a function pointer callable from C code, from a C_UnicodeComposeFuncT.

UnicodeDecomposeCompatibilityFuncT

type C_UnicodeDecomposeCompatibilityFuncT = Ptr UnicodeFuncsT -> Word32 -> Word32 -> Ptr () -> IO Word32 Source #

Type for the callback on the (unwrapped) C side.

type UnicodeDecomposeCompatibilityFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: a Unicode function structure

-> Word32

u: codepoint to decompose

-> Word32

decomposed: address of codepoint array (of length UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into

-> IO Word32

Returns: number of codepoints in the full compatibility decomposition of u, or 0 if no decomposition available.

Deprecated: (Since version 2.0.0)

Fully decompose u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to decomposed. The complete length of the decomposition will be returned.

If u has no compatibility decomposition, zero should be returned.

The Unicode standard guarantees that a buffer of length UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any compatibility decomposition plus an terminating value of 0. Consequently, decompose must be allocated by the caller to be at least this length. Implementations of this function type must ensure that they do not write past the provided array.

type UnicodeDecomposeCompatibilityFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: a Unicode function structure

-> Word32

u: codepoint to decompose

-> Word32

decomposed: address of codepoint array (of length UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into

-> Ptr ()

userData: user data pointer as passed to unicodeFuncsSetDecomposeCompatibilityFunc

-> IO Word32

Returns: number of codepoints in the full compatibility decomposition of u, or 0 if no decomposition available.

Fully decompose u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to decomposed. The complete length of the decomposition will be returned.

If u has no compatibility decomposition, zero should be returned.

The Unicode standard guarantees that a buffer of length UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any compatibility decomposition plus an terminating value of 0. Consequently, decompose must be allocated by the caller to be at least this length. Implementations of this function type must ensure that they do not write past the provided array.

dynamic_UnicodeDecomposeCompatibilityFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeDecomposeCompatibilityFuncT 
-> UnicodeFuncsT

ufuncs: a Unicode function structure

-> Word32

u: codepoint to decompose

-> Word32

decomposed: address of codepoint array (of length UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into

-> Ptr ()

userData: user data pointer as passed to unicodeFuncsSetDecomposeCompatibilityFunc

-> m Word32

Returns: number of codepoints in the full compatibility decomposition of u, or 0 if no decomposition available.

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

UnicodeDecomposeFuncT

type C_UnicodeDecomposeFuncT = Ptr UnicodeFuncsT -> Word32 -> Ptr Word32 -> Ptr Word32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type UnicodeDecomposeFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

ab: The code point to decompose

-> IO (Int32, Word32, Word32)

Returns: true if ab decomposed, false otherwise

A virtual method for the UnicodeFuncsT structure.

This method should decompose an input Unicode code point, returning the two decomposed code points in hb_codepoint_t output parameters (if successful). The method must return an hb_bool_t indicating the success of the composition.

type UnicodeDecomposeFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

ab: The code point to decompose

-> Ptr ()

userData: user data pointer passed by the caller

-> IO (Int32, Word32, Word32)

Returns: true if ab decomposed, false otherwise

A virtual method for the UnicodeFuncsT structure.

This method should decompose an input Unicode code point, returning the two decomposed code points in hb_codepoint_t output parameters (if successful). The method must return an hb_bool_t indicating the success of the composition.

dynamic_UnicodeDecomposeFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeDecomposeFuncT 
-> UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

ab: The code point to decompose

-> Ptr ()

userData: user data pointer passed by the caller

-> m (Int32, Word32, Word32)

Returns: true if ab decomposed, false otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_UnicodeDecomposeFuncT :: C_UnicodeDecomposeFuncT -> IO (FunPtr C_UnicodeDecomposeFuncT) Source #

Generate a function pointer callable from C code, from a C_UnicodeDecomposeFuncT.

UnicodeEastasianWidthFuncT

type C_UnicodeEastasianWidthFuncT = Ptr UnicodeFuncsT -> Word32 -> Ptr () -> IO Word32 Source #

Type for the callback on the (unwrapped) C side.

type UnicodeEastasianWidthFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> IO Word32 

Deprecated: (Since version 2.0.0)

A virtual method for the UnicodeFuncsT structure.

type UnicodeEastasianWidthFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO Word32 

A virtual method for the UnicodeFuncsT structure.

dynamic_UnicodeEastasianWidthFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeEastasianWidthFuncT 
-> UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m Word32 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

UnicodeGeneralCategoryFuncT

type C_UnicodeGeneralCategoryFuncT = Ptr UnicodeFuncsT -> Word32 -> Ptr () -> IO CUInt Source #

Type for the callback on the (unwrapped) C side.

type UnicodeGeneralCategoryFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> IO UnicodeGeneralCategoryT

Returns: The UnicodeGeneralCategoryT of unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the General Category property for a specified Unicode code point.

type UnicodeGeneralCategoryFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO UnicodeGeneralCategoryT

Returns: The UnicodeGeneralCategoryT of unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the General Category property for a specified Unicode code point.

dynamic_UnicodeGeneralCategoryFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeGeneralCategoryFuncT 
-> UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m UnicodeGeneralCategoryT

Returns: The UnicodeGeneralCategoryT of unicode

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

UnicodeMirroringFuncT

type C_UnicodeMirroringFuncT = Ptr UnicodeFuncsT -> Word32 -> Ptr () -> IO Word32 Source #

Type for the callback on the (unwrapped) C side.

type UnicodeMirroringFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> IO Word32

Returns: The hb_codepoint_t of the Mirroring Glyph for unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the Bi-Directional Mirroring Glyph code point for a specified Unicode code point.

<note>Note: If a code point does not have a specified Bi-Directional Mirroring Glyph defined, the method should return the original code point.</note>

type UnicodeMirroringFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO Word32

Returns: The hb_codepoint_t of the Mirroring Glyph for unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the Bi-Directional Mirroring Glyph code point for a specified Unicode code point.

<note>Note: If a code point does not have a specified Bi-Directional Mirroring Glyph defined, the method should return the original code point.</note>

dynamic_UnicodeMirroringFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeMirroringFuncT 
-> UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m Word32

Returns: The hb_codepoint_t of the Mirroring Glyph for unicode

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_UnicodeMirroringFuncT :: C_UnicodeMirroringFuncT -> IO (FunPtr C_UnicodeMirroringFuncT) Source #

Generate a function pointer callable from C code, from a C_UnicodeMirroringFuncT.

UnicodeScriptFuncT

type C_UnicodeScriptFuncT = Ptr UnicodeFuncsT -> Word32 -> Ptr () -> IO CUInt Source #

Type for the callback on the (unwrapped) C side.

type UnicodeScriptFuncT Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> IO ScriptT

Returns: The ScriptT of unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the Script property for a specified Unicode code point.

type UnicodeScriptFuncT_WithClosures Source #

Arguments

 = UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> IO ScriptT

Returns: The ScriptT of unicode

A virtual method for the UnicodeFuncsT structure.

This method should retrieve the Script property for a specified Unicode code point.

drop_closures_UnicodeScriptFuncT :: UnicodeScriptFuncT -> UnicodeScriptFuncT_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_UnicodeScriptFuncT Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_UnicodeScriptFuncT 
-> UnicodeFuncsT

ufuncs: A Unicode-functions structure

-> Word32

unicode: The code point to query

-> Ptr ()

userData: User data pointer passed by the caller

-> m ScriptT

Returns: The ScriptT of unicode

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_UnicodeScriptFuncT :: C_UnicodeScriptFuncT -> IO (FunPtr C_UnicodeScriptFuncT) Source #

Generate a function pointer callable from C code, from a C_UnicodeScriptFuncT.