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>2021-01-25 05:49:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-25 05:49:32 +0300
commit6623d572aa55591059bbbc60b75d414700763720 (patch)
treea1292e49a784ecdc5cd0bcbf9c5237613c4fd33a /source/blender/windowmanager/gizmo
parent9708aa6341329bac93012de083bfb33c97be5667 (diff)
Cleanup: minor changes and comments to screen_bounds_get access
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r--source/blender/windowmanager/gizmo/WM_gizmo_types.h7
-rw-r--r--source/blender/windowmanager/gizmo/wm_gizmo_fn.h6
2 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.h b/source/blender/windowmanager/gizmo/WM_gizmo_types.h
index 0588fd2b2ce..fd7f9c2de7c 100644
--- a/source/blender/windowmanager/gizmo/WM_gizmo_types.h
+++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.h
@@ -371,7 +371,12 @@ typedef struct wmGizmoType {
*/
wmGizmoFnMatrixBasisGet matrix_basis_get;
- /** Returns screen-space bounding box. Needed for nice tooltip placement. */
+ /**
+ * Returns screen-space bounding box in the window space
+ * (compatible with #wmEvent.x #wmEvent.y).
+ *
+ * Used for tool-tip placement (otherwise the cursor location is used).
+ */
wmGizmoFnScreenBoundsGet screen_bounds_get;
/** Activate a gizmo state when the user clicks on it. */
diff --git a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
index 4eea7cc6dcf..84e6308223f 100644
--- a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
+++ b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
@@ -59,12 +59,12 @@ typedef int (*wmGizmoFnModal)(struct bContext *,
eWM_GizmoFlagTweak);
typedef void (*wmGizmoFnPropertyUpdate)(struct wmGizmo *, struct wmGizmoProperty *);
typedef void (*wmGizmoFnMatrixBasisGet)(const struct wmGizmo *, float[4][4]);
-typedef void (*wmGizmoFnScreenBoundsGet)(struct bContext *,
- struct wmGizmo *,
- rcti *r_bounding_box);
typedef int (*wmGizmoFnInvoke)(struct bContext *, struct wmGizmo *, const struct wmEvent *);
typedef void (*wmGizmoFnExit)(struct bContext *, struct wmGizmo *, const bool);
typedef int (*wmGizmoFnCursorGet)(struct wmGizmo *);
+typedef void (*wmGizmoFnScreenBoundsGet)(struct bContext *,
+ struct wmGizmo *,
+ rcti *r_bounding_box);
typedef void (*wmGizmoFnSelectRefresh)(struct wmGizmo *);
typedef void (*wmGizmoFnFree)(struct wmGizmo *);