diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-08 20:40:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-08 20:40:46 +0400 |
commit | 9b3b52dfd6229d5456d818e2b919acae9d6ab47b (patch) | |
tree | 32d2c028986cb56b921da16b5fffbd20ae56a49f /source/blender/makesrna/intern/rna_ui.c | |
parent | 4b2072bec302c9e0b38337eebd0ba9ad9933841a (diff) |
RNA:
* Added the build system code to compile files named
editors/*/*_api.c into the makesrna preprocessing.
The reason to do this is to keep operators and API
close together, but it doesn't fit well with the build
system, especially Makefiles use an ugly hack here.
* Some fixes to pass an RNA AnyType through the API,
this will give a PointerRNA, for use in the interface
code for example.
* Added RNA wrapping of some UI template code as a test.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c new file mode 100644 index 00000000000..8a93fb4a49d --- /dev/null +++ b/source/blender/makesrna/intern/rna_ui.c @@ -0,0 +1,55 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Blender Foundation (2009) + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include <stdlib.h> + +#include "RNA_define.h" +#include "RNA_types.h" + +#include "rna_internal.h" + +#ifdef RNA_RUNTIME + +#include "UI_interface.h" + +#else + +static void rna_def_ui_layout(BlenderRNA *brna) +{ + StructRNA *srna; + + srna= RNA_def_struct(brna, "UILayout", NULL); + RNA_def_struct_sdna(srna, "uiLayout"); + RNA_def_struct_ui_text(srna, "UI Layout", "User interface layout in a panel or header."); + + RNA_api_ui_layout(srna); +} + +void RNA_def_ui(BlenderRNA *brna) +{ + rna_def_ui_layout(brna); +} + +#endif + |