|
Blender
V3.3
|
#include <stdio.h>#include <string.h>#include "BLI_listbase.h"#include "BLI_sys_types.h"#include "DNA_space_types.h"#include "DNA_windowmanager_types.h"#include "MEM_guardedalloc.h"#include "UI_interface.h"#include "BLI_ghash.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_main.h"#include "BKE_screen.h"#include "WM_api.h"#include "WM_types.h"Go to the source code of this file.
Functions | |
| uiListType * | WM_uilisttype_find (const char *idname, bool quiet) |
| bool | WM_uilisttype_add (uiListType *ult) |
| static void | wm_uilisttype_unlink_from_region (const uiListType *ult, ARegion *region) |
| static void | wm_uilisttype_unlink_from_area (const uiListType *ult, ScrArea *area) |
| static void | wm_uilisttype_unlink (Main *bmain, const uiListType *ult) |
| void | WM_uilisttype_remove_ptr (Main *bmain, uiListType *ult) |
| void | WM_uilisttype_init (void) |
| void | WM_uilisttype_free (void) |
| void | WM_uilisttype_to_full_list_id (const uiListType *ult, const char *list_id, char r_full_list_id[]) |
| const char * | WM_uilisttype_list_id_get (const uiListType *ult, uiList *list) |
Variables | |
| static GHash * | uilisttypes_hash = NULL |
UI List Registry.
Definition in file wm_uilist_type.c.
| bool WM_uilisttype_add | ( | uiListType * | ult | ) |
Definition at line 50 of file wm_uilist_type.c.
References BLI_ghash_insert(), uiListType::idname, and uilisttypes_hash.
Referenced by ED_uilisttypes_ui(), and panelRegister().
| uiListType* WM_uilisttype_find | ( | const char * | idname, |
| bool | quiet | ||
| ) |
Definition at line 34 of file wm_uilist_type.c.
References BLI_ghash_lookup(), NULL, and uilisttypes_hash.
Referenced by ui_template_list_data_retrieve().
Definition at line 124 of file wm_uilist_type.c.
References BLI_ghash_free(), BLI_ghashIterator_getValue(), ExtensionRNA::data, ExtensionRNA::free, GHASH_ITER, MEM_freeN, NULL, uiListType::rna_ext, and uilisttypes_hash.
Referenced by WM_exit_ex().
Called on initialize WM_init()
Definition at line 119 of file wm_uilist_type.c.
References BLI_ghash_str_new_ex(), and uilisttypes_hash.
Referenced by WM_init().
| const char* WM_uilisttype_list_id_get | ( | const uiListType * | ult, |
| uiList * | list | ||
| ) |
Definition at line 146 of file wm_uilist_type.c.
References BLI_assert, uiListType::idname, and uiList::list_id.
| void WM_uilisttype_remove_ptr | ( | Main * | bmain, |
| uiListType * | ult | ||
| ) |
Definition at line 109 of file wm_uilist_type.c.
References BLI_assert, BLI_ghash_remove(), uiListType::idname, MEM_freeN, NULL, uilisttypes_hash, UNUSED_VARS_NDEBUG, and wm_uilisttype_unlink().
| void WM_uilisttype_to_full_list_id | ( | const uiListType * | ult, |
| const char * | list_id, | ||
| char | r_full_list_id[] | ||
| ) |
Definition at line 138 of file wm_uilist_type.c.
References BLI_snprintf(), uiListType::idname, and UI_MAX_NAME_STR.
Referenced by ui_list_ensure().
|
static |
For all lists representing ult, clear their uiListType pointer. Use when a list-type is deleted, so that the UI doesn't keep references to it.
This is a common pattern for unregistering (usually .py defined) types at runtime, e.g. see WM_gizmomaptype_group_unlink(). Note that unlike in some other cases using this pattern, we don't actually free the lists with type ult, we just clear the reference to the type. That's because UI-Lists are written to files and we don't want them to get lost together with their (user visible) settings.
Definition at line 88 of file wm_uilist_type.c.
References blender::compositor::area(), ListBase::first, LISTBASE_FOREACH, NULL, Main::screens, Main::wm, wm_uilisttype_unlink_from_area(), and wm_uilisttype_unlink_from_region().
Referenced by WM_uilisttype_remove_ptr().
|
static |
Definition at line 67 of file wm_uilist_type.c.
References blender::compositor::area(), LISTBASE_FOREACH, and wm_uilisttype_unlink_from_region().
Referenced by wm_uilisttype_unlink().
|
static |
Definition at line 56 of file wm_uilist_type.c.
References LISTBASE_FOREACH, NULL, and ARegion::ui_lists.
Referenced by wm_uilisttype_unlink(), and wm_uilisttype_unlink_from_area().
Definition at line 32 of file wm_uilist_type.c.
Referenced by WM_uilisttype_add(), WM_uilisttype_find(), WM_uilisttype_free(), WM_uilisttype_init(), and WM_uilisttype_remove_ptr().