How to use the electron-better-ipc.ipcRenderer.answerMain function in electron-better-ipc

To help you get started, we’ve selected a few electron-better-ipc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github npezza93 / archipelago / app / renderer / traffic-lights.jsx View on Github external
bindListeners() {
    if (this.props.currentProfile) {
      this.addSubscription(new Disposable(
        ipc.answerMain('setting-changed', ({property, value}) => {
          if (property === 'tabColor') {
            this.setState({backgroundColor: value})
          }
        })
      ))
      this.addSubscription(new Disposable(
        ipc.answerMain('active-profile-changed', () => {
          this.setState({backgroundColor: this.backgroundColor})
        })
      ))
    }
  }
}
github npezza93 / archipelago / app / renderer / visor / visor.jsx View on Github external
bindListeners() {
    this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
    this.addSubscription(new Disposable(ipc.answerMain('close', this.state.tab.kill)))
    this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.resetCssSettings)))
  }
}
github npezza93 / archipelago / app / renderer / app / app.jsx View on Github external
bindListeners() {
    this.addSubscription(
      new Disposable(() => ipc.removeListener('close-via-menu', this.closeViaMenu))
    )
    ipc.on('close-via-menu', this.closeViaMenu)
    this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
    this.addSubscription(new Disposable(ipc.answerMain('new-tab', this.addTab)))
    this.addSubscription(new Disposable(ipc.answerMain('search-next', this.searchNext)))
    this.addSubscription(new Disposable(ipc.answerMain('search-previous', this.searchPrevious)))
    this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.handleActiveProfileChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('close', this.handleClose)))
  }
}
github npezza93 / archipelago / app / renderer / visor / visor.jsx View on Github external
bindListeners() {
    this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
    this.addSubscription(new Disposable(ipc.answerMain('close', this.state.tab.kill)))
    this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.resetCssSettings)))
  }
}
github npezza93 / archipelago / app / renderer / app / tab-list.jsx View on Github external
bindListeners() {
    this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.resetStyles)))
    this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.resetStyles)))
  }
}
github npezza93 / archipelago / app / renderer / app / app.jsx View on Github external
bindListeners() {
    this.addSubscription(
      new Disposable(() => ipc.removeListener('close-via-menu', this.closeViaMenu))
    )
    ipc.on('close-via-menu', this.closeViaMenu)
    this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
    this.addSubscription(new Disposable(ipc.answerMain('new-tab', this.addTab)))
    this.addSubscription(new Disposable(ipc.answerMain('search-next', this.searchNext)))
    this.addSubscription(new Disposable(ipc.answerMain('search-previous', this.searchPrevious)))
    this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.handleActiveProfileChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('close', this.handleClose)))
  }
}
github wulkano / kap / renderer / pages / preferences.js View on Github external
componentDidMount() {
    ipc.answerMain('open-plugin-config', preferencesContainer.openPluginsConfig);
    ipc.answerMain('options', preferencesContainer.setNavigation);
    ipc.answerMain('mount', () => preferencesContainer.mount(this.setOverlay));
  }
github npezza93 / archipelago / app / renderer / app / app.jsx View on Github external
bindListeners() {
    this.addSubscription(
      new Disposable(() => ipc.removeListener('close-via-menu', this.closeViaMenu))
    )
    ipc.on('close-via-menu', this.closeViaMenu)
    this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
    this.addSubscription(new Disposable(ipc.answerMain('new-tab', this.addTab)))
    this.addSubscription(new Disposable(ipc.answerMain('search-next', this.searchNext)))
    this.addSubscription(new Disposable(ipc.answerMain('search-previous', this.searchPrevious)))
    this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.handleActiveProfileChanged)))
    this.addSubscription(new Disposable(ipc.answerMain('close', this.handleClose)))
  }
}
github wulkano / kap / renderer / pages / config.js View on Github external
componentDidMount() {
    ipc.answerMain('plugin', pluginName => {
      configContainer.setPlugin(pluginName);
      this.setState({pluginName: pluginName.replace(/^kap-/, '')});
    });
  }
github wulkano / kap / renderer / pages / preferences.js View on Github external
componentDidMount() {
    ipc.answerMain('open-plugin-config', preferencesContainer.openPluginsConfig);
    ipc.answerMain('options', preferencesContainer.setNavigation);
    ipc.answerMain('mount', () => preferencesContainer.mount(this.setOverlay));
  }