diff options
Diffstat (limited to 'source/blender/editors/space_api/spacetypes.c')
-rw-r--r-- | source/blender/editors/space_api/spacetypes.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 4fddcb2bfef..33ec7f771ba 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -79,7 +79,7 @@ void ED_spacetypes_init(void) /* UI_UNIT_X is now a variable, is used in some spacetype inits? */ U.widget_unit = 20; - + /* create space types */ ED_spacetype_outliner(); ED_spacetype_view3d(); @@ -123,7 +123,7 @@ void ED_spacetypes_init(void) ED_operatortypes_render(); ED_operatortypes_mask(); ED_operatortypes_io(); - + ED_operatortypes_view2d(); ED_operatortypes_ui(); @@ -223,32 +223,32 @@ void ED_spacetypes_keymap(wmKeyConfig *keyconf) typedef struct RegionDrawCB { struct RegionDrawCB *next, *prev; - + void (*draw)(const struct bContext *, struct ARegion *, void *); void *customdata; - + int type; - + } RegionDrawCB; -void *ED_region_draw_cb_activate(ARegionType *art, +void *ED_region_draw_cb_activate(ARegionType *art, void (*draw)(const struct bContext *, struct ARegion *, void *), void *customdata, int type) { RegionDrawCB *rdc = MEM_callocN(sizeof(RegionDrawCB), "RegionDrawCB"); - + BLI_addtail(&art->drawcalls, rdc); rdc->draw = draw; rdc->customdata = customdata; rdc->type = type; - + return rdc; } void ED_region_draw_cb_exit(ARegionType *art, void *handle) { RegionDrawCB *rdc; - + for (rdc = art->drawcalls.first; rdc; rdc = rdc->next) { if (rdc == (RegionDrawCB *)handle) { BLI_remlink(&art->drawcalls, rdc); @@ -266,7 +266,7 @@ void *ED_region_draw_cb_customdata(void *handle) void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type) { RegionDrawCB *rdc; - + for (rdc = ar->type->drawcalls.first; rdc; rdc = rdc->next) { if (rdc->type == type) { rdc->draw(C, ar, rdc->customdata); @@ -295,17 +295,17 @@ static void xxx_free(SpaceLink *UNUSED(sl)) /* spacetype; init callback for usage, should be redoable */ static void xxx_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) { - + /* link area to SpaceXXX struct */ - + /* define how many regions, the order and types */ - + /* add types to regions */ } static SpaceLink *xxx_duplicate(SpaceLink *UNUSED(sl)) { - + return NULL; } @@ -323,16 +323,16 @@ static void xxx_keymap(wmKeyConfig *UNUSED(keyconf)) void ED_spacetype_xxx(void) { static SpaceType st; - + st.spaceid = SPACE_VIEW3D; - + st.new = xxx_new; st.free = xxx_free; st.init = xxx_init; st.duplicate = xxx_duplicate; st.operatortypes = xxx_operatortypes; st.keymap = xxx_keymap; - + BKE_spacetype_register(&st); } |