From 7e62076347eccbf04c4d2c725878477c13ba48c5 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 22 May 2012 00:38:04 +0100 Subject: [PATCH] Added more code documentation --- DESIGN | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DESIGN b/DESIGN index 54194438..5470b4f2 100644 --- a/DESIGN +++ b/DESIGN @@ -163,4 +163,19 @@ The idea is that these modules could be included in other applications. The "prof_" prefix is just because they were created whilst developing Profanity. +prof_autocomplete.c +------------------- +Two type are PAutocomplete can be created. + +p_autocomplete_new() creates a PAutocomplete that can store strings, the +simple case. + +p_obj_autocomplete_new() creates a PAutocomplete of arbitrary data +structures. This function must be passed function pointers of the following +types: + + PStrFunc: A function that will get a string out of the data structure + PCopyFunc: A function that will make a copy the data structure, allocating + memory for it. + GDestroyNotify: A function that will free memory for the data structure.