Blender V4.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
11#pragma once
12
13#include "BLI_compiler_attrs.h"
14
15struct wmKeyMap;
16struct wmMsgBus;
17
18/* #wmGizmoGroup. */
19using wmGizmoGroupFnPoll = bool (*)(const bContext *, wmGizmoGroupType *);
20using wmGizmoGroupFnInit = void (*)(const bContext *, wmGizmoGroup *);
21using wmGizmoGroupFnRefresh = void (*)(const bContext *, wmGizmoGroup *);
22using wmGizmoGroupFnDrawPrepare = void (*)(const bContext *, wmGizmoGroup *);
23using wmGizmoGroupFnInvokePrepare = void (*)(const bContext *,
25 wmGizmo *,
26 const wmEvent *);
29
30/* #wmGizmo. */
31/* See: wmGizmoType for docs on each type. */
32
33using wmGizmoFnSetup = void (*)(wmGizmo *);
34using wmGizmoFnDraw = void (*)(const bContext *, wmGizmo *);
35using wmGizmoFnDrawSelect = void (*)(const bContext *, wmGizmo *, int);
36using wmGizmoFnTestSelect = int (*)(bContext *, wmGizmo *, const int mval[2]);
39using wmGizmoFnMatrixBasisGet = void (*)(const wmGizmo *, float[4][4]);
40using wmGizmoFnInvoke = int (*)(bContext *, wmGizmo *, const wmEvent *);
41using wmGizmoFnExit = void (*)(bContext *, wmGizmo *, const bool);
43using wmGizmoFnScreenBoundsGet = bool (*)(bContext *, wmGizmo *, rcti *r_bounding_box);
44using wmGizmoFnSelectRefresh = void (*)(wmGizmo *);
45using wmGizmoFnFree = void (*)(wmGizmo *);
46
47/* #wmGizmoProperty ('value' type defined by 'wmGizmoProperty.data_type'). */
48using wmGizmoPropertyFnGet = void (*)(const wmGizmo *,
50 /* Typically `float *`. */
51 void *value);
52using wmGizmoPropertyFnSet = void (*)(const wmGizmo *,
54 /* Typically `const float *`. */
55 const void *value);
56using wmGizmoPropertyFnRangeGet = void (*)(const wmGizmo *,
58 /* Typically `float[2]`. */
59 void *range);
60using wmGizmoPropertyFnFree = void (*)(const wmGizmo *, wmGizmoProperty *);
61
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
IndexRange range
wmGizmoPropertyFnGet value_get_fn
wmGizmoPropertyFnRangeGet range_get_fn
wmGizmoPropertyFnFree free_fn
wmGizmoPropertyFnSet value_set_fn
int(*)(bContext *, wmGizmo *, const int mval[2]) wmGizmoFnTestSelect
void(*)(wmGizmo *, wmGizmoProperty *) wmGizmoFnPropertyUpdate
void(*)(bContext *, wmGizmo *, const bool) wmGizmoFnExit
void(*)(const bContext *, wmGizmo *) wmGizmoFnDraw
bool(*)(const bContext *, wmGizmoGroupType *) wmGizmoGroupFnPoll
void(*)(const wmGizmo *, wmGizmoProperty *, void *value) wmGizmoPropertyFnGet
void(*)(wmGizmo *) wmGizmoFnSelectRefresh
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnRefresh
void(*)(const wmGizmo *, wmGizmoProperty *, void *range) wmGizmoPropertyFnRangeGet
void(*)(const bContext *, wmGizmoGroup *, wmMsgBus *) wmGizmoGroupFnMsgBusSubscribe
void(*)(wmGizmo *) wmGizmoFnSetup
void(*)(wmGizmo *) wmGizmoFnFree
void(*)(const wmGizmo *, float[4][4]) wmGizmoFnMatrixBasisGet
wmKeyMap *(*)(const wmGizmoGroupType *, wmKeyConfig *) wmGizmoGroupFnSetupKeymap
int(*)(wmGizmo *) wmGizmoFnCursorGet
int(*)(bContext *, wmGizmo *, const wmEvent *, eWM_GizmoFlagTweak) wmGizmoFnModal
void(*)(const wmGizmo *, wmGizmoProperty *, const void *value) wmGizmoPropertyFnSet
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnDrawPrepare
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnInit
void(*)(const bContext *, wmGizmoGroup *, wmGizmo *, const wmEvent *) wmGizmoGroupFnInvokePrepare
bool(*)(bContext *, wmGizmo *, rcti *r_bounding_box) wmGizmoFnScreenBoundsGet
int(*)(bContext *, wmGizmo *, const wmEvent *) wmGizmoFnInvoke
void(*)(const bContext *, wmGizmo *, int) wmGizmoFnDrawSelect
void(*)(const wmGizmo *, wmGizmoProperty *) wmGizmoPropertyFnFree