Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_api/spacetypes.c')
-rw-r--r--source/blender/editors/space_api/spacetypes.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 441ee96e123..45b0fb36ecc 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -77,7 +77,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_time();
@@ -98,7 +98,7 @@ void ED_spacetypes_init(void)
ED_spacetype_userpref();
ED_spacetype_clip();
// ...
-
+
/* register operator types for screen and all spaces */
ED_operatortypes_screen();
ED_operatortypes_anim();
@@ -120,10 +120,10 @@ void ED_spacetypes_init(void)
ED_operatortypes_logic();
ED_operatortypes_mask();
ED_operatortypes_io();
-
+
ED_operatortypes_view2d();
ED_operatortypes_ui();
-
+
/* register operators */
spacetypes = BKE_spacetypes_list();
for (type = spacetypes->first; type; type = type->next) {
@@ -208,32 +208,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);
@@ -251,7 +251,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) {
UI_reinit_gl_state();
@@ -281,17 +281,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;
}
@@ -309,16 +309,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);
}