1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef __WM_TOOLSYSTEM_H__
#define __WM_TOOLSYSTEM_H__
/** \file blender/windowmanager/WM_toolsystem.h
* \ingroup wm
*/
/* dna-savable wmStructs here */
#include "BLI_compiler_attrs.h"
#ifdef __cplusplus
extern "C" {
#endif
struct bContext;
struct bToolRef_Runtime;
struct IDProperty;
struct wmMsgSubscribeKey;
struct wmMsgSubscribeValue;
struct wmOperatorType;
struct PointerRNA;
struct ScrArea;
struct Main;
/* wm_toolsystem.c */
/* Values that define a categoey of active tool. */
typedef struct bToolKey { int space_type; int mode; } bToolKey;
struct bToolRef *WM_toolsystem_ref_from_context(struct bContext *C);
struct bToolRef *WM_toolsystem_ref_find(struct WorkSpace *workspace, const bToolKey *tkey);
bool WM_toolsystem_ref_ensure(
struct WorkSpace *workspace, const bToolKey *tkey,
struct bToolRef **r_tref);
struct bToolRef *WM_toolsystem_ref_set_by_name(
bContext *C, struct WorkSpace *workspace, const bToolKey *tkey,
const char *name, bool cycle);
struct bToolRef_Runtime *WM_toolsystem_runtime_from_context(struct bContext *C);
struct bToolRef_Runtime *WM_toolsystem_runtime_find(struct WorkSpace *workspace, const bToolKey *tkey);
void WM_toolsystem_unlink(struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey);
void WM_toolsystem_refresh(struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey);
void WM_toolsystem_reinit(struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey);
void WM_toolsystem_unlink_all(struct bContext *C, struct WorkSpace *workspace);
void WM_toolsystem_refresh_all(struct bContext *C, struct WorkSpace *workspace);
void WM_toolsystem_reinit_all(struct bContext *C, struct wmWindow *win);
void WM_toolsystem_ref_set_from_runtime(
struct bContext *C, struct WorkSpace *workspace, struct bToolRef *tref,
const struct bToolRef_Runtime *tool, const char *idname);
void WM_toolsystem_init(struct bContext *C);
int WM_toolsystem_mode_from_spacetype(
struct WorkSpace *workspace, struct Scene *scene, struct ScrArea *sa,
int space_type);
bool WM_toolsystem_key_from_context(
struct WorkSpace *workspace, struct Scene *scene, struct ScrArea *sa,
bToolKey *tkey);
void WM_toolsystem_update_from_context(
struct bContext *C,
struct WorkSpace *workspace, struct Scene *scene, struct ScrArea *sa);
void WM_toolsystem_update_from_context_view3d(struct bContext *C);
bool WM_toolsystem_active_tool_is_brush(const struct bContext *C);
void WM_toolsystem_do_msg_notify_tag_refresh(
struct bContext *C, struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val);
struct IDProperty *WM_toolsystem_ref_properties_ensure_idprops(struct bToolRef *tref);
void WM_toolsystem_ref_properties_ensure(struct bToolRef *tref, struct wmOperatorType *ot, struct PointerRNA *ptr);
void WM_toolsystem_ref_properties_init_for_keymap(
struct bToolRef *tref, struct PointerRNA *dst_ptr, struct PointerRNA *src_ptr, struct wmOperatorType *ot);
void WM_toolsystem_refresh_screen_area(struct WorkSpace *workspace, struct Scene *scene, struct ScrArea *sa);
void WM_toolsystem_refresh_screen_all(struct Main *bmain);
#ifdef __cplusplus
}
#endif
#endif /* __WM_TOOLSYSTEM_API_H__ */
|