ListItem.h 848 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef HEADER_ListItem
  2. #define HEADER_ListItem
  3. /*
  4. htop - ListItem.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 "Object.h"
  11. #include "RichString.h"
  12. typedef struct ListItem_ {
  13. Object super;
  14. char* value;
  15. int key;
  16. bool moving;
  17. } ListItem;
  18. extern const ObjectClass ListItem_class;
  19. void ListItem_delete(Object* cast);
  20. void ListItem_display(const Object* cast, RichString* out);
  21. void ListItem_init(ListItem* this, const char* value, int key);
  22. ListItem* ListItem_new(const char* value, int key);
  23. void ListItem_append(ListItem* this, const char* text);
  24. int ListItem_compare(const void* cast1, const void* cast2);
  25. static inline const char* ListItem_getRef(const ListItem* this) {
  26. return this->value;
  27. }
  28. #endif