diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-21 18:30:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-21 18:30:59 +0400 |
commit | 7f55c3b89c67a17d454389815be313b4c66f34b4 (patch) | |
tree | 31f6d8adc536d40c032d4610fad64a8ec80de80c /source/blender/makesdna/DNA_windowmanager_types.h | |
parent | 1f9368b37ec9a418cd8996ffd9ee24f4bd47b2dd (diff) |
RNA read-only wrapped wmEvent so python operators invoke functions
* 2 new enums event_value_items and event_type_items in RNA_enum_types.h
* WM_key_event_string now uses an RNA enum lookup rather then its own switch statement.
* moved wmEvent from WM_types.h into DNA_windowmanager_types.h
* added RNA_enum_identifier and RNA_enum_name to get strings from an enum value.
Diffstat (limited to 'source/blender/makesdna/DNA_windowmanager_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 7d6b5ec8764..e02d2984771 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -222,5 +222,36 @@ typedef enum wmRadialControlMode { WM_RADIALCONTROL_ANGLE } wmRadialControlMode; +/* ************** wmEvent ************************ */ +/* for read-only rna access, dont save this */ + +/* each event should have full modifier state */ +/* event comes from eventmanager and from keymap */ +typedef struct wmEvent { + struct wmEvent *next, *prev; + + short type; /* event code itself (short, is also in keymap) */ + short val; /* press, release, scrollvalue */ + short x, y; /* mouse pointer position, screen coord */ + short mval[2]; /* region mouse position, name convention pre 2.5 :) */ + short prevx, prevy; /* previous mouse pointer position */ + short unicode; /* future, ghost? */ + char ascii; /* from ghost */ + char pad; + + /* modifier states */ + short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */ + short keymodifier; /* rawkey modifier */ + + /* keymap item, set by handler (weak?) */ + const char *keymap_idname; + + /* custom data */ + short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */ + void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */ + short customdatafree; + +} wmEvent; + #endif /* DNA_WINDOWMANAGER_TYPES_H */ |