diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-12 15:01:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-12 15:01:29 +0400 |
commit | a9f6e5438443e6b35db1e22f6c595d31804af9b6 (patch) | |
tree | c196cb64ba0c687bf1ed9f568a710b7ee865b230 /source/blender/makesrna/intern/rna_wm_api.c | |
parent | 68e27b749ec0ebcde549cf2bc442a17f829c87ee (diff) |
style cleanup: mostly whitespace in rna
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm_api.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 9b3634bc8ac..d910ed7900c 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -72,7 +72,7 @@ static int rna_event_modal_handler_add(struct bContext *C, struct wmOperator *op } /* XXX, need a way for python to know event types, 0x0110 is hard coded */ -struct wmTimer *rna_event_timer_add(struct wmWindowManager *wm, float time_step, wmWindow *win) +wmTimer *rna_event_timer_add(struct wmWindowManager *wm, float time_step, wmWindow *win) { return WM_event_add_timer(wm, win, 0x0110, time_step); } @@ -164,15 +164,15 @@ static wmKeyMap *rna_keymap_find_modal(wmKeyConfig *UNUSED(keyconf), const char #else -#define WM_GEN_INVOKE_EVENT (1<<0) -#define WM_GEN_INVOKE_SIZE (1<<1) -#define WM_GEN_INVOKE_RETURN (1<<2) +#define WM_GEN_INVOKE_EVENT (1 << 0) +#define WM_GEN_INVOKE_SIZE (1 << 1) +#define WM_GEN_INVOKE_RETURN (1 << 2) static void rna_generic_op_invoke(FunctionRNA *func, int flag) { PropertyRNA *parm; - RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT); + RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); parm = RNA_def_pointer(func, "operator", "Operator", "", "Operator to call"); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -204,7 +204,7 @@ void RNA_api_wm(StructRNA *srna) rna_generic_op_invoke(func, 0); func = RNA_def_function(srna, "modal_handler_add", "rna_event_modal_handler_add"); - RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT); + RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); parm = RNA_def_pointer(func, "operator", "Operator", "", "Operator to call"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_return(func, RNA_def_boolean(func, "handle", 1, "", "")); @@ -222,18 +222,18 @@ void RNA_api_wm(StructRNA *srna) func = RNA_def_function(srna, "event_timer_remove", "rna_event_timer_remove"); parm = RNA_def_pointer(func, "timer", "Timer", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); /* invoke functions, for use with python */ func = RNA_def_function(srna, "invoke_props_popup", "WM_operator_props_popup"); RNA_def_function_ui_description(func, "Operator popup invoke"); - rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT|WM_GEN_INVOKE_RETURN); + rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT | WM_GEN_INVOKE_RETURN); /* invoked dialog opens popup with OK button, does not auto-exec operator. */ func = RNA_def_function(srna, "invoke_props_dialog", "WM_operator_props_dialog_popup"); RNA_def_function_ui_description(func, "Operator dialog (non-autoexec popup) invoke"); - rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE|WM_GEN_INVOKE_RETURN); + rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE | WM_GEN_INVOKE_RETURN); /* invoke enum */ func = RNA_def_function(srna, "invoke_search_popup", "rna_Operator_enum_search_invoke"); @@ -242,11 +242,11 @@ void RNA_api_wm(StructRNA *srna) /* invoke functions, for use with python */ func = RNA_def_function(srna, "invoke_popup", "WM_operator_ui_popup"); RNA_def_function_ui_description(func, "Operator popup invoke"); - rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE|WM_GEN_INVOKE_RETURN); + rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE | WM_GEN_INVOKE_RETURN); func = RNA_def_function(srna, "invoke_confirm", "WM_operator_confirm"); RNA_def_function_ui_description(func, "Operator confirmation"); - rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT|WM_GEN_INVOKE_RETURN); + rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT | WM_GEN_INVOKE_RETURN); } @@ -268,19 +268,19 @@ void RNA_api_operator(StructRNA *srna) /* poll */ func = RNA_def_function(srna, "poll", NULL); RNA_def_function_ui_description(func, "Test if the operator can be called or not"); - RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER_OPTIONAL); RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", "")); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); /* exec */ func = RNA_def_function(srna, "execute", NULL); RNA_def_function_ui_description(func, "Execute the operator"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - /* better name? */ + /* better name? */ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); @@ -289,7 +289,7 @@ void RNA_api_operator(StructRNA *srna) RNA_def_function_ui_description(func, "Check the operator settings, return True to signal a change to redraw"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); parm = RNA_def_boolean(func, "result", 0, "result", ""); /* better name? */ RNA_def_function_return(func, parm); @@ -299,11 +299,11 @@ void RNA_api_operator(StructRNA *srna) RNA_def_function_ui_description(func, "Invoke the operator"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); parm = RNA_def_pointer(func, "event", "Event", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - /* better name? */ + /* better name? */ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); @@ -311,11 +311,11 @@ void RNA_api_operator(StructRNA *srna) RNA_def_function_ui_description(func, "Modal operator function"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); parm = RNA_def_pointer(func, "event", "Event", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - /* better name? */ + /* better name? */ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); @@ -324,16 +324,16 @@ void RNA_api_operator(StructRNA *srna) RNA_def_function_ui_description(func, "Draw function for the operator"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); /* cancel */ func = RNA_def_function(srna, "cancel", NULL); RNA_def_function_ui_description(func, "Called when the operator is canceled"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - /* better name? */ + /* better name? */ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); } @@ -356,17 +356,17 @@ void RNA_api_macro(StructRNA *srna) /* poll */ func = RNA_def_function(srna, "poll", NULL); RNA_def_function_ui_description(func, "Test if the operator can be called or not"); - RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER_OPTIONAL); RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", "")); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); /* draw */ func = RNA_def_function(srna, "draw", NULL); RNA_def_function_ui_description(func, "Draw function for the operator"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); } void RNA_api_keyconfig(StructRNA *srna) @@ -391,7 +391,7 @@ void RNA_api_keymap(StructRNA *srna) func = RNA_def_function(srna, "restore_item_to_default", "rna_keymap_restore_item_to_default"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); } void RNA_api_keymapitem(StructRNA *srna) |