diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-12 05:02:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-12 05:46:29 +0300 |
commit | 8770f3530592d8fa7fea52a37666c2680d553d3a (patch) | |
tree | 8373c022aee33a666b14e1dde6647afc97efdebb /source/blender/editors/interface | |
parent | 5852f97dc245f77a08da1e5dcea13464f25ece2c (diff) |
Cleanup: remove DNA_screen_types.h, use struct qualifier
Also remove draw-manager & depsgraph headers in interface_icons.c
Change this in 2.83 to prevent merge issues in master with
interface_intern.h header.
Diffstat (limited to 'source/blender/editors/interface')
4 files changed, 46 insertions, 34 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index f57c775d432..9f9e04eea82 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -45,10 +45,8 @@ #include "DNA_object_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" -#include "DNA_workspace_types.h" #include "RNA_access.h" -#include "RNA_enum_types.h" #include "BKE_appdir.h" #include "BKE_context.h" @@ -63,10 +61,6 @@ #include "BIF_glutil.h" -#include "DEG_depsgraph.h" - -#include "DRW_engine.h" - #include "ED_datafiles.h" #include "ED_keyframes_draw.h" #include "ED_render.h" diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 51fe990bd02..3ded62dca7f 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -25,6 +25,8 @@ #define __INTERFACE_INTERN_H__ #include "BLI_compiler_attrs.h" +#include "BLI_rect.h" + #include "DNA_listBase.h" #include "RNA_types.h" #include "UI_interface.h" @@ -345,7 +347,7 @@ struct uiBlock { uiBlock *next, *prev; ListBase buttons; - Panel *panel; + struct Panel *panel; uiBlock *oldblock; ListBase butstore; /* UI_butstore_* runtime function */ @@ -477,8 +479,10 @@ extern void ui_window_to_block_rctf(const struct ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src); -extern void ui_window_to_region(const ARegion *region, int *x, int *y); -extern void ui_window_to_region_rcti(const ARegion *region, rcti *rect_dst, const rcti *rct_src); +extern void ui_window_to_region(const struct ARegion *region, int *x, int *y); +extern void ui_window_to_region_rcti(const struct ARegion *region, + rcti *rect_dst, + const rcti *rct_src); extern void ui_region_to_window(const struct ARegion *region, int *x, int *y); extern void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect); @@ -566,7 +570,7 @@ struct uiPopupBlockCreate { int event_xy[2]; /* when popup is initialized from a button */ - ARegion *butregion; + struct ARegion *butregion; uiBut *but; }; @@ -598,8 +602,8 @@ struct uiPopupBlockHandle { /* for operator popups */ struct wmOperator *popup_op; struct wmOperatorType *optype; - ScrArea *ctx_area; - ARegion *ctx_region; + struct ScrArea *ctx_area; + struct ARegion *ctx_region; int opcontext; /* return values */ @@ -648,9 +652,15 @@ ColorPicker *ui_block_colorpicker_create(struct uiBlock *block); /* interface_region_search.c */ /* Searchbox for string button */ -ARegion *ui_searchbox_create_generic(struct bContext *C, struct ARegion *butregion, uiBut *but); -ARegion *ui_searchbox_create_operator(struct bContext *C, struct ARegion *butregion, uiBut *but); -ARegion *ui_searchbox_create_menu(struct bContext *C, struct ARegion *butregion, uiBut *but); +struct ARegion *ui_searchbox_create_generic(struct bContext *C, + struct ARegion *butregion, + uiBut *but); +struct ARegion *ui_searchbox_create_operator(struct bContext *C, + struct ARegion *butregion, + uiBut *but); +struct ARegion *ui_searchbox_create_menu(struct bContext *C, + struct ARegion *butregion, + uiBut *but); bool ui_searchbox_inside(struct ARegion *region, int x, int y); int ui_searchbox_find_index(struct ARegion *region, const char *name); @@ -672,7 +682,7 @@ void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but); uiBlock *ui_popup_block_refresh(struct bContext *C, uiPopupBlockHandle *handle, - ARegion *butregion, + struct ARegion *butregion, uiBut *but); uiPopupBlockHandle *ui_popup_block_create(struct bContext *C, @@ -733,33 +743,33 @@ void ui_draw_but_TAB_outline(const rcti *rect, float rad, uchar highlight[3], uchar highlight_fade[3]); -void ui_draw_but_HISTOGRAM(ARegion *region, +void ui_draw_but_HISTOGRAM(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); -void ui_draw_but_WAVEFORM(ARegion *region, +void ui_draw_but_WAVEFORM(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); -void ui_draw_but_VECTORSCOPE(ARegion *region, +void ui_draw_but_VECTORSCOPE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); void ui_draw_but_COLORBAND(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); void ui_draw_but_UNITVEC(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); -void ui_draw_but_CURVE(ARegion *region, +void ui_draw_but_CURVE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); -void ui_draw_but_CURVEPROFILE(ARegion *region, +void ui_draw_but_CURVEPROFILE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); -void ui_draw_but_IMAGE(ARegion *region, +void ui_draw_but_IMAGE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); -void ui_draw_but_TRACKPREVIEW(ARegion *region, +void ui_draw_but_TRACKPREVIEW(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect); @@ -836,7 +846,10 @@ struct GPUBatch *ui_batch_roundbox_shadow_get(void); void ui_draw_anti_tria_rect(const rctf *rect, char dir, const float color[4]); void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect); -void ui_draw_popover_back(ARegion *region, struct uiStyle *style, uiBlock *block, rcti *rect); +void ui_draw_popover_back(struct ARegion *region, + struct uiStyle *style, + uiBlock *block, + rcti *rect); void ui_draw_pie_center(uiBlock *block); const struct uiWidgetColors *ui_tooltip_get_theme(void); @@ -844,8 +857,11 @@ void ui_draw_widget_menu_back_color(const rcti *rect, bool use_shadow, const flo void ui_draw_widget_menu_back(const rcti *rect, bool use_shadow); void ui_draw_tooltip_background(const struct uiStyle *UNUSED(style), uiBlock *block, rcti *rect); -extern void ui_draw_but( - const struct bContext *C, ARegion *region, struct uiStyle *style, uiBut *but, rcti *rect); +extern void ui_draw_but(const struct bContext *C, + struct ARegion *region, + struct uiStyle *style, + uiBut *but, + rcti *rect); void ui_draw_menu_item(const struct uiFontStyle *fstyle, rcti *rect, @@ -895,8 +911,8 @@ void ui_item_paneltype_func(struct bContext *C, struct uiLayout *layout, void *a /* interface_align.c */ bool ui_but_can_align(const uiBut *but) ATTR_WARN_UNUSED_RESULT; -int ui_but_align_opposite_to_area_align_get(const ARegion *region) ATTR_WARN_UNUSED_RESULT; -void ui_block_align_calc(uiBlock *block, const ARegion *region); +int ui_but_align_opposite_to_area_align_get(const struct ARegion *region) ATTR_WARN_UNUSED_RESULT; +void ui_block_align_calc(uiBlock *block, const struct ARegion *region); /* interface_anim.c */ void ui_but_anim_flag(uiBut *but, float cfra); @@ -973,8 +989,9 @@ bool ui_region_contains_point_px(const struct ARegion *region, int y) ATTR_WARN_UNUSED_RESULT; bool ui_region_contains_rect_px(const struct ARegion *region, const rcti *rect_px); -ARegion *ui_screen_region_find_mouse_over_ex(bScreen *screen, int x, int y); -ARegion *ui_screen_region_find_mouse_over(bScreen *screen, const struct wmEvent *event); +struct ARegion *ui_screen_region_find_mouse_over_ex(struct bScreen *screen, int x, int y); +struct ARegion *ui_screen_region_find_mouse_over(struct bScreen *screen, + const struct wmEvent *event); /* interface_context_menu.c */ bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index d14c9e69e55..e481ec08d72 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -28,7 +28,6 @@ #include "MEM_guardedalloc.h" -#include "DNA_screen_types.h" #include "DNA_userdef_types.h" #include "BLI_listbase.h" diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 2ac84b4b043..ed0f50f4113 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -27,7 +27,6 @@ #include <string.h> #include "DNA_brush_types.h" -#include "DNA_screen_types.h" #include "DNA_userdef_types.h" #include "BLI_math.h" @@ -4616,7 +4615,7 @@ static int widget_roundbox_set(uiBut *but, rcti *rect) * \{ */ /* conversion from old to new buttons, so still messy */ -void ui_draw_but(const bContext *C, ARegion *region, uiStyle *style, uiBut *but, rcti *rect) +void ui_draw_but(const bContext *C, struct ARegion *region, uiStyle *style, uiBut *but, rcti *rect) { bTheme *btheme = UI_GetTheme(); const ThemeUI *tui = &btheme->tui; @@ -5046,7 +5045,10 @@ static void ui_draw_popover_back_impl(const uiWidgetColors *wcol, GPU_blend(false); } -void ui_draw_popover_back(ARegion *region, uiStyle *UNUSED(style), uiBlock *block, rcti *rect) +void ui_draw_popover_back(struct ARegion *region, + uiStyle *UNUSED(style), + uiBlock *block, + rcti *rect) { uiWidgetType *wt = widget_type(UI_WTYPE_MENU_BACK); |