Replace OS X and Mac OS with macOS

This commit is contained in:
Leonard Lamprecht 2016-06-18 15:26:26 +02:00
parent 52350b5e35
commit 67dd19ed0f
157 changed files with 650 additions and 650 deletions

View file

@ -90,7 +90,7 @@ an issue:
* [Source Code Directory Structure](development/source-code-directory-structure.md)
* [Technical Differences to NW.js (formerly node-webkit)](development/atom-shell-vs-node-webkit.md)
* [Build System Overview](development/build-system-overview.md)
* [Build Instructions (OS X)](development/build-instructions-osx.md)
* [Build Instructions (macOS)](development/build-instructions-osx.md)
* [Build Instructions (Windows)](development/build-instructions-windows.md)
* [Build Instructions (Linux)](development/build-instructions-linux.md)
* [Debug Instructions (Windows)](development/debug-instructions-windows.md)

View file

@ -13,14 +13,14 @@ Examples:
## Platform notice
On Linux and Windows, the `Command` key does not have any effect so
use `CommandOrControl` which represents `Command` on OS X and `Control` on
use `CommandOrControl` which represents `Command` on macOS and `Control` on
Linux and Windows to define some accelerators.
Use `Alt` instead of `Option`. The `Option` key only exists on OS X, whereas
Use `Alt` instead of `Option`. The `Option` key only exists on macOS, whereas
the `Alt` key is available on all platforms.
The `Super` key is mapped to the `Windows` key on Windows and Linux and
`Cmd` on OS X.
`Cmd` on macOS.
## Available modifiers

View file

