Blender
V3.3
|
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "RNA_types.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_listBase.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "BKE_idprop.h"
#include "BKE_keyconfig.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Functions | |
Key-Config Preference (UserDef) API | |
| |
wmKeyConfigPref * | BKE_keyconfig_pref_ensure (UserDef *userdef, const char *kc_idname) |
Key-Config Versioning | |
void | BKE_keyconfig_pref_set_select_mouse (UserDef *userdef, int value, bool override) |
static void | keymap_item_free (wmKeyMapItem *kmi) |
static void | keymap_diff_item_free (wmKeyMapDiffItem *kmdi) |
void | BKE_keyconfig_keymap_filter_item (wmKeyMap *keymap, const struct wmKeyConfigFilterItemParams *params, bool(*filter_fn)(wmKeyMapItem *kmi, void *user_data), void *user_data) |
void | BKE_keyconfig_pref_filter_items (struct UserDef *userdef, const struct wmKeyConfigFilterItemParams *params, bool(*filter_fn)(wmKeyMapItem *kmi, void *user_data), void *user_data) |
Key-Config Preference (RNA Type) API | |
| |
static GHash * | global_keyconfigpreftype_hash = NULL |
wmKeyConfigPrefType_Runtime * | BKE_keyconfig_pref_type_find (const char *idname, bool quiet) |
void | BKE_keyconfig_pref_type_add (wmKeyConfigPrefType_Runtime *kpt_rt) |
void | BKE_keyconfig_pref_type_remove (const wmKeyConfigPrefType_Runtime *kpt_rt) |
void | BKE_keyconfig_pref_type_init (void) |
void | BKE_keyconfig_pref_type_free (void) |
void BKE_keyconfig_keymap_filter_item | ( | wmKeyMap * | keymap, |
const struct wmKeyConfigFilterItemParams * | params, | ||
bool(*)(wmKeyMapItem *kmi, void *user_data) | filter_fn, | ||
void * | user_data | ||
) |
Definition at line 145 of file keyconfig.c.
References BLI_remlink(), wmKeyMap::diff_items, ListBase::first, wmKeyMap::items, keymap_diff_item_free(), keymap_item_free(), wmKeyMapItem::next, params, blender::bke::attribute_accessor_functions::remove(), and user_data.
Referenced by BKE_keyconfig_pref_filter_items().
wmKeyConfigPref* BKE_keyconfig_pref_ensure | ( | UserDef * | userdef, |
const char * | kc_idname | ||
) |
Definition at line 33 of file keyconfig.c.
References BLI_addtail(), BLI_findstring(), wmKeyConfigPref::idname, IDP_GROUP, IDP_New(), MEM_callocN, NULL, wmKeyConfigPref::prop, STRNCPY, and UserDef::user_keyconfig_prefs.
Referenced by BKE_keyconfig_pref_set_select_mouse().
void BKE_keyconfig_pref_filter_items | ( | struct UserDef * | userdef, |
const struct wmKeyConfigFilterItemParams * | params, | ||
bool(*)(wmKeyMapItem *kmi, void *user_data) | filter_fn, | ||
void * | user_data | ||
) |
Definition at line 189 of file keyconfig.c.
References BKE_keyconfig_keymap_filter_item(), LISTBASE_FOREACH, params, user_data, and UserDef::user_keymaps.
Set select mouse, for versioning code.
Definition at line 110 of file keyconfig.c.
References BKE_keyconfig_pref_ensure(), IDPropertyTemplate::i, IDP_AddToGroup(), IDP_GetPropertyFromGroup(), IDP_Int, IDP_INT, IDP_New(), wmKeyConfigPref::prop, and WM_KEYCONFIG_STR_DEFAULT.
Referenced by blo_do_versions_userdef().
void BKE_keyconfig_pref_type_add | ( | wmKeyConfigPrefType_Runtime * | kpt_rt | ) |
Definition at line 82 of file keyconfig.c.
References BLI_ghash_insert(), and global_keyconfigpreftype_hash.
wmKeyConfigPrefType_Runtime* BKE_keyconfig_pref_type_find | ( | const char * | idname, |
bool | quiet | ||
) |
Definition at line 59 of file keyconfig.c.
References BLI_ghash_lookup(), global_keyconfigpreftype_hash, and NULL.
Definition at line 98 of file keyconfig.c.
References BLI_ghash_free(), global_keyconfigpreftype_hash, MEM_freeN, and NULL.
Referenced by WM_exit_ex().
Definition at line 92 of file keyconfig.c.
References BLI_assert, BLI_ghash_str_new(), global_keyconfigpreftype_hash, and NULL.
Referenced by WM_init().
void BKE_keyconfig_pref_type_remove | ( | const wmKeyConfigPrefType_Runtime * | kpt_rt | ) |
Definition at line 87 of file keyconfig.c.
References BLI_ghash_remove(), global_keyconfigpreftype_hash, MEM_freeN, and NULL.
|
static |
Definition at line 134 of file keyconfig.c.
References wmKeyMapDiffItem::add_item, keymap_item_free(), MEM_freeN, and wmKeyMapDiffItem::remove_item.
Referenced by BKE_keyconfig_keymap_filter_item().
|
static |
Definition at line 125 of file keyconfig.c.
References IDP_FreeProperty(), MEM_freeN, wmKeyMapItem::properties, and wmKeyMapItem::ptr.
Referenced by BKE_keyconfig_keymap_filter_item(), and keymap_diff_item_free().
Definition at line 57 of file keyconfig.c.
Referenced by BKE_keyconfig_pref_type_add(), BKE_keyconfig_pref_type_find(), BKE_keyconfig_pref_type_free(), BKE_keyconfig_pref_type_init(), and BKE_keyconfig_pref_type_remove().