static void *Undo_Do_Playlist( struct Tracker_Windows *window, struct WBlocks *wblock, struct WTracks *wtrack, int realline, void *pointer ){ int *ret = BL_copy(); BL_paste(pointer); BS_UpdateBlockList(); BS_UpdatePlayList(); return ret; }
void *Undo_Do_Block_Insert( struct Tracker_Windows *window, struct WBlocks *wblock, struct WTracks *wtrack, int realline, void *pointer ){ struct Undo_Block_InsertDelete *ubi=(struct Undo_Block_InsertDelete *)pointer; if(ubi->wblock!=NULL){ return Undo_Do_Block_Delete(window,wblock,wtrack,realline,pointer); } ubi->wblock=(struct WBlocks *)ListFindElement1(&window->wblocks->l,ubi->blockpos); DeleteBlock(ubi->blockpos); BL_paste(ubi->playlist); BS_UpdateBlockList(); BS_UpdatePlayList(); return ubi; }
void *Undo_Do_Block_Delete( struct Tracker_Windows *window, struct WBlocks *wblock, struct WTracks *wtrack, int realline, void *pointer ){ struct Undo_Block_InsertDelete *ubi=(struct Undo_Block_InsertDelete *)pointer; if(ubi->wblock==NULL){ return Undo_Do_Block_Insert(window,wblock,wtrack,realline,pointer); } InsertBlock_IncBlockNums(ubi->blockpos); ListAddElement1(&root->song->blocks,&ubi->wblock->block->l); ListAddElement1(&window->wblocks,&ubi->wblock->l); BL_paste(ubi->playlist); BS_UpdateBlockList(); BS_UpdatePlayList(); ubi->wblock=NULL; return ubi; }