Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Borghetti <bdiego@gmail.com>2008-01-19 20:54:05 +0300
committerDiego Borghetti <bdiego@gmail.com>2008-01-19 20:54:05 +0300
commitb80049a139752fc9074d4d8a74019ccdef36936d (patch)
tree7bb5195ded66d61e210b3fac1b2e9c531f57cf03 /source/blender/windowmanager/WM_types.h
parentd7223cb3aaaa87a9afb0b84874997d57dc9323ae (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/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 195fa3a0063..a0d1bc58ecb 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -32,6 +32,7 @@
#include "wm_cursors.h"
#include "wm_event_types.h"
+#include "wm_gesture_types.h"
/* ************** wmOperatorType ************************ */
@@ -105,9 +106,21 @@ enum {
WM_NOTE_OBJECT_CHANGED,
WM_NOTE_AREA_SPLIT,
WM_NOTE_AREA_DRAG,
+ WM_NOTE_GESTURE_CHANGED,
WM_NOTE_LAST
};
+/* ************** Gesture Manager data ************** */
+typedef struct wmGestureRect {
+ /* always this first!! */
+ wmGesture gesture;
+
+ short x1, x2;
+ short y1, y2;
+} wmGestureRect;
+
+#define GESTURE_RECT 0
+
/* ************** custom wmEvent data ************** */
#define DEV_STYLUS 1
@@ -120,6 +133,10 @@ typedef struct wmTabletData {
float Ytilt; /* as above */
} wmTabletData;
+typedef struct wmBorderSelect {
+ short x1, y1;
+ short x2, y2;
+} wmBorderSelect;
/* *************** migrated stuff, clean later? ******************************** */