99 Commits

Author SHA1 Message Date
Allan Odgaard
88481bdd12 Add NSWindow’s new toolbarStyle property to sdk-compat.h 2021-01-17 14:09:53 +01:00
Allan Odgaard
b42bbfc5fe Organize the sdk-compat.h file 2021-01-17 14:09:53 +01:00
Allan Odgaard
f000204330 Remove PUBLIC macro 2020-06-05 21:22:50 +07:00
Allan Odgaard
fe16803a72 Add os/activity.h to list of headers to precompile 2020-05-12 08:22:04 +07:00
Allan Odgaard
e4f61f12b7 Change a few leading spaces to tabs 2020-04-30 13:28:24 +07:00
Allan Odgaard
b514114ec7 Access most system singletons using dot syntax
These are identified by having a prefix of shared, default, or standard in the class method.
2020-04-23 12:25:11 +07:00
Allan Odgaard
079377ed49 Require macOS 10.12 and remove compatibility checks 2019-10-07 21:28:16 +02:00
Allan Odgaard
e59f9fcfa6 Remove oak::cap from algorithm.h 2019-08-01 10:28:35 +02:00
Allan Odgaard
caefacb911 Add missing space (according to syntax style guide) 2019-08-01 10:05:58 +02:00
Allan Odgaard
087e0ce0a7 Import os/log.h when deployment target is macOS 10.12 or later 2019-07-13 08:22:00 +02:00
Ronald Wampler
9fe62089ef Remove forward declarations for macOS 10.12 SDK
Although our minimum target is 10.10, we currently (dd41b992f7) only support compiling with Xcode 9, which has the macOS 10.13 SDK.
2018-11-15 09:38:15 +07:00
Ronald Wampler
a7339d3860 Add some more forward declarations for macOS 10.14 SDK 2018-11-15 09:38:15 +07:00
Allan Odgaard
dd41b992f7 Assume @available directive is available (Xcode 9) 2018-10-31 22:56:24 +07:00
Ronald Wampler
b43abb13a6 Use a dynamic color for the dark divider style (10.14) 2018-10-28 12:13:39 +07:00
Ronald Wampler
e64b09b688 Introduce overloads for the new divider styles
Also, switch to use the new divider styles in most places. The remaining usage of the old "OakCreateLine" functions are in the OakChooser windows. These will be refactor for better dark mode support next.
2018-10-28 11:07:03 +07:00
Ronald Wampler
9049d995ed Introduce OAK_AVAILABLE macro
Newer versions of clang now warn when using API's that are only available on OS version newer than the target OS unless they are guarded using `@available`.

This is temporary and should be remove when we move away from older versions of Xcode.
2018-10-12 19:37:41 +02:00
Ronald Wampler
9198c496b0 OakBackgroundFillView: Add support of Mojave Dark mode
This introduces the `OakBackgroundFillViewStyle` enum with styles that are dark mode aware and should lead to more consistent use between UI elements in the future. Also, convert OTVStatusBar and OFBHeaderView to use the new style enum.
2018-10-07 11:28:52 +02:00
Allan Odgaard
69b5af7621 Include sdk-compat.h after system frameworks 2018-08-21 12:22:22 +02:00
Allan Odgaard
43fc65805d Add NSAppearanceName stuff from the macOS 10.14 SDK 2018-08-21 11:42:25 +02:00
Allan Odgaard
e70791ee89 Rename a bunch of constants to fix deprecation warnings (10.12) 2018-06-16 22:55:30 +02:00
Allan Odgaard
1b0eafddeb Add the 10.12 NSAlertStyle constants to sdk-compat.h 2017-09-12 20:43:52 +02:00
Allan Odgaard
a0a15caa2a Introduce sdk-compat.h for redeclaring stuff in latest SDK
This is when we are not yet ready to require building with the latest SDK but need to use some of symbols defined there.
2017-09-12 20:43:52 +02:00
Ronald Wampler
a5323b4f77 Add oak::random_shuffle algorithm 2016-10-18 23:06:49 +02:00
Ronald Wampler
1f84a3d09f Add random header as a precompiled header 2016-10-18 23:06:49 +02:00
Allan Odgaard
182d4aa140 Add oak::has_prefix for comparing std::string with string literal 2016-10-17 11:03:41 +02:00
Ronald Wampler
1658d6356a Use thread_local instead of our own implementation
Apple's clang (Apple LLVM version 8.0.0 (clang-800.0.24.1)) as shipped with Xcode 8 now supports `thread_local`. This effectively reverts commits: 14c6a70 f3d1aba 9d1d1a1a and 172ce9d.
2016-09-15 07:17:52 +02:00
Allan Odgaard
46fb745bbe Use perrorf when printing errors with dynamic strings
Also revise error messages to be more consistent.
2016-08-28 17:25:26 +02:00
Allan Odgaard
fe301508c8 Introduce perrorf as shorthand for fprintf with strerror 2016-08-28 17:25:19 +02:00
Allan Odgaard
dbdfa3c6af Add identifying information to perror output 2016-08-21 12:09:30 +02:00
Allan Odgaard
a415576827 Disable deprecation warning for Gestalt API
The replacement API¹ did not appear until the 10.10 SDK, although it might be usable from 10.9.2, but as we currently support 10.8, we cannot use it.

¹ [[NSProcessInfo processInfo] operatingSystemVersion]
2016-07-05 10:45:02 +02:00
Allan Odgaard
96508d81c3 Remove unused function (os_tuple) 2016-06-22 20:44:41 +02:00
Allan Odgaard
437f640e74 Implement move assignment and constructor for oak::basic_tree_t 2016-06-20 18:19:13 +02:00
Allan Odgaard
8e8a647e25 Add algorithm to erase descendent keys form a std::map
This can be used when the key is name spaced, e.g. `/foo/bar` or `foo.bar`. Here we can erase everything under foo by using `/foo/` or `foo.` respectively.
2016-06-02 21:07:43 +02:00
Ronald Wampler
00a20aefb6 Revert "Disable unused-local-typedef warning for sparsehash"
This reverts commit 2c6ad9b391.

Upstream released a new version, which resolved the warnings this commit meant to suppress.
2015-10-22 16:27:40 +07:00
Ronald Wampler
2c6ad9b391 Disable unused-local-typedef warning for sparsehash
Also, disable unknown-pragmas warning for older version of clang.
2015-08-11 21:01:07 +02:00
Ronald Wampler
f3d1abaeca Introduce tls_ptr_t
This is a lightweight wrapper around the pthread methods to access thread local memory.
2015-08-11 21:01:07 +02:00
Allan Odgaard
457969788e Use std::tuple for the OS version
This makes compatibility checks simpler, since we can use a single comparison operator.
2015-06-23 22:46:58 +02:00
Joachim Mårtensson
70893f4583 Use dense_hash_map for style cache 2015-05-09 21:24:38 +02:00
Allan Odgaard
0f4397769d Include the cstdlib header
This is to ensure we get the integer prototype for std::abs
2015-05-06 21:19:07 +02:00
Ronald Wampler
4aff7098a5 Use std::abs instead of abs()
This suppresses a couple of warnings with the latest version of clang shipped with Xcode 6.3.
2015-04-30 15:15:56 +02:00
Allan Odgaard
29a576ffbe Don’t go via helper for pthread_setname_np
This was previously done because the function wasn’t available until 10.7, but since that is (now) our deployment target, there is no need to wrap the call.
2014-12-25 09:36:01 +01:00
Allan Odgaard
0bdefafac3 Remove dependency graph support to only framework using this API 2014-12-25 09:33:56 +01:00
Allan Odgaard
aeb9ab7d00 Move server.h to the only framework left using this legacy API 2014-12-25 09:33:13 +01:00
Allan Odgaard
0c99cb0699 Remove unused helper function 2014-12-25 09:32:23 +01:00
Allan Odgaard
3a86535022 Move boost crc include to PCH
Also use unsigned integer for the checksum.
2014-10-18 12:36:23 +02:00
Allan Odgaard
7cb2330aae Log error if curl_easy_init() or accept() fails 2014-09-30 14:15:11 +02:00
Allan Odgaard
ec81a045af Force a layout before opening window (from tests)
This appears to be a requirement (to do it manually). Running 10.9.4.
2014-09-17 10:35:25 +02:00
Allan Odgaard
57e43f27e3 Return 0 if Gestalt() fails 2014-08-21 16:06:33 +02:00
Allan Odgaard
c272afaff2 Cleanup/harmonize whitespace
Leading indent should consist only of tabs, beyond that, only spaces should be used.
2014-04-25 16:55:31 +07:00
Allan Odgaard
39b94e6ac3 Harmonize whitespace and add trailing newline 2014-04-14 14:26:52 +07:00