Mercurial > minori
comparison src/sys/osx/dark_theme.mm @ 179:9c4645100fec
osx: clean up includes, we do not need cocoa
what we *do* need is the very basics that animia already depends on anyway.
these are basically guaranteed to be on any macos system, making it fairly portable
now... I haven't tested this :) I don't have a macos machine right now...
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 04 Dec 2023 12:03:36 -0500 |
parents | 6d8da6e64d61 |
children |
comparison
equal
deleted
inserted
replaced
178:bc8d2ccff09c | 179:9c4645100fec |
---|---|
1 #include "sys/osx/dark_theme.h" | 1 #include "sys/osx/dark_theme.h" |
2 #import <Cocoa/Cocoa.h> | 2 |
3 #import <AppKit/AppKit.h> | |
3 | 4 |
4 namespace osx { | 5 namespace osx { |
5 | 6 |
6 /* I remember clang giving a hissy fit when I tried simplifying this to just | 7 /* I remember clang giving a hissy fit when I tried simplifying this to just |
7 a return; does it still do that? */ | 8 * a return; does it still do that? |
9 */ | |
8 bool DarkThemeAvailable() { | 10 bool DarkThemeAvailable() { |
9 if (@available(macOS 10.14, *)) | 11 if (@available(macOS 10.14, *)) |
10 return true; | 12 return true; |
11 else | 13 else |
12 return false; | 14 return false; |