diff options
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 07cba2bad1c..f9fcbdab55d 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -41,6 +41,7 @@ struct uiLayout; struct wmDrawBuffer; struct wmTimer; struct wmTooltipState; +struct PointerRNA; /* TODO Doing this is quite ugly :) * Once the top-bar is merged bScreen should be refactored to use ScrAreaMap. */ @@ -135,6 +136,15 @@ typedef struct Panel_Runtime { /* For instanced panels: Index of the list item the panel corresponds to. */ int list_index; + + /** + * Pointer for storing which data the panel corresponds to. + * Useful when there can be multiple instances of the same panel type. + * + * \note A panel and its sub-panels share the same custom data pointer. + * This avoids freeing the same pointer twice when panels are removed. + */ + struct PointerRNA *custom_data_ptr; } Panel_Runtime; /** The part from uiBlock that needs saved in file. */ @@ -427,7 +437,7 @@ typedef struct ARegion { /** Private, cached notifier events. */ short do_draw; /** Private, cached notifier events. */ - short do_draw_overlay; + short do_draw_paintcursor; /** Private, set for indicate drawing overlapped. */ short overlap; /** Temporary copy of flag settings for clean fullscreen. */ @@ -609,7 +619,7 @@ enum { /* regiontype, first two are the default set */ /* Do NOT change order, append on end. Types are hardcoded needed */ -enum { +typedef enum eRegionType { RGN_TYPE_WINDOW = 0, RGN_TYPE_HEADER = 1, RGN_TYPE_CHANNELS = 2, @@ -625,7 +635,7 @@ enum { RGN_TYPE_EXECUTE = 10, RGN_TYPE_FOOTER = 11, RGN_TYPE_TOOL_HEADER = 12, -}; +} eRegionType; /* use for function args */ #define RGN_TYPE_ANY -1 |