Commit graph

247 commits

Author SHA1 Message Date
Heilig Benedek
a8ae14e94f Introducing a will-enter-full-screen event that's cancellable 2016-02-09 01:17:05 +01:00
Cheng Zhao
059d97e1aa Merge pull request #4181 from bengotow/scroll-touch-events
Extend NativeWindow to track touch-based scroll events on OS X
2016-01-25 14:47:54 +08:00
Cheng Zhao
7761815339 Merge branch 'bg-color-pr' of https://github.com/evgenyzinoviev/electron 2016-01-24 21:33:53 +08:00
Cheng Zhao
c41de501cb spec: Test the -able methods 2016-01-24 14:31:37 +08:00
Cheng Zhao
239bfe970c Make hasShadow work on Windows/Linux 2016-01-24 14:31:37 +08:00
Cheng Zhao
d704b3f7ba Reorgnize how attributes work 2016-01-24 14:31:37 +08:00
Cheng Zhao
31624995bc Merge pull request #4202 from evgenyzinoviev/shadow-pr
Added hasShadow option to BrowserWindow on OS X
2016-01-22 23:56:38 -08:00
Cheng Zhao
8cabe0f008 Merge pull request #4156 from evgenyzinoviev/windows-pr
Improvements in BrowserWindow
2016-01-22 23:42:41 -08:00
evgenyzinoviev
ff41b4a267 added hasShadow option to BrowserWindow (osx) 2016-01-23 01:16:08 +01:00
evgenyzinoviev
2fcd3ce7cd Support alpha in backgroundColor 2016-01-23 00:55:08 +01:00
evgenyzinoviev
ef51e4e108 maximizable and fullscreenable 2016-01-22 23:21:46 +01:00
Ben Gotow
d492ff45d5 Rename up/down => begin/end 2016-01-21 16:31:09 -08:00
Cheng Zhao
21f5e27a5e Merge pull request #4161 from gabriel/master
Support backgroundColor for window on mac
2016-01-21 15:42:21 -07:00
Gabriel Handford
239baa3e9a Support backgroundColor for window on mac 2016-01-21 11:07:33 -08:00
Ben Gotow
bd2252ea55 Extend NativeWindow to track touch-based scroll events on OS X
In N1, we want to implement the famous "swipe to archive" action on threads in the user's inbox. Chrome exposes `scroll` and `wheel` events, but these aren't sufficient to implement the interaction because the element needs to "snap" when the user lifts their fingers from the trackpad, not when they / we stop receiving `wheel` / `scroll` events. These events may stop before the user lifts their fingers, or continue after the user has lifted their fingers if they had enough momentum for the gesture to continue.

This exposes BrowserWindow `scroll-touch-down` and `scroll-touch-up`, which fire immeditaely when the user touches two fingers to the trackpad, and again when the user lifts their fingers. Combined with the existing wheel event should allow for "swipe-to-archive" and other similar interactions.

Note: This is only implemented on Mac OS X and the events don't fire unless you're using a trackpad!

Related: #1486, #2683, https://github.com/nylas/N1/issues/541
2016-01-21 09:40:21 -08:00
evgenyzinoviev
2a554cb138 added or/and improved closable, minimizable, movable, resizable features for windows on os x and windows 2016-01-19 16:14:57 +01:00
evgenyzinoviev
b75dccb0be arguments handing rewritten, doc updated 2016-01-15 17:31:31 +01:00
evgenyzinoviev
2598b00b41 Animate window resizing on OS X 2016-01-15 05:59:58 +01:00
Cheng Zhao
0df03a23a3 Pass origin in capturePage 2016-01-04 20:06:36 +08:00
Cheng Zhao
7a1717156e Revert "browser: dont lose coordinates in capturepage src rect"
This reverts commit 3c5e5053e3.
2016-01-04 19:37:25 +08:00
Cheng Zhao
14db4a1946 Add isDevToolsFocused to webview 2016-01-04 10:46:30 +08:00
Robo
3c5e5053e3 browser: dont lose coordinates in capturepage src rect 2015-12-14 00:52:05 +05:30
Cheng Zhao
774ba2a235 Merge pull request #3706 from billyct/master
support an api with SetIgnoreMouseEvents for osx
2015-12-09 12:00:16 +08:00
Cheng Zhao
73e7773d84 Update to API changes of Chrome 47 2015-12-07 19:56:23 +08:00
billyct
5f092a6c65 support an api with SetIgnoreMouseEvents, and worked fine with osx 2015-12-06 10:14:54 +08:00
Cheng Zhao
8d20dda6d7 No need to override TitleWasSet in NativeWindow 2015-12-01 17:51:09 +08:00
Cheng Zhao
860c46b3c1 Separate options from switches
On Windows the case sensitivity of command line switches are ignored, so
--nodeIntegraion will become --nodeintegration.

