How to use the electron-better-ipc.ipcMain.callRenderer 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 wulkano / kap / main / editor.js View on Github external
editorWindow.on('blur', () => {
    editorEmitter.emit('blur');
    ipc.callRenderer(editorWindow, 'blur');
  });
  editorWindow.on('focus', () => {
github npezza93 / archipelago / app / main / profile-manager.js View on Github external
const disposable = this.configFile.onDidChange('activeProfileId', () => {
      const newValue = this.activeProfile()
      if (oldValue && newValue && oldValue.id !== newValue.id) {
        oldValue = newValue
        for (const window of BrowserWindow.getAllWindows()) {
          ipc.callRenderer(window, 'active-profile-changed', newValue.attributes)
        }

        return callback(newValue)
      }
    })
github npezza93 / archipelago / app / main / windows / search.js View on Github external
    this.callOnWindow(() => ipc.callRenderer(searchWindow, 'search-previous'))
  },
github wulkano / kap / main / export-options.js View on Github external
const updateExportOptions = () => {
  const editors = getEditors();
  const exportOptions = getExportOptions();
  for (const editor of editors) {
    ipc.callRenderer(editor, 'export-options', exportOptions);
  }

  setOptions(exportOptions);
};
github npezza93 / archipelago / app / main / index.js View on Github external
ipc.answerRenderer('search-next', ({query, options}) => {
    ipc.callRenderer(currentTerminalWindow, 'search-next', {query, options})
  })
))
github npezza93 / archipelago / app / main / index.js View on Github external
ipc.answerRenderer('search-previous', ({query, options}) => {
    ipc.callRenderer(currentTerminalWindow, 'search-previous', {query, options})
  })
))
github npezza93 / archipelago / app / main / profile-manager.js View on Github external
ipc.answerRenderer('change-setting', ({property, value}) => {
        this.set(property, value)
        for (const window of BrowserWindow.getAllWindows()) {
          ipc.callRenderer(window, 'setting-changed', {property, value})
        }
      })
    )
github npezza93 / archipelago / app / main / menus / shell.js View on Github external
click(item, focusedWindow) {
          ipc.callRenderer(focusedWindow, 'split', 'horizontal')
        }
      }
github wulkano / kap / main / preferences.js View on Github external
nodeIntegration: true
    }
  });

  const titlebarHeight = 85;
  prefsWindow.setSheetOffset(titlebarHeight);

  prefsWindow.on('close', () => {
    prefsWindow = null;
  });

  loadRoute(prefsWindow, 'preferences');

  await pEvent(prefsWindow.webContents, 'did-finish-load');
  if (options) {
    ipc.callRenderer(prefsWindow, 'options', options);
  }

  ipc.callRenderer(prefsWindow, 'mount');

  return new Promise(resolve => {
    ipc.answerRenderer('preferences-ready', () => {
      prefsWindow.show();
      resolve(prefsWindow);
    });
  });
};
github wulkano / kap / main / common / plugins.js View on Github external
const openConfig = async () => {
          const prefsWindow = await openPrefsWindow();
          ipc.callRenderer(prefsWindow, 'open-plugin-config', name);
        };