MainPanel.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef HEADER_MainPanel
  2. #define HEADER_MainPanel
  3. /*
  4. htop - ColumnsPanel.h
  5. (C) 2004-2015 Hisham H. Muhammad
  6. (C) 2020 Red Hat, Inc. All Rights Reserved.
  7. Released under the GNU GPLv2+, see the COPYING file
  8. in the source distribution for its full text.
  9. */
  10. #include <stdbool.h>
  11. #include "Action.h"
  12. #include "FunctionBar.h"
  13. #include "IncSet.h"
  14. #include "Object.h"
  15. #include "Panel.h"
  16. #include "Row.h"
  17. typedef struct MainPanel_ {
  18. Panel super;
  19. State* state;
  20. IncSet* inc;
  21. Htop_Action* keys;
  22. FunctionBar* processBar; /* function bar with process-specific actions */
  23. FunctionBar* readonlyBar; /* function bar without process actions (ro) */
  24. unsigned int idSearch;
  25. } MainPanel;
  26. typedef bool(*MainPanel_foreachRowFn)(Row*, Arg);
  27. #define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar)
  28. // update the Label Keys in the MainPanel bar, list: list / tree mode, filter: filter (inc) active / inactive
  29. void MainPanel_updateLabels(MainPanel* this, bool list, bool filter);
  30. int MainPanel_selectedRow(MainPanel* this);
  31. bool MainPanel_foreachRow(MainPanel* this, MainPanel_foreachRowFn fn, Arg arg, bool* wasAnyTagged);
  32. extern const PanelClass MainPanel_class;
  33. MainPanel* MainPanel_new(void);
  34. void MainPanel_setState(MainPanel* this, State* state);
  35. void MainPanel_setFunctionBar(MainPanel* this, bool readonly);
  36. void MainPanel_delete(Object* object);
  37. #endif