2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 2 of the License, or
5
* (at your option) any later version.
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU Library General Public License for more details.
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
17
#ifndef _AWN_SYSMON_UTIL
18
#define _AWN_SYSMON_UTIL
23
#include <libawn/libawn.h>
25
#include <glibtop/proclist.h>
26
#include <glibtop/procstate.h>
27
#include <glibtop/proctime.h>
35
glibtop_proc_state proc_state;
36
glibtop_proc_time proc_time;
40
gdouble get_double_time (void);
42
gint get_conf_value_int (GObject * object, gchar * prop_name);
44
void do_bridge ( AwnApplet * applet,GObject *object,
45
gchar * instance_group,gchar * key_name,gchar * prop_name );
47
void connect_notify (GObject * object,gchar * prop_name,GCallback cb,gpointer data);
49
void update_process_info (void);
51
GList * get_process_info (void);
53
void inc_process_info_users(void);
55
void dec_process_info_users(void);
58
gint cmp_proc_info_percent_ascending (AwnProcInfo *left, AwnProcInfo *right);
59
gint cmp_proc_info_percent_descending (AwnProcInfo *left, AwnProcInfo *right);
61
gint cmp_proc_state_cmd_ascending (AwnProcInfo *left, AwnProcInfo *right);
62
gint cmp_proc_state_cmd_descending (AwnProcInfo *left, AwnProcInfo *right);
64
gint cmp_pid_ascending (AwnProcInfo *left, AwnProcInfo *right);
65
gint cmp_pid_descending (AwnProcInfo *left, AwnProcInfo *right);
67
GList * get_sorted_proc_list (GCompareFunc cmp_func);