[Bf-blender-cvs] [8291b6736f6] wm-drag-drop-rewrite: Apply clang-format to changed files
Julian Eisel
noreply at git.blender.org
Tue Nov 19 15:05:06 CET 2019
Commit: 8291b6736f61640cca95302e6ccbba32d46c2b6f
Author: Julian Eisel
Date: Tue Nov 19 15:04:10 2019 +0100
Branches: wm-drag-drop-rewrite
https://developer.blender.org/rB8291b6736f61640cca95302e6ccbba32d46c2b6f
Apply clang-format to changed files
===================================================================
M source/blender/blenkernel/BKE_screen.h
M source/blender/editors/include/UI_interface.h
M source/blender/editors/screen/area.c
M source/blender/editors/space_api/spacetypes.c
M source/blender/editors/space_clip/space_clip.c
M source/blender/editors/space_file/space_file.c
M source/blender/editors/space_image/space_image.c
M source/blender/editors/space_node/space_node.c
M source/blender/editors/space_outliner/outliner_intern.h
M source/blender/editors/space_sequencer/space_sequencer.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/windowmanager/WM_types.h
M source/blender/windowmanager/intern/wm_dragdrop.c
M source/blender/windowmanager/intern/wm_draw.c
M source/blender/windowmanager/wm_event_system.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 9e5f4d67aa0..3d680a68945 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -114,7 +114,10 @@ typedef struct SpaceType {
void (*space_subtype_item_extend)(struct bContext *C, EnumPropertyItem **item, int *totitem);
/* get drop target for data */
- void (*drop_target_find)(struct bContext *C, struct wmDropTargetFinder *finder, struct wmDragData *drag_data, const struct wmEvent *event);
+ void (*drop_target_find)(struct bContext *C,
+ struct wmDropTargetFinder *finder,
+ struct wmDragData *drag_data,
+ const struct wmEvent *event);
/* region type definitions */
ListBase regiontypes;
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 3565a6a9cf7..965544e0018 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -709,7 +709,6 @@ void UI_but_drag_set_value(uiBut *but);
void UI_but_drag_set_image(
uiBut *but, const char *path, int icon, struct ImBuf *ima, float scale, const bool use_free);
-
void UI_but_flag_enable(uiBut *but, int flag);
void UI_but_flag_disable(uiBut *but, int flag);
bool UI_but_flag_is_set(uiBut *but, int flag);
@@ -2325,7 +2324,10 @@ typedef struct uiDragColorHandle {
void ED_operatortypes_ui(void);
void ED_keymap_ui(struct wmKeyConfig *keyconf);
-void UI_drop_target_find(struct bContext *C, struct wmDropTargetFinder *finder, struct wmDragData *drag_data, const struct wmEvent *event);
+void UI_drop_target_find(struct bContext *C,
+ struct wmDropTargetFinder *finder,
+ struct wmDragData *drag_data,
+ const struct wmEvent *event);
bool UI_context_copy_to_selected_list(struct bContext *C,
struct PointerRNA *ptr,
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 1a64712a340..7a6a099775d 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1674,7 +1674,7 @@ static void ed_default_handlers(
WM_event_add_keymap_handler(handlers, keymap_sculpt);
}
- WM_event_ensure_drop_handler(handlers);
+ WM_event_ensure_drop_handler(handlers);
}
void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *area)
@@ -2896,7 +2896,7 @@ void ED_region_info_draw(ARegion *ar,
float fill_color[4],
const bool full_redraw)
{
- ED_region_info_draw_multiline(ar, (const char *[2]){text, NULL}, fill_color, full_redraw);
+ ED_region_info_draw_multiline(ar, (const char * [2]){text, NULL}, fill_color, full_redraw);
}
#define MAX_METADATA_STR 1024
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index f7ea7730c23..65c3808e314 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -172,7 +172,6 @@ void ED_spacemacros_init(void)
ED_operatormacros_sequencer();
ED_operatormacros_paint();
ED_operatormacros_gpencil();
-
}
/* called in wm.c */
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 2bfd21ba814..a595121bf67 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1307,24 +1307,28 @@ static void clip_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID
static void drop_init__open_file(wmDragData *drag_data, PointerRNA *ptr)
{
- const char *path = WM_drag_query_single_path_image_or_movie(drag_data);
- char dir[FILE_MAX], file[FILE_MAX];
- BLI_split_dirfile(path, dir, file, sizeof(dir), sizeof(file));
+ const char *path = WM_drag_query_single_path_image_or_movie(drag_data);
+ char dir[FILE_MAX], file[FILE_MAX];
+ BLI_split_dirfile(path, dir, file, sizeof(dir), sizeof(file));
- RNA_string_set(ptr, "directory", dir);
+ RNA_string_set(ptr, "directory", dir);
- RNA_collection_clear(ptr, "files");
+ RNA_collection_clear(ptr, "files");
- PointerRNA itemptr;
- RNA_collection_add(ptr, "files", &itemptr);
- RNA_string_set(&itemptr, "name", file);
+ PointerRNA itemptr;
+ RNA_collection_add(ptr, "files", &itemptr);
+ RNA_string_set(&itemptr, "name", file);
}
-static void clip_drop_target_find(bContext *UNUSED(C), wmDropTargetFinder *finder, wmDragData *drag_data, const wmEvent *UNUSED(event))
+static void clip_drop_target_find(bContext *UNUSED(C),
+ wmDropTargetFinder *finder,
+ wmDragData *drag_data,
+ const wmEvent *UNUSED(event))
{
- if (WM_drag_query_single_path_image_or_movie(drag_data)) {
- WM_drop_target_propose__template_1(finder, DROP_TARGET_SIZE_AREA, "CLIP_OT_open", "Open File", drop_init__open_file);
- }
+ if (WM_drag_query_single_path_image_or_movie(drag_data)) {
+ WM_drop_target_propose__template_1(
+ finder, DROP_TARGET_SIZE_AREA, "CLIP_OT_open", "Open File", drop_init__open_file);
+ }
}
/* only called once, from space/spacetypes.c */
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 882c6da1fcb..88c81c6209a 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -666,11 +666,18 @@ static void file_ui_region_listener(wmWindow *UNUSED(win),
}
}
-static void file_drop_target_find(bContext *UNUSED(C), wmDropTargetFinder *finder, wmDragData *drag_data, const wmEvent *UNUSED(event))
+static void file_drop_target_find(bContext *UNUSED(C),
+ wmDropTargetFinder *finder,
+ wmDragData *drag_data,
+ const wmEvent *UNUSED(event))
{
- if (WM_drag_query_single_path(drag_data)) {
- WM_drop_target_propose__template_1(finder, DROP_TARGET_SIZE_AREA, "FILE_OT_filepath_drop", "Open", WM_drop_init_single_filepath);
- }
+ if (WM_drag_query_single_path(drag_data)) {
+ WM_drop_target_propose__template_1(finder,
+ DROP_TARGET_SIZE_AREA,
+ "FILE_OT_filepath_drop",
+ "Open",
+ WM_drop_init_single_filepath);
+ }
}
/* only called once, from space/spacetypes.c */
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index dcc804301f9..8ff3b16d795 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -979,11 +979,18 @@ static void image_space_subtype_item_extend(bContext *UNUSED(C),
RNA_enum_items_add(item, totitem, rna_enum_space_image_mode_items);
}
-static void image_drop_target_find(bContext *UNUSED(C), wmDropTargetFinder *finder, wmDragData *drag_data, const wmEvent *UNUSED(event))
+static void image_drop_target_find(bContext *UNUSED(C),
+ wmDropTargetFinder *finder,
+ wmDragData *drag_data,
+ const wmEvent *UNUSED(event))
{
- if (WM_drag_query_single_path_image(drag_data)) {
- WM_drop_target_propose__template_1(finder, DROP_TARGET_SIZE_AREA, "IMAGE_OT_open", "Open Image", WM_drop_init_single_filepath);
- }
+ if (WM_drag_query_single_path_image(drag_data)) {
+ WM_drop_target_propose__template_1(finder,
+ DROP_TARGET_SIZE_AREA,
+ "IMAGE_OT_open",
+ "Open Image",
+ WM_drop_init_single_filepath);
+ }
}
/**************************** spacetype *****************************/
@@ -1011,7 +1018,7 @@ void ED_spacetype_image(void)
st->space_subtype_item_extend = image_space_subtype_item_extend;
st->space_subtype_get = image_space_subtype_get;
st->space_subtype_set = image_space_subtype_set;
- st->drop_target_find = image_drop_target_find;
+ st->drop_target_find = image_drop_target_find;
/* regions: main window */
art = MEM_callocN(sizeof(ARegionType), "spacetype image region");
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index b2e4cd008df..a4a7d78c1ea 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -888,30 +888,33 @@ static void node_space_subtype_item_extend(bContext *C, EnumPropertyItem **item,
static void file_drop_init__file_path(wmDragData *drag_data, PointerRNA *ptr)
{
- RNA_string_set(ptr, "filepath", WM_drag_query_single_path_image_or_movie(drag_data));
- RNA_struct_property_unset(ptr, "name");
+ RNA_string_set(ptr, "filepath", WM_drag_query_single_path_image_or_movie(drag_data));
+ RNA_struct_property_unset(ptr, "name");
}
static void file_drop_init__id_name(wmDragData *drag_data, PointerRNA *ptr)
{
- RNA_string_set(ptr, "name", WM_drag_query_single_id_of_type(drag_data, ID_IM)->name + 2);
- RNA_struct_property_unset(ptr, "filepath");
+ RNA_string_set(ptr, "name", WM_drag_query_single_id_of_type(drag_data, ID_IM)->name + 2);
+ RNA_struct_property_unset(ptr, "filepath");
}
-static void node_drop_target_find(bContext *UNUSED(C), wmDropTargetFinder *finder, wmDragData *drag_data, const wmEvent *UNUSED(event))
+static void node_drop_target_find(bContext *UNUSED(C),
+ wmDropTargetFinder *finder,
+ wmDragData *drag_data,
+ const wmEvent *UNUSED(event))
{
- if (WM_drag_query_single_path_image_or_movie(drag_data)) {
- WM_drop_target_propose__template_1(finder, DROP_TARGET_SIZE_AREA,
- "NODE_OT_add_file", "Load", file_drop_init__file_path);
- }
- if (WM_drag_query_single_id_of_type(drag_data, ID_IM)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list