gi-dazzle-1.0.2: libdazzle bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Dazzle.Structs.FuzzyMutableIndex

Description

No description available in the introspection data.

Synopsis

Exported types

newtype FuzzyMutableIndex Source #

Memory-managed wrapper type.

Constructors

FuzzyMutableIndex (ManagedPtr FuzzyMutableIndex) 

Instances

Instances details
Eq FuzzyMutableIndex Source # 
Instance details

Defined in GI.Dazzle.Structs.FuzzyMutableIndex

GBoxed FuzzyMutableIndex Source # 
Instance details

Defined in GI.Dazzle.Structs.FuzzyMutableIndex

ManagedPtrNewtype FuzzyMutableIndex Source # 
Instance details

Defined in GI.Dazzle.Structs.FuzzyMutableIndex

TypedObject FuzzyMutableIndex Source # 
Instance details

Defined in GI.Dazzle.Structs.FuzzyMutableIndex

Methods

glibType :: IO GType

HasParentTypes FuzzyMutableIndex Source # 
Instance details

Defined in GI.Dazzle.Structs.FuzzyMutableIndex

IsGValue (Maybe FuzzyMutableIndex) Source #

Convert FuzzyMutableIndex to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Dazzle.Structs.FuzzyMutableIndex

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe FuzzyMutableIndex -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe FuzzyMutableIndex)

type ParentTypes FuzzyMutableIndex Source # 
Instance details

Defined in GI.Dazzle.Structs.FuzzyMutableIndex

type ParentTypes FuzzyMutableIndex = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

beginBulkInsert, contains, endBulkInsert, insert, match, ref, remove, unref.

Getters

None.

Setters

setFreeFunc.

beginBulkInsert

fuzzyMutableIndexBeginBulkInsert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FuzzyMutableIndex

fuzzy: A Fuzzy.

-> m () 

Start a bulk insertion. fuzzy is not ready for searching until fuzzyMutableIndexEndBulkInsert has been called.

This allows for inserting large numbers of strings and deferring the final sort until fuzzyMutableIndexEndBulkInsert.

contains

fuzzyMutableIndexContains :: (HasCallStack, MonadIO m) => FuzzyMutableIndex -> Text -> m Bool Source #

No description available in the introspection data.

endBulkInsert

fuzzyMutableIndexEndBulkInsert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FuzzyMutableIndex

fuzzy: A Fuzzy.

-> m () 

Complete a bulk insert and resort the index.

insert

fuzzyMutableIndexInsert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FuzzyMutableIndex

fuzzy: A Fuzzy.

-> Text

key: A UTF-8 encoded string.

-> Ptr ()

value: A value to associate with key.

-> m () 

Inserts a string into the fuzzy matcher.

match

fuzzyMutableIndexMatch Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FuzzyMutableIndex

fuzzy: A Fuzzy.

-> Text

needle: The needle to fuzzy search for.

-> CSize

maxMatches: The max number of matches to return.

-> m [FuzzyMutableIndexMatch]

Returns: A newly allocated Array containing FuzzyMatch elements. This should be freed when the caller is done with it using g_array_unref(). It is a programming error to keep the structure around longer than the fuzzy instance.

DzlFuzzyMutableIndex searches within fuzzy for strings that fuzzy match needle. Only up to maxMatches will be returned.

TODO: max_matches is not yet respected.

new

fuzzyMutableIndexNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Bool

caseSensitive: True if case should be preserved.

-> m FuzzyMutableIndex

Returns: A newly allocated Fuzzy that should be freed with fuzzyMutableIndexUnref.

Create a new Fuzzy for fuzzy matching strings.

newWithFreeFunc

fuzzyMutableIndexNewWithFreeFunc :: (HasCallStack, MonadIO m) => Bool -> DestroyNotify -> m FuzzyMutableIndex Source #

No description available in the introspection data.

ref

fuzzyMutableIndexRef :: (HasCallStack, MonadIO m) => FuzzyMutableIndex -> m FuzzyMutableIndex Source #

No description available in the introspection data.

remove

fuzzyMutableIndexRemove :: (HasCallStack, MonadIO m) => FuzzyMutableIndex -> Text -> m () Source #

No description available in the introspection data.

setFreeFunc

fuzzyMutableIndexSetFreeFunc :: (HasCallStack, MonadIO m) => FuzzyMutableIndex -> DestroyNotify -> m () Source #

No description available in the introspection data.

unref

fuzzyMutableIndexUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FuzzyMutableIndex

fuzzy: A Fuzzy.

-> m () 

Decrements the reference count of fuzzy by one. When the reference count reaches zero, the structure will be freed.