diff options
author | Diego Borghetti <bdiego@gmail.com> | 2008-01-19 20:54:05 +0300 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2008-01-19 20:54:05 +0300 |
commit | b80049a139752fc9074d4d8a74019ccdef36936d (patch) | |
tree | 7bb5195ded66d61e210b3fac1b2e9c531f57cf03 /source/blender/makesdna | |
parent | d7223cb3aaaa87a9afb0b84874997d57dc9323ae (diff) |
New "Gesture Manager" system.
This is a first implementation of the "gesture manager" system,
the idea is put the WM in a automatic draw mode so we can
implement different "Gesture types" to draw different class
of data (lasso, bound box, etc).
The gesture data is passed through the data field of the notifiers,
i think that we can change this to something like:
WM_gesture_init(C, data); /* put the data in the context. */
while() {
/* send WM_NOTE_GESTURE_CHANGED to update screen */
}
/* send event and free the data in the context. */
WM_gesture_end(C);
Also i add a new operator and event to test the gesture manager.
The new operator is the "border select" function, just press BKEY
in the window and LMB or ESCKEY to exit.
In the case of LMB you can see a print in the console about the
BORDERSELECT event.
All this still need a lot of work, comment are welcome.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 85c6bbf9172..7be60470d34 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -54,6 +54,8 @@ typedef struct bScreen { short full, winid; /* winid from WM, starts with 1 */ short do_draw; /* notifier for drawing edges */ short do_refresh; /* notifier for scale screen, changed screen, etc */ + short do_gesture; /* notifier for gesture draw. */ + short pad[3]; short mainwin; /* screensize subwindow, for screenedges and global menus */ short subwinactive; /* active subwindow */ diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index f74cc659645..a16cd0c8366 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -97,7 +97,7 @@ typedef struct wmWindow { ListBase handlers; /* window+screen handlers, overriding all queues */ ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */ - + void *gesture; /* gesture stuff. */ } wmWindow; # |