1 /* Conky, a system monitor, based on torsmo
3 * Any original torsmo code is licensed under the BSD license
5 * All code written since the fork of torsmo is licensed under the GPL
7 * Please see COPYING for details
9 * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
10 * Copyright (c) 2005-2008 Brenden Matthews, Philip Kovacs, et. al.
12 * All rights reserved.
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 #ifndef _TEXT_OBJECT_H
28 #define _TEXT_OBJECT_H
30 #include "config.h" /* for the defines */
31 #include "timed_thread.h" /* timed_thread */
33 #ifdef TCP_PORT_MONITOR
34 #include "tcp-portmon.h" /* tcp_port_monitor_data */
37 #include "mail.h" /* local_mail_s */
38 #include "fs.h" /* struct fs_stat */
41 #include "nvidia.h" /* nvidia_s */
44 enum text_object_type {
46 #if defined(__linux__)
48 #endif /* __linux__ */
60 #endif /* !__OpenBSD__ */
87 OBJ_diskiograph_write,
123 #if defined(__linux__)
129 OBJ_i8k_left_fan_status,
130 OBJ_i8k_right_fan_status,
131 OBJ_i8k_left_fan_rpm,
132 OBJ_i8k_right_fan_rpm,
134 OBJ_i8k_buttons_status,
152 OBJ_wireless_bitrate,
154 OBJ_wireless_link_qual,
155 OBJ_wireless_link_qual_max,
156 OBJ_wireless_link_qual_perc,
157 OBJ_wireless_link_bar,
158 #endif /* __linux__ */
181 OBJ_unforwarded_mails,
211 OBJ_running_processes,
220 OBJ_temp1, /* i2c is used instead in these */
244 #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
245 || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
247 OBJ_apm_battery_time,
248 OBJ_apm_battery_life,
249 #endif /* __FreeBSD__ __OpenBSD__ */
251 OBJ_obsd_sensors_temp,
252 OBJ_obsd_sensors_fan,
253 OBJ_obsd_sensors_volt,
256 #endif /* __OpenBSD__ */
292 OBJ_music_player_interval,
312 OBJ_xmms2_timesplayed,
313 OBJ_if_xmms2_connected,
316 OBJ_audacious_status,
318 OBJ_audacious_length,
319 OBJ_audacious_length_seconds,
320 OBJ_audacious_position,
321 OBJ_audacious_position_seconds,
322 OBJ_audacious_bitrate,
323 OBJ_audacious_frequency,
324 OBJ_audacious_channels,
325 OBJ_audacious_filename,
326 OBJ_audacious_playlist_length,
327 OBJ_audacious_playlist_position,
328 OBJ_audacious_main_volume,
345 #ifdef TCP_PORT_MONITOR
361 OBJ_if_smapi_bat_installed,
365 OBJ_entropy_poolsize,
370 struct text_object *next, *prev; /* doubly linked list of text objects */
371 struct text_object *sub; /* for objects parsing text into objects */
373 char *s; /* some string */
374 int i; /* some integer */
375 long l; /* some other integer */
377 struct net_stat *net;
379 struct diskio_stat *diskio;
380 unsigned char loadavg[3];
381 unsigned int cpu_index;
390 char *tz; /* timezone variable */
391 char *fmt; /* time display formatting */
412 struct text_object *next;
429 /* If not -1, a file descriptor to read from when
430 * logfile is a FIFO. */
447 timed_thread *p_timed_thread;
453 #ifdef TCP_PORT_MONITOR
454 struct tcp_port_monitor_data tcp_port_monitor;
487 struct local_mail_s local_mail;
489 struct nvidia_s nvidia;
496 unsigned int c, d, e;
502 /* text object list helpers */
503 int append_object(struct text_object *root, struct text_object *obj);
507 * Opaque is a pointer to the address of the ifblock stack's top object.
508 * Calling clients should pass the address of a defined void pointer which
509 * was initialised to NULL (empty stack).
511 int obj_be_ifblock_if(void **opaque, struct text_object *);
512 int obj_be_ifblock_else(void **opaque, struct text_object *);
513 int obj_be_ifblock_endif(void **opaque, struct text_object *);
514 int ifblock_stack_empty(void **opaque);
516 #endif /* _TEXT_OBJECT_H */