diff options
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r-- | source/blender/windowmanager/gizmo/WM_gizmo_types.h | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/gizmo/wm_gizmo_fn.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.h b/source/blender/windowmanager/gizmo/WM_gizmo_types.h index 8f84c02be12..0588fd2b2ce 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_types.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.h @@ -371,6 +371,9 @@ typedef struct wmGizmoType { */ wmGizmoFnMatrixBasisGet matrix_basis_get; + /** Returns screen-space bounding box. Needed for nice tooltip placement. */ + wmGizmoFnScreenBoundsGet screen_bounds_get; + /** Activate a gizmo state when the user clicks on it. */ wmGizmoFnInvoke invoke; diff --git a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h index 418e848e35b..4eea7cc6dcf 100644 --- a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h +++ b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h @@ -59,6 +59,9 @@ 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 *); |