We should separate options from switches so we use "nodeIntegraion" in
options, while passing "--node-integration" in command line.
2015-11-13 14:05:49 +08:00
Robo
bb439c5f1c browser: check window liveness before setting title 2015-11-13 02:43:21 +05:30
Cheng Zhao
917b33dbe7 Small code cleanup 2015-10-29 10:55:08 +08:00
Omri Litov
ef038257d1 Returns buffer instead of WPARAM and LPARAM 2015-10-29 03:00:44 +02:00
Omri Litov
f22837523f Use WPARAM as uint64_t and LPARAM as int64_t 2015-10-28 21:54:50 +02:00
Cheng Zhao
b86267aa3b Use uint64_t instead of LPARAM
LPARAM is defined to differnt types on differnt machines with different
SDKs, so there is no way to represent it on all platforms safely, using
uint64_t seems to be the only safe choice.
2015-10-28 19:51:24 +08:00
Omri Litov
edbebf84b9 Added browser-window event 'message' 2015-10-27 03:12:01 +02:00
Cheng Zhao
e36d455d51 Add setBackgroundColor method 2015-10-23 11:35:33 +08:00
Cheng Zhao
d092c6acc9 osx: Implement draggable region with mouseDownCanMoveWindow
Previously we implemented draggable region by tracking mouse position,
it is buggy and causing some problems. But it is interesting that until
this didn't cause troubles until recently.
2015-10-21 08:54:46 +08:00
Cheng Zhao
11a49bba35 win: Fix "enable-larger-than-screen" option spec 2015-10-15 16:36:29 +08:00
Cheng Zhao
898db4d6bd osx: Set resizable flag when creating window
Setting resizable for frameless window before it is shown will change
its size.
2015-10-06 15:23:23 +08:00
Cheng Zhao
428c5b6d01 Setting "x" and "y" should not change window size 2015-10-06 14:50:18 +08:00
Cheng Zhao
b70e7c6a4c Remove default definition of ContentSizeToWindowSize 2015-10-06 00:39:16 +08:00
Cheng Zhao
e675407552 Make min/max size respect use-content-size 2015-10-05 20:36:28 +08:00
Cheng Zhao
8577f2b52f osx: Add NativeWindow::SetSizeConstraints 2015-10-05 20:07:20 +08:00
Cheng Zhao
8d61531f4e Revert #2879 2015-10-01 17:46:11 +08:00
Cheng Zhao
83c514001e Move devtools API to WebContents 2015-10-01 11:25:31 +08:00
Cheng Zhao
7884a2319c osx: Make draggable region work for window with hidden titlebar 2015-09-25 16:38:36 +08:00
Robo
5ca5c4fb92 browser: hide webcontents when window not shown 2015-09-24 10:30:18 +05:30
Cheng Zhao
86f523d3c1 Move BeginFrameSubscription to WebContents 2015-09-18 15:57:43 +08:00
Cheng Zhao
42863e4700 Move SendInputEvent to WebContents 2015-09-18 14:20:31 +08:00
Cheng Zhao
9e7de78231 Fix cpplint warnings 2015-09-18 14:12:48 +08:00
Cheng Zhao
c550546ff1 Do not manually convert Object to WebInputEvent 2015-09-18 14:09:31 +08:00
Cheng Zhao
5a599cb6ff Sequence of definitions should follow the declarations 2015-09-18 13:49:33 +08:00