Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_text_api.c
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | static void rna_Text_write(Text *text, const char *str) | ||||
| WM_main_add_notifier(NC_TEXT | NA_EDITED, text); | WM_main_add_notifier(NC_TEXT | NA_EDITED, text); | ||||
| } | } | ||||
| #else | #else | ||||
| void RNA_api_text(StructRNA *srna) | void RNA_api_text(StructRNA *srna) | ||||
| { | { | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *prop; | PropertyRNA *parm; | ||||
| func = RNA_def_function(srna, "clear", "rna_Text_clear"); | func = RNA_def_function(srna, "clear", "rna_Text_clear"); | ||||
| RNA_def_function_ui_description(func, "clear the text block"); | RNA_def_function_ui_description(func, "clear the text block"); | ||||
| func = RNA_def_function(srna, "write", "rna_Text_write"); | func = RNA_def_function(srna, "write", "rna_Text_write"); | ||||
| RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block"); | RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block"); | ||||
| prop = RNA_def_string(func, "text", "Text", 0, "", "New text for this data-block"); | parm = RNA_def_string(func, "text", "Text", 0, "", "New text for this data-block"); | ||||
| RNA_def_property_flag(prop, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| #endif | #endif | ||||