diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-19 21:12:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-19 21:12:16 +0400 |
commit | f1979f45ec3fdfdc1e0faa807ee8c5595dd6b82e (patch) | |
tree | 1e7175a88938a446f01ec0928948111c046c4bca /source/blender/blenkernel/BKE_screen.h | |
parent | adff6aeb1c749183921c0facd373972bbeb874b4 (diff) |
RNA:
* Wrapped HeaderType/Header.
* Some tweaks to get type properties wrapped with less code.
* Made Panel space and region types enum instead of string.
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index fb0c65b3cf9..8ac3b4b0b51 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -37,6 +37,7 @@ struct bContextDataResult; struct bScreen; struct ListBase; struct Panel; +struct Header; struct ScrArea; struct SpaceType; struct wmNotifier; @@ -149,8 +150,8 @@ typedef struct PanelType { char idname[BKE_ST_MAXNAME]; /* unique name */ char label[BKE_ST_MAXNAME]; /* for panel header */ char context[BKE_ST_MAXNAME]; /* for buttons window */ - char space_type[BKE_ST_MAXNAME]; - char region_type[BKE_ST_MAXNAME]; + int space_type; + int region_type; /* verify if the panel should draw or not */ int (*poll)(const struct bContext *, struct PanelType *); @@ -169,14 +170,17 @@ typedef struct PanelType { typedef struct HeaderType { struct HeaderType *next, *prev; - char *idname; /* unique name */ - char *name; /* for UI */ + char idname[BKE_ST_MAXNAME]; /* unique name */ + int space_type; /* draw entirely, view changes should be handled here */ - void (*draw)(const struct bContext *, struct uiLayout *); + void (*draw)(const struct bContext *, struct Header *); /* python integration */ - void *py_data; + void *py_data; + struct StructRNA *py_srna; + int (*py_call)(struct PointerRNA *, struct FunctionRNA *, struct ParameterList *); + void (*py_free)(void *py_data); } HeaderType; /* spacetypes */ |