Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_gesture.c
| Show All 21 Lines | |||||
| * | * | ||||
| * Gestures (cursor motions) creating, evaluating and drawing, shared between operators. | * Gestures (cursor motions) creating, evaluating and drawing, shared between operators. | ||||
| */ | */ | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "DNA_vec_types.h" | #include "DNA_vec_types.h" | ||||
| #include "DNA_windowmanager_types.h" | #include "DNA_windowmanager_types.h" | ||||
| #include <CLG_log.h> | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_bitmap_draw_2d.h" | #include "BLI_bitmap_draw_2d.h" | ||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BLI_lasso_2d.h" | #include "BLI_lasso_2d.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| ▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | if (WM_event_drag_test_with_delta(event, delta)) { | ||||
| } | } | ||||
| else if (theta == -2) { | else if (theta == -2) { | ||||
| val = EVT_GESTURE_S; | val = EVT_GESTURE_S; | ||||
| } | } | ||||
| else if (theta == -3) { | else if (theta == -3) { | ||||
| val = EVT_GESTURE_SW; | val = EVT_GESTURE_SW; | ||||
| } | } | ||||
| #if 0 | |||||
| /* debug */ | /* debug */ | ||||
| if (val == 1) { | if (val == 1) { | ||||
| printf("tweak north\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak north"); | ||||
| } | } | ||||
| if (val == 2) { | else if (val == 2) { | ||||
| printf("tweak north-east\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak north-east"); | ||||
| } | } | ||||
| if (val == 3) { | else if (val == 3) { | ||||
| printf("tweak east\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak east"); | ||||
| } | } | ||||
| if (val == 4) { | else if (val == 4) { | ||||
| printf("tweak south-east\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak south-east"); | ||||
| } | } | ||||
| if (val == 5) { | else if (val == 5) { | ||||
| printf("tweak south\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak south"); | ||||
| } | } | ||||
| if (val == 6) { | else if (val == 6) { | ||||
| printf("tweak south-west\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak south-west"); | ||||
| } | } | ||||
| if (val == 7) { | else if (val == 7) { | ||||
| printf("tweak west\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak west"); | ||||
| } | } | ||||
| if (val == 8) { | else if (val == 8) { | ||||
| printf("tweak north-west\n"); | CLOG_VERBOSE(WM_LOG_EVENTS, 5, "tweak north-west"); | ||||
| } | } | ||||
| #endif | |||||
| return val; | return val; | ||||
| } | } | ||||
| } | } | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| /* ******************* gesture draw ******************* */ | /* ******************* gesture draw ******************* */ | ||||
| ▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines | |||||