Mercurial > dwindows
comparison mac/dw.m @ 2148:79e9c8080ad9
Mac: Beta 2 of Xcode 12 has 10_16 defined but max allowed is 10_15.
The new warnings are about deprecations in 10.15 so switching them to
Catalina instead of Big Sur. Still not sure why it isn't 11.0 SDK.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 24 Jul 2020 19:27:31 +0000 |
parents | 42f8ad7a89e8 |
children | c08e03168a9e |
comparison
equal
deleted
inserted
replaced
2147:dfc64135adb6 | 2148:79e9c8080ad9 |
---|---|
161 #define BUILDING_FOR_CATALINA | 161 #define BUILDING_FOR_CATALINA |
162 #define WK_API_ENABLED 1 | 162 #define WK_API_ENABLED 1 |
163 #endif | 163 #endif |
164 | 164 |
165 /* Handle deprecation of constants in 10.16... */ | 165 /* Handle deprecation of constants in 10.16... */ |
166 #if defined(MAC_OS_X_VERSION_11_0) && ((defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_11_0) || !defined(MAC_OS_X_VERSION_MAX_ALLOWED)) | 166 #if defined(MAC_OS_X_VERSION_10_16) && ((defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_16) || !defined(MAC_OS_X_VERSION_MAX_ALLOWED)) |
167 #define BUILDING_FOR_BIG_SUR | 167 #define BUILDING_FOR_BIG_SUR |
168 #endif | 168 #endif |
169 | 169 |
170 /* Macros to encapsulate running functions on the main thread | 170 /* Macros to encapsulate running functions on the main thread |
171 * on Mojave or later... and locking mutexes on earlier versions. | 171 * on Mojave or later... and locking mutexes on earlier versions. |
4444 { | 4444 { |
4445 NSBox *groupbox = [[DWGroupBox alloc] init]; | 4445 NSBox *groupbox = [[DWGroupBox alloc] init]; |
4446 DWBox *thisbox = dw_box_new(type, pad); | 4446 DWBox *thisbox = dw_box_new(type, pad); |
4447 Box *box = [thisbox box]; | 4447 Box *box = [thisbox box]; |
4448 | 4448 |
4449 #ifndef BUILDING_FOR_BIG_SUR | 4449 #ifndef BUILDING_FOR_CATALINA |
4450 [groupbox setBorderType:NSBezelBorder]; | 4450 [groupbox setBorderType:NSBezelBorder]; |
4451 #endif | 4451 #endif |
4452 [groupbox setTitle:[NSString stringWithUTF8String:title]]; | 4452 [groupbox setTitle:[NSString stringWithUTF8String:title]]; |
4453 box->grouphwnd = groupbox; | 4453 box->grouphwnd = groupbox; |
4454 [groupbox setContentView:thisbox]; | 4454 [groupbox setContentView:thisbox]; |
6392 HWND API dw_status_text_new(const char *text, ULONG cid) | 6392 HWND API dw_status_text_new(const char *text, ULONG cid) |
6393 { | 6393 { |
6394 NSBox *border = [[NSBox alloc] init]; | 6394 NSBox *border = [[NSBox alloc] init]; |
6395 NSTextField *textfield = dw_text_new(text, cid); | 6395 NSTextField *textfield = dw_text_new(text, cid); |
6396 | 6396 |
6397 #ifndef BUILDING_FOR_BIG_SUR | 6397 #ifndef BUILDING_FOR_CATALINA |
6398 [border setBorderType:NSGrooveBorder]; | 6398 [border setBorderType:NSGrooveBorder]; |
6399 #endif | 6399 #endif |
6400 [border setTitlePosition:NSNoTitle]; | 6400 [border setTitlePosition:NSNoTitle]; |
6401 [border setContentView:textfield]; | 6401 [border setContentView:textfield]; |
6402 [border setContentViewMargins:NSMakeSize(1.5,1.5)]; | 6402 [border setContentViewMargins:NSMakeSize(1.5,1.5)]; |