Action.h 1.21 KB
Newer Older
1
2
3
4
5
6
/* Do not edit this file. It was automatically generated. */

#ifndef HEADER_Action
#define HEADER_Action
/*
htop - Action.h
Hisham Muhammad's avatar
Hisham Muhammad committed
7
(C) 2015 Hisham H. Muhammad
8
9
10
11
12
13
14
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/


#include "IncSet.h"
#include "Settings.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
15
#include "Header.h"
16
#include "UsersTable.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
17
18
#include "ProcessList.h"
#include "Panel.h"
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

typedef enum {
   HTOP_OK = 0x00,
   HTOP_REFRESH = 0x01,
   HTOP_RECALCULATE = 0x03, // implies HTOP_REFRESH
   HTOP_SAVE_SETTINGS = 0x04,
   HTOP_KEEP_FOLLOWING = 0x08,
   HTOP_QUIT = 0x10,
   HTOP_REDRAW_BAR = 0x20,
   HTOP_UPDATE_PANELHDR = 0x41, // implies HTOP_REFRESH
} Htop_Reaction;

typedef Htop_Reaction (*Htop_Action)();

typedef struct State_ {
   Settings* settings;
   UsersTable* ut;
Hisham Muhammad's avatar
Hisham Muhammad committed
36
37
38
   ProcessList* pl;
   Panel* panel;
   Header* header;
39
40
41
} State;


42
Object* Action_pickFromVector(State* st, Panel* list, int x);
Hisham Muhammad's avatar
Hisham Muhammad committed
43
44
45
46
47

// ----------------------------------------

bool Action_setUserOnly(const char* userName, uid_t* userId);

48
49
Htop_Reaction Action_setSortKey(Settings* settings, ProcessField sortKey);

Hisham Muhammad's avatar
Hisham Muhammad committed
50
51
// ----------------------------------------

Hisham's avatar
Hisham committed
52
53
Htop_Reaction Action_follow(State* st);

54

Hisham Muhammad's avatar
Hisham Muhammad committed
55
56
void Action_setBindings(Htop_Action* keys);

57
58

#endif