2013-04-15 07:39:54 +00:00
|
|
|
var atom = require('atom');
|
2013-04-23 04:18:07 +00:00
|
|
|
var ipc = require('ipc');
|
2013-04-17 12:05:43 +00:00
|
|
|
var Window = require('window');
|
|
|
|
|
|
|
|
var mainWindow = null;
|
2013-04-15 07:39:54 +00:00
|
|
|
|
2013-04-23 09:21:34 +00:00
|
|
|
// Echo every message back.
|
2013-04-23 04:18:07 +00:00
|
|
|
ipc.on('message', function(process_id, routing_id) {
|
|
|
|
ipc.send.apply(ipc, arguments);
|
2013-04-22 14:24:02 +00:00
|
|
|
});
|
|
|
|
|
2013-04-23 13:52:19 +00:00
|
|
|
ipc.on('sync-message', function(event, process_id, routing_id) {
|
|
|
|
event.result = arguments;
|
|
|
|
});
|
|
|
|
|
2013-04-15 07:39:54 +00:00
|
|
|
atom.browserMainParts.preMainMessageLoopRun = function() {
|
2013-04-17 12:05:43 +00:00
|
|
|
mainWindow = new Window({ width: 800, height: 600 });
|
2013-04-24 08:43:01 +00:00
|
|
|
mainWindow.loadURL('file://' + __dirname + '/index.html');
|
2013-04-18 16:06:10 +00:00
|
|
|
|
2013-04-18 15:50:47 +00:00
|
|
|
mainWindow.on('page-title-updated', function(event, title) {
|
|
|
|
event.preventDefault();
|
|
|
|
|
2013-04-24 08:43:01 +00:00
|
|
|
this.setTitle('Atom Shell - ' + title);
|
2013-04-18 15:50:47 +00:00
|
|
|
});
|
2013-04-15 07:39:54 +00:00
|
|
|
}
|