Using mainwindow and ipcMain in another file

Hello is there any way to use ipcMain and my mainWindow function in another files?