Cheng Zhao
394bf0a8d9
Add BrowserWindow.getFocusedWindow() API.
2013-05-16 23:00:43 +08:00
Cheng Zhao
5c3857790c
Add BrowserWindow.isFocused() API.
2013-05-16 22:56:52 +08:00
Cheng Zhao
eec8abf397
Add Menu.buildFromTemplate API to greatly simplify building menu.
2013-05-16 22:43:58 +08:00
Cheng Zhao
e58f115b43
Make MenuItem's type default to 'submenu' if it has submenu property.
2013-05-16 22:22:33 +08:00
Cheng Zhao
c2f6676c62
Add 'selector' property for MenuItem, which automatically calls first reponder's selector.
2013-05-16 20:53:10 +08:00
Cheng Zhao
fae3137463
Automatically convert menu with tile of 'Window' to Window menu in application menu.
2013-05-16 20:48:09 +08:00
Cheng Zhao
84c320ea7f
setApplicationMenu and sendActionToFirstResponder are Mac only.
2013-05-16 20:31:58 +08:00
Cheng Zhao
4984f30e48
Read menu item's properties in menu's delegate.
2013-05-16 20:06:25 +08:00
Cheng Zhao
84e721188b
Build node-webkit style Menu API arounding the delegate-style Menu API.
2013-05-16 19:34:23 +08:00
Cheng Zhao
faf7280d1f
Add API to SendActionToFirstResponder.
...
It's important to bind application menu items to curtain actions of
first responder, like 'quit', 'minimize', 'copy' etc. This API gives
developers ability to do most of them in javascript.
2013-05-16 17:25:02 +08:00
Cheng Zhao
5d985aae09
Calling delegate methods should pass command id of menu item.
2013-05-16 15:32:37 +08:00
Cheng Zhao
995b9dacc9
Fix titles of submenus in application menu.
2013-05-16 14:39:12 +08:00
Cheng Zhao
937b811c8d
Add Menu.setApplicationMenu API to set main menu of NSApp.
2013-05-16 10:54:37 +08:00
Cheng Zhao
64a8664ffe
Fix places where Window should be BrowserWindow.
2013-05-15 22:17:27 +08:00
Cheng Zhao
072ac8ba0b
Rename 'window' module to 'browser_window' module. Fix #3 .
2013-05-15 19:19:53 +08:00
Cheng Zhao
65c1ec4e94
Prevent submenu from getting destroyed bebore the container menu.
2013-05-14 22:17:25 +08:00
Cheng Zhao
3bcb5b11a4
Set accelerator for menu item by string in delegate.
2013-05-14 21:37:59 +08:00
Cheng Zhao
46c882f0ba
Emit 'execute' event when menu item is clicked.
2013-05-14 20:24:53 +08:00
Cheng Zhao
d8a6c68bf9
Expose Menu's delegate methods in javascript.
2013-05-14 19:26:16 +08:00
Cheng Zhao
9ef9f6bf95
Fix the menu popup on OS X.
2013-05-14 19:25:14 +08:00
Cheng Zhao
d6103dd639
Expose Menu API in javascript.
2013-05-14 19:24:52 +08:00
Cheng Zhao
13c0a05fdd
Add popup method for Menu.
2013-05-14 16:50:56 +08:00
Cheng Zhao
85e22c0709
Expose dialog.showMessageBox API.
2013-05-10 21:19:13 +08:00
Cheng Zhao
34e9132b68
Modify Window API to be more consistent.
...
* '_' becomes '-'
* removes 'position' field
* adds 'center' method.
2013-05-10 20:34:05 +08:00
Cheng Zhao
e6a9add691
Rename atom module to atom_delegate to avoid conflicts with Atom.
2013-05-07 20:33:50 +08:00
Cheng Zhao
ffc0d4f516
Fix whitespace/line_length warnings of cpplint.
2013-05-07 11:43:21 +08:00
Cheng Zhao
dae98fa43f
Expose MenuModel's methods in js.
2013-05-07 00:03:34 +08:00
Cheng Zhao
7cc04035c4
Add Menu API. (WIP)
2013-05-06 20:27:09 +08:00
Cheng Zhao
5915591592
Pass the native window object directly in native dialog API.
2013-05-05 20:36:46 +08:00
Cheng Zhao
67f998357c
Make the CallbacksRegistry a separate module, though rather small.
2013-05-05 20:30:38 +08:00
Cheng Zhao
f725927c44
Use cross-platform callbacks in the dialog API.
2013-05-05 20:24:20 +08:00
Cheng Zhao
ec43f740a7
Add the generialized showMessageBox API.
2013-05-03 21:03:26 +08:00
Cheng Zhao
4aeb5e1388
Add dialog API.
...
Supported APIs:
* openFile
* openMultiFiles
* openFolder
* saveAs
Each API is asynchronous and accepts a callback.
2013-05-03 19:31:24 +08:00
Cheng Zhao
42f10a15d5
URL => Url, ID => Id in coffee script.
2013-05-03 15:36:25 +08:00
Cheng Zhao
9b75019898
Add 'quit' and 'window-all-closed' events for app module.
2013-05-03 10:53:54 +08:00
Cheng Zhao
66404b5f15
Add the 'app' built-in module.
2013-05-03 00:05:09 +08:00
Cheng Zhao
21df63fc9b
Add 'closed' and 'destroyed' event for Window.
2013-05-02 18:19:07 +08:00
Cheng Zhao
afe07521c5
Correctly handle window's lifetime when it's closed.
2013-05-01 23:28:01 +08:00
Cheng Zhao
6c21121001
Avoid using destoryed native objects in js API.
2013-04-29 19:38:18 +08:00
Cheng Zhao
948e50285d
Use camelCase not under_score, I forgot it's coffee script.
2013-04-27 19:13:24 +08:00
Cheng Zhao
cc921fed1e
Add remote.getObject API to get object in browser by it's ID.
2013-04-26 22:25:30 +08:00
Cheng Zhao
bcfec7c8cd
Notify creation and destruction of native objects.
2013-04-25 20:23:00 +08:00
Cheng Zhao
0692776020
No more C++ RecordedObject and ObjectsRegistry code.
...
All RPC API will be implemented in pure javascript.
2013-04-25 15:02:58 +08:00
Cheng Zhao
d723173bc7
Initial RPC API implementation.
...
Basic usage is:
remote = require 'remote'
Window = remote.require 'window'
w = new Window { width: 800, height: 600 }
Still need to do:
* Beter support for Array type.
* Remote objects should cheat devtools.
* Support cross-process callbacks.
2013-04-24 16:43:01 +08:00
Cheng Zhao
1b87a31940
Add ipc.sendSync in renderer.
2013-04-23 21:52:19 +08:00
Cheng Zhao
8f0b2b6363
small tune of IPC interface.
2013-04-23 20:57:14 +08:00
Cheng Zhao
d28f51fb9c
Add getRoutingID and getProcessID for window API.
2013-04-23 17:21:34 +08:00
Cheng Zhao
16244e42e0
Use require('ipc').send to communicate between browser and renderer.
2013-04-23 12:18:07 +08:00
Cheng Zhao
c22d927b6f
Messages from renderer will be emitted to the process object in browser.
2013-04-22 22:24:02 +08:00
Cheng Zhao
66a0abe799
Renderer can now use process.send to send messages to browser.
2013-04-22 21:32:48 +08:00