2012-11-10 00:31:37 +00:00
|
|
|
/* 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_ {
|
2014-04-24 22:50:03 +00:00
|
|
|
char buffer[INCMODE_MAX+1];
|
2012-11-10 00:31:37 +00:00
|
|
|
int index;
|
|
|
|
FunctionBar* bar;
|
|
|
|
bool isFilter;
|
|
|
|
} IncMode;
|
|
|
|
|
|
|
|
typedef struct IncSet_ {
|
|
|
|
IncMode modes[2];
|
|
|
|
IncMode* active;
|
2018-01-28 01:28:37 +00:00
|
|
|
Panel* panel;
|
2012-11-10 00:31:37 +00:00
|
|
|
FunctionBar* defaultBar;
|
|
|
|
bool filtering;
|
2016-05-05 13:30:06 +00:00
|
|
|
bool found;
|
2012-11-10 00:31:37 +00:00
|
|
|
} IncSet;
|
|
|
|
|
|
|
|
typedef const char* (*IncMode_GetPanelValue)(Panel*, int);
|
|
|
|
|
|
|
|
|
|
|
|
IncSet* IncSet_new(FunctionBar* bar);
|
|
|
|
|
|
|
|
void IncSet_delete(IncSet* this);
|
|
|
|
|
2018-01-28 01:28:37 +00:00
|
|
|
void IncSet_activate(IncSet* this, IncType type, Panel* panel);
|
|
|
|
|
2012-11-10 00:31:37 +00:00
|
|
|
bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue getPanelValue, Vector* lines);
|
|
|
|
|
|
|
|
const char* IncSet_getListItemValue(Panel* panel, int i);
|
|
|
|
|
2018-01-28 01:28:37 +00:00
|
|
|
void IncSet_drawBar(IncSet* this, int attr);
|
2012-11-10 00:31:37 +00:00
|
|
|
|
2015-03-23 20:04:53 +00:00
|
|
|
int IncSet_synthesizeEvent(IncSet* this, int x);
|
|
|
|
|
2012-11-10 00:31:37 +00:00
|
|
|
#endif
|