ScreensPanel.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef HEADER_ScreensPanel
  2. #define HEADER_ScreensPanel
  3. /*
  4. htop - ScreensPanel.h
  5. (C) 2004-2011 Hisham H. Muhammad
  6. (C) 2020-2022 htop dev team
  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 "AvailableColumnsPanel.h"
  12. #include "ColumnsPanel.h"
  13. #include "DynamicScreen.h"
  14. #include "ListItem.h"
  15. #include "Object.h"
  16. #include "Panel.h"
  17. #include "ScreenManager.h"
  18. #include "Settings.h"
  19. #ifndef SCREEN_NAME_LEN
  20. #define SCREEN_NAME_LEN 20
  21. #endif
  22. typedef struct ScreensPanel_ {
  23. Panel super;
  24. ScreenManager* scr;
  25. Settings* settings;
  26. ColumnsPanel* columns;
  27. AvailableColumnsPanel* availableColumns;
  28. char buffer[SCREEN_NAME_LEN + 1];
  29. char* saved;
  30. int cursor;
  31. bool moving;
  32. ListItem* renamingItem;
  33. } ScreensPanel;
  34. typedef struct ScreenListItem_ {
  35. ListItem super;
  36. DynamicScreen* ds;
  37. ScreenSettings* ss;
  38. } ScreenListItem;
  39. extern ObjectClass ScreenListItem_class;
  40. ScreenListItem* ScreenListItem_new(const char* value, ScreenSettings* ss);
  41. ScreensPanel* ScreensPanel_new(Settings* settings);
  42. void ScreensPanel_update(Panel* super);
  43. #endif