[rendering] This simple trick didn't work...
[wikipediardware.git] / wiki-lib / include / search.h
blob7d4b86c5c6b6fdd283dac3f1da445ce38dda6a98
1 /*
2 * Copyright (c) 2009 Holger Hans Peter Freyther <zecke@openmoko.org>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef WL_SEARCH_H
19 #define WL_SEARCH_H
21 #define TARGET_SIZE 11
23 * Highlevel search interface...
25 void search_paint(void);
26 void search_select_down(void);
27 void search_select_up(void);
28 const char *search_current_target(void);
29 const char *search_current_title(void);
31 const char *search_release(int y);
33 /**
34 * Initialize the search engine. Once.
36 void search_init();
38 /**
39 * Load trigrams. return if done..
41 int search_load_trigram(void);
43 /**
44 * For every new search call this
46 void search_reset();
48 /**
49 * Repaint, reselect the current screen..
51 void search_reload(void);
53 /**
54 * Search for another char. It needs to be lower case
56 void search_add(char c);
58 /**
59 * Remove the last char from the search
61 void search_remove_char(void);
63 /**
64 * Fetch the results.
66 * Get a result and consume.... book keeping is left
67 * to the user. Null pointer returned at the end of the
68 * search.
70 char* search_fetch_result();
72 #endif