Blender  V3.3
wm_gizmo_fn.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
9 #pragma once
10 
11 #include "BLI_compiler_attrs.h"
12 
13 struct wmMsgBus;
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /* wmGizmoGroup */
20 typedef bool (*wmGizmoGroupFnPoll)(const struct bContext *,
22 typedef void (*wmGizmoGroupFnInit)(const struct bContext *, struct wmGizmoGroup *);
23 typedef void (*wmGizmoGroupFnRefresh)(const struct bContext *, struct wmGizmoGroup *);
24 typedef void (*wmGizmoGroupFnDrawPrepare)(const struct bContext *, struct wmGizmoGroup *);
25 typedef void (*wmGizmoGroupFnInvokePrepare)(const struct bContext *,
26  struct wmGizmoGroup *,
27  struct wmGizmo *,
28  const struct wmEvent *);
29 typedef struct wmKeyMap *(*wmGizmoGroupFnSetupKeymap)(const struct wmGizmoGroupType *,
31 typedef void (*wmGizmoGroupFnMsgBusSubscribe)(const struct bContext *,
32  struct wmGizmoGroup *,
33  struct wmMsgBus *);
34 
35 /* wmGizmo */
36 /* See: wmGizmoType for docs on each type. */
37 
38 typedef void (*wmGizmoFnSetup)(struct wmGizmo *);
39 typedef void (*wmGizmoFnDraw)(const struct bContext *, struct wmGizmo *);
40 typedef void (*wmGizmoFnDrawSelect)(const struct bContext *, struct wmGizmo *, int);
41 typedef int (*wmGizmoFnTestSelect)(struct bContext *, struct wmGizmo *, const int mval[2]);
42 typedef int (*wmGizmoFnModal)(struct bContext *,
43  struct wmGizmo *,
44  const struct wmEvent *,
46 typedef void (*wmGizmoFnPropertyUpdate)(struct wmGizmo *, struct wmGizmoProperty *);
47 typedef void (*wmGizmoFnMatrixBasisGet)(const struct wmGizmo *, float[4][4]);
48 typedef int (*wmGizmoFnInvoke)(struct bContext *, struct wmGizmo *, const struct wmEvent *);
49 typedef void (*wmGizmoFnExit)(struct bContext *, struct wmGizmo *, const bool);
50 typedef int (*wmGizmoFnCursorGet)(struct wmGizmo *);
52  struct wmGizmo *,
53  rcti *r_bounding_box) ATTR_WARN_UNUSED_RESULT;
54 typedef void (*wmGizmoFnSelectRefresh)(struct wmGizmo *);
55 typedef void (*wmGizmoFnFree)(struct wmGizmo *);
56 
57 /* wmGizmoProperty ('value' type defined by 'wmGizmoProperty.data_type') */
58 typedef void (*wmGizmoPropertyFnGet)(const struct wmGizmo *,
59  struct wmGizmoProperty *,
60  /* typically 'float *' */
61  void *value);
62 typedef void (*wmGizmoPropertyFnSet)(const struct wmGizmo *,
63  struct wmGizmoProperty *,
64  /* typically 'const float *' */
65  const void *value);
66 typedef void (*wmGizmoPropertyFnRangeGet)(const struct wmGizmo *,
67  struct wmGizmoProperty *,
68  /* typically 'float[2]' */
69  void *range);
70 typedef void (*wmGizmoPropertyFnFree)(const struct wmGizmo *, struct wmGizmoProperty *);
71 
72 typedef struct wmGizmoPropertyFnParams {
77  void *user_data;
79 
80 #ifdef __cplusplus
81 }
82 #endif
#define ATTR_WARN_UNUSED_RESULT
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
SyclQueue void void size_t num_bytes void
wmGizmoPropertyFnGet value_get_fn
Definition: wm_gizmo_fn.h:73
wmGizmoPropertyFnRangeGet range_get_fn
Definition: wm_gizmo_fn.h:75
wmGizmoPropertyFnFree free_fn
Definition: wm_gizmo_fn.h:76
wmGizmoPropertyFnSet value_set_fn
Definition: wm_gizmo_fn.h:74
void(* wmGizmoFnMatrixBasisGet)(const struct wmGizmo *, float[4][4])
Definition: wm_gizmo_fn.h:47
void(* wmGizmoPropertyFnRangeGet)(const struct wmGizmo *, struct wmGizmoProperty *, void *range)
Definition: wm_gizmo_fn.h:66
struct wmGizmoPropertyFnParams wmGizmoPropertyFnParams
int(* wmGizmoFnInvoke)(struct bContext *, struct wmGizmo *, const struct wmEvent *)
Definition: wm_gizmo_fn.h:48
void(* wmGizmoFnSetup)(struct wmGizmo *)
Definition: wm_gizmo_fn.h:38
void(* wmGizmoFnSelectRefresh)(struct wmGizmo *)
Definition: wm_gizmo_fn.h:54
bool(* wmGizmoGroupFnPoll)(const struct bContext *, struct wmGizmoGroupType *) ATTR_WARN_UNUSED_RESULT
Definition: wm_gizmo_fn.h:20
void(* wmGizmoGroupFnDrawPrepare)(const struct bContext *, struct wmGizmoGroup *)
Definition: wm_gizmo_fn.h:24
int(* wmGizmoFnCursorGet)(struct wmGizmo *)
Definition: wm_gizmo_fn.h:50
void(* wmGizmoFnPropertyUpdate)(struct wmGizmo *, struct wmGizmoProperty *)
Definition: wm_gizmo_fn.h:46
int(* wmGizmoFnModal)(struct bContext *, struct wmGizmo *, const struct wmEvent *, eWM_GizmoFlagTweak)
Definition: wm_gizmo_fn.h:42
void(* wmGizmoPropertyFnFree)(const struct wmGizmo *, struct wmGizmoProperty *)
Definition: wm_gizmo_fn.h:70
bool(* wmGizmoFnScreenBoundsGet)(struct bContext *, struct wmGizmo *, rcti *r_bounding_box) ATTR_WARN_UNUSED_RESULT
Definition: wm_gizmo_fn.h:51
void(* wmGizmoFnDrawSelect)(const struct bContext *, struct wmGizmo *, int)
Definition: wm_gizmo_fn.h:40
void(* wmGizmoGroupFnMsgBusSubscribe)(const struct bContext *, struct wmGizmoGroup *, struct wmMsgBus *)
Definition: wm_gizmo_fn.h:31
void(* wmGizmoGroupFnRefresh)(const struct bContext *, struct wmGizmoGroup *)
Definition: wm_gizmo_fn.h:23
void(* wmGizmoPropertyFnSet)(const struct wmGizmo *, struct wmGizmoProperty *, const void *value)
Definition: wm_gizmo_fn.h:62
void(* wmGizmoFnFree)(struct wmGizmo *)
Definition: wm_gizmo_fn.h:55
void(* wmGizmoGroupFnInvokePrepare)(const struct bContext *, struct wmGizmoGroup *, struct wmGizmo *, const struct wmEvent *)
Definition: wm_gizmo_fn.h:25
void(* wmGizmoFnExit)(struct bContext *, struct wmGizmo *, const bool)
Definition: wm_gizmo_fn.h:49
void(* wmGizmoFnDraw)(const struct bContext *, struct wmGizmo *)
Definition: wm_gizmo_fn.h:39
int(* wmGizmoFnTestSelect)(struct bContext *, struct wmGizmo *, const int mval[2])
Definition: wm_gizmo_fn.h:41
void(* wmGizmoPropertyFnGet)(const struct wmGizmo *, struct wmGizmoProperty *, void *value)
Definition: wm_gizmo_fn.h:58
void(* wmGizmoGroupFnInit)(const struct bContext *, struct wmGizmoGroup *)
Definition: wm_gizmo_fn.h:22