X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Ftext_object.h;h=53a71fbe239490c7b3085b581b9850fc549a3abb;hb=bd8c0fc134e004eebb40d6b0e74c2c860c24fb91;hp=61ab4ca7b7c8a2848ae9d32076666e73055d7c06;hpb=b74e0494de7ecab86e48b023a174b0b45f23dc57;p=monky diff --git a/src/text_object.h b/src/text_object.h index 61ab4ca..53a71fb 100644 --- a/src/text_object.h +++ b/src/text_object.h @@ -9,7 +9,7 @@ * Please see COPYING for details * * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen - * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al. + * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. * (see AUTHORS) * All rights reserved. * @@ -30,14 +30,7 @@ #define _TEXT_OBJECT_H #include "config.h" /* for the defines */ -#include "timed_thread.h" /* timed_thread */ - -#ifdef TCP_PORT_MONITOR -#include "tcp-portmon.h" /* tcp_port_monitor_data */ -#endif - -#include "mail.h" /* local_mail_s */ -#include "fs.h" /* struct fs_stat */ +#include "specials.h" /* enum special_types */ enum text_object_type { OBJ_read_tcp, @@ -47,15 +40,17 @@ enum text_object_type { #endif /* __linux__ */ #ifndef __OpenBSD__ OBJ_acpiacadapter, - OBJ_adt746xcpu, - OBJ_adt746xfan, OBJ_acpifan, OBJ_acpitemp, OBJ_battery, OBJ_battery_time, + OBJ_battery_temp, + OBJ_battery_volts, OBJ_battery_percent, OBJ_battery_bar, OBJ_battery_short, + OBJ_cell_radio_dbm, + OBJ_cell_radio_percent, #endif /* !__OpenBSD__ */ OBJ_buffers, OBJ_cached, @@ -76,8 +71,8 @@ enum text_object_type { OBJ_font, OBJ_cpu, OBJ_cpubar, -#ifdef X11 OBJ_cpugauge, +#ifdef X11 OBJ_cpugraph, OBJ_loadgraph, #endif /* X11 */ @@ -103,11 +98,11 @@ enum text_object_type { OBJ_texeci, OBJ_execbar, OBJ_execibar, -#ifdef X11 OBJ_execgauge, + OBJ_execigauge, +#ifdef X11 OBJ_execgraph, OBJ_execigraph, - OBJ_execigauge, #endif /* X11 */ OBJ_execp, OBJ_execpi, @@ -149,9 +144,7 @@ enum text_object_type { OBJ_ibm_volume, OBJ_ibm_brightness, OBJ_smapi, -#ifdef X11 OBJ_smapi_bat_bar, -#endif /* X11 */ OBJ_smapi_bat_perc, OBJ_smapi_bat_temp, OBJ_smapi_bat_power, @@ -205,6 +198,7 @@ enum text_object_type { OBJ_unseen_mails, OBJ_flagged_mails, OBJ_unflagged_mails, + OBJ_format_time, OBJ_forwarded_mails, OBJ_unforwarded_mails, OBJ_replied_mails, @@ -215,8 +209,8 @@ enum text_object_type { OBJ_mem, OBJ_memeasyfree, OBJ_memfree, -#ifdef X11 OBJ_memgauge, +#ifdef X11 OBJ_memgraph, #endif /* X11 */ OBJ_membar, @@ -225,11 +219,9 @@ enum text_object_type { OBJ_mixer, OBJ_mixerl, OBJ_mixerr, -#ifdef X11 OBJ_mixerbar, OBJ_mixerlbar, OBJ_mixerrbar, -#endif /* X11 */ OBJ_if_mixer_mute, #ifdef X11 OBJ_monitor, @@ -240,8 +232,52 @@ enum text_object_type { #endif /* X11 */ OBJ_nameserver, OBJ_nodename, + OBJ_nodename_short, OBJ_nvidia, OBJ_pre_exec, + OBJ_cmdline_to_pid, + OBJ_pid_chroot, + OBJ_pid_cmdline, + OBJ_pid_cwd, + OBJ_pid_environ, + OBJ_pid_environ_list, + OBJ_pid_exe, + OBJ_pid_nice, + OBJ_pid_openfiles, + OBJ_pid_parent, + OBJ_pid_priority, + OBJ_pid_state, + OBJ_pid_state_short, + OBJ_pid_stderr, + OBJ_pid_stdin, + OBJ_pid_stdout, + OBJ_pid_threads, + OBJ_pid_thread_list, + OBJ_pid_time_kernelmode, + OBJ_pid_time_usermode, + OBJ_pid_time, + OBJ_pid_uid, + OBJ_pid_euid, + OBJ_pid_suid, + OBJ_pid_fsuid, + OBJ_pid_gid, + OBJ_pid_egid, + OBJ_pid_sgid, + OBJ_pid_fsgid, + OBJ_pid_read, + OBJ_pid_vmpeak, + OBJ_pid_vmsize, + OBJ_pid_vmlck, + OBJ_pid_vmhwm, + OBJ_pid_vmrss, + OBJ_pid_vmdata, + OBJ_pid_vmstk, + OBJ_pid_vmexe, + OBJ_pid_vmlib, + OBJ_pid_vmpte, + OBJ_pid_write, + OBJ_gid_name, + OBJ_uid_name, OBJ_processes, OBJ_running_processes, OBJ_shadecolor, @@ -254,6 +290,8 @@ enum text_object_type { OBJ_swapperc, OBJ_sysname, OBJ_text, + OBJ_threads, + OBJ_running_threads, OBJ_time, OBJ_utime, OBJ_tztime, @@ -270,6 +308,7 @@ enum text_object_type { OBJ_user_names, OBJ_user_terms, OBJ_user_times, + OBJ_user_time, OBJ_user_number, OBJ_imap_messages, OBJ_imap_unseen, @@ -389,9 +428,9 @@ enum text_object_type { OBJ_lua, OBJ_lua_parse, OBJ_lua_bar, + OBJ_lua_gauge, #ifdef X11 OBJ_lua_graph, - OBJ_lua_gauge, #endif /* X11 */ #endif /* HAVE_LUA */ #ifdef TCP_PORT_MONITOR @@ -423,9 +462,9 @@ enum text_object_type { OBJ_apcupsd_linev, OBJ_apcupsd_load, OBJ_apcupsd_loadbar, + OBJ_apcupsd_loadgauge, #ifdef X11 OBJ_apcupsd_loadgraph, - OBJ_apcupsd_loadgauge, #endif /* X11 */ OBJ_apcupsd_charge, OBJ_apcupsd_timeleft, @@ -437,56 +476,17 @@ enum text_object_type { struct text_object { struct text_object *next, *prev; /* doubly linked list of text objects */ struct text_object *sub; /* for objects parsing text into objects */ + struct text_object *ifblock_next; /* jump target for ifblock objects */ union { void *opaque; /* new style generic per object data */ char *s; /* some string */ int i; /* some integer */ - long l; /* some other integer */ - unsigned int sensor; - struct net_stat *net; - struct diskio_stat *diskio; - unsigned char loadavg[3]; - unsigned int cpu_index; - struct mail_s *mail; - - struct { - void *opaque; /* temporary workaround to not blow stuff */ - struct text_object *next; - char *s; - int i; - char *str; - } ifblock; - - struct { - int a, b; - } pair; /* 2 */ - struct { - char *text; - unsigned int show; - unsigned int step; - unsigned int start; - long resetcolor; - } scroll; - - struct { - char *left; - char *seperation; - char *right; - } combine; - - struct { - char *host; - unsigned int port; - } read_tcp; - - struct local_mail_s local_mail; + long l; /* some long integer */ } data; + + void *special_data; int type; - int a, b; long line; - unsigned int c, d, e; - float f; - char char_a, char_b; }; /* text object list helpers */