cocoa backend postponed
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
fa3488402e
commit
1562c3b89e
3 changed files with 15 additions and 3 deletions
|
|
@ -1,7 +1,8 @@
|
|||
$library_suffix = ".dylib";
|
||||
set_shared_flag("-dynamiclib");
|
||||
|
||||
use_backend("cocoa");
|
||||
#use_backend("cocoa");
|
||||
new_object("src/backend/nococoa.m");
|
||||
|
||||
add_cflags("-DSTBI_NO_THREAD_LOCALS");
|
||||
add_ldflags("-framework Cocoa -lobjc");
|
||||
|
|
|
|||
8
src/backend/nococoa.m
Normal file
8
src/backend/nococoa.m
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <Mw/Milsko.h>
|
||||
|
||||
void MwLLNoCocoaErrorMessage() {
|
||||
NSAlert* alert = [[NSAlert alloc] init];
|
||||
[alert setMessageText:@"Milsko applications currently requires XQuartz or cocoa-way. PRs are welcome for anyone who wants to finish the Cocoa backend (prefarably in Objective-C)"];
|
||||
[alert addButtonWithTitle:@"Ok"];
|
||||
[alert runModal];
|
||||
}
|
||||
|
|
@ -967,7 +967,6 @@ int MwLibraryInit(void) {
|
|||
#ifdef USE_WAYLAND
|
||||
MwLLWaylandCallInit,
|
||||
#endif
|
||||
/* x11 has higher priority then cocoa until it works */
|
||||
#ifdef USE_X11
|
||||
MwLLX11CallInit,
|
||||
#endif
|
||||
|
|
@ -989,6 +988,10 @@ int MwLibraryInit(void) {
|
|||
if(calls[i]() == 0) return 0;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
void MwNoCocoaErrorMessage();
|
||||
MwNoCocoaErrorMessage();
|
||||
#else
|
||||
printf("[WARNING] No suitable GUI backend found! Enabled:"
|
||||
#ifdef USE_COCOA
|
||||
" Cocoa"
|
||||
|
|
@ -1006,7 +1009,7 @@ int MwLibraryInit(void) {
|
|||
" ClassicMacOS"
|
||||
#endif
|
||||
"\n");
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue