Commit Graph

299 Commits

Author SHA1 Message Date
Camilla Berglund
1ea66b9033 Cleanup 2015-12-07 21:17:03 +01:00
Camilla Berglund
e82e2b7570 Fix full screen window position on OS X
Fixes #653.
2015-12-07 21:14:24 +01:00
Camilla Berglund
d4079ad3a2 Move all context related members to _GLFWcontext 2015-11-09 23:52:02 +01:00
Camilla Berglund
d3e5a3024c Fix update being called on nil context 2015-11-09 20:36:42 +01:00
Camilla Berglund
9c315412e1 Add glfwGetKeyName
Fixes #464.
2015-11-09 14:46:09 +01:00
Camilla Berglund
496f559c9a Add GLFW_NO_API for creating context-less windows 2015-10-26 00:30:30 +01:00
Camilla Berglund
aee6b8765e Remove support for OS X 10.6
If you want 10.6 to be supported in future releases, please submit
a patch for #448.
2015-10-18 19:16:54 +02:00
Camilla Berglund
d84772d620 Add size limits and aspect ratio functions
Fixes #555.
2015-10-18 17:18:29 +02:00
Camilla Berglund
0eccf75f65 Replace GL booleans with public macros 2015-10-13 00:46:02 +02:00
Camilla Berglund
13fbb4748a Clean up cursor mode setting 2015-10-12 22:01:50 +02:00
Camilla Berglund
95a07f3340 Start 3.2 2015-10-12 21:59:49 +02:00
Aaron Jacobs
755f913b02 Fix invalid types, null pointer use, memory leak
Closes #612.
2015-10-12 21:09:07 +02:00
Camilla Berglund
fb6fbcf700 Fix video modes not restored when hiding OS X app 2015-10-12 21:08:59 +02:00
Camilla Berglund
f6f0771770 Replace NSScreen with platform functions 2015-09-07 16:32:10 +02:00
Camilla Berglund
4b4cb9ce66 Fix window refresh events emission on OS X 2015-09-07 16:32:10 +02:00
Camilla Berglund
67eadf1e97 Fix glfwIconifyWindow not restoring video mode
Fixes #590.
2015-09-07 16:32:10 +02:00
Camilla Berglund
41287694cb Replace convertBaseToScreen deprecated in 10.11
Closes #534.
2015-08-17 19:46:24 +02:00
Camilla Berglund
e686f5a249 Fixed AppKit not initialized for cursor creation. 2015-07-21 17:22:21 +02:00
Camilla Berglund
cc4c232956 Renamed cursor window library struct member.
Since _glfwPlatformWindowFocused it has a more limited role.
2015-06-17 12:06:45 +02:00
Camilla Berglund
58c2c10cdb Moved helper functions to correct section. 2015-06-07 13:24:09 +02:00
Camilla Berglund
8f0fd7ecf5 Reverted to plain NSView.
Fixes #500.
Fixes #443.
Closes #504.
Closes #510.
2015-05-18 22:55:38 +02:00
Camilla Berglund
9040c64e5b Implemented GLFW_AUTO_ICONIFY on OS X.
Fixes #506.
2015-05-06 23:53:52 +02:00
Camilla Berglund
076d9311fa Removed tab characters. 2015-04-10 13:17:27 +02:00
Camilla Berglund
c5099ff407 Cleanup of #493. 2015-04-09 17:59:37 +02:00
Chi-kwan Chan
4277e9f5d6 Removed NSScreen member of OS X monitor.
Apple's documentation of [NSScreen screens] mentions that, "The
(screens) array should not be cached.  Screens can be added, removed,
or dynamically reconfigured at any time."  Because of this, we simply
obtain the screen from a displayID whenever we need it.

Fixes #492.
Closes #493.
2015-04-09 17:59:37 +02:00
Camilla Berglund
d493a82f9e Various error fixes.
Fixed incorrect error types.  Added missing error string prefixes.
Removed some invalid or superfluous error emissions.  Clarified some
error strings.  Joined error string lines to aid grep.  Replaced some
generic error strings with specific ones.  Documentation work.

Fixes #450.
2015-03-15 15:52:27 +01:00
Camilla Berglund
93855ae6ab Fixed name of path drop list. 2015-02-16 15:40:08 +01:00
Camilla Berglund
21280ca775 Fixed glfwSetWindowSize not changing video mode.
glfwSetWindowSize did not change the video mode for full screen windows
on OS X.

Fixes #423.
2015-01-29 15:56:06 +01:00
Camilla Berglund
58e9d7a8ec Added refresh event on backing property change. 2015-01-05 22:33:06 +01:00
Camilla Berglund
439417a22c Comment and string spell check pass. 2015-01-05 22:21:31 +01:00
Camilla Berglund
1634742177 Fixed lifetime management of application delegate. 2015-01-04 18:22:46 +01:00
Camilla Berglund
d459145d28 Made glfwGetCursorPos query system directly.
Fixes #103.
Fixes #153.
Fixes #193.
Fixes #355.
Fixes #381.
2015-01-04 16:54:19 +01:00
Camilla Berglund
641761ddb0 Changed state attribs to direct access.
Changed the window states (focused, iconified and visible) to query the
system directly.

THIS IS A BREAKING CHANGE, although a fairly obscure one.  It affects
applications that both care about telling actual key events from
synthetic ones, and are implemented in a non-self-synchronizing way, and
that poll the GLFW_FOCUSED window attribute instead of using the window
focus callback.

If you maintain one of these, please feel free to drop me an email and
I'll help any way I can to transition your application to 3.1.

Fixes #189.
Fixes #204.
2015-01-04 16:53:32 +01:00
Camilla Berglund
aa7f827e72 Fixed pre-drop cursor position update.
Progresses #381.
2014-12-31 22:24:21 +01:00
Camilla Berglund
54a1fad13b Fixed cursor sometimes not being set. 2014-12-30 21:55:20 +01:00
Camilla Berglund
e480c76a11 Removed use of cursor rectangles.
Poor use of cursor rectangles broke Lion full screen and led to rect
reset loop.  Cursor image is now updated only with the existing
enter/exit detection NSTrackingArea.

Fixes #339.
Fixes #375.
2014-12-30 15:25:48 +01:00
Camilla Berglund
e57da19d4a Fixed OS X enter/leave full screen triggers. 2014-12-30 15:25:48 +01:00
Camilla Berglund
81bcefe86c Moved to using NSOpenGLView. 2014-12-30 15:25:24 +01:00
Camilla Berglund
9aa15aa710 Fixed menu bar for non-bundled OS X applications.
The menu bar for non-bundled applications did not become visible until
it had lost and regained focus.  This is fixed (somehow) by letting the
NSApplication run loop start and stop.

Technique by scoopr.
2014-12-18 03:34:32 +01:00
Camilla Berglund
2a1375e97c Added glfwCreateStandardCursor.
This function allows the creation of cursor objects using one of several
standard cursor shapes from the current system cursor theme.
2014-12-15 21:58:44 +01:00
Camilla Berglund
1495134398 Changed all key translation to arrays. 2014-12-15 21:55:17 +01:00
Camilla Berglund
b81a19928d Fixed auto-hiding of windowed windows on OS X. 2014-12-02 23:15:08 +01:00
Camilla Berglund
8de5c4e3b8 Fixed OS X full screen window hiding. 2014-11-05 18:40:22 +01:00
Camilla Berglund
70c349f36b Fixed OS X full screen window placement. 2014-11-05 18:38:39 +01:00
Camilla Berglund
34bf1b13e9 Fixed Lion full screen regression.
Restored lines lost during testing surgery.
2014-11-04 16:39:46 +01:00
Camilla Berglund
6743761c2c Moved OS X from full screen view to window. 2014-10-28 22:21:10 +01:00
Camilla Berglund
3b9a14fc9c Moved note to new place of inversion. 2014-10-26 18:29:34 +01:00
Camilla Berglund
4c64e94d39 Fixed X-axis scroll offset inversion (take two).
Fixed #239 (properly).
2014-10-26 15:15:42 +01:00
Patrick Walton
5052b2d7e0 Create an autorelease pool in glfwPostEmptyEvent.
This prevents leaking NSEvent objects.

Closes #372.
2014-10-21 12:20:13 +02:00
Camilla Berglund
f4a467a864 Fixed OS X scroll X-axis inversion.
When natural scrolling is disabled on OS X, the X-axis of the scroll
offsets is inverted compared to the direction on Windows.  The X11
scrolling directions are unspecified and so have been aligned with the
Windows port.  Natural scrolling inverts both axes on both OS X and X11,
so the issue remains when the feature is enabled.

This inverts the provided X-axis scroll offset, making "unnatural"
scroll data align with the Windows and X11 ports and "natual" scroll
data be fully inverted and aligned with its counterpart on X11.

Fixes #239.
2014-10-13 15:48:40 +02:00
Camilla Berglund
e9c7314d50 Added GLFW_FOCUSED window hint.
Fixes #101.
2014-09-10 11:50:50 +02:00
Camilla Berglund
8d170c7f47 Merged clipboard code into input. 2014-09-09 16:36:41 +02:00
Camilla Berglund
8cd88ddf61 Cleanup of OS X cursor fixes.
Closes #334.
Fixes #254.
2014-08-13 09:17:14 +02:00
Arseny Kapoulkine
87fb437d76 Fixed changing cursor while it's outside window.
We need to invoke both [NSCursor set] and [NSView addCursorRect].

First call is responsible for changing the cursor if it's inside the
view; second call is responsible for keeping the cursor the same if it's
outside.
2014-08-13 09:17:14 +02:00
Arseny Kapoulkine
e74ebf0be3 Fix cursor behavior on OS X.
Don't implement resetCursorRects: this occasionally hides the cursor
since an empty cursor is assigned to the window rectangle.  Implementing
this method is not required since OS displays the window cursor
correctly by default.

Don't reset cursor mode when window loses focus: once again, OS handles
this correctly, and this means that the window cursor state is restored
when window gains focus again.
2014-08-13 09:17:14 +02:00
Camilla Berglund
96b12ee504 Added character with modifiers callback.
The undefined behaviour changed with #40 has been reverted, making the
character-only callback again behave like a system text field.  This
behavior has now been documentated.

Fixes #203.
Fixes #305.
2014-06-24 10:50:05 +02:00
Camilla Berglund
a7b9deb2ca Fixed use of previous member name. 2014-06-18 21:07:54 +02:00
Camilla Berglund
3ce7bfef07 Added GLFW_FLOATING.
Fixes #23.
2014-06-18 16:39:39 +02:00
Camilla Berglund
7123bcfc3e Fixed modifier key events being lost. 2014-06-17 11:49:29 +02:00
Camilla Berglund
aa6f8d40bd Fixed misspelled parameter.
Fixes #287.
2014-05-04 12:19:11 +02:00
Camilla Berglund
4a8f6ba58c Moved window delegate creation to createWindow. 2014-04-06 13:46:16 +02:00
Camilla Berglund
eb3f75e03e Added glfwGetWindowFrameSize. 2014-03-30 10:57:32 +02:00
Camilla Berglund
8fa9cc0de3 Added GLFWimage struct. 2014-03-20 11:30:27 +01:00
Camilla Berglund
608de57358 Cleanup. 2014-03-20 11:30:27 +01:00
urraka
40c04a7565 Added support for custom system cursors.
This adds 3 functions to the GLFW API: glfwCreateCursor,
glfwDestroyCursor and glfwSetCursor.
2014-03-20 11:30:27 +01:00
Camilla Berglund
1ccc23268c Added glfwPostEmptyEvent. 2014-03-09 17:55:55 +01:00
Camilla Berglund
6e990b77d1 Removed stale comment. 2014-03-07 00:11:43 +01:00
Camilla Berglund
6d8e78cc95 Further separation of window and context.
The context related parts of _GLFWwndconfig have been moved to
_GLFWctxconfig and given better names.  Window hint and attribute
members have been renamed to match.
2014-03-06 20:07:58 +01:00
Michael Dickens
04b4e605a0 Removed C99-ism for the sake of OS X 10.6.
Fixes #241.
2014-02-13 20:58:48 +01:00
Camilla Berglund
84377c6175 Added _GLFW_USE_RETINA. 2014-02-10 13:45:13 +01:00
Camilla Berglund
611006af18 Updated API version in comment headers. 2014-01-22 01:32:00 +01:00
Camilla Berglund
8f349e84ae Cleaned up drop callback design. 2014-01-21 18:23:25 +01:00
Camilla Berglund
8ae063bb1b Cleanup. 2014-01-21 15:25:49 +01:00
arturo
89d0723ba3 Initial drag and drop support. 2014-01-21 15:25:49 +01:00
David Avedissian
c789238741 Removed extra argument 2014-01-18 23:43:17 +00:00
David Avedissian
4658e72b84 Fixed link error introduced by previous commit 2014-01-18 21:32:18 +00:00
Camilla Berglund
e0a26aa62f Cursor mode cleanup. 2014-01-15 14:23:34 +01:00
Camilla Berglund
7341f8b635 Enlarged OS X invisible cursor.
Fixes #206.
2014-01-06 15:34:49 +01:00
Camilla Berglund
bc625b21b3 Removed completed todo. 2013-11-10 14:03:34 +01:00
Camilla Berglund
b9d4875f3e Improved documentation of hacks. 2013-11-10 13:56:27 +01:00
Camilla Berglund
a83d257ac6 Moved application activation to window showing.
Fixes #93.
2013-11-07 18:07:46 +01:00
Camilla Berglund
ec5cb9c6f7 Moved to Cocoa for transformation and activation. 2013-11-07 18:03:39 +01:00
Camilla Berglund
58045a5c07 Added Lion full scren menu item. 2013-10-28 13:01:58 +01:00
Jack Moffitt
5be45d214b Fix build on Mac OS X 10.7 Lion.
`CVDisplayLinkRef` needs an extra header file, and `NSAppKitVersionNumber10_7`
wasn't added until 10.8so use `> NSAppKitVersionNumber10_6` instead.
2013-10-24 02:24:34 -06:00
Camilla Berglund
d78510457c Added hack for full screen focus on OS X. 2013-10-17 19:59:34 +02:00
Camilla Berglund
9c15e2ff86 Enabled Lion full screen. 2013-10-10 00:09:03 +02:00
Camilla Berglund
7775c87cd6 Cleanup and change log update. 2013-10-09 23:58:43 +02:00
Camilla Berglund
1047d5646d Merge pull request #139 from Pieroman/patch-1
Fixed full screen windows blanking unused monitors.
2013-10-09 14:47:41 -07:00
Andri Pálsson
99784fb8f0 Fixed hidden cursor positioning corner case. 2013-10-09 19:06:03 +02:00
Camilla Berglund
e9694cca47 Merge pull request #152 from sjml/master
Fixed minor Xcode 5 warnings.
2013-10-08 10:43:55 -07:00
Shane Liesegang
9e0c07b7ba Fixing Xcode 5 warning
Xcode 5 has gotten more pedantic about undeclared selectors, by
default.
2013-10-08 10:49:00 -04:00
Shane Liesegang
209de7b56d Removing warnings when building Cocoa in 64-bit
NSInteger is defined as the native integer width, so these changes
remove implicit conversions that were causing precision warnings.
2013-10-08 10:42:17 -04:00
Camilla Berglund
5759d0fdf2 Fixed F13 being reported as PrtSc on OS X. 2013-09-26 19:58:35 +02:00
Camilla Berglund
201d0a78b1 Fixed Grave and World 1 being flipped. 2013-09-26 00:00:07 +02:00
Pieroman
d3f22b8a04 Fixed Mac OS X bug where request for one fullscreen window blacks out other monitors 2013-09-19 21:33:44 +02:00
Camilla Berglund
546c794321 Fixed OS X cursor bugs #3, #72 and #88. 2013-09-19 01:05:51 +02:00
Camilla Berglund
d69796d9e0 Updated menu label for minimization. 2013-09-16 15:58:05 +02:00
Camilla Berglund
9c20737b60 Allowed characters regardless of modifier keys. 2013-08-19 13:08:35 +02:00
Camilla Berglund
3cfc400cf9 Simplified source file comment headers. 2013-07-30 14:46:52 +02:00
Camilla Berglund
6e85924bd3 Replaced selector test with NSAppKitVersionNumber. 2013-07-30 14:46:51 +02:00