typedef struct MenuItem {
char* title;
char* description;
+ void* user_data;
} MenuItem;
typedef struct Menu {
WINDOW* sub_win;
int max_height;
int max_width;
+ void* user_data;
} Menu;
int swap_item(Menu* menu, int src_index, int dest_index);
new_menuitem = malloc(sizeof(MenuItem));
new_menuitem->title = title;
- new_menuitem->description = 0; //TEMP FOR NOW
+ new_menuitem->description = strdup(""); //TEMP FOR NOW
return new_menuitem;
}