@ -19,7 +19,7 @@ The `app` object emits the following events:
### Event: 'will-finish-launching'
Emitted when the application has finished basic startup. On Windows and Linux,
the `will-finish-launching` event is the same as the `ready` event; on OS X,
the `will-finish-launching` event is the same as the `ready` event; on macOS,
this event represents the `applicationWillFinishLaunching` notification of
`NSApplication`. You would usually set up listeners for the `open-file` and
`open-url` events here, and start the crash reporter and auto updater.
@ -73,7 +73,7 @@ Returns:
Emitted when the application is quitting.
### Event: 'open-file' _OS X_
### Event: 'open-file' _macOS_
Returns:
@ -92,7 +92,7 @@ You should call `event.preventDefault()` if you want to handle this event.
On Windows, you have to parse `process.argv` (in the main process) to get the
filepath.
### Event: 'open-url' _OS X_
### Event: 'open-url' _macOS_
Returns:
@ -104,7 +104,7 @@ must be registered to be opened by your application.
You should call `event.preventDefault()` if you want to handle this event.
### Event: 'activate' _OS X_
### Event: 'activate' _macOS_
Returns:
@ -114,7 +114,7 @@ Returns:
Emitted when the application is activated, which usually happens when the user
clicks on the application's dock icon.
### Event: 'continue-activity' _OS X_
### Event: 'continue-activity' _macOS_
Returns:
@ -314,14 +314,14 @@ app.exit(0)
### `app.focus()`
On Linux, focuses on the first visible window. On OS X, makes the application
On Linux, focuses on the first visible window. On macOS, makes the application
the active app. On Windows, focuses on the application's first window.
### `app.hide()` _OS X_
### `app.hide()` _macOS_
Hides all application windows without minimizing them.
### `app.show()` _OS X_
### `app.show()` _macOS_
Shows application windows after they were hidden. Does not automatically focus
them.
@ -343,7 +343,7 @@ You can request the following paths by the name:
* `appData` Per-user application data directory, which by default points to:
* `%APPDATA%` on Windows
* `$XDG_CONFIG_HOME` or `~/.config` on Linux
* `~/Library/Application Support` on OS X
* `~/Library/Application Support` on macOS
* `userData` The directory for storing your app's configuration files, which by
default it is the `appData` directory appended with your app's name.
* `temp` Temporary directory.
@ -403,20 +403,20 @@ Returns the current application locale.
**Note:** On Windows you have to call it after the `ready` events gets emitted.
### `app.addRecentDocument(path)` _OS X_ _Windows_
### `app.addRecentDocument(path)` _macOS_ _Windows_
* `path` String
Adds `path` to the recent documents list.
This list is managed by the OS. On Windows you can visit the list from the task
bar, and on OS X you can visit it from dock menu.
bar, and on macOS you can visit it from dock menu.
### `app.clearRecentDocuments()` _OS X_ _Windows_
### `app.clearRecentDocuments()` _macOS_ _Windows_
Clears the recent documents list.
### `app.setAsDefaultProtocolClient(protocol)` _OS X_ _Windows_
### `app.setAsDefaultProtocolClient(protocol)` _macOS_ _Windows_
* `protocol` String - The name of your protocol, without `://`. If you want your
app to handle `electron://` links, call this method with `electron` as the
@ -428,31 +428,31 @@ system. Once registered, all links with `your-protocol://` will be opened with
the current executable. The whole link, including protocol, will be passed to
your application as a parameter.
**Note:** On OS X, you can only register protocols that have been added to
**Note:** On macOS, you can only register protocols that have been added to
your app's `info.plist`, which can not be modified at runtime. You can however
change the file with a simple text editor or script during build time.
Please refer to [Apple's documentation][CFBundleURLTypes] for details.
The API uses the Windows Registry and LSSetDefaultHandlerForURLScheme internally.
### `app.removeAsDefaultProtocolClient(protocol)` _OS X_ _Windows_
### `app.removeAsDefaultProtocolClient(protocol)` _macOS_ _Windows_
* `protocol` String - The name of your protocol, without `://`.
This method checks if the current executable as the default handler for a
protocol (aka URI scheme). If so, it will remove the app as the default handler.
### `app.isDefaultProtocolClient(protocol)` _OS X_ _Windows_
### `app.isDefaultProtocolClient(protocol)` _macOS_ _Windows_
* `protocol` String - The name of your protocol, without `://`.
This method checks if the current executable is the default handler for a protocol
(aka URI scheme). If so, it will return true. Otherwise, it will return false.
**Note:** On OS X, you can use this method to check if the app has been
**Note:** On macOS, you can use this method to check if the app has been
registered as the default protocol handler for a protocol. You can also verify
this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the
OS X machine. Please refer to
macOS machine. Please refer to
[Apple's documentation][LSCopyDefaultHandlerForURLScheme] for details.
The API uses the Windows Registry and LSCopyDefaultHandlerForURLScheme internally.
@ -503,7 +503,7 @@ application and your app should continue loading. And returns `true` if your
process has sent its parameters to another instance, and you should immediately
quit.
On OS X the system enforces single instance automatically when users try to open
On macOS the system enforces single instance automatically when users try to open
a second instance of your app in Finder, and the `open-file` and `open-url`
events will be emitted for that. However when users start your app in command
line the system's single instance mechanism will be bypassed and you have to
@ -538,7 +538,7 @@ app.on('ready', () => {
Releases all locks that were created by `makeSingleInstance`. This will allow
multiple instances of the application to once again run side by side.
### `app.setUserActivity(type, userInfo[, webpageURL])` _OS X_
### `app.setUserActivity(type, userInfo[, webpageURL])` _macOS_
* `type` String - Uniquely identifies the activity. Maps to
[`NSUserActivity.activityType`][activity-type].
@ -549,7 +549,7 @@ multiple instances of the application to once again run side by side.
Creates an `NSUserActivity` and sets it as the current activity. The activity
is eligible for [Handoff][handoff] to another device afterward.
### `app.getCurrentActivityType()` _OS X_
### `app.getCurrentActivityType()` _macOS_
Returns the type of the currently running activity.
@ -591,7 +591,7 @@ correctly.
**Note:** This will not affect `process.argv`.
### `app.dock.bounce([type])` _OS X_
### `app.dock.bounce([type])` _macOS_
* `type` String (optional) - Can be `critical` or `informational`. The default is
`informational`
@ -605,43 +605,43 @@ or the request is canceled.
Returns an ID representing the request.
### `app.dock.cancelBounce(id)` _OS X_
### `app.dock.cancelBounce(id)` _macOS_
* `id` Integer
Cancel the bounce of `id`.
### `app.dock.downloadFinished(filePath)` _OS X_
### `app.dock.downloadFinished(filePath)` _macOS_
* `filePath` String
Bounces the Downloads stack if the filePath is inside the Downloads folder.
### `app.dock.setBadge(text)` _OS X_
### `app.dock.setBadge(text)` _macOS_
* `text` String
Sets the string to be displayed in the docks badging area.
### `app.dock.getBadge()` _OS X_
### `app.dock.getBadge()` _macOS_
Returns the badge string of the dock.
### `app.dock.hide()` _OS X_
### `app.dock.hide()` _macOS_
Hides the dock icon.
### `app.dock.show()` _OS X_
### `app.dock.show()` _macOS_
Shows the dock icon.
### `app.dock.setMenu(menu)` _OS X_
### `app.dock.setMenu(menu)` _macOS_
* `menu` [Menu](menu.md)
Sets the application's [dock menu][dock-menu].
### `app.dock.setIcon(image)` _OS X_
### `app.dock.setIcon(image)` _macOS_
* `image` [NativeImage](native-image.md)

View file

@ -20,13 +20,13 @@ application by using one of these projects:
Though `autoUpdater` provides a uniform API for different platforms, there are
still some subtle differences on each platform.
### OS X
### macOS
On OS X, the `autoUpdater` module is built upon [Squirrel.Mac][squirrel-mac],
On macOS, the `autoUpdater` module is built upon [Squirrel.Mac][squirrel-mac],
meaning you don't need any special setup to make it work. For server-side
requirements, you can read [Server Support][server-support].
**Note:** Your application must be signed for automatic updates on Mac OS X.
**Note:** Your application must be signed for automatic updates on macOS.
This is a requirement of `Squirrel.Mac`.
### Windows
@ -42,7 +42,7 @@ The installer generated with Squirrel will create a shortcut icon with an
same ID for your app with `app.setAppUserModelId` API, otherwise Windows will
not be able to pin your app properly in task bar.
The server-side setup is also different from OS X. You can read the documents of
The server-side setup is also different from macOS. You can read the documents of
[Squirrel.Windows][squirrel-windows] to get more details.
### Linux
@ -96,7 +96,7 @@ The `autoUpdater` object has the following methods:
### `autoUpdater.setFeedURL(url[, requestHeaders])`
* `url` String
* `requestHeaders` Object _OS X_ - HTTP request headers.
* `requestHeaders` Object _macOS_ - HTTP request headers.
Sets the `url` and initialize the auto updater.

View file

@ -101,9 +101,9 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
other windows. Default is `false`.
* `fullscreen` Boolean - Whether the window should show in fullscreen. When
explicitly set to `false` the fullscreen button will be hidden or disabled
on OS X. Default is `false`.
on macOS. Default is `false`.
* `fullscreenable` Boolean - Whether the window can be put into fullscreen
mode. On OS X, also whether the maximize/zoom button should toggle full
mode. On macOS, also whether the maximize/zoom button should toggle full
screen mode or maximize window. Default is `true`.
* `skipTaskbar` Boolean - Whether to show the window in taskbar. Default is
`false`.
@ -129,7 +129,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
like `#66CD00` or `#FFF` or `#80FFFFFF` (alpha is supported). Default is
`#FFF` (white).
* `hasShadow` Boolean - Whether window should have a shadow. This is only
implemented on OS X. Default is `true`.
implemented on macOS. Default is `true`.
* `darkTheme` Boolean - Forces using dark theme for the window, only works on
some GTK+3 desktop environments. Default is `false`.
* `transparent` Boolean - Makes the window [transparent](frameless-window.md).
@ -151,7 +151,7 @@ supported values are:
* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
`notification`.
* On OS X, possible types are `desktop`, `textured`.
* On macOS, possible types are `desktop`, `textured`.
* The `textured` type adds metal gradient appearance
(`NSTexturedBackgroundWindowMask`).
* The `desktop` type places the window at the desktop background window level
@ -159,7 +159,7 @@ supported values are:
focus, keyboard or mouse events, but you can use `globalShortcut` to receive
input sparingly.
The `titleBarStyle` option is only supported on OS X 10.10 Yosemite and newer.
The `titleBarStyle` option is only supported on macOS 10.10 Yosemite and newer.
Possible values are:
* `default` or not specified, results in the standard gray opaque Mac title
@ -216,7 +216,7 @@ The `webPreferences` option is an object that can have following properties:
* `directWrite` Boolean - Enables DirectWrite font rendering system on
Windows. Default is `true`.
* `scrollBounce` Boolean - Enables scroll bounce (rubber banding) effect on
OS X. Default is `false`.
macOS. Default is `false`.
* `blinkFeatures` String - A list of feature strings separated by `,`, like
`CSSVariables,KeyboardEventKey` to enable. The full list of supported feature
strings can be found in the [RuntimeEnabledFeatures.in][blink-feature-string]
@ -338,9 +338,9 @@ Emitted when the window is getting resized.
Emitted when the window is getting moved to a new position.
__Note__: On OS X this event is just an alias of `moved`.
__Note__: On macOS this event is just an alias of `moved`.
### Event: 'moved' _OS X_
### Event: 'moved' _macOS_
Emitted once when the window is moved to a new position.
@ -384,15 +384,15 @@ someWindow.on('app-command', (e, cmd) => {
});
```
### Event: 'scroll-touch-begin' _OS X_
### Event: 'scroll-touch-begin' _macOS_
Emitted when scroll wheel event phase has begun.
### Event: 'scroll-touch-end' _OS X_
### Event: 'scroll-touch-end' _macOS_
Emitted when scroll wheel event phase has ended.
### Event: 'swipe' _OS X_
### Event: 'swipe' _macOS_
Returns:
@ -567,7 +567,7 @@ Sets whether the window should be in fullscreen mode.
Returns a boolean, whether the window is in fullscreen mode.
### `win.setAspectRatio(aspectRatio[, extraSize])` _OS X_
### `win.setAspectRatio(aspectRatio[, extraSize])` _macOS_
* `aspectRatio` The aspect ratio we want to maintain for some portion of the
content view.
@ -597,7 +597,7 @@ height areas you have within the overall content view.
* `y` Integer
* `width` Integer
* `height` Integer
* `animate` Boolean (optional) _OS X_
* `animate` Boolean (optional) _macOS_
Resizes and moves the window to `width`, `height`, `x`, `y`.
@ -609,7 +609,7 @@ Returns an object that contains window's width, height, x and y values.
* `width` Integer
* `height` Integer
* `animate` Boolean (optional) _OS X_
* `animate` Boolean (optional) _macOS_
Resizes the window to `width` and `height`.
@ -621,7 +621,7 @@ Returns an array that contains window's width and height.
* `width` Integer
* `height` Integer
* `animate` Boolean (optional) _OS X_
* `animate` Boolean (optional) _macOS_
Resizes the window's client area (e.g. the web page) to `width` and `height`.
@ -661,37 +661,37 @@ Sets whether the window can be manually resized by user.
Returns whether the window can be manually resized by user.
### `win.setMovable(movable)` _OS X_ _Windows_
### `win.setMovable(movable)` _macOS_ _Windows_
* `movable` Boolean
Sets whether the window can be moved by user. On Linux does nothing.
### `win.isMovable()` _OS X_ _Windows_
### `win.isMovable()` _macOS_ _Windows_
Returns whether the window can be moved by user. On Linux always returns
`true`.
### `win.setMinimizable(minimizable)` _OS X_ _Windows_
### `win.setMinimizable(minimizable)` _macOS_ _Windows_
* `minimizable` Boolean
Sets whether the window can be manually minimized by user. On Linux does
nothing.
### `win.isMinimizable()` _OS X_ _Windows_
### `win.isMinimizable()` _macOS_ _Windows_
Returns whether the window can be manually minimized by user. On Linux always
returns `true`.
### `win.setMaximizable(maximizable)` _OS X_ _Windows_
### `win.setMaximizable(maximizable)` _macOS_ _Windows_
* `maximizable` Boolean
Sets whether the window can be manually maximized by user. On Linux does
nothing.
### `win.isMaximizable()` _OS X_ _Windows_
### `win.isMaximizable()` _macOS_ _Windows_
Returns whether the window can be manually maximized by user. On Linux always
returns `true`.
@ -708,13 +708,13 @@ maximizes the window.
Returns whether the maximize/zoom window button toggles fullscreen mode or
maximizes the window.
### `win.setClosable(closable)` _OS X_ _Windows_
### `win.setClosable(closable)` _macOS_ _Windows_
* `closable` Boolean
Sets whether the window can be manually closed by user. On Linux does nothing.
### `win.isClosable()` _OS X_ _Windows_
### `win.isClosable()` _macOS_ _Windows_
Returns whether the window can be manually closed by user. On Linux always
returns `true`.
@ -739,7 +739,7 @@ Moves window to the center of the screen.
* `x` Integer
* `y` Integer
* `animate` Boolean (optional) _OS X_
* `animate` Boolean (optional) _macOS_
Moves window to `x` and `y`.
@ -760,9 +760,9 @@ Returns the title of the native window.
**Note:** The title of web page can be different from the title of the native
window.
### `win.setSheetOffset(offsetY[, offsetX])` _OS X_
### `win.setSheetOffset(offsetY[, offsetX])` _macOS_
Changes the attachment point for sheets on Mac OS X. By default, sheets are
Changes the attachment point for sheets on macOS. By default, sheets are
attached just below the window frame, but you may want to display them beneath
a HTML-rendered toolbar. For example:
@ -797,7 +797,7 @@ Returns whether the window is in kiosk mode.
Returns the platform-specific handle of the window as `Buffer`.
The native type of the handle is `HWND` on Windows, `NSView*` on OS X, and
The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and
`Window` (`unsigned long`) on Linux.
### `win.hookWindowMessage(message, callback)` _Windows_
@ -824,25 +824,25 @@ Unhook the window message.
Unhooks all of the window messages.
### `win.setRepresentedFilename(filename)` _OS X_
### `win.setRepresentedFilename(filename)` _macOS_
* `filename` String
Sets the pathname of the file the window represents, and the icon of the file
will show in window's title bar.
### `win.getRepresentedFilename()` _OS X_
### `win.getRepresentedFilename()` _macOS_
Returns the pathname of the file the window represents.
### `win.setDocumentEdited(edited)` _OS X_
### `win.setDocumentEdited(edited)` _macOS_
* `edited` Boolean
Specifies whether the windows document has been edited, and the icon in title
bar will become gray when set to `true`.
### `win.isDocumentEdited()` _OS X_
### `win.isDocumentEdited()` _macOS_
Whether the window's document has been edited.
@ -903,14 +903,14 @@ screen readers
Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to
convey some sort of application status or to passively notify the user.
### `win.setHasShadow(hasShadow)` _OS X_
### `win.setHasShadow(hasShadow)` _macOS_
* `hasShadow` (Boolean)
Sets whether the window should have a shadow. On Windows and Linux does
nothing.
### `win.hasShadow()` _OS X_
### `win.hasShadow()` _macOS_
Returns whether the window has a shadow. On Windows and Linux always returns
`true`.
@ -951,7 +951,7 @@ The `flags` is an array that can include following `String`s:
button state is drawn. This value is intended for instances where the button
is used in a notification.
### `win.showDefinitionForSelection()` _OS X_
### `win.showDefinitionForSelection()` _macOS_
Same as `webContents.showDefinitionForSelection()`.

View file

@ -42,7 +42,7 @@ The `crash-reporter` module has the following methods:
You are required to call this method before using other `crashReporter`
APIs.
**Note:** On OS X, Electron uses a new `crashpad` client, which is different
**Note:** On macOS, Electron uses a new `crashpad` client, which is different
from `breakpad` on Windows and Linux. To enable the crash collection feature,
you are required to call the `crashReporter.start` API to initialize `crashpad`
in the main process and in each renderer process from which you wish to collect

View file

@ -103,7 +103,7 @@ will be passed via `callback(filename)`
* `cancelId` Integer - The value will be returned when user cancels the dialog
instead of clicking the buttons of the dialog. By default it is the index
of the buttons that have "cancel" or "no" as label, or 0 if there is no such
buttons. On OS X and Windows the index of "Cancel" button will always be
buttons. On macOS and Windows the index of "Cancel" button will always be
used as `cancelId`, not matter whether it is already specified.
* `noLink` Boolean - On Windows Electron will try to figure out which one of
the `buttons` are common buttons (like "Cancel" or "Yes"), and show the
@ -129,7 +129,7 @@ and no GUI dialog will appear.
## Sheets
On Mac OS X, dialogs are presented as sheets attached to a window if you provide
On macOS, dialogs are presented as sheets attached to a window if you provide
a `BrowserWindow` reference in the `browserWindow` parameter, or modals if no
window is provided.

View file

@ -18,9 +18,9 @@ const {BrowserWindow} = require('electron')
let win = new BrowserWindow({width: 800, height: 600, frame: false})
```
### Alternatives on OS X
### Alternatives on macOS
On Mac OS X 10.10 Yosemite and newer, there's an alternative way to specify
On macOS 10.10 Yosemite and newer, there's an alternative way to specify
a chromeless window. Instead of setting `frame` to `false` which disables
both the titlebar and window controls, you may want to have the title bar
hidden and your content extend to the full window size, yet still preserve

View file

@ -52,7 +52,7 @@ The `role` property can have following values:
* `minimize` - Minimize current window
* `close` - Close current window
On OS X `role` can also have following additional values:
On macOS `role` can also have following additional values:
* `about` - Map to the `orderFrontStandardAboutPanel` action
* `hide` - Map to the `hide` action
@ -64,7 +64,7 @@ On OS X `role` can also have following additional values:
* `help` - The submenu is a "Help" menu
* `services` - The submenu is a "Services" menu
When specifying `role` on OS X, `label` and `accelerator` are the only options
When specifying `role` on macOS, `label` and `accelerator` are the only options
that will affect the MenuItem. All other options will be ignored.
## Instance Properties

View file

@ -226,7 +226,7 @@ The `menu` class has the following methods:
* `menu` Menu
Sets `menu` as the application menu on OS X. On Windows and Linux, the `menu`
Sets `menu` as the application menu on macOS. On Windows and Linux, the `menu`
will be set as each window's top menu.
**Note:** This API has to be called after the `ready` event of `app` module.
@ -235,7 +235,7 @@ will be set as each window's top menu.
Returns the application menu (an instance of `Menu`), if set, or `null`, if not set.
### `Menu.sendActionToFirstResponder(action)` _OS X_
### `Menu.sendActionToFirstResponder(action)` _macOS_
* `action` String
@ -243,8 +243,8 @@ Sends the `action` to the first responder of application. This is used for
emulating default Cocoa menu behaviors, usually you would just use the
`role` property of `MenuItem`.
See the [OS X Cocoa Event Handling Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-SW7)
for more information on OS X's native actions.
See the [macOS Cocoa Event Handling Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-SW7)
for more information on macOS's native actions.
### `Menu.buildFromTemplate(template)`
@ -265,7 +265,7 @@ The `menu` object has the following instance methods:
* `browserWindow` BrowserWindow (optional) - Default is `null`.
* `x` Number (optional) - Default is -1.
* `y` Number (**required** if `x` is used) - Default is -1.
* `positioningItem` Number (optional) _OS X_ - The index of the menu item to
* `positioningItem` Number (optional) _macOS_ - The index of the menu item to
be positioned under the mouse cursor at the specified coordinates. Default is
-1.
@ -294,14 +294,14 @@ Inserts the `menuItem` to the `pos` position of the menu.
Get an array containing the menu's items.
## Notes on OS X Application Menu
## Notes on macOS Application Menu
OS X has a completely different style of application menu from Windows and
macOS has a completely different style of application menu from Windows and
Linux, here are some notes on making your app's menu more native-like.
### Standard Menus
On OS X there are many system defined standard menus, like the `Services` and
On macOS there are many system defined standard menus, like the `Services` and
`Windows` menus. To make your menu a standard menu, you should set your menu's
`role` to one of following and Electron will recognize them and make them
become standard menus:
@ -312,13 +312,13 @@ become standard menus:
### Standard Menu Item Actions
OS X has provided standard actions for some menu items, like `About xxx`,
macOS has provided standard actions for some menu items, like `About xxx`,
`Hide xxx`, and `Hide Others`. To set the action of a menu item to a standard
action, you should set the `role` attribute of the menu item.
### Main Menu's Name
On OS X the label of application menu's first item is always your app's name,
On macOS the label of application menu's first item is always your app's name,
no matter what label you set. To change it you have to change your app's name
by modifying your app bundle's `Info.plist` file. See [About Information
Property List Files][AboutInformationPropertyListFiles] for more information.

View file

@ -81,7 +81,7 @@ mixed with other content to create the desired final appearance.
The most common case is to use template images for a menu bar icon so it can
adapt to both light and dark menu bars.
**Note:** Template image is only supported on OS X.
**Note:** Template image is only supported on macOS.
To mark an image as a template image, its filename should end with the word
`Template`. For example:
@ -141,10 +141,10 @@ Returns a [Buffer][buffer] that contains the image's `JPEG` encoded data.
Returns the data URL of the image.
### `image.getNativeHandle()` _OS X_
### `image.getNativeHandle()` _macOS_
Returns a [Buffer][buffer] that stores C pointer to underlying native handle of
the image. On OS X, a pointer to `NSImage` instance would be returned.
the image. On macOS, a pointer to `NSImage` instance would be returned.
Notice that the returned pointer is a weak pointer to the underlying native
image instead of a copy, so you _must_ ensure that the associated

View file

@ -74,7 +74,7 @@ Causes the main thread of the current process crash.
Causes the main thread of the current process hang.
### `process.setFdLimit(maxDescriptors)` _OS X_ _Linux_
### `process.setFdLimit(maxDescriptors)` _macOS_ _Linux_
* `maxDescriptors` Integer

View file

@ -31,7 +31,7 @@ Open the given file in the desktop's default manner.
### `shell.openExternal(url[, options])`
* `url` String
* `options` Object (optional) _OS X_
* `options` Object (optional) _macOS_
* `activate` Boolean - `true` to bring the opened application to the
foreground. The default is `true`.

View file

@ -4,16 +4,16 @@
## Methods
### `systemPreferences.isDarkMode()` _OS X_
### `systemPreferences.isDarkMode()` _macOS_
This method returns `true` if the system is in Dark Mode, and `false` otherwise.
### `systemPreferences.subscribeNotification(event, callback)` _OS X_
### `systemPreferences.subscribeNotification(event, callback)` _macOS_
* `event` String
* `callback` Function
Subscribes to native notifications of OS X, `callback` will be called with
Subscribes to native notifications of macOS, `callback` will be called with
`callback(event, userInfo)` when the corresponding `event` happens. The
`userInfo` is an Object that contains the user information dictionary sent
along with the notification.
@ -29,13 +29,13 @@ example values of `event` are:
* `AppleColorPreferencesChangedNotification`
* `AppleShowScrollBarsSettingChanged`
### `systemPreferences.unsubscribeNotification(id)` _OS X_
### `systemPreferences.unsubscribeNotification(id)` _macOS_
* `id` Integer
Removes the subscriber with `id`.
### `systemPreferences.getUserDefault(key, type)` _OS X_
### `systemPreferences.getUserDefault(key, type)` _macOS_
* `key` String
* `type` String - Can be `string`, `boolean`, `integer`, `float`, `double`,
@ -43,7 +43,7 @@ Removes the subscriber with `id`.
Get the value of `key` in system preferences.
This API reads from `NSUserDefaults` on OS X, some popular `key` and `type`s
This API reads from `NSUserDefaults` on macOS, some popular `key` and `type`s
are:
* `AppleInterfaceStyle: string`

View file

@ -71,9 +71,9 @@ labeled as such.
Emitted when the tray icon is clicked.
**Note:** The `bounds` payload is only implemented on OS X and Windows.
**Note:** The `bounds` payload is only implemented on macOS and Windows.
### Event: 'right-click' _OS X_ _Windows_
### Event: 'right-click' _macOS_ _Windows_
* `event` Event
* `altKey` Boolean
@ -88,7 +88,7 @@ Emitted when the tray icon is clicked.
Emitted when the tray icon is right clicked.
### Event: 'double-click' _OS X_ _Windows_
### Event: 'double-click' _macOS_ _Windows_
* `event` Event
* `altKey` Boolean
@ -116,26 +116,26 @@ Emitted when the tray balloon is clicked.
Emitted when the tray balloon is closed because of timeout or user manually
closes it.
### Event: 'drop' _OS X_
### Event: 'drop' _macOS_
Emitted when any dragged items are dropped on the tray icon.
### Event: 'drop-files' _OS X_
### Event: 'drop-files' _macOS_
* `event`
* `files` Array - the file path of dropped files.
Emitted when dragged files are dropped in the tray icon.
### Event: 'drag-enter' _OS X_
### Event: 'drag-enter' _macOS_
Emitted when a drag operation enters the tray icon.
### Event: 'drag-leave' _OS X_
### Event: 'drag-leave' _macOS_
Emitted when a drag operation exits the tray icon.
### Event: 'drag-end' _OS X_
### Event: 'drag-end' _macOS_
Emitted when a drag operation ends on the tray or ends at another location.
@ -156,11 +156,11 @@ Destroys the tray icon immediately.
Sets the `image` associated with this tray icon.
### `Tray.setPressedImage(image)` _OS X_
### `Tray.setPressedImage(image)` _macOS_
* `image` [NativeImage](native-image.md)
Sets the `image` associated with this tray icon when pressed on OS X.
Sets the `image` associated with this tray icon when pressed on macOS.
### `Tray.setToolTip(toolTip)`
@ -168,13 +168,13 @@ Sets the `image` associated with this tray icon when pressed on OS X.
Sets the hover text for this tray icon.
### `Tray.setTitle(title)` _OS X_
### `Tray.setTitle(title)` _macOS_
* `title` String
Sets the title displayed aside of the tray icon in the status bar.
### `Tray.setHighlightMode(highlight)` _OS X_
### `Tray.setHighlightMode(highlight)` _macOS_
* `highlight` Boolean
@ -190,7 +190,7 @@ when the tray icon is clicked. Defaults to true.
Displays a tray balloon.
### `Tray.popUpContextMenu([menu, position])` _OS X_ _Windows_
### `Tray.popUpContextMenu([menu, position])` _macOS_ _Windows_
* `menu` Menu (optional)
* `position` Object (optional) - The pop up position.

View file

@ -957,7 +957,7 @@ win.webContents.on('did-finish-load', () => {
});
```
### `webContents.showDefinitionForSelection()` _OS X_
### `webContents.showDefinitionForSelection()` _macOS_
Shows pop-up dictionary that searches the selected word on the page.

View file

@ -490,7 +490,7 @@ Sends an input `event` to the page.
See [webContents.sendInputEvent](web-contents.md##webcontentssendinputeventevent)
for detailed description of `event` object.
### `<webview>.showDefinitionForSelection()` _OS X_
### `<webview>.showDefinitionForSelection()` _macOS_
Shows pop-up dictionary that searches the selected word on the page.

View file

@ -1,10 +1,10 @@
# Build Instructions (OS X)
# Build Instructions (macOS)
Follow the guidelines below for building Electron on OS X.
Follow the guidelines below for building Electron on macOS.
## Prerequisites
* OS X >= 10.8
* macOS >= 10.8
* [Xcode](https://developer.apple.com/technologies/tools/) >= 5.1
* [node.js](http://nodejs.org) (external)
@ -48,8 +48,8 @@ After building is done, you can find `Electron.app` under `out/D`.
## 32bit Support
Electron can only be built for a 64bit target on OS X and there is no plan to
support 32bit OS X in future.
Electron can only be built for a 64bit target on macOS and there is no plan to
support 32bit macOS in future.
## Tests

View file

@ -24,7 +24,7 @@ These are the ways that we construct the Electron documentation.
- Optional arguments are denoted when called out in list.
- Line length is 80-column wrapped.
- Platform specific methods are noted in italics following method header.
- ```### `method(foo, bar)` _OS X_```
- ```### `method(foo, bar)` _macOS_```
- Prefer 'in the ___ process' over 'on'
### Documentation Translations

View file

@ -1,11 +1,11 @@
# Application Distribution
To distribute your app with Electron, the folder containing your app should be
named `app` and placed under Electron's resources directory (on OS X it is
named `app` and placed under Electron's resources directory (on macOS it is
`Electron.app/Contents/Resources/` and on Linux and Windows it is `resources/`),
like this:
On OS X:
On macOS:
```text
electron/Electron.app/Contents/Resources/app/
@ -37,7 +37,7 @@ To use an `asar` archive to replace the `app` folder, you need to rename the
archive to `app.asar`, and put it under Electron's resources directory like
below, and Electron will then try to read the archive and start from it.
On OS X:
On macOS:
```text
electron/Electron.app/Contents/Resources/
@ -63,7 +63,7 @@ before distributing it to users.
You can rename `electron.exe` to any name you like, and edit its icon and other
information with tools like [rcedit](https://github.com/atom/rcedit).
### OS X
### macOS
You can rename `Electron.app` to any name you want, and you also have to rename
the `CFBundleDisplayName`, `CFBundleIdentifier` and `CFBundleName` fields in

View file

@ -8,7 +8,7 @@ applications can put a custom menu in the dock menu.
This guide explains how to integrate your application into those desktop
environments with Electron APIs.
## Notifications (Windows, Linux, OS X)
## Notifications (Windows, Linux, macOS)
All three operating systems provide means for applications to send notifications
to the user. Electron conveniently allows developers to send notifications with
@ -50,17 +50,17 @@ desktop environment that follows [Desktop Notifications
Specification][notification-spec], including Cinnamon, Enlightenment, Unity,
GNOME, KDE.
### OS X
### macOS
Notifications are straight-forward on OS X, you should however be aware of
Notifications are straight-forward on macOS, you should however be aware of
[Apple's Human Interface guidelines regarding notifications](https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/NotificationCenter.html).
Note that notifications are limited to 256 bytes in size - and will be truncated
if you exceed that limit.
## Recent documents (Windows & OS X)
## Recent documents (Windows & macOS)
Windows and OS X provide easy access to a list of recent documents opened by
Windows and macOS provide easy access to a list of recent documents opened by
the application via JumpList or dock menu, respectively.
__JumpList:__
@ -95,14 +95,14 @@ on registering your application in [Application Registration][app-registration].
When a user clicks a file from the JumpList, a new instance of your application
will be started with the path of the file added as a command line argument.
### OS X Notes
### macOS Notes
When a file is requested from the recent documents menu, the `open-file` event
of `app` module will be emitted for it.
## Custom Dock Menu (OS X)
## Custom Dock Menu (macOS)
OS X enables developers to specify a custom menu for the dock, which usually
macOS enables developers to specify a custom menu for the dock, which usually
contains some shortcuts for commonly used features of your application:
__Dock menu of Terminal.app:__
@ -110,7 +110,7 @@ __Dock menu of Terminal.app:__
<img src="https://cloud.githubusercontent.com/assets/639601/5069962/6032658a-6e9c-11e4-9953-aa84006bdfff.png" height="354" width="341" >
To set your custom dock menu, you can use the `app.dock.setMenu` API, which is
only available on OS X:
only available on macOS:
```javascript
const electron = require('electron');
@ -154,7 +154,7 @@ __Tasks of Internet Explorer:__
![IE](http://i.msdn.microsoft.com/dynimg/IC420539.png)
Unlike the dock menu in OS X which is a real menu, user tasks in Windows work
Unlike the dock menu in macOS which is a real menu, user tasks in Windows work
like application shortcuts such that when user clicks a task, a program will be
executed with specified arguments.
@ -248,13 +248,13 @@ __Launcher shortcuts of Audacious:__
![audacious](https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles?action=AttachFile&do=get&target=shortcuts.png)
## Progress Bar in Taskbar (Windows, OS X, Unity)
## Progress Bar in Taskbar (Windows, macOS, Unity)
On Windows a taskbar button can be used to display a progress bar. This enables
a window to provide progress information to the user without the user having to
switch to the window itself.
On OS X the progress bar will be displayed as a part of the dock icon.
On macOS the progress bar will be displayed as a part of the dock icon.
The Unity DE also has a similar feature that allows you to specify the progress
bar in the launcher.
@ -298,9 +298,9 @@ let win = new BrowserWindow({...});
win.setOverlayIcon('path/to/overlay.png', 'Description for overlay');
```
## Represented File of Window (OS X)
## Represented File of Window (macOS)
On OS X a window can set its represented file, so the file's icon can show in
On macOS a window can set its represented file, so the file's icon can show in
the title bar and when users Command-Click or Control-Click on the title a path
popup will show.

View file

@ -21,7 +21,7 @@ Using the [React Developer Tools][react-devtools] as example:
* `~/.config/google-chrome-beta/Default/Extensions/`
* `~/.config/google-chrome-canary/Default/Extensions/`
* `~/.config/chromium/Default/Extensions/`
* on OS X it is `~/Library/Application Support/Google/Chrome/Default/Extensions`.
* on macOS it is `~/Library/Application Support/Google/Chrome/Default/Extensions`.
1. Pass the location of the extension to `BrowserWindow.addDevToolsExtension`
API, for the React Developer Tools, it is something like:
`~/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/0.14.10_0`

View file

@ -116,7 +116,7 @@ codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
```
If you are new to app sandboxing under OS X, you should also read through
If you are new to app sandboxing under macOS, you should also read through
Apple's [Enabling App Sandbox][enable-app-sandbox] to have a basic idea, then
add keys for the permissions needed by your app to the entitlements files.

View file

@ -116,7 +116,7 @@ app.on('ready', createWindow);
// Quit when all windows are closed.
app.on('window-all-closed', () => {
// On OS X it is common for applications and their menu bar
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit();
@ -124,7 +124,7 @@ app.on('window-all-closed', () => {
});
app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (win === null) {
createWindow();
@ -194,7 +194,7 @@ $ .\electron\electron.exe your-app\
$ ./electron/electron your-app/
```
#### OS X
#### macOS
```bash
$ ./Electron.app/Contents/MacOS/Electron your-app/

View file

@ -2,10 +2,10 @@
Following platforms are supported by Electron:
### OS X
### macOS
Only 64bit binaries are provided for OS X, and the minimum OS X version
supported is OS X 10.9.
Only 64bit binaries are provided for macOS, and the minimum macOS version
supported is macOS 10.9.
### Windows

View file

@ -20,11 +20,11 @@ for `$DISPLAY`, so no further configuration of your app is required.
This step can be automated with Paul Betts's
[xvfb-maybe](https://github.com/paulcbetts/xvfb-maybe): Prepend your test
commands with `xvfb-maybe` and the little tool will automatically configure
xvfb, if required by the current system. On Windows or Mac OS X, it will simply
xvfb, if required by the current system. On Windows or macOS, it will simply
do nothing.
```
## On Windows or OS X, this just invokes electron-mocha
## On Windows or macOS, this just invokes electron-mocha
## On Linux, if we are in a headless environment, this will be equivalent
## to xvfb-run electron-mocha ./test/*.js
xvfb-maybe electron-mocha ./test/*.js

View file

@ -6,7 +6,7 @@ and then enable it in your application.
## Prepare a Copy of Flash Plugin
On OS X and Linux, the details of the Pepper Flash plugin can be found by
On macOS and Linux, the details of the Pepper Flash plugin can be found by
navigating to `chrome://plugins` in the Chrome browser. Its location and version
are useful for Electron's Pepper Flash support. You can also copy it to another
location.

View file

@ -12,7 +12,7 @@ the architecture and Chrome version of the Electron build you use.
version used by Electron, otherwise the plugin will not work even though
`navigator.plugins` would show it has been loaded.
### Windows & OS X
### Windows & macOS
Open `chrome://components/` in Chrome browser, find `WidevineCdm` and make
sure it is up to date, then you can find all the plugin binaries from the
@ -20,12 +20,12 @@ sure it is up to date, then you can find all the plugin binaries from the
directory.
`APP_DATA` is system's location for storing app data, on Windows it is
`%LOCALAPPDATA%`, on OS X it is `~/Library/Application Support`. `VERSION` is
`%LOCALAPPDATA%`, on macOS it is `~/Library/Application Support`. `VERSION` is
Widevine CDM plugin's version string, like `1.4.8.866`. `PLATFORM` is `mac` or
`win`. `ARCH` is `x86` or `x64`.
On Windows the required binaries are `widevinecdm.dll` and
`widevinecdmadapter.dll`, on OS X they are `libwidevinecdm.dylib` and
`widevinecdmadapter.dll`, on macOS they are `libwidevinecdm.dylib` and
`widevinecdmadapter.plugin`. You can copy them to anywhere you like, but they
have to be put together.
@ -52,7 +52,7 @@ Example code:
```javascript
// You have to pass the filename of `widevinecdmadapter` here, it is
// * `widevinecdmadapter.plugin` on OS X,
// * `widevinecdmadapter.plugin` on macOS,
// * `libwidevinecdmadapter.so` on Linux,
// * `widevinecdmadapter.dll` on Windows.
app.commandLine.appendSwitch('widevine-cdm-path', '/path/to/widevinecdmadapter.plugin');