diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-21 16:57:44 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-21 16:57:44 +0900 |
| commit | 5bb312993960adaa663701391a83f76b81edc60a (patch) | |
| tree | 8838656d0000d24a4c44f5a548b0b36477dbee60 /fedora/.local/bin/htop-vim/Action.h | |
| parent | a861a5fb4c3449abd9d43481c24a90fb91345d75 (diff) | |
created htop-vim/
Diffstat (limited to 'fedora/.local/bin/htop-vim/Action.h')
| -rw-r--r-- | fedora/.local/bin/htop-vim/Action.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/fedora/.local/bin/htop-vim/Action.h b/fedora/.local/bin/htop-vim/Action.h new file mode 100644 index 0000000..09b68bd --- /dev/null +++ b/fedora/.local/bin/htop-vim/Action.h @@ -0,0 +1,67 @@ +#ifndef HEADER_Action +#define HEADER_Action +/* +htop - Action.h +(C) 2015 Hisham H. Muhammad +Released under the GNU GPLv2+, see the COPYING file +in the source distribution for its full text. +*/ + +#include "config.h" // IWYU pragma: keep + +#include <stdbool.h> +#include <sys/types.h> + +#include "Header.h" +#include "Object.h" +#include "Panel.h" +#include "Process.h" +#include "ProcessList.h" +#include "Settings.h" +#include "UsersTable.h" + + +typedef enum { + HTOP_OK = 0x00, + HTOP_REFRESH = 0x01, + HTOP_RECALCULATE = 0x02 | HTOP_REFRESH, + HTOP_SAVE_SETTINGS = 0x04, + HTOP_KEEP_FOLLOWING = 0x08, + HTOP_QUIT = 0x10, + HTOP_REDRAW_BAR = 0x20, + HTOP_UPDATE_PANELHDR = 0x40 | HTOP_REFRESH, + HTOP_RESIZE = 0x80 | HTOP_REFRESH | HTOP_REDRAW_BAR | HTOP_UPDATE_PANELHDR, +} Htop_Reaction; + +struct MainPanel_; // IWYU pragma: keep + +typedef struct State_ { + Settings* settings; + UsersTable* ut; + ProcessList* pl; + struct MainPanel_* mainPanel; + Header* header; + bool pauseProcessUpdate; + bool hideProcessSelection; + bool hideMeters; +} State; + +static inline bool State_hideFunctionBar(const State* st) { + return st->settings->hideFunctionBar == 2 || (st->settings->hideFunctionBar == 1 && st->hideProcessSelection); +} + +typedef Htop_Reaction (*Htop_Action)(State* st); + +Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess); + +bool Action_setUserOnly(const char* userName, uid_t* userId); + +Htop_Reaction Action_setSortKey(Settings* settings, ProcessField sortKey); + +Htop_Reaction Action_setScreenTab(Settings* settings, int x); + +Htop_Reaction Action_follow(State* st); + +void Action_setBindings(Htop_Action* keys); + +#endif |
