Item container.
More...
Item container.
Contains properties for visual representation of item.
struct bm_item* bm_item_new |
( |
const char * |
text | ) |
|
Allocate a new item.
- Parameters
-
text | Pointer to null terminated C "string", can be NULL for empty text. |
- Returns
- bm_item for new item instance, NULL if creation failed.
void bm_item_free |
( |
struct bm_item * |
item | ) |
|
Release bm_item instance.
- Parameters
-
item | bm_item instance to be freed from memory. |
void bm_item_set_userdata |
( |
struct bm_item * |
item, |
|
|
void * |
userdata |
|
) |
| |
Set userdata pointer to bm_item instance. Userdata will be carried unmodified by the instance.
- Parameters
-
item | bm_item instance where to set userdata pointer. |
userdata | Pointer to userdata. |
void* bm_item_get_userdata |
( |
struct bm_item * |
item | ) |
|
Get userdata pointer from bm_item instance.
- Parameters
-
item | bm_item instance which userdata pointer to get. |
- Returns
- Pointer for unmodified userdata.
bool bm_item_set_text |
( |
struct bm_item * |
item, |
|
|
const char * |
text |
|
) |
| |
Set text to bm_item instance.
- Parameters
-
item | bm_item instance where to set text. |
text | C "string" to set as text, can be NULL for empty text. |
- Returns
- true if set was succesful, false if out of memory.
const char* bm_item_get_text |
( |
const struct bm_item * |
item | ) |
|
Get text from bm_item instance.
- Parameters
-
item | bm_item instance where to get text from. |
- Returns
- Pointer to null terminated C "string", can be NULL for empty text.