From 2a73405cd060b543d56987650327b18078a137d7 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 10 Nov 2012 00:31:37 +0000 Subject: search and filter for the strace and lsof screens! --- IncSet.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 IncSet.h (limited to 'IncSet.h') diff --git a/IncSet.h b/IncSet.h new file mode 100644 index 00000000..fe425330 --- /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 + +#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]; + 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 -- cgit v1.2.3