DynamicScreen.h 953 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef HEADER_DynamicScreen
  2. #define HEADER_DynamicScreen
  3. /*
  4. htop - DynamicColumn.h
  5. (C) 2023 htop dev team
  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 "Hashtable.h"
  11. #include "Panel.h"
  12. typedef struct DynamicScreen_ {
  13. char name[32]; /* unique name cannot contain any spaces */
  14. char* heading; /* user-settable more readable name */
  15. char* caption; /* explanatory text for screen */
  16. char* fields;
  17. char* sortKey;
  18. char* columnKeys;
  19. int direction;
  20. } DynamicScreen;
  21. Hashtable* DynamicScreens_new(void);
  22. void DynamicScreens_delete(Hashtable* screens);
  23. void DynamicScreen_done(DynamicScreen* this);
  24. void DynamicScreens_addAvailableColumns(Panel* availableColumns, char* screen);
  25. const char* DynamicScreen_lookup(Hashtable* screens, unsigned int key);
  26. bool DynamicScreen_search(Hashtable* screens, const char* name, unsigned int* key);
  27. #endif