ekg2
|
00001 /* $Id: themes.h 4542 2008-08-28 18:42:26Z darkjames $ */ 00002 00003 /* 00004 * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License Version 2 as 00008 * published by the Free Software Foundation. 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., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __EKG_THEMES_H 00021 #define __EKG_THEMES_H 00022 00023 #include "strings.h" 00024 00025 #define _(a) (a) 00026 #define N_(a) (a) 00027 00028 typedef struct { 00029 union { 00030 char *b; /* ekg2-remote: almost OK */ 00031 CHAR_T *w; 00032 } str; 00033 00034 short *attr; /* ekg2-remote: almost OK */ 00035 time_t ts; /* ekg2-remote: OK */ 00036 00037 int prompt_len; /* ekg2-remote: BAD */ 00038 unsigned int prompt_empty : 1; /* ekg2-remote: BAD */ 00039 int margin_left; /* ekg2-remote: BAD */ 00040 void *private; /* ekg2-remote: NULL, unused? */ 00041 } fstring_t; 00042 00043 #define print(x...) print_window_w(NULL, EKG_WINACT_JUNK, x) 00044 #define print_status(x...) print_window_w(window_status, EKG_WINACT_JUNK, x) 00045 00046 void format_add(const char *name, const char *value, int replace); 00047 void remote_format_add(const char *name, const char *value); 00048 const char *format_find(const char *name); 00049 #define format_ok(format_find_result) (format_find_result[0]) 00050 #define format_exists(format) (format_ok(format_find(format))) 00051 char *format_string(const char *format, ...); 00052 00053 void theme_init(); 00054 void theme_free(); 00055 00056 fstring_t *fstring_new(const char *str); 00057 fstring_t *fstring_new_format(const char *format, ...); 00058 void fstring_free(fstring_t *str); 00059 00060 typedef enum { 00061 FSTR_FOREA = 1, 00062 FSTR_FOREB = 2, 00063 FSTR_FOREC = 4, 00064 FSTR_FOREMASK = (FSTR_FOREA|FSTR_FOREB|FSTR_FOREC), 00065 FSTR_BACKA = 8, 00066 FSTR_BACKB = 16, 00067 FSTR_BACKC = 32, 00068 FSTR_BACKMASK = (FSTR_BACKA|FSTR_BACKB|FSTR_BACKC), 00069 FSTR_BOLD = 64, 00070 FSTR_NORMAL = 128, 00071 FSTR_BLINK = 256, 00072 FSTR_UNDERLINE = 512, 00073 FSTR_REVERSE = 1024, 00074 FSTR_ALTCHARSET = 2048 00075 } fstr_t; 00076 00077 #endif /* __EKG_THEMES_H */ 00078 00079 /* 00080 * Local Variables: 00081 * mode: c 00082 * c-file-style: "k&r" 00083 * c-basic-offset: 8 00084 * indent-tabs-mode: t 00085 * End: 00086 */