WM: utility function to iterate on menu types
This commit is contained in:
parent
2c463a8250
commit
a76fc2f7ed
|
@ -593,6 +593,7 @@ void WM_uilisttype_free(void);
|
|||
/* wm_menu_type.c */
|
||||
void WM_menutype_init(void);
|
||||
struct MenuType *WM_menutype_find(const char *idname, bool quiet);
|
||||
void WM_menutype_iter(struct GHashIterator *ghi);
|
||||
bool WM_menutype_add(struct MenuType *mt);
|
||||
void WM_menutype_freelink(struct MenuType *mt);
|
||||
void WM_menutype_free(void);
|
||||
|
|
|
@ -57,6 +57,11 @@ MenuType *WM_menutype_find(const char *idname, bool quiet)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void WM_menutype_iter(GHashIterator *ghi)
|
||||
{
|
||||
BLI_ghashIterator_init(ghi, menutypes_hash);
|
||||
}
|
||||
|
||||
bool WM_menutype_add(MenuType *mt)
|
||||
{
|
||||
BLI_assert((mt->description == NULL) || (mt->description[0]));
|
||||
|
|
Loading…
Reference in New Issue