blob: 27538f4b83931e447b255f92b52fe58ef3da30b8 [file] [log] [blame]
Hisham Muhammad2a734052012-11-10 00:31:37 +00001/* Do not edit this file. It was automatically generated. */
2
3#ifndef HEADER_IncSet
4#define HEADER_IncSet
5/*
6htop - IncSet.h
7(C) 2005-2012 Hisham H. Muhammad
8Released under the GNU GPL, see the COPYING file
9in the source distribution for its full text.
10*/
11
12
13#include "FunctionBar.h"
14#include "Panel.h"
15#include <stdbool.h>
16
17#define INCMODE_MAX 40
18
19typedef enum {
20 INC_SEARCH = 0,
21 INC_FILTER = 1
22} IncType;
23
24#define IncSet_filter(inc_) (inc_->filtering ? inc_->modes[INC_FILTER].buffer : NULL)
25
26typedef struct IncMode_ {
Hisham Muhammadd5b3b6d2014-04-24 19:50:03 -030027 char buffer[INCMODE_MAX+1];
Hisham Muhammad2a734052012-11-10 00:31:37 +000028 int index;
29 FunctionBar* bar;
30 bool isFilter;
31} IncMode;
32
33typedef struct IncSet_ {
34 IncMode modes[2];
35 IncMode* active;
Hisham Muhammad2a734052012-11-10 00:31:37 +000036 FunctionBar* defaultBar;
37 bool filtering;
Hisham572546f2016-05-05 10:30:06 -030038 bool found;
Hisham Muhammad2a734052012-11-10 00:31:37 +000039} IncSet;
40
41typedef const char* (*IncMode_GetPanelValue)(Panel*, int);
42
43
44IncSet* IncSet_new(FunctionBar* bar);
45
46void IncSet_delete(IncSet* this);
47
48bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue getPanelValue, Vector* lines);
49
50const char* IncSet_getListItemValue(Panel* panel, int i);
51
Hisham Muhammadade79932015-03-23 17:04:53 -030052void IncSet_activate(IncSet* this, IncType type, Panel* panel);
Hisham Muhammad2a734052012-11-10 00:31:37 +000053
54void IncSet_drawBar(IncSet* this);
55
Hisham Muhammadade79932015-03-23 17:04:53 -030056int IncSet_synthesizeEvent(IncSet* this, int x);
57
Hisham Muhammad2a734052012-11-10 00:31:37 +000058#endif