Blender V5.3
wm_gizmo_fn.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#pragma once
12
13#include "DNA_windowmanager_enums.h" /* For `wmOperatorStatus`. */
14
15namespace blender {
16
17struct bContext;
18struct rcti;
19struct wmEvent;
20struct wmGizmo;
21struct wmGizmoGroup;
22struct wmGizmoGroupType;
23struct wmGizmoProperty;
24struct wmKeyConfig;
25struct wmKeyMap;
26struct wmMsgBus;
27
28/* #wmGizmoGroup. */
29using wmGizmoGroupFnPoll = bool (*)(const bContext *, wmGizmoGroupType *);
30using wmGizmoGroupFnInit = void (*)(const bContext *, wmGizmoGroup *);
31using wmGizmoGroupFnRefresh = void (*)(const bContext *, wmGizmoGroup *);
32using wmGizmoGroupFnDrawPrepare = void (*)(const bContext *, wmGizmoGroup *);
34using wmGizmoGroupFnInvokePrepare = void (*)(const bContext *,
36 wmGizmo *,
37 const wmEvent *);
40
41/* #wmGizmo. */
42/* See: wmGizmoType for docs on each type. */
43
44using wmGizmoFnSetup = void (*)(wmGizmo *);
45using wmGizmoFnDraw = void (*)(const bContext *, wmGizmo *);
46using wmGizmoFnDrawSelect = void (*)(const bContext *, wmGizmo *, int);
47using wmGizmoFnTestSelect = int (*)(bContext *, wmGizmo *, const int mval[2]);
49 wmGizmo *,
50 const wmEvent *,
53using wmGizmoFnMatrixBasisGet = void (*)(const wmGizmo *, float[4][4]);
55using wmGizmoFnExit = void (*)(bContext *, wmGizmo *, const bool);
56using wmGizmoFnCursorGet = int (*)(wmGizmo *);
57using wmGizmoFnScreenBoundsGet = bool (*)(const bContext *, wmGizmo *, rcti *r_bounding_box);
58using wmGizmoFnSelectRefresh = void (*)(wmGizmo *);
59using wmGizmoFnFree = void (*)(wmGizmo *);
60
61/* #wmGizmoProperty ('value' type defined by 'wmGizmoProperty.data_type'). */
62using wmGizmoPropertyFnGet = void (*)(const wmGizmo *,
64 /* Typically `float *`. */
65 void *value);
66using wmGizmoPropertyFnSet = void (*)(const wmGizmo *,
68 /* Typically `const float *`. */
69 const void *value);
70using wmGizmoPropertyFnRangeGet = void (*)(const wmGizmo *,
72 /* Typically `float[2]`. */
73 void *range);
83 void (*)(wmGizmoProperty *,
84 const FunctionRef<void(PointerRNA &ptr, PropertyRNA *prop, int index)> callback);
85
86using wmGizmoPropertyFnFree = void (*)(const wmGizmo *, wmGizmoProperty *);
87
96
97} // namespace blender
BMesh Iterators.
void(*)(wmGizmo *) wmGizmoFnFree
void(*)(const wmGizmo *, wmGizmoProperty *, void *range) wmGizmoPropertyFnRangeGet
void(*)(const bContext *, wmGizmoGroup *, wmMsgBus *) wmGizmoGroupFnMsgBusSubscribe
void(*)(const wmGizmo *, wmGizmoProperty *, void *value) wmGizmoPropertyFnGet
void(*)(const bContext *, wmGizmo *, int) wmGizmoFnDrawSelect
int(*)(wmGizmo *) wmGizmoFnCursorGet
void(*)(wmGizmo *) wmGizmoFnSetup
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
void(*)(const wmGizmo *, wmGizmoProperty *, const void *value) wmGizmoPropertyFnSet
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnRefresh
bool(*)(const bContext *, wmGizmoGroupType *) wmGizmoGroupFnPoll
void(*)(const bContext *, wmGizmo *) wmGizmoFnDraw
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnInit
void(*)(const bContext *, wmGizmoGroup *, wmGizmo *, const wmEvent *) wmGizmoGroupFnInvokePrepare
int(*)(bContext *, wmGizmo *, const int mval[2]) wmGizmoFnTestSelect
void(*)(const wmGizmo *, wmGizmoProperty *) wmGizmoPropertyFnFree
wmOperatorStatus(*)(bContext *, wmGizmo *, const wmEvent *) wmGizmoFnInvoke
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnDrawPrepare
void(*)(wmGizmo *, wmGizmoProperty *) wmGizmoFnPropertyUpdate
void(*)(bContext *, wmGizmo *, const bool) wmGizmoFnExit
bool(*)(const bContext *, wmGizmo *, rcti *r_bounding_box) wmGizmoFnScreenBoundsGet
void(*)(const wmGizmo *, float[4][4]) wmGizmoFnMatrixBasisGet
void(*)(wmGizmoProperty *, const FunctionRef< void(PointerRNA &ptr, PropertyRNA *prop, int index)> callback) wmGizmoPropertyFnForeachRNAProp
wmOperatorStatus(*)(bContext *, wmGizmo *, const wmEvent *, eWM_GizmoFlagTweak) wmGizmoFnModal
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnDrawBackground
void(*)(wmGizmo *) wmGizmoFnSelectRefresh
wmKeyMap *(*)(const wmGizmoGroupType *, wmKeyConfig *) wmGizmoGroupFnSetupKeymap
wmGizmoPropertyFnSet value_set_fn
wmGizmoPropertyFnRangeGet range_get_fn
wmGizmoPropertyFnGet value_get_fn
wmGizmoPropertyFnFree free_fn
wmGizmoPropertyFnForeachRNAProp foreach_rna_prop_fn