svn merge ^/trunk/blender -r46612:46629
[blender.git] / source / blender / editors / space_api / spacetypes.c
index 6733d95ad7142ff795030e7429cfc7e147480fb9..fa77249a7a180cad1813f6fab4ef598ca9a34f22 100644 (file)
@@ -71,7 +71,7 @@ void ED_spacetypes_init(void)
        SpaceType *type;
 
        /* UI_UNIT_X is now a variable, is used in some spacetype inits? */
-       U.widget_unit= 20;
+       U.widget_unit = 20;
        
        /* create space types */
        ED_spacetype_outliner();
@@ -119,7 +119,7 @@ void ED_spacetypes_init(void)
        
        /* register operators */
        spacetypes = BKE_spacetypes_list();
-       for (type=spacetypes->first; type; type=type->next) {
+       for (type = spacetypes->first; type; type = type->next) {
                if (type->operatortypes)
                        type->operatortypes();
        }
@@ -139,7 +139,7 @@ void ED_spacetypes_init(void)
        
        /* register dropboxes (can use macros) */
        spacetypes = BKE_spacetypes_list();
-       for (type=spacetypes->first; type; type=type->next) {
+       for (type = spacetypes->first; type; type = type->next) {
                if (type->dropboxes)
                        type->dropboxes();
        }
@@ -173,10 +173,10 @@ void ED_spacetypes_keymap(wmKeyConfig *keyconf)
        UI_view2d_keymap(keyconf);
 
        spacetypes = BKE_spacetypes_list();
-       for (stype=spacetypes->first; stype; stype=stype->next) {
+       for (stype = spacetypes->first; stype; stype = stype->next) {
                if (stype->keymap)
                        stype->keymap(keyconf);
-               for (atype=stype->regiontypes.first; atype; atype=atype->next) {
+               for (atype = stype->regiontypes.first; atype; atype = atype->next) {
                        if (atype->keymap)
                                atype->keymap(keyconf);
                }
@@ -196,15 +196,15 @@ typedef struct RegionDrawCB {
 } RegionDrawCB;
 
 void *ED_region_draw_cb_activate(ARegionType *art, 
-                                                                void   (*draw)(const struct bContext *, struct ARegion *, void *),
-                                                                void *customdata, int type)
+                                 void (*draw)(const struct bContext *, struct ARegion *, void *),
+                                 void *customdata, int type)
 {
-       RegionDrawCB *rdc= MEM_callocN(sizeof(RegionDrawCB), "RegionDrawCB");
+       RegionDrawCB *rdc = MEM_callocN(sizeof(RegionDrawCB), "RegionDrawCB");
        
        BLI_addtail(&art->drawcalls, rdc);
-       rdc->draw= draw;
-       rdc->customdata= customdata;
-       rdc->type= type;
+       rdc->draw = draw;
+       rdc->customdata = customdata;
+       rdc->type = type;
        
        return rdc;
 }
@@ -213,8 +213,8 @@ 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) {
+       for (rdc = art->drawcalls.first; rdc; rdc = rdc->next) {
+               if (rdc == (RegionDrawCB *)handle) {
                        BLI_remlink(&art->drawcalls, rdc);
                        MEM_freeN(rdc);
                        return;
@@ -231,8 +231,8 @@ 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)
+       for (rdc = ar->type->drawcalls.first; rdc; rdc = rdc->next) {
+               if (rdc->type == type)
                        rdc->draw(C, ar, rdc->customdata);
        }               
 }
@@ -287,14 +287,14 @@ void ED_spacetype_xxx(void)
 {
        static SpaceType st;
        
-       st.spaceid= SPACE_VIEW3D;
+       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;
+       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);
 }