Blender V2.61 - r43446
Functions | Variables

wm_keymap.c File Reference

#include <string.h>
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_window.h"
#include "wm_event_system.h"
#include "wm_event_types.h"

Go to the source code of this file.

Functions

static wmKeyMapItemwm_keymap_item_copy (wmKeyMapItem *kmi)
static void wm_keymap_item_free (wmKeyMapItem *kmi)
static void wm_keymap_item_properties_set (wmKeyMapItem *kmi)
static int wm_keymap_item_equals_result (wmKeyMapItem *a, wmKeyMapItem *b)
static int wm_keymap_item_equals (wmKeyMapItem *a, wmKeyMapItem *b)
void WM_keymap_properties_reset (wmKeyMapItem *kmi, struct IDProperty *properties)
static wmKeyMapDiffItemwm_keymap_diff_item_copy (wmKeyMapDiffItem *kmdi)
static void wm_keymap_diff_item_free (wmKeyMapDiffItem *kmdi)
wmKeyConfigWM_keyconfig_new (wmWindowManager *wm, const char *idname)
wmKeyConfigWM_keyconfig_new_user (wmWindowManager *wm, const char *idname)
void WM_keyconfig_remove (wmWindowManager *wm, wmKeyConfig *keyconf)
void WM_keyconfig_free (wmKeyConfig *keyconf)
static wmKeyConfigwm_keyconfig_list_find (ListBase *lb, char *idname)
static wmKeyConfigWM_keyconfig_active (wmWindowManager *wm)
void WM_keyconfig_set_active (wmWindowManager *wm, const char *idname)
static wmKeyMapwm_keymap_new (const char *idname, int spaceid, int regionid)
static wmKeyMapwm_keymap_copy (wmKeyMap *keymap)
void WM_keymap_free (wmKeyMap *keymap)
static void keymap_event_set (wmKeyMapItem *kmi, short type, short val, int modifier, short keymodifier)
static void keymap_item_set_id (wmKeyMap *keymap, wmKeyMapItem *kmi)
wmKeyMapItemWM_keymap_verify_item (wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier)
wmKeyMapItemWM_keymap_add_item (wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier)
wmKeyMapItemWM_keymap_add_menu (wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier)
void WM_keymap_remove_item (wmKeyMap *keymap, wmKeyMapItem *kmi)
static void wm_keymap_addon_add (wmKeyMap *keymap, wmKeyMap *addonmap)
static wmKeyMapItemwm_keymap_find_item_equals (wmKeyMap *km, wmKeyMapItem *needle)
static wmKeyMapItemwm_keymap_find_item_equals_result (wmKeyMap *km, wmKeyMapItem *needle)
static void wm_keymap_diff (wmKeyMap *diff_km, wmKeyMap *from_km, wmKeyMap *to_km, wmKeyMap *orig_km, wmKeyMap *addon_km)
static void wm_keymap_patch (wmKeyMap *km, wmKeyMap *diff_km)
static wmKeyMapwm_keymap_patch_update (ListBase *lb, wmKeyMap *defaultmap, wmKeyMap *addonmap, wmKeyMap *usermap)
static void wm_keymap_diff_update (ListBase *lb, wmKeyMap *defaultmap, wmKeyMap *addonmap, wmKeyMap *km)
wmKeyMapWM_keymap_list_find (ListBase *lb, const char *idname, int spaceid, int regionid)
wmKeyMapWM_keymap_find (wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
wmKeyMapWM_keymap_find_all (const bContext *C, const char *idname, int spaceid, int regionid)
wmKeyMapWM_modalkeymap_add (wmKeyConfig *keyconf, const char *idname, EnumPropertyItem *items)
wmKeyMapWM_modalkeymap_get (wmKeyConfig *keyconf, const char *idname)
wmKeyMapItemWM_modalkeymap_add_item (wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value)
void WM_modalkeymap_assign (wmKeyMap *km, const char *opname)
const char * WM_key_event_string (short type)
char * WM_keymap_item_to_string (wmKeyMapItem *kmi, char *str, int len)
static wmKeyMapItemwm_keymap_item_find_handlers (const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext), IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
static wmKeyMapItemwm_keymap_item_find_props (const bContext *C, const char *opname, int opcontext, IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
static wmKeyMapItemwm_keymap_item_find (const bContext *C, const char *opname, int opcontext, IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r)
char * WM_key_event_operator_string (const bContext *C, const char *opname, int opcontext, IDProperty *properties, const short sloppy, char *str, int len)
int WM_key_event_operator_id (const bContext *C, const char *opname, int opcontext, IDProperty *properties, int hotkey, wmKeyMap **keymap_r)
int WM_keymap_item_compare (wmKeyMapItem *k1, wmKeyMapItem *k2)
void WM_keyconfig_update_tag (wmKeyMap *km, wmKeyMapItem *kmi)
static int wm_keymap_test_and_clear_update (wmKeyMap *km)
static wmKeyMapwm_keymap_preset (wmWindowManager *wm, wmKeyMap *km)
void WM_keyconfig_update (wmWindowManager *wm)
wmKeyMapWM_keymap_active (wmWindowManager *wm, wmKeyMap *keymap)
void WM_keymap_restore_item_to_default (bContext *C, wmKeyMap *keymap, wmKeyMapItem *kmi)
void WM_keymap_restore_to_default (wmKeyMap *keymap, bContext *C)
wmKeyMapItemWM_keymap_item_find_id (wmKeyMap *keymap, int id)
wmKeyMapWM_keymap_guess_opname (const bContext *C, const char *opname)

Variables

static int WM_KEYMAP_UPDATE = 0

Detailed Description

Definition in file wm_keymap.c.


Function Documentation

static void keymap_event_set ( wmKeyMapItem kmi,
short  type,
short  val,
int  modifier,
short  keymodifier 
) [static]
static void keymap_item_set_id ( wmKeyMap keymap,
wmKeyMapItem kmi 
) [static]
int WM_key_event_operator_id ( const bContext C,
const char *  opname,
int  opcontext,
IDProperty properties,
int  hotkey,
wmKeyMap **  keymap_r 
)

Definition at line 879 of file wm_keymap.c.

References wmKeyMapItem::id, TRUE, and wm_keymap_item_find().

Referenced by menu_change_shortcut(), remove_shortcut_func(), and ui_but_menu().

char* WM_key_event_operator_string ( const bContext C,
const char *  opname,
int  opcontext,
IDProperty properties,
const short  sloppy,
char *  str,
int  len 
)
const char* WM_key_event_string ( short  type)
static wmKeyConfig* WM_keyconfig_active ( wmWindowManager wm) [static]
void WM_keyconfig_free ( wmKeyConfig keyconf)
static wmKeyConfig* wm_keyconfig_list_find ( ListBase lb,
char *  idname 
) [static]

Definition at line 216 of file wm_keymap.c.

References ListBase::first, wmKeyConfig::idname, KMAP_MAX_NAME, wmKeyConfig::next, and NULL.

Referenced by WM_keyconfig_active().

wmKeyConfig* WM_keyconfig_new ( wmWindowManager wm,
const char *  idname 
)
wmKeyConfig* WM_keyconfig_new_user ( wmWindowManager wm,
const char *  idname 
)

Definition at line 182 of file wm_keymap.c.

References wmKeyConfig::flag, KEYCONF_USER, and WM_keyconfig_new().

void WM_keyconfig_remove ( wmWindowManager wm,
wmKeyConfig keyconf 
)
void WM_keyconfig_set_active ( wmWindowManager wm,
const char *  idname 
)
void WM_keyconfig_update ( wmWindowManager wm)
void WM_keyconfig_update_tag ( wmKeyMap km,
wmKeyMapItem kmi 
)
wmKeyMap* WM_keymap_active ( wmWindowManager wm,
wmKeyMap keymap 
)
wmKeyMapItem* WM_keymap_add_item ( wmKeyMap keymap,
const char *  idname,
int  type,
int  val,
int  modifier,
int  keymodifier 
)
wmKeyMapItem* WM_keymap_add_menu ( wmKeyMap keymap,
const char *  idname,
int  type,
int  val,
int  modifier,
int  keymodifier 
)
static void wm_keymap_addon_add ( wmKeyMap keymap,
wmKeyMap addonmap 
) [static]
static wmKeyMap* wm_keymap_copy ( wmKeyMap keymap) [static]
static void wm_keymap_diff ( wmKeyMap diff_km,
wmKeyMap from_km,
wmKeyMap to_km,
wmKeyMap orig_km,
wmKeyMap addon_km 
) [static]
static wmKeyMapDiffItem* wm_keymap_diff_item_copy ( wmKeyMapDiffItem kmdi) [static]
static void wm_keymap_diff_item_free ( wmKeyMapDiffItem kmdi) [static]
static void wm_keymap_diff_update ( ListBase lb,
wmKeyMap defaultmap,
wmKeyMap addonmap,
wmKeyMap km 
) [static]
wmKeyMap* WM_keymap_find ( wmKeyConfig keyconf,
const char *  idname,
int  spaceid,
int  regionid 
)

Definition at line 638 of file wm_keymap.c.

References BLI_addtail(), wmKeyConfig::keymaps, NULL, WM_keyconfig_update_tag(), WM_keymap_list_find(), and wm_keymap_new().

Referenced by action_channel_area_init(), action_keymap(), action_main_area_init(), buttons_keymap(), buttons_main_area_init(), clip_keymap(), clip_main_area_init(), clip_preview_area_init(), clip_properties_area_init(), console_keymap(), console_main_area_init(), ed_default_handlers(), ED_keymap_anim(), ED_keymap_animchannels(), ED_keymap_armature(), ED_keymap_curve(), ED_keymap_gpencil(), ED_keymap_mesh(), ED_keymap_metaball(), ED_keymap_object(), ED_keymap_paint(), ED_keymap_screen(), ED_keymap_uvedit(), ED_marker_keymap(), ED_region_panels_init(), file_channel_area_init(), file_header_area_init(), file_keymap(), file_main_area_init(), file_ui_area_init(), graph_buttons_area_init(), graph_channel_area_init(), graph_main_area_init(), graphedit_keymap(), image_buttons_area_init(), image_keymap(), image_main_area_init(), image_scope_area_init(), info_keymap(), info_main_area_init(), keymap_particle(), logic_buttons_area_init(), logic_keymap(), logic_main_area_init(), nla_buttons_area_init(), nla_channel_area_init(), nla_keymap(), nla_main_area_init(), node_buttons_area_init(), node_keymap(), node_main_area_init(), outliner_keymap(), outliner_main_area_init(), script_keymap(), script_main_area_init(), sequencer_keymap(), sequencer_main_area_init(), sequencer_preview_area_init(), text_keymap(), text_main_area_init(), time_keymap(), time_main_area_init(), UI_view2d_keymap(), view3d_buttons_area_init(), view3d_header_area_init(), view3d_keymap(), view3d_main_area_init(), view3d_tools_area_init(), WM_modalkeymap_add(), wm_window_add_ghostwindows(), and wm_window_keymap().

wmKeyMap* WM_keymap_find_all ( const bContext C,
const char *  idname,
int  spaceid,
int  regionid 
)
static wmKeyMapItem* wm_keymap_find_item_equals ( wmKeyMap km,
wmKeyMapItem needle 
) [static]
static wmKeyMapItem* wm_keymap_find_item_equals_result ( wmKeyMap km,
wmKeyMapItem needle 
) [static]
void WM_keymap_free ( wmKeyMap keymap)
wmKeyMap* WM_keymap_guess_opname ( const bContext C,
const char *  opname 
)
int WM_keymap_item_compare ( wmKeyMapItem k1,
wmKeyMapItem k2 
)
static wmKeyMapItem* wm_keymap_item_copy ( wmKeyMapItem kmi) [static]
static int wm_keymap_item_equals ( wmKeyMapItem a,
wmKeyMapItem b 
) [static]
static int wm_keymap_item_equals_result ( wmKeyMapItem a,
wmKeyMapItem b 
) [static]
static wmKeyMapItem* wm_keymap_item_find ( const bContext C,
const char *  opname,
int  opcontext,
IDProperty properties,
const short  hotkey,
const short  sloppy,
wmKeyMap **  keymap_r 
) [static]

Definition at line 857 of file wm_keymap.c.

References NULL, and wm_keymap_item_find_props().

Referenced by WM_key_event_operator_id(), and WM_key_event_operator_string().

static wmKeyMapItem* wm_keymap_item_find_handlers ( const bContext C,
ListBase handlers,
const char *  opname,
int   UNUSEDopcontext,
IDProperty properties,
int  compare_props,
int  hotkey,
wmKeyMap **  keymap_r 
) [static]
wmKeyMapItem* WM_keymap_item_find_id ( wmKeyMap keymap,
int  id 
)
static wmKeyMapItem* wm_keymap_item_find_props ( const bContext C,
const char *  opname,
int  opcontext,
IDProperty properties,
int  compare_props,
int  hotkey,
wmKeyMap **  keymap_r 
) [static]
static void wm_keymap_item_free ( wmKeyMapItem kmi) [static]
static void wm_keymap_item_properties_set ( wmKeyMapItem kmi) [static]
char* WM_keymap_item_to_string ( wmKeyMapItem kmi,
char *  str,
int  len 
)
wmKeyMap* WM_keymap_list_find ( ListBase lb,
const char *  idname,
int  spaceid,
int  regionid 
)
static wmKeyMap* wm_keymap_new ( const char *  idname,
int  spaceid,
int  regionid 
) [static]
static void wm_keymap_patch ( wmKeyMap km,
wmKeyMap diff_km 
) [static]
static wmKeyMap* wm_keymap_patch_update ( ListBase lb,
wmKeyMap defaultmap,
wmKeyMap addonmap,
wmKeyMap usermap 
) [static]
static wmKeyMap* wm_keymap_preset ( wmWindowManager wm,
wmKeyMap km 
) [static]
void WM_keymap_properties_reset ( wmKeyMapItem kmi,
struct IDProperty properties 
)
void WM_keymap_remove_item ( wmKeyMap keymap,
wmKeyMapItem kmi 
)
void WM_keymap_restore_item_to_default ( bContext C,
wmKeyMap keymap,
wmKeyMapItem kmi 
)
void WM_keymap_restore_to_default ( wmKeyMap keymap,
bContext C 
)
static int wm_keymap_test_and_clear_update ( wmKeyMap km) [static]
wmKeyMapItem* WM_keymap_verify_item ( wmKeyMap keymap,
const char *  idname,
int  type,
int  val,
int  modifier,
int  keymodifier 
)
wmKeyMap* WM_modalkeymap_add ( wmKeyConfig keyconf,
const char *  idname,
EnumPropertyItem items 
)
wmKeyMapItem* WM_modalkeymap_add_item ( wmKeyMap km,
int  type,
int  val,
int  modifier,
int  keymodifier,
int  value 
)
void WM_modalkeymap_assign ( wmKeyMap km,
const char *  opname 
)
wmKeyMap* WM_modalkeymap_get ( wmKeyConfig keyconf,
const char *  idname 
)

Variable Documentation

int WM_KEYMAP_UPDATE = 0 [static]

Definition at line 936 of file wm_keymap.c.