1 /* -*- mode: c; c-file-style: "gnu" -*- 2 * ccze-private.h -- Internal CCZE function prototypes 3 * Copyright (C) 2002, 2003 Gergely Nagy <algernon@bonehunter.rulez.org> 4 * 5 * This file is part of ccze. 6 * 7 * ccze is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * ccze is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 15 * License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 21 22 #ifndef _CCZE_PRIVATE_H 23 #define _CCZE_PRIVATE_H 1 24 25 #include <ccze.h> 26 27 /* ccze-color.c */ 28 void ccze_color_init (void); 29 void ccze_color_parse (char *line); 30 void ccze_color_load (const char *fn); 31 32 int ccze_color_strip_attrib (int color); 33 char *ccze_color_to_name_simple (int color); 34 char *ccze_color_lookup_name (ccze_color_t color); 35 char *ccze_color_to_css (ccze_color_t cidx); 36 void ccze_colors_to_css (void); 37 char *ccze_cssbody_color (void); 38 39 /* ccze-plugin.c */ 40 void ccze_plugin_init (void); 41 void ccze_plugin_argv_init (void); 42 int ccze_plugin_argv_set (const char *name, const char *args); 43 void ccze_plugin_argv_finalise (void); 44 ccze_plugin_t **ccze_plugins (void); 45 void ccze_plugin_load_all (void); 46 void ccze_plugin_load (const char *name); 47 void ccze_plugin_add (ccze_plugin_t *plugin); 48 void ccze_plugin_setup (void); 49 void ccze_plugin_shutdown (void); 50 void ccze_plugin_finalise (void); 51 void ccze_plugin_run (ccze_plugin_t **pluginset, char *subject, 52 size_t subjlen, char **rest, 53 ccze_plugin_type_t type, int *handled, 54 int *status); 55 void ccze_plugin_load_all_builtins (void); 56 int ccze_plugin_list_fancy (void); 57 58 /* ccze-wordcolor.c */ 59 void ccze_wordcolor_process (const char *msg, int wcol, int slookup); 60 void ccze_wordcolor_setup (void); 61 void ccze_wordcolor_shutdown (void); 62 63 /* ccze.c */ 64 typedef enum 65 { 66 CCZE_MODE_CURSES, 67 CCZE_MODE_RAW_ANSI, 68 CCZE_MODE_HTML, 69 CCZE_MODE_DEBUG, 70 CCZE_MODE_PLUGIN_LIST 71 } ccze_mode_t; 72 73 typedef struct 74 { 75 int scroll; 76 int convdate; 77 int wcol; 78 int slookup; 79 int remfac; 80 int transparent; 81 char *rcfile; 82 char *cssfile; 83 char **pluginlist; 84 int pluginlist_alloc, pluginlist_len; 85 char **color_argv; 86 int color_argv_alloc, color_argv_len; 87 88 ccze_mode_t mode; 89 } ccze_config_t; 90 91 extern ccze_config_t ccze_config; 92 93 #endif /* !_CCZE_PRIVATE_H */ 94