diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-08 18:02:57 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-08 18:02:57 +0300 |
commit | 02e23c16dd9e403deb1694829c11d16dc47392ee (patch) | |
tree | f5ec9e3f68bad13137bdeafa326281c74387327e /source/blender/makesdna/DNA_windowmanager_types.h | |
parent | 11e15bf68979670b2257814aa296886222b3ee40 (diff) |
2.5
Part one of wrapping up area/region management.
Read design doc here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/AreaManager
This commit:
- brings keymap storage to WM, based on names/types. This structure
allows rna-ifying it too, so you can browse keymaps etc.
- creating areas and regions works slightly different now, wich
regiontypes stored in areatype.
Todo:
- better callbacks and structure for defining which handlers need to
be added.
- using region types to validate regions
- proper implementation of local region data
- code method for customizing keymaps. Current idea is that you have
to indicate an entire keymap to be custom, to prevent too complicated
merging problems of default and custom maps (like order, multiple keys
for same operator, disabling options, etc).
Diffstat (limited to 'source/blender/makesdna/DNA_windowmanager_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index c67a482ccaa..867007032b6 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -66,13 +66,8 @@ typedef struct wmWindowManager { ListBase reports; /* information and error reports */ - /* custom keymaps */ - ListBase windowkeymap; - ListBase screenkeymap; - ListBase view2dkeymap; - ListBase uikeymap; - ListBase timekeymap; - /* keymaps have to be NULLed in readfile.c */ + /* used keymaps, optionally/partially saved */ + ListBase keymaps; } wmWindowManager; @@ -157,6 +152,19 @@ typedef struct wmKeymapItem { short pad; } wmKeymapItem; +#define KMAP_MAX_NAME 64 + +/* stored in WM, the actively used keymaps */ +typedef struct wmKeyMap { + struct wmKeyMap *next, *prev; + + ListBase keymap; + + char nameid[64]; /* global editor keymaps, or for more per space/region */ + int spaceid; /* same IDs as in DNA_space_types.h */ + int regionid; /* see above */ +} wmKeyMap; + /* this one is the operator itself, stored in files for macros etc */ /* operator + operatortype should be able to redo entirely, but for different contextes */ |