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:
authorCampbell Barton <ideasman42@gmail.com>2019-05-28 18:03:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-28 18:05:22 +0300
commit916c2d0e7f31c71082fdadbe35d809c0802b4063 (patch)
tree7abda5f23441caefe8ba75f7d752d471970f317d /source/blender/windowmanager
parente4ac8ab212769b569334d0cd15d4bf04f42cbc89 (diff)
Cleanup: use WM_ prefix for cursor enum
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_types.h10
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c2
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c4
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c10
-rw-r--r--source/blender/windowmanager/intern/wm_operator_type.c8
5 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 00c43450de7..e6e7b7d1577 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -162,12 +162,12 @@ enum {
(1 << 11), /* Need evaluated data (i.e. a valid, up-to-date depsgraph for current context) */
};
-/* Wrap Axis. */
+/** For #WM_cursor_grab_enable wrap axis. */
enum {
- CURSOR_WRAP_NONE = 0,
- CURSOR_WRAP_X,
- CURSOR_WRAP_Y,
- CURSOR_WRAP_XY,
+ WM_CURSOR_WRAP_NONE = 0,
+ WM_CURSOR_WRAP_X,
+ WM_CURSOR_WRAP_Y,
+ WM_CURSOR_WRAP_XY,
};
/* context to call operator in for WM_operator_name_call */
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index ba9d59e82d6..73fae5fd46a 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -1038,7 +1038,7 @@ void wm_gizmomap_modal_set(
gzmap->gzmap_context.modal = gz;
if ((gz->flag & WM_GIZMO_MOVE_CURSOR) && (event->is_motion_absolute == false)) {
- WM_cursor_grab_enable(win, CURSOR_WRAP_XY, true, NULL);
+ WM_cursor_grab_enable(win, WM_CURSOR_WRAP_XY, true, NULL);
copy_v2_v2_int(gzmap->gzmap_context.event_xy, &event->x);
gzmap->gzmap_context.event_grabcursor = win->grabcursor;
}
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index eeea3bf498c..490a05a40d6 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -242,10 +242,10 @@ void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4])
else if (wrap) {
mode = GHOST_kGrabWrap;
- if (wrap == CURSOR_WRAP_X) {
+ if (wrap == WM_CURSOR_WRAP_X) {
mode_axis = GHOST_kAxisX;
}
- if (wrap == CURSOR_WRAP_Y) {
+ if (wrap == WM_CURSOR_WRAP_Y) {
mode_axis = GHOST_kGrabAxisY;
}
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index ac2bf1985d4..198e26aa465 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1469,20 +1469,20 @@ static int wm_operator_invoke(bContext *C,
*/
if (ot->flag & OPTYPE_BLOCKING || (op->opm && op->opm->type->flag & OPTYPE_BLOCKING)) {
int bounds[4] = {-1, -1, -1, -1};
- int wrap = CURSOR_WRAP_NONE;
+ int wrap = WM_CURSOR_WRAP_NONE;
if (event && (U.uiflag & USER_CONTINUOUS_MOUSE)) {
const wmOperator *op_test = op->opm ? op->opm : op;
const wmOperatorType *ot_test = op_test->type;
if ((ot_test->flag & OPTYPE_GRAB_CURSOR_XY) ||
(op_test->flag & OP_IS_MODAL_GRAB_CURSOR)) {
- wrap = CURSOR_WRAP_XY;
+ wrap = WM_CURSOR_WRAP_XY;
}
else if (ot_test->flag & OPTYPE_GRAB_CURSOR_X) {
- wrap = CURSOR_WRAP_X;
+ wrap = WM_CURSOR_WRAP_X;
}
else if (ot_test->flag & OPTYPE_GRAB_CURSOR_Y) {
- wrap = CURSOR_WRAP_Y;
+ wrap = WM_CURSOR_WRAP_Y;
}
}
@@ -1493,7 +1493,7 @@ static int wm_operator_invoke(bContext *C,
/* Wrap only in X for header. */
if (ar && ELEM(ar->regiontype, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, RGN_TYPE_FOOTER)) {
- wrap = CURSOR_WRAP_X;
+ wrap = WM_CURSOR_WRAP_X;
}
if (ar && ar->regiontype == RGN_TYPE_WINDOW &&
diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c
index 7ae28f3f448..69f09162c74 100644
--- a/source/blender/windowmanager/intern/wm_operator_type.c
+++ b/source/blender/windowmanager/intern/wm_operator_type.c
@@ -430,17 +430,17 @@ static int wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event)
* */
if (op->opm->type->flag & OPTYPE_BLOCKING) {
int bounds[4] = {-1, -1, -1, -1};
- int wrap = CURSOR_WRAP_NONE;
+ int wrap = WM_CURSOR_WRAP_NONE;
if ((op->opm->flag & OP_IS_MODAL_GRAB_CURSOR) ||
(op->opm->type->flag & OPTYPE_GRAB_CURSOR_XY)) {
- wrap = CURSOR_WRAP_XY;
+ wrap = WM_CURSOR_WRAP_XY;
}
else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_X) {
- wrap = CURSOR_WRAP_X;
+ wrap = WM_CURSOR_WRAP_X;
}
else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_Y) {
- wrap = CURSOR_WRAP_Y;
+ wrap = WM_CURSOR_WRAP_Y;
}
if (wrap) {