Groupoid-theoretical methods in the mapping class groups of surfaces