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-2009 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/>.
28 * vim: ts=4 sw=4 noet ai cindent syntax=c
35 #include "config.h" /* defines */
37 #if defined(HAS_MCHECK_H)
39 #endif /* HAS_MCHECK_H */
44 #define EQUAL 0 //returnvalue of strcmp-variants when strings are equal
48 #define DEFAULT_BAR_WIDTH_NO_X 10
50 #if !defined(__GNUC__)
51 # define __attribute__(x) /* nothing */
55 // use our own strndup() if it's not available
56 char *strndup(const char *s, size_t n);
57 #endif /* HAVE_STRNDUP */
59 /* headers of optional features
60 * include them here, so we don't need to run the check
61 * in every code file optionally using the feature
65 #include "audacious.h"
93 #include "ccurl_thread.h"
94 #endif /* HAVE_CURL */
102 #error "WEATHER needs to be defined if XOAP is defined"
110 #ifdef TCP_PORT_MONITOR
111 #include "tcp-portmon.h"
134 /* A size for temporary, static buffers to use when
135 * one doesn't know what to choose. Defaults to 256. */
136 extern unsigned int text_buffer_size;
139 int get_stippled_borders(void);
142 /* defined in conky.c */
143 extern long default_fg_color, default_bg_color, default_out_color;
144 extern long color0, color1, color2, color3, color4, color5, color6, color7,
146 void set_current_text_color(long colour);
147 long get_current_text_color(void);
149 void set_updatereset(int);
150 int get_updatereset(void);
152 char *get_global_text(void);
153 extern long global_text_lines;
155 //adds newstring to to the tree unless you can already see it when travelling back.
156 //if it's possible to attach it then it returns a pointer to the leaf, else it returns NULL
157 struct conftree* conftree_add(struct conftree* previous, const char* newstring);
159 extern struct conftree *currentconffile;
183 #ifdef TCP_PORT_MONITOR
184 INFO_TCP_PORT_MONITOR = 19,
219 /* get_battery_stuff() item selector
220 * needed by conky.c, linux.c and freebsd.c */
226 /* if_up strictness selector
227 * needed by conky.c and linux.c (and potentially others) */
236 #endif /* HAVE_LUA */
238 /* needed by linux.c and top.c -> outsource somewhere */
240 /* set to true if kernel uses "long" format for /proc/stats */
241 KFLAG_IS_LONGSTAT = 0x01,
242 /* set to true if kernel shows # of threads for the proc value
243 * in sysinfo() call */
244 KFLAG_PROC_IS_THREADS = 0x02
245 /* bits 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 available for future use */
246 /* KFLAG_NEXT_ONE = 0x04 */
248 #define KFLAG_SETON(a) ctx->info.kflags |= a
249 #define KFLAG_SETOFF(a) ctx->info.kflags &= (~a)
250 #define KFLAG_FLIP(a) ctx->info.kflags ^= a
251 #define KFLAG_ISSET(a) ctx->info.kflags & a
253 /* defined in users.c */
254 void update_users(void);
256 extern int inotify_fd;
260 /* to get rid of 'unused variable' warnings */
261 #define UNUSED(a) (void)a
262 #define UNUSED_ATTR __attribute__ ((unused))
264 #endif /* _conky_h_ */