diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:33 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:33 +0200 |
commit | f75ab6d2c11e8a8e18191b087564aedebbeb96c5 (patch) | |
tree | 2a046e11678e798f3f9c7f7af4f9ac205c8d2731 /IncSet.h | |
parent | 2004bbc3ef28ada3acca05f5d5fa9108121a6784 (diff) | |
download | debian_htop-f75ab6d2c11e8a8e18191b087564aedebbeb96c5.tar.gz debian_htop-f75ab6d2c11e8a8e18191b087564aedebbeb96c5.tar.bz2 debian_htop-f75ab6d2c11e8a8e18191b087564aedebbeb96c5.zip |
Imported Upstream version 1.0.3upstream/1.0.3
Diffstat (limited to 'IncSet.h')
-rw-r--r-- | IncSet.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/IncSet.h b/IncSet.h new file mode 100644 index 0000000..c528f18 --- /dev/null +++ b/IncSet.h @@ -0,0 +1,56 @@ +/* Do not edit this file. It was automatically generated. */ + +#ifndef HEADER_IncSet +#define HEADER_IncSet +/* +htop - IncSet.h +(C) 2005-2012 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ + + +#include "FunctionBar.h" +#include "Panel.h" +#include <stdbool.h> + +#define INCMODE_MAX 40 + +typedef enum { + INC_SEARCH = 0, + INC_FILTER = 1 +} IncType; + +#define IncSet_filter(inc_) (inc_->filtering ? inc_->modes[INC_FILTER].buffer : NULL) + +typedef struct IncMode_ { + char buffer[INCMODE_MAX+1]; + int index; + FunctionBar* bar; + bool isFilter; +} IncMode; + +typedef struct IncSet_ { + IncMode modes[2]; + IncMode* active; + FunctionBar* bar; + FunctionBar* defaultBar; + bool filtering; +} IncSet; + +typedef const char* (*IncMode_GetPanelValue)(Panel*, int); + + +IncSet* IncSet_new(FunctionBar* bar); + +void IncSet_delete(IncSet* this); + +bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue getPanelValue, Vector* lines); + +const char* IncSet_getListItemValue(Panel* panel, int i); + +void IncSet_activate(IncSet* this, IncType type); + +void IncSet_drawBar(IncSet* this); + +#endif |