X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fconky.h;h=30e73a0b366710a5de629d6e13d0f02f3bece92f;hb=52e86f4bf6054450ebc31076ff3c25d793ae96cf;hp=f0a850f69cc0d06f0f5fd91e53622d3da54cc470;hpb=7fc1c801aa8861140e071bc1974eb6bbe44987cb;p=monky diff --git a/src/conky.h b/src/conky.h index f0a850f..30e73a0 100644 --- a/src/conky.h +++ b/src/conky.h @@ -10,7 +10,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. * @@ -90,10 +90,6 @@ struct text_object; #include "mpd.h" #endif -#ifdef NVIDIA -#include "nvidia.h" -#endif - #ifdef HAVE_CURL #include "ccurl_thread.h" #endif /* HAVE_CURL */ @@ -136,14 +132,10 @@ struct text_object; * one doesn't know what to choose. Defaults to 256. */ extern unsigned int text_buffer_size; -struct entropy_s { - unsigned int entropy_avail; - unsigned int poolsize; -}; - struct usr_info { char *names; char *times; + char *ctime; char *terms; int number; }; @@ -181,6 +173,9 @@ long get_current_text_color(void); void set_updatereset(int); int get_updatereset(void); +int percent_print(char *, int, unsigned); +void human_readable(long long, char *, int); + struct conftree { char* string; struct conftree* horz_next; @@ -232,10 +227,12 @@ struct information { unsigned short procs; unsigned short run_procs; + unsigned short threads; + unsigned short run_threads; float *cpu_usage; /* struct cpu_stat cpu_summed; what the hell is this? */ - unsigned int cpu_count; + int cpu_count; int cpu_avg_samples; int net_avg_samples; @@ -244,8 +241,6 @@ struct information { float loadavg[3]; - struct mail_s *mail; - int mail_running; #ifdef XMMS2 struct xmms2_s xmms2; #endif @@ -256,7 +251,6 @@ struct information { struct bmpx_s bmpx; #endif struct usr_info users; - struct dns_data nameserver_info; struct process *cpu[10]; struct process *memu[10]; struct process *time[10]; @@ -265,7 +259,6 @@ struct information { #endif struct process *first_process; unsigned long looped; - struct entropy_s entropy; double music_player_interval; #ifdef X11 @@ -303,9 +296,7 @@ extern int top_cpu, top_mem, top_time; #ifdef IOSTATS extern int top_io; #endif -#ifdef __linux__ extern int top_running; -#endif /* defined in conky.c, needed by top.c */ extern int cpu_separate; @@ -315,7 +306,8 @@ extern int cpu_separate; extern struct information info; /* defined in users.c */ -void update_users(void); +int update_users(void); +void update_user_time(char *tty); /* defined in conky.c */ extern double current_update_time, last_update_time, update_interval; @@ -326,9 +318,9 @@ int spaced_print(char *, int, const char *, int, ...) extern int inotify_fd; /* defined in conky.c - * evaluates 'text' and places the result in 'buffer' + * evaluates 'text' and places the result in 'p' of max length 'p_max_size' */ -void evaluate(const char *text, char *buffer); +void evaluate(const char *text, char *p, int p_max_size); /* maximum size of config TEXT buffer, i.e. below TEXT line. */ extern unsigned int max_user_text; @@ -336,9 +328,6 @@ extern unsigned int max_user_text; /* path to config file */ extern char *current_config; -/* just a wrapper for read_exec() defined in conky.c */ -void do_read_exec(const char *data, char *buf, const int size); - #ifdef X11 #define TO_X 1 #endif /* X11 */ @@ -367,4 +356,9 @@ void set_update_interval(double interval); #define UNUSED(a) (void)a #define UNUSED_ATTR __attribute__ ((unused)) +void parse_conky_vars(struct text_object *, const char *, + char *, int, struct information *); + +void generate_text_internal(char *, int, struct text_object, + struct information *); #endif /* _conky_h_ */