Blender  V2.59
rna_text_api.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * ***** BEGIN GPL LICENSE BLOCK *****
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software Foundation,
00017  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  *
00019  * Contributor(s): Campbell Barton
00020  *
00021  * ***** END GPL LICENSE BLOCK *****
00022  */
00023 
00029 #include <stdlib.h>
00030 #include <stdio.h>
00031 
00032 
00033 #include "RNA_define.h"
00034 
00035 #ifdef RNA_RUNTIME
00036 
00037 #else
00038 
00039 void RNA_api_text(StructRNA *srna)
00040 {
00041         FunctionRNA *func;
00042         PropertyRNA *prop;
00043 
00044         func= RNA_def_function(srna, "clear", "clear_text");
00045         RNA_def_function_ui_description(func, "clear the text block.");
00046 
00047         func= RNA_def_function(srna, "write", "write_text");
00048         RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block.");
00049         prop= RNA_def_string(func, "text", "Text", 0, "", "New text for this datablock.");
00050         RNA_def_property_flag(prop, PROP_REQUIRED);
00051 }
00052 
00053 #endif