Commit graph

119 commits

Author SHA1 Message Date
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
5372b6cd91 Fullscreenable => FullScreenable 2016-01-24 14:31:36 +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
evgenyzinoviev
ff41b4a267 added hasShadow option to BrowserWindow (osx) 2016-01-23 01:16: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
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
Omri Litov
3f0c007578 Added getNativeWindowHandle 2016-01-07 22:38:35 +02:00
Cheng Zhao
14db4a1946 Add isDevToolsFocused to webview 2016-01-04 10:46:30 +08:00
billyct
5f092a6c65 support an api with SetIgnoreMouseEvents, and worked fine with osx 2015-12-06 10:14:54 +08:00
Cheng Zhao
6795bd1d96 Do not manually manage native resources
We should rely on the destructor to cleanup everything, instead of
putting them in the Destroy method.
2015-12-03 15:38:43 +08:00
Cheng Zhao
8d20dda6d7 No need to override TitleWasSet in NativeWindow 2015-12-01 17:51:09 +08:00
Eran Tiktin
18de28c3ff Make BrowserWindow options argument optional
Resolves #3473
2015-11-21 06:22:19 +02:00
Cheng Zhao
9a20b33d97 Add isDestroyed method for classes with destroy method 2015-11-19 17:08:16 +08:00
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
e355532d27 Change windows messages api to hook instead of emitter 2015-10-27 14:00:08 +02: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
f2c7943d42 Add WebContents.getOwnerBrowserWindow 2015-10-01 13:45:59 +08:00
Cheng Zhao
83c514001e Move devtools API to WebContents 2015-10-01 11:25:31 +08:00
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
c550546ff1 Do not manually convert Object to WebInputEvent 2015-09-18 14:09:31 +08:00
Cheng Zhao
ee0d48dc5a Merge branch 'master' of https://github.com/MaxWhere/electron into MaxWhere-master 2015-09-18 12:01:33 +08:00
Heilig Benedek
ceef06b344 Renamed setOffscreenRender to begin/endFrameSubscription because the name was a bit misleading, and replaced the ArrayBuffer creation with a node::Buffer::New call. 2015-09-16 02:59:16 +02:00
Cheng Zhao
b72a5884f2 Add BrowserWindow.isDevToolsFocused 2015-09-15 11:43:45 +08:00
Cheng Zhao
e2bd1abce6 Make sure BrowserContext is destroyed on exit 2015-09-06 10:54:34 +08:00
Heilig Benedek
3dd3fd9200 Merge branch 'master' of https://github.com/brenca/electron
Conflicts:
	atom/browser/api/atom_api_window.h
	atom/browser/native_window.cc
2015-08-31 18:46:29 +02:00
Heilig Benedek
c59c0bd5b3 Mouse event handling and keyboard event handling (not totally working yet) 2015-08-31 18:32:33 +02:00
gellert
58081ca9e9 setOffscreenRender and api docs added 2015-08-29 00:45:00 +02:00
Heilig Benedek
e4c01f3187 Offscreen render support base 2015-08-27 11:22:39 +02:00
Cheng Zhao
958658513c Refactor code in taskbarHost 2015-08-06 12:44:07 +08:00
Cheng Zhao
a28f70e85c Decouple TaskbarHost from NativeWindow 2015-08-06 11:10:34 +08:00
Haojian Wu
2f1cb8b52a Expose NativeWindow.setThumbarButtons API to all platforms. 2015-08-05 22:30:05 +08:00
Haojian Wu
54af048f04 win: Add BrowserWindow.setThumbarButtons API. 2015-08-05 13:55:02 +08:00
Cheng Zhao
72eb87a631 Make the extraSize of BrowserWindow.setAspectRatio optional 2015-07-23 10:14:02 +08:00
Cheng Zhao
df35700b94 Style fixes
* Use under_score for variable names in C++
* Use const& when possible
* Line length <= 80
2015-07-23 10:07:58 +08:00
Michael S. Barthelemy
6d25c81bd1 changes requested for pull request #2250 into electron master 2015-07-22 10:23:31 -04:00
Michael S. Barthelemy
d0c6176640 wrap lines to meet Travis CI build requirements 2015-07-16 14:45:27 -04:00
Michael S. Barthelemy
7cdfa44438 shorten names 2015-07-16 14:31:01 -04:00
Michael S. Barthelemy
666aca7803 add function maintainAspectRatioOfInteriorContent to BrowserWindow in order to enforce an aspect ratio for an electron window 2015-07-16 13:54:51 -04:00
Cheng Zhao
ae52af3870 Check BrowserWindow's lifetime 2015-07-06 18:28:42 +08:00
Paul Betts
58efb3c018 I forget cpplint every time 2015-06-25 15:09:25 -06:00
Paul Betts
cde7c6a4ef Move app commands to strings 2015-06-25 11:29:57 -06:00