Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-09-07 22:59:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-07 22:59:28 +0300
commit59eaa9030098b7991c3a8bf01f56fe7f2cf0cd36 (patch)
tree154cc6add00dbffc41828dc5017c802cf87504cb /source/blender/makesrna/intern/rna_screen.c
parent639a916f12039796ad13e2bfee5209bb13a5098b (diff)
Cleanup: move area API into own function
Diffstat (limited to 'source/blender/makesrna/intern/rna_screen.c')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 7ca26ab1c9f..0a997ca2163 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -209,11 +209,21 @@ static void rna_def_area_spaces(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_ui_text(prop, "Active Space", "Space currently being displayed in this area");
}
+static void rna_def_area_api(StructRNA *srna)
+{
+ FunctionRNA *func;
+
+ RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw");
+
+ func = RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
+ RNA_def_function_ui_description(func, "Set the header text");
+ RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
+}
+
static void rna_def_area(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- FunctionRNA *func;
srna = RNA_def_struct(brna, "Area", NULL);
RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor");
@@ -267,11 +277,7 @@ static void rna_def_area(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Height", "Area height");
- RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw");
-
- func = RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
- RNA_def_function_ui_description(func, "Set the header text");
- RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
+ rna_def_area_api(srna);
}
static void rna_def_view2d_api(StructRNA *srna)