ScreenManager.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef HEADER_ScreenManager
  2. #define HEADER_ScreenManager
  3. /*
  4. htop - ScreenManager.h
  5. (C) 2004-2011 Hisham H. Muhammad
  6. Released under the GNU GPLv2+, see the COPYING file
  7. in the source distribution for its full text.
  8. */
  9. #include <stdbool.h>
  10. #include "Action.h"
  11. #include "Header.h"
  12. #include "Machine.h"
  13. #include "Panel.h"
  14. #include "Vector.h"
  15. typedef struct ScreenManager_ {
  16. int x1;
  17. int y1;
  18. int x2;
  19. int y2;
  20. Vector* panels;
  21. const char* name;
  22. int panelCount;
  23. Header* header;
  24. Machine* host;
  25. State* state;
  26. bool allowFocusChange;
  27. } ScreenManager;
  28. ScreenManager* ScreenManager_new(Header* header, Machine* host, State* state, bool owner);
  29. void ScreenManager_delete(ScreenManager* this);
  30. int ScreenManager_size(const ScreenManager* this);
  31. void ScreenManager_add(ScreenManager* this, Panel* item, int size);
  32. void ScreenManager_insert(ScreenManager* this, Panel* item, int size, int idx);
  33. Panel* ScreenManager_remove(ScreenManager* this, int idx);
  34. void ScreenManager_resize(ScreenManager* this);
  35. void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey, const char* name);
  36. #endif