1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2 * vim: ts=4 sw=4 noet ai cindent syntax=c
11 #include <sys/socket.h>
12 #include "text_object.h"
14 void add_update_callback(void (*func)(void));
15 void free_update_callbacks(void);
16 void start_update_threading(void);
19 void strfold(char *start, int count);
20 int check_mount(char *s);
21 void prepare_update(void);
22 void update_uptime(void);
23 void update_meminfo(void);
24 void update_net_stats(void);
25 void update_cpu_usage(void);
26 void update_total_processes(void);
27 void update_uname(void);
28 void update_running_processes(void);
29 void update_i8k(void);
30 void update_stuff(void);
31 char get_freq(char *, size_t, const char *, int, unsigned int);
32 void get_freq_dynamic(char *, size_t, const char *, int);
33 char get_voltage(char *, size_t, const char *, int, unsigned int); /* ptarjan */
34 void update_load_average(void);
35 void update_top(void);
36 void free_all_processes(void);
37 struct process *get_first_process(void);
38 void get_cpu_count(void);
39 double get_time(void);
41 /* Converts '~/...' paths to '/home/blah/...' assumes that 'dest' is at least
42 * DEFAULT_TEXT_BUFFER_SIZE. It's similar to variable_substitute, except only
43 * cheques for $HOME and ~/ in path */
44 void to_real_path(char *dest, const char *source);
45 FILE *open_file(const char *file, int *reported);
46 int open_fifo(const char *file, int *reported);
47 void variable_substitute(const char *s, char *dest, unsigned int n);
49 void format_seconds(char *buf, unsigned int n, long t);
50 void format_seconds_short(char *buf, unsigned int n, long t);
53 void update_x11info(void);
56 int round_to_int_temp(float);
58 unsigned int round_to_int(float);
60 extern int no_buffers;
62 void get_adt746x_cpu(char *, size_t);
63 void get_adt746x_fan(char *, size_t);
65 int open_acpi_temperature(const char *name);
66 double get_acpi_temperature(int fd);
67 void get_acpi_ac_adapter(char *, size_t);
68 void get_acpi_fan(char *, size_t);
69 void get_battery_stuff(char *buf, unsigned int n, const char *bat, int item);
70 int get_battery_perct(const char *bat);
71 int get_battery_perct_bar(const char *bat);
72 void get_battery_short_status(char *buf, unsigned int n, const char *bat);
74 void scan_loadavg_arg(struct text_object *, const char *);
75 void print_loadavg(struct text_object *, char *, int);
77 void scan_loadgraph_arg(struct text_object *, const char *);
78 void print_loadgraph(struct text_object *, char *);
81 #endif /* _COMMON_H */