17 lines
439 B
TypeScript
17 lines
439 B
TypeScript
import * as electron from 'electron';
|
|
import Q from '../q-module';
|
|
|
|
export default function bindWindowButtonEvents(q: Q): void {
|
|
q.$('#minimize').addEventListener('click', () => {
|
|
electron.ipcRenderer.send('minimize');
|
|
});
|
|
|
|
q.$('#maximize').addEventListener('click', () => {
|
|
electron.ipcRenderer.send('maximize');
|
|
});
|
|
|
|
q.$('#close').addEventListener('click', () => {
|
|
electron.ipcRenderer.send('close');
|
|
});
|
|
}
|