Commit Graph

350 Commits

Author SHA1 Message Date
Camilla Löwy
f680001b95 Cocoa: Remove superfluous compatibility macro 2018-11-27 21:44:20 +01:00
Camilla Löwy
18145a7f3d Cocoa: Use NSURLs for drag and drop
Fixes #1377.
2018-11-27 21:44:20 +01:00
Camilla Löwy
5595fa3ae6 Cocoa: Fix OpenGL rendering not being displayed
Fix based on information provided by @rcgordon.

Fixes #1334.
Closes #1346.
2018-10-26 16:24:16 +02:00
Camilla Löwy
6dfc12a439 Cocoa: Fix some macOS 10.14 deprecation warnings 2018-10-26 15:19:48 +02:00
Camilla Löwy
50eccd298a Fix cursor mode application for unfocused windows
Fixes #1239.
Fixes #1247.
2018-04-25 21:49:26 +02:00
Camilla Löwy
2884915000 Cocoa: Set CAMetalLayer contents scale from window
Fixes #1229.
2018-03-20 19:58:39 +01:00
Camilla Löwy
5f8108e8a9 Cocoa: Fix SDK version numbers
The pattern for version 10.10 and later was incorrectly applied to
version number for 10.8.

Fixes #1232.
2018-03-20 01:03:37 +01:00
Camilla Löwy
77879736af Cocoa: Event polling did not initialize AppKit
Fixes #1218.
2018-03-01 02:23:27 +01:00
Camilla Löwy
58cc4b2c5c Move full screen cursor centering to shared code 2018-02-07 16:47:00 +01:00
Camilla Löwy
cfb5cb8805 Add comment 2018-02-07 16:46:58 +01:00
Camilla Löwy
1d75b205cb Cleanup
Allow window creation despite video mode setting failure.

Video mode setting failure is ignored the rest of the time and the
desired video mode has never been a hard constraint anyway.
2018-02-07 16:46:58 +01:00
Camilla Löwy
973bf29622 Remove use of non-standard function strdup
Related to #873.
2018-01-17 11:56:35 +01:00
Camilla Löwy
ee9dffcd66 Add GLFW_HOVERED for polling cursor hover state
This window attribute corresponds to the cursor enter/leave callback.

Fixes #1166.
2018-01-09 18:02:52 +01:00
Camilla Löwy
370eac3c48 Add glfwSetWindowContentScaleCallback
Related to #677.
Related to #1115.
2018-01-09 18:00:22 +01:00
Camilla Löwy
9da2285b14 Cocoa: Make frame autosave hint a string 2017-12-19 15:08:28 +01:00
Camilla Löwy
0e8c4ea7ce Add lock key modifier bits input mode
This adds the GLFW_MOD_CAPS_LOCK and GLFW_MOD_NUM_LOCK modifier bits.
Set the GLFW_LOCK_KEY_MODS input mode to enable these for all callbacks
that receive modifier bits.

Fixes #946.
2017-12-06 18:01:34 +01:00
Stephen Gowen
bb13275b72 Cocoa: Fix Xcode Warnings
Closes #1132.
2017-11-20 18:04:05 +01:00
Camilla Löwy
1fe319d234 Cocoa: Filter out duplicate size events
Fixes #1085.
2017-11-16 11:56:06 +01:00
Camilla Löwy
8b81a03a5a Cocoa: Remove double resize of full screen window
Related to #1085.
2017-11-16 11:37:00 +01:00
Camilla Löwy
11e47f08b1 Add glfwGetWindowOpacity and glfwSetWindowOpacity
This adds support for setting the opacity of the whole window, including
any decorations.

Fixes #1089.
2017-11-15 15:46:01 +01:00
Camilla Löwy
31cbb20ba2 Deprecate window parameter of clipboard functions 2017-11-10 02:52:16 +01:00
Camilla Löwy
bf09dba95b Cleanup 2017-10-26 18:05:56 +02:00
Camilla Löwy
16bf872117 Add content scale queries
This adds glfwGetWindowContentScale and glfwGetMonitorContentScale for
querying the recommended drawing scale factor for DPI-aware rendering.

Parts of this patch are based on code by @ferreiradaselva.

Fixes #235.
Fixes #439.
Fixes #677.
Fixes #845.
Fixes #898.
2017-10-26 17:26:36 +02:00
Camilla Löwy
5aeb37d1b8 Cocoa: Fix window title being lost when untitled
The window title was lost and could not be updated while the window did
not have NSWindowStyleMaskTitled set.

Fixes #1082.
2017-09-28 19:04:11 +02:00
Camilla Löwy
da68ec56c3 Cocoa: Start using instancetype
The first tiny step towards using more modern Objective-C.
2017-09-28 19:03:50 +02:00
Camilla Löwy
32e78aeb2e Add GLFW_TRANSPARENT attribute and documentation
This completes support for window framebuffer transparency on Windows,
macOS and X11.  Note that the hint/attribute may be renamed before
release to clarify its relationship to GLFW_OPACITY.

Fixes #197.
Closes #1079.
Related to #663.
Related to #715.
Related to #723.
Related to #1078.
2017-09-27 21:54:04 +02:00
Bailey Cosier
93e66661d3 Cleanup
This is an extract of a commit, minimally edited to ensure it compiles.

Closes #1078.
Related to #197.
2017-09-27 21:33:03 +02:00
Cem Karan
ac009a5f5c Cocoa: Implement GLFW_TRANSPARENT
This is an extract of a commit, minimally edited to ensure it compiles.

Closes #663.
Related to #197.
2017-09-27 21:33:03 +02:00
Camilla Löwy
58a247b26d Cocoa: Fix some characters not repeating
Fixes #1010.
2017-08-23 19:10:35 +02:00
Camilla Löwy
ce5e649d3b Cleanup
Move global data to library struct.  Simplify semantics.  Update
changelog.

Related to #1028.
2017-08-23 13:24:05 +02:00
Sergey Tikhomirov
80e4922b5e Cocoa: Hide cursor instead of using blank image
When cursor isn't in normal mode and should be hidden, use [NSCursor hide]
method instead of setting it to blank image. This should prevent
situations when hidden cursor becomes visible after system notification
was shown.

Fixes #971.
Closes #1028.
2017-08-23 08:44:56 +03:00
Camilla Löwy
ab2247f8f3 Cocoa: Fix string object being updated incorrectly
Fixes #1050.
2017-08-06 23:27:58 +02:00
Camilla Löwy
82284b86eb Cleanup
Thanks to glfwGetKeyScancode we can now pass only a scancode to the
platform layer for glfwGetKeyName.
2017-07-13 01:26:06 +02:00
ryogo.yoshimura
4dee58d480 Cocoa: Fix conversion between NSPoint and CGPoint
GLFW still supports versions of macOS before these became the same
underlying type.

Closes #1023.
2017-06-08 16:39:02 +02:00
Camilla Löwy
018ae69b33 Cleanup
Related to #985.
2017-05-16 15:43:28 +02:00
Konstantin Käfer
d1d08ef99f Cocoa: Fix EGL support
This adds support for using GLFW with EGL backends on macOS.  While EGL
isn't available by default on macOS, there are third-party
implementations like SwiftShader.

The addition of MoltenVK support added an override to makeBackingLayer.
In non-Vulkan mode, this means that we are returning nil from that
function.  The NSGL implementation creates this layer manually later on,
but other OpenGL backends don't necessarily do that.

Closes #985.
2017-05-16 15:42:19 +02:00
Felipe Ferreira da Silva
412eb6a611 Add glfwRequestWindowAttention
Related to #988.
2017-05-11 13:36:39 +02:00
Camilla Berglund
7410346c5c Cocoa: Allow undecorated windows to become main 2017-03-16 15:46:21 +01:00
Camilla Löwy
3d8aa53573 Cocoa: Fix full screen window not being restorable
Once a full screen window was iconified, it would appear to restore but
then disappear.

Fixes #848.
2017-03-15 01:27:46 +01:00
Camilla Löwy
7c88c92778 Cocoa: Fix window rect on leaving video mode
Fixes #748.
2017-03-14 21:23:48 +01:00
Camilla Löwy
7a8516d296 Cleanup 2017-03-01 04:36:00 +01:00
Camilla Löwy
c50aba1335 Cocoa: Add support for MainMenu.nib loading 2017-03-01 04:36:00 +01:00
Camilla Löwy
6d9a58bfef Add glfwInitHint
This allows setting hints that control how the library is initialized,
transforming more compile-time options into run-time ones.
2017-03-01 04:35:41 +01:00
Camilla Löwy
e9560ef021 Add GLFW_OSMESA_CONTEXT_API
This allows the creation of OpenGL contexts via OSMesa on existing
platforms.  It does not add a compile- or link-time dependency on
OSMesa.

Fixes #281.
2017-02-28 20:38:10 +01:00
Camilla Löwy
ce8fe645f4 Cleanup 2017-02-26 22:22:53 +01:00
Camilla Löwy
77a8f103d8 Add GLFW_COCOA_GRAPHICS_SWICTHING
This provides control over whether the context should participate in
macOS Automatic Graphics Switching.

Closes #377.
Closes #935.
2017-02-10 01:29:29 +01:00
Camilla Löwy
5a74b5008d Cleanup
Related to #842.
2017-02-06 15:16:27 +01:00
Liam Middlebrook
72ac5badb0 Add GLFW_CENTER_CURSOR
Adds a hint for controlling whether the cursor is centered over newly
created full screen windows.

Fixes #749.
Closes #842.
2017-02-06 15:16:26 +01:00
Camilla Löwy
221451b817 Cleanup 2017-01-10 15:46:00 +01:00
Camilla Löwy
ec410fb6fe Cocoa: Enable EGL 2017-01-02 15:32:55 +01:00