File: userbox.h

package info (click to toggle)
gps 1.1.0.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,212 kB
  • ctags: 987
  • sloc: cpp: 11,600; sh: 381; makefile: 319; ansic: 227; perl: 17
file content (62 lines) | stat: -rw-r--r-- 1,427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* $Id: userbox.h,v 1.5 2000/10/03 03:35:21 bergo Exp $ */

#ifndef USERBOX_H
#define USERBOX_H

#include "polling.h"

void pop_user_box(GtkWidget *gw,gpointer data);
void close_user_box(GtkWidget *w, gpointer data);
void destroy_user_box(GtkWidget *w,gpointer data);

gboolean ubox_expose_event(GtkWidget *widget,GdkEventExpose *ee,
			    gpointer data);
gboolean ubox_configure_event(GtkWidget *widget,GdkEventConfigure *ce,
			    gpointer data);
gboolean ubox_bpress_event(GtkWidget *widget,GdkEventButton *be,
			    gpointer data);
gboolean ubox_motion_event(GtkWidget *widget,GdkEventMotion *gem,
			   gpointer data);

gint refresh_ubox(gpointer data);

gint ubox_cpu_cmp(const gpointer a,const gpointer b);
gint ubox_mem_cmp(const gpointer a,const gpointer b);
gint ubox_cpu_cmp_gr(const gpointer a,const gpointer b);
gint ubox_mem_cmp_gr(const gpointer a,const gpointer b);

long gps_memvalue(char *s);
void ubox_reset_lists();
void ubox_reset_links();

void query_group(char *dest,char *user,int maxc);

float ubox_cpu_fraction(float value);
float ubox_mem_fraction(long value);

///
class UserBoxCpuTuple {
 public:
  char username[GPS_MAXOWNER];
  char groupname[64];
  float cpuusage;
};

///
class UserBoxMemTuple {
 public:
  char username[GPS_MAXOWNER];
  char groupname[64];
  long membytes;
};

///
class UserLink {
 public:
  char username[GPS_MAXOWNER];
  int x,y,w,h;

  int hit(int a,int b);
};

#endif