mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 19:16:21 +00:00
Simplified autocomplete api
Now stores memory management functions, passed on p_autocomplete_new
This commit is contained in:
@@ -29,15 +29,13 @@ typedef struct p_autocomplete_t *PAutocomplete;
|
||||
typedef const char * (*PStrFunc)(const void *obj);
|
||||
typedef void * (*PCopyFunc)(const void *obj);
|
||||
|
||||
PAutocomplete p_autocomplete_new(void);
|
||||
void p_autocomplete_clear(PAutocomplete ac, GDestroyNotify free_func);
|
||||
void p_autocomplete_reset(PAutocomplete ac);
|
||||
void p_autocomplete_add(PAutocomplete ac, void *item, PStrFunc str_func,
|
||||
PAutocomplete p_autocomplete_new(PStrFunc str_func, PCopyFunc copy_func,
|
||||
GDestroyNotify free_func);
|
||||
void p_autocomplete_remove(PAutocomplete ac, const char * const item,
|
||||
PStrFunc str_func, GDestroyNotify free_func);
|
||||
GSList * p_autocomplete_get_list(PAutocomplete ac, PCopyFunc copy_func);
|
||||
gchar * p_autocomplete_complete(PAutocomplete ac, gchar *search_str,
|
||||
PStrFunc str_func);
|
||||
void p_autocomplete_clear(PAutocomplete ac);
|
||||
void p_autocomplete_reset(PAutocomplete ac);
|
||||
void p_autocomplete_add(PAutocomplete ac, void *item);
|
||||
void p_autocomplete_remove(PAutocomplete ac, const char * const item);
|
||||
GSList * p_autocomplete_get_list(PAutocomplete ac);
|
||||
gchar * p_autocomplete_complete(PAutocomplete ac, gchar *search_str);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user