2006-03-04 21:16:49 +03:00
|
|
|
#ifndef HEADER_ListItem
|
|
|
|
#define HEADER_ListItem
|
|
|
|
/*
|
2006-06-07 00:28:42 +04:00
|
|
|
htop - ListItem.h
|
2011-05-26 20:35:07 +04:00
|
|
|
(C) 2004-2011 Hisham H. Muhammad
|
2021-09-22 12:33:00 +03:00
|
|
|
Released under the GNU GPLv2+, see the COPYING file
|
2006-03-04 21:16:49 +03:00
|
|
|
in the source distribution for its full text.
|
|
|
|
*/
|
|
|
|
|
2020-09-19 14:55:23 +03:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2006-03-04 21:16:49 +03:00
|
|
|
#include "Object.h"
|
2006-06-07 00:28:42 +04:00
|
|
|
|
2021-04-29 18:12:43 +03:00
|
|
|
|
2006-03-04 21:16:49 +03:00
|
|
|
typedef struct ListItem_ {
|
|
|
|
Object super;
|
|
|
|
char* value;
|
|
|
|
int key;
|
2015-01-22 04:27:31 +03:00
|
|
|
bool moving;
|
2006-03-04 21:16:49 +03:00
|
|
|
} ListItem;
|
|
|
|
|
2020-10-05 14:19:50 +03:00
|
|
|
extern const ObjectClass ListItem_class;
|
2006-03-04 21:16:49 +03:00
|
|
|
|
2021-08-31 08:38:52 +03:00
|
|
|
void ListItem_delete(Object* cast);
|
|
|
|
|
|
|
|
void ListItem_display(const Object* cast, RichString* out);
|
|
|
|
|
|
|
|
void ListItem_init(ListItem* this, const char* value, int key);
|
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
ListItem* ListItem_new(const char* value, int key);
|
2006-03-04 21:16:49 +03:00
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
void ListItem_append(ListItem* this, const char* text);
|
2006-06-07 00:28:42 +04:00
|
|
|
|
2021-08-31 08:38:52 +03:00
|
|
|
int ListItem_compare(const void* cast1, const void* cast2);
|
|
|
|
|
2020-10-18 20:22:30 +03:00
|
|
|
static inline const char* ListItem_getRef(const ListItem* this) {
|
|
|
|
return this->value;
|
|
|
|
}
|
2006-06-07 00:28:42 +04:00
|
|
|
|
2006-03-04 21:16:49 +03:00
|
|
|
#endif
|