1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
3 * Conky, a system monitor, based on torsmo
5 * Any original torsmo code is licensed under the BSD license
7 * All code written since the fork of torsmo is licensed under the GPL
9 * Please see COPYING for details
11 * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
12 * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
14 * All rights reserved.
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program. If not, see <http://www.gnu.org/licenses/>.
32 /* special stuff in text_buffer */
34 #define SPECIAL_CHAR '\x01'
36 #define MAX_GRAPH_DEPTH 512
38 // don't use spaces in LOGGRAPH or NORMGRAPH if you change them
71 unsigned long first_colour; // for graph gradient
72 unsigned long last_colour;
77 /* direct access to the registered specials (FIXME: bad encapsulation) */
78 extern struct special_t *specials;
79 extern int special_count;
81 extern int default_bar_width;
82 extern int default_bar_height;
84 extern int default_graph_width;
85 extern int default_graph_height;
86 extern int default_gauge_width;
87 extern int default_gauge_height;
90 /* forward declare to avoid mutual inclusion between specials.h and text_object.h */
93 /* max number of specials allowed (TODO: use linked list instead) */
94 extern int max_specials;
96 /* scanning special arguments */
97 const char *scan_bar(struct text_object *, const char *);
98 const char *scan_gauge(struct text_object *, const char *);
100 char *scan_font(const char *);
101 char *scan_graph(struct text_object *, const char *, int);
102 void scan_tab(struct text_object *, const char *);
103 void scan_stippled_hr(struct text_object *, const char*);
105 /* printing specials */
106 void new_font(char *, char *);
107 void new_graph(struct text_object *, char *, int, double);
108 void new_hr(char *, int);
109 void new_stippled_hr(struct text_object *, char *);
111 void new_gauge(struct text_object *, char *, int, int);
112 void new_bar(struct text_object *, char *, int, int);
113 void new_fg(char *, long);
114 void new_bg(char *, long);
115 void new_outline(char *, long);
116 void new_offset(char *, long);
117 void new_voffset(char *, long);
118 void new_alignr(char *, long);
119 void new_alignc(char *, long);
120 void new_goto(char *, long);
121 void new_tab(struct text_object *, char *);
123 #endif /* _SPECIALS_H */