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/>.
29 #ifndef _TEXT_OBJECT_H
30 #define _TEXT_OBJECT_H
32 #include "config.h" /* for the defines */
33 #include "specials.h" /* enum special_types */
35 enum text_object_type {
38 #if defined(__linux__)
40 #endif /* __linux__ */
54 OBJ_cell_radio_percent,
55 #endif /* !__OpenBSD__ */
86 OBJ_diskiograph_write,
130 #if defined(__linux__)
136 OBJ_i8k_left_fan_status,
137 OBJ_i8k_right_fan_status,
138 OBJ_i8k_left_fan_rpm,
139 OBJ_i8k_right_fan_rpm,
141 OBJ_i8k_buttons_status,
152 OBJ_if_smapi_bat_installed,
154 /* information from sony_laptop kernel module
155 * /sys/devices/platform/sony-laptop */
167 OBJ_wireless_bitrate,
169 OBJ_wireless_link_qual,
170 OBJ_wireless_link_qual_max,
171 OBJ_wireless_link_qual_perc,
172 OBJ_wireless_link_bar,
173 #endif /* __linux__ */
174 #if defined(__FreeBSD__) || defined(__linux__)
204 OBJ_unforwarded_mails,
244 OBJ_pid_environ_list,
257 OBJ_pid_time_kernelmode,
258 OBJ_pid_time_usermode,
283 OBJ_running_processes,
318 #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
319 || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
321 OBJ_apm_battery_time,
322 OBJ_apm_battery_life,
323 #endif /* __FreeBSD__ __OpenBSD__ */
325 OBJ_obsd_sensors_temp,
326 OBJ_obsd_sensors_fan,
327 OBJ_obsd_sensors_volt,
330 #endif /* __OpenBSD__ */
384 OBJ_xmms2_timesplayed,
385 OBJ_if_xmms2_connected,
388 OBJ_audacious_status,
390 OBJ_audacious_length,
391 OBJ_audacious_length_seconds,
392 OBJ_audacious_position,
393 OBJ_audacious_position_seconds,
394 OBJ_audacious_bitrate,
395 OBJ_audacious_frequency,
396 OBJ_audacious_channels,
397 OBJ_audacious_filename,
398 OBJ_audacious_playlist_length,
399 OBJ_audacious_playlist_position,
400 OBJ_audacious_main_volume,
404 #endif /* AUDACIOUS */
418 #endif /* HAVE_CURL */
426 OBJ_weather_forecast,
436 #endif /* HAVE_LUA */
437 #ifdef TCP_PORT_MONITOR
439 #endif /* TCP_PORT_MONITOR */
443 #endif /* HAVE_ICONV */
454 OBJ_entropy_poolsize,
466 OBJ_apcupsd_loadgauge,
468 OBJ_apcupsd_loadgraph,
471 OBJ_apcupsd_timeleft,
473 OBJ_apcupsd_lastxfer,
478 struct text_object *next, *prev; /* doubly linked list of text objects */
479 struct text_object *sub; /* for objects parsing text into objects */
480 struct text_object *ifblock_next; /* jump target for ifblock objects */
482 void *opaque; /* new style generic per object data */
483 char *s; /* some string */
484 int i; /* some integer */
485 long l; /* some long integer */
493 /* text object list helpers */
494 int append_object(struct text_object *root, struct text_object *obj);
498 * Opaque is a pointer to the address of the ifblock stack's top object.
499 * Calling clients should pass the address of a defined void pointer which
500 * was initialised to NULL (empty stack).
502 int obj_be_ifblock_if(void **opaque, struct text_object *);
503 int obj_be_ifblock_else(void **opaque, struct text_object *);
504 int obj_be_ifblock_endif(void **opaque, struct text_object *);
505 int ifblock_stack_empty(void **opaque);
507 #endif /* _TEXT_OBJECT_H */