~ubuntu-branches/ubuntu/natty/awn-extras/natty

« back to all changes in this revision

Viewing changes to applets/maintained/sysmon/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-12-18 21:14:11 UTC
  • Revision ID: james.westby@ubuntu.com-20101218211411-hp9b0h7xhnu5o3kp
Tags: upstream-0.4.1~bzr1485
ImportĀ upstreamĀ versionĀ 0.4.1~bzr1485

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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.
 
6
 * 
 
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.
 
11
 * 
 
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
 
15
 */
 
16
 
 
17
#ifndef _AWN_SYSMON_UTIL
 
18
#define _AWN_SYSMON_UTIL
 
19
 
 
20
 
 
21
 
 
22
#include <gtk/gtk.h>
 
23
#include <libawn/libawn.h>
 
24
 
 
25
#include <glibtop/proclist.h>
 
26
#include <glibtop/procstate.h>
 
27
#include <glibtop/proctime.h>
 
28
 
 
29
#include "defines.h"
 
30
 
 
31
typedef struct
 
32
{
 
33
  pid_t   pid;
 
34
  gdouble percent_cpu;
 
35
  glibtop_proc_state  proc_state;
 
36
  glibtop_proc_time  proc_time;
 
37
}AwnProcInfo;
 
38
 
 
39
 
 
40
gdouble get_double_time (void);
 
41
 
 
42
gint get_conf_value_int (GObject * object, gchar * prop_name);
 
43
 
 
44
void do_bridge ( AwnApplet * applet,GObject *object,
 
45
           gchar * instance_group,gchar * key_name,gchar * prop_name );
 
46
 
 
47
void connect_notify (GObject * object,gchar * prop_name,GCallback cb,gpointer data);
 
48
 
 
49
void update_process_info (void);
 
50
 
 
51
GList * get_process_info (void);
 
52
 
 
53
void  inc_process_info_users(void);
 
54
 
 
55
void dec_process_info_users(void);
 
56
 
 
57
 
 
58
gint cmp_proc_info_percent_ascending (AwnProcInfo *left, AwnProcInfo *right);
 
59
gint cmp_proc_info_percent_descending (AwnProcInfo *left, AwnProcInfo *right);
 
60
 
 
61
gint cmp_proc_state_cmd_ascending (AwnProcInfo *left, AwnProcInfo *right);
 
62
gint cmp_proc_state_cmd_descending (AwnProcInfo *left, AwnProcInfo *right);
 
63
 
 
64
gint cmp_pid_ascending (AwnProcInfo *left, AwnProcInfo *right);
 
65
gint cmp_pid_descending (AwnProcInfo *left, AwnProcInfo *right);
 
66
 
 
67
GList * get_sorted_proc_list (GCompareFunc cmp_func);
 
68
 
 
69
#endif
 
70