File: properties.h

package info (click to toggle)
gtop 0.28.1-5
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,324 kB
  • ctags: 890
  • sloc: ansic: 6,141; sh: 4,766; cpp: 355; makefile: 281; sed: 93
file content (53 lines) | stat: -rw-r--r-- 1,238 bytes parent folder | download
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
#ifndef __PROPERTIES_H__
#define __PROPERTIES_H__

typedef struct _GTopProperties GTopProperties;
typedef enum   _GTopPropFsMode GTopPropFsMode;
typedef enum   _GTopProcSelect GTopProcSelect;

#define MEMUSAGE_FIELDS		5

enum _GTopPropFsMode {
	GTOP_FSMODE_SUBLOCKS = 0,
	GTOP_FSMODE_BLOCKS,
	GTOP_FSMODE_INODES
};

enum _GTopProcSelect {
	GTOP_PROC_SELECT_ALL = 0,
	GTOP_PROC_SELECT_USER,
	GTOP_PROC_SELECT_TTY
};

struct _GTopProperties {
	GdkColor summary_cpu [4];
	GdkColor summary_mem [4];
	GdkColor summary_swap [2];
	glong memusage_thresholds [MEMUSAGE_FIELDS];
	GTopProcSelect proc_select;
	gint selected_fs;
	glong selected_fs_mask;
	GTopPropFsMode fsmode;
};

typedef struct _GTopPropertiesHook GTopPropertiesHook;

struct _GTopPropertiesHook {
	void (*init_func) (GTopPropertiesHook *, GtkWidget *);
	void (*apply_func) (GTopPropertiesHook *);
	void (*update_func) (GTopPropertiesHook *);
	void (*load_func) (GTopPropertiesHook *);
	void (*save_func) (GTopPropertiesHook *);
	GList *next;
};

extern GList *gtop_properties_hook;

extern GTopProperties gtop_temp_properties;
extern GTopProperties gtop_properties;

void gtop_properties_changed (void);
void gtop_show_properties (void);
void gtop_init_properties (void);

#endif