From e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 06:17:24 +0200 Subject: ClangFormat: apply to source, most of intern Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat --- source/blender/windowmanager/WM_toolsystem.h | 92 +++++++++++++++++----------- 1 file changed, 55 insertions(+), 37 deletions(-) (limited to 'source/blender/windowmanager/WM_toolsystem.h') diff --git a/source/blender/windowmanager/WM_toolsystem.h b/source/blender/windowmanager/WM_toolsystem.h index 762c25b3f18..5afa0a88560 100644 --- a/source/blender/windowmanager/WM_toolsystem.h +++ b/source/blender/windowmanager/WM_toolsystem.h @@ -41,25 +41,28 @@ struct wmOperatorType; /* wm_toolsystem.c */ -#define WM_TOOLSYSTEM_SPACE_MASK ( \ - (1 << SPACE_IMAGE) | \ - (1 << SPACE_NODE) | \ - (1 << SPACE_VIEW3D) ) +#define WM_TOOLSYSTEM_SPACE_MASK ((1 << SPACE_IMAGE) | (1 << SPACE_NODE) | (1 << SPACE_VIEW3D)) /* Values that define a categoey of active tool. */ -typedef struct bToolKey { int space_type; int mode; } bToolKey; +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_id( - struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey, - const char *name, bool cycle); +bool WM_toolsystem_ref_ensure(struct WorkSpace *workspace, + const bToolKey *tkey, + struct bToolRef **r_tref); +struct bToolRef *WM_toolsystem_ref_set_by_id(struct 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); +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); @@ -69,52 +72,67 @@ 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_ref_set_from_runtime(struct bContext *C, + struct WorkSpace *workspace, + struct bToolRef *tref, + const struct bToolRef_Runtime *tool, + const char *idname); -void WM_toolsystem_ref_sync_from_context( - struct Main *bmain, struct WorkSpace *workspace, struct bToolRef *tref); +void WM_toolsystem_ref_sync_from_context(struct Main *bmain, + struct WorkSpace *workspace, + struct bToolRef *tref); void WM_toolsystem_init(struct bContext *C); -int WM_toolsystem_mode_from_spacetype( - struct ViewLayer *view_layer, struct ScrArea *sa, int space_type); -bool WM_toolsystem_key_from_context( - struct ViewLayer *view_layer, struct ScrArea *sa, bToolKey *tkey); +int WM_toolsystem_mode_from_spacetype(struct ViewLayer *view_layer, + struct ScrArea *sa, + int space_type); +bool WM_toolsystem_key_from_context(struct ViewLayer *view_layer, + struct ScrArea *sa, + bToolKey *tkey); void WM_toolsystem_update_from_context_view3d(struct bContext *C); -void WM_toolsystem_update_from_context( - struct bContext *C, struct WorkSpace *workspace, struct ViewLayer *view_layer, - struct ScrArea *sa); +void WM_toolsystem_update_from_context(struct bContext *C, + struct WorkSpace *workspace, + struct ViewLayer *view_layer, + struct ScrArea *sa); 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); +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_ex( - struct bToolRef *tref, const char *idname, struct StructRNA *type, struct PointerRNA *r_ptr); +void WM_toolsystem_ref_properties_ensure_ex(struct bToolRef *tref, + const char *idname, + struct StructRNA *type, + struct PointerRNA *r_ptr); #define WM_toolsystem_ref_properties_ensure_from_operator(tref, ot, r_ptr) \ - WM_toolsystem_ref_properties_ensure_ex(tref, (ot)->idname, (ot)->srna, r_ptr) + WM_toolsystem_ref_properties_ensure_ex(tref, (ot)->idname, (ot)->srna, r_ptr) #define WM_toolsystem_ref_properties_ensure_from_gizmo_group(tref, gzgroup, r_ptr) \ - WM_toolsystem_ref_properties_ensure_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr) + WM_toolsystem_ref_properties_ensure_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr) -bool WM_toolsystem_ref_properties_get_ex( - struct bToolRef *tref, const char *idname, struct StructRNA *type, struct PointerRNA *r_ptr); +bool WM_toolsystem_ref_properties_get_ex(struct bToolRef *tref, + const char *idname, + struct StructRNA *type, + struct PointerRNA *r_ptr); #define WM_toolsystem_ref_properties_get_from_operator(tref, ot, r_ptr) \ - WM_toolsystem_ref_properties_get_ex(tref, (ot)->idname, (ot)->srna, r_ptr) + WM_toolsystem_ref_properties_get_ex(tref, (ot)->idname, (ot)->srna, r_ptr) #define WM_toolsystem_ref_properties_get_from_gizmo_group(tref, gzgroup, r_ptr) \ - WM_toolsystem_ref_properties_get_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr) + WM_toolsystem_ref_properties_get_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_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_ref_properties_init_for_keymap(struct bToolRef *tref, + struct PointerRNA *dst_ptr, + struct PointerRNA *src_ptr, + struct wmOperatorType *ot); void WM_toolsystem_refresh_active(struct bContext *C); -void WM_toolsystem_refresh_screen_area(struct WorkSpace *workspace, struct ViewLayer *view_layer, struct ScrArea *sa); +void WM_toolsystem_refresh_screen_area(struct WorkSpace *workspace, + struct ViewLayer *view_layer, + struct ScrArea *sa); void WM_toolsystem_refresh_screen_all(struct Main *bmain); #ifdef __cplusplus -- cgit v1.2.3