00001 /* help.h: header for help.c 00002 * 00003 * Copyright (C) 2003, 2004 Eggheads Development Team 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 * 00019 * $Id: help.h,v 1.6 2004-10-04 16:05:32 stdarg Exp $ 00020 */ 00021 00022 #ifndef _EGG_HELP_H_ 00023 #define _EGG_HELP_H_ 00024 00025 typedef struct { 00026 char *name; 00027 int ref; 00028 } help_file_t; 00029 00030 typedef struct { 00031 char *name; 00032 char *syntax; 00033 char *summary; 00034 help_file_t *file; 00035 } help_summary_t; 00036 00037 typedef struct { 00038 char *name; 00039 help_summary_t **entries; 00040 int nentries; 00041 } help_section_t; 00042 00043 typedef struct { 00044 char *search; 00045 int cursection; 00046 int curentry; 00047 } help_search_t; 00048 00049 int help_init(); 00050 int help_shutdown(); 00051 int help_set_default_path(const char *path); 00052 int help_set_default_lang(const char *lang); 00053 00054 int help_count_sections(); 00055 int help_count_entries(); 00056 00057 int help_load(const char *filename); 00058 int help_unload(const char *filename); 00059 00060 int help_load_by_module(const char *name); 00061 int help_unload_by_module(const char *name); 00062 00063 help_summary_t *help_lookup_summary(const char *name); 00064 help_section_t *help_lookup_section(const char *name); 00065 xml_node_t *help_lookup_entry(help_summary_t *entry); 00066 00067 help_search_t *help_search_new(const char *searchstr); 00068 int help_search_end(help_search_t *search); 00069 help_summary_t *help_search_result(help_search_t *search); 00070 00071 #endif /* !_EGG_HELP_H_ */