ekg2  GIT master
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje Grupay Strony
themes.h
Idź do dokumentacji tego pliku.
1 /* $Id: themes.h 4542 2008-08-28 18:42:26Z darkjames $ */
2 
3 /*
4  * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License Version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 #ifndef __EKG_THEMES_H
21 #define __EKG_THEMES_H
22 
23 #include "strings.h"
24 
25 #define _(a) (a)
26 #define N_(a) (a)
27 
28 typedef struct {
29  union {
30  char *b; /* ekg2-remote: almost OK */
32  } str;
33 
34  short *attr; /* ekg2-remote: almost OK */
35  time_t ts; /* ekg2-remote: OK */
36 
37  int prompt_len; /* ekg2-remote: BAD */
38  unsigned int prompt_empty : 1; /* ekg2-remote: BAD */
39  int margin_left; /* ekg2-remote: BAD */
40  void *private; /* ekg2-remote: NULL, unused? */
41 } fstring_t;
42 
43 #define print(x...) print_window_w(NULL, EKG_WINACT_JUNK, x)
44 #define print_status(x...) print_window_w(window_status, EKG_WINACT_JUNK, x)
45 
46 void format_add(const char *name, const char *value, int replace);
47 void remote_format_add(const char *name, const char *value);
48 const char *format_find(const char *name);
49 #define format_ok(format_find_result) (format_find_result[0])
50 #define format_exists(format) (format_ok(format_find(format)))
51 char *format_string(const char *format, ...);
52 
53 void theme_init();
54 void theme_free();
55 
56 fstring_t *fstring_new(const char *str);
57 fstring_t *fstring_new_format(const char *format, ...);
58 void fstring_free(fstring_t *str);
59 
60 typedef enum {
66  FSTR_BACKB = 16,
67  FSTR_BACKC = 32,
69  FSTR_BOLD = 64,
70  FSTR_NORMAL = 128,
71  FSTR_BLINK = 256,
73  FSTR_REVERSE = 1024,
75 } fstr_t;
76 
77 #endif /* __EKG_THEMES_H */
78 
79 /*
80  * Local Variables:
81  * mode: c
82  * c-file-style: "k&r"
83  * c-basic-offset: 8
84  * indent-tabs-mode: t
85  * End:
86  */