{-# OPTIONS_GHC -fno-warn-unused-imports #-} #include #include module Bindings.Friso.Raw.FrisoAPI where import Foreign.Ptr #strict_import {- typedef unsigned short ushort_t; -} #synonym_t ushort_t , CUShort {- typedef unsigned char uchar_t; -} #synonym_t uchar_t , CUChar {- typedef unsigned int uint_t; -} #synonym_t uint_t , CUInt {- typedef char * fstring; -} #synonym_t fstring , CString {- typedef struct { fstring buffer; uint_t length; uint_t allocs; } string_buffer_entry; -} #starttype string_buffer_entry #field buffer , CString #field length , CUInt #field allocs , CUInt #stoptype {- typedef string_buffer_entry * string_buffer_t; -} #synonym_t string_buffer_t , #ccall new_string_buffer_with_opacity , CUInt -> IO (Ptr ) #ccall new_string_buffer_with_string , CString -> IO (Ptr ) #ccall string_buffer_append , Ptr -> CString -> IO () #ccall string_buffer_append_char , Ptr -> CString -> IO () #ccall string_buffer_insert , (Ptr ) -> CUInt -> CString -> IO () #ccall string_buffer_remove , Ptr -> CUInt -> CUInt -> IO CString #ccall string_buffer_trim , Ptr -> IO (Ptr ) #ccall string_buffer_devote , Ptr -> IO CString #ccall string_buffer_clear , Ptr -> IO () #ccall free_string_buffer , Ptr -> IO () {- typedef struct { fstring source; uint_t srcLen; fstring delimiter; uint_t delLen; uint_t idx; } string_split_entry; -} #starttype string_split_entry #field source , CString #field srcLen , CUInt #field delimiter , CString #field delLen , CUInt #field idx , CUInt #stoptype {- typedef string_split_entry * string_split_t; -} #synonym_t string_split_t , #ccall new_string_split , CString -> CString -> IO (Ptr ) #ccall string_split_reset , Ptr -> CString -> CString -> IO () #ccall string_split_set_source , Ptr -> CString -> IO () #ccall string_split_set_delimiter , Ptr -> CString -> IO () #ccall free_string_split , Ptr -> IO () #ccall string_split_next , Ptr -> CString -> IO CString {- typedef struct { void * * items; uint_t allocs; uint_t length; } friso_array_entry; -} #starttype friso_array_entry #field items , Ptr (Ptr ()) #field allocs , CUInt #field length , CUInt #stoptype {- typedef friso_array_entry * friso_array_t; -} #synonym_t friso_array_t , #ccall new_array_list_with_opacity , CUInt -> IO (Ptr ) #ccall free_array_list , Ptr -> IO () #ccall array_list_add , Ptr -> Ptr () -> IO () #ccall array_list_insert , Ptr -> CUInt -> Ptr () -> IO () #ccall array_list_get , Ptr -> CUInt -> IO (Ptr ()) #ccall array_list_set , Ptr -> CUInt -> Ptr () -> IO (Ptr ()) #ccall array_list_remove , Ptr -> CUInt -> IO (Ptr ()) #ccall array_list_trim , Ptr -> IO (Ptr ) #ccall array_list_clear , Ptr -> IO (Ptr ) {- struct friso_link_node { void * value; struct friso_link_node * prev; struct friso_link_node * next; }; -} #starttype struct friso_link_node #field value , Ptr () #field prev , Ptr #field next , Ptr #stoptype {- typedef struct friso_link_node link_node_entry; -} #synonym_t link_node_entry , {- typedef link_node_entry * link_node_t; -} #synonym_t link_node_t , {- typedef struct { link_node_t head; link_node_t tail; uint_t size; } friso_link_entry; -} #starttype friso_link_entry #field head , #field tail , #field size , CUInt #stoptype {- typedef friso_link_entry * friso_link_t; -} #synonym_t friso_link_t , #ccall new_link_list , IO (Ptr ) #ccall free_link_list , Ptr -> IO () #ccall link_list_clear , Ptr -> IO (Ptr ) #ccall link_list_add , Ptr -> Ptr () -> IO () #ccall link_list_insert_before , Ptr -> CUInt -> Ptr () -> IO () #ccall link_list_get , Ptr -> CUInt -> IO (Ptr ()) #ccall link_list_set , Ptr -> CUInt -> Ptr () -> IO (Ptr ()) #ccall link_list_remove , Ptr -> CUInt -> IO (Ptr ()) #ccall link_list_remove_node , Ptr -> (Ptr ) -> IO (Ptr ()) #ccall link_list_remove_first , Ptr -> IO (Ptr ()) #ccall link_list_remove_last , Ptr -> IO (Ptr ()) #ccall link_list_add_last , Ptr -> Ptr () -> IO () #ccall link_list_add_first , Ptr -> Ptr () -> IO () {- struct hash_entry { fstring _key; void * _val; struct hash_entry * _next; }; -} #starttype struct hash_entry #field _key , CString #field _val , Ptr () #field _next , Ptr #stoptype {- typedef struct hash_entry friso_hash_entry; -} #synonym_t friso_hash_entry , {- typedef friso_hash_entry * hash_entry_t; -} #synonym_t hash_entry_t , #callback fhash_callback_fn_t , Ptr -> IO () {- typedef struct { uint_t length; uint_t size; float factor; uint_t threshold; hash_entry_t * table; } friso_hash_cdt; -} #starttype friso_hash_cdt #field length , CUInt #field size , CUInt #field factor , CFloat #field threshold , CUInt #field table , Ptr #stoptype {- typedef friso_hash_cdt * friso_hash_t; -} #synonym_t friso_hash_t , #ccall new_hash_table , IO (Ptr ) #ccall free_hash_table , Ptr -> -> IO () #ccall hash_put_mapping , Ptr -> CString -> Ptr () -> IO () #ccall hash_exist_mapping , Ptr -> CString -> IO CInt #ccall hash_get_value , Ptr -> CString -> IO (Ptr ()) #ccall hash_remove_mapping , Ptr -> CString -> IO (Ptr )