mac: get it compiling. remove preQuartz.h (will add something better later) and rename the 'quickdraw' target to carbon

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@184 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
IoIxD
2025-10-06 21:01:50 +00:00
parent 8dac5bd0f0
commit 26a522d035
10 changed files with 169 additions and 2293 deletions

View File

@@ -2,25 +2,25 @@
#include <Mw/Milsko.h>
#include "mac.h"
#include "quickDraw.h"
#include "carbon.h"
MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
void* library;
MwLL r = malloc(sizeof(*r));
MwLLCreateCommon(r);
library = dlopen("CarbonLib", RTLD_NOW);
if(library != NULL) {
dlclose(library);
r->backend = getQuickDrawBackend();
quickDrawBackendUserDataInit(r->userdata);
return r;
}
printf("ERROR: No supported UI library found. (Searched for: CarbonLib)\n");
getchar();
raise(SIGTRAP);
// void* library;
// MwLL r = malloc(sizeof(*r));
// MwLLCreateCommon(r);
//
// library = dlopen("CarbonLib", RTLD_NOW);
// if(library != NULL) {
// dlclose(library);
// r->backend = getQuickDrawBackend();
// quickDrawBackendUserDataInit(r->userdata);
// return r;
// }
//
// printf("ERROR: No supported UI library found. (Searched for: CarbonLib)\n");
// getchar();
// raise(SIGTRAP);
return NULL;
};
@@ -75,3 +75,9 @@ void MwLLSetIcon(MwLL handle, MwLLPixmap pixmap) {
void MwLLForceRender(MwLL handle) {
return handle->backend.forceRender(handle);
};
void MwLLSetCursor(MwLL handle, MwCursor* image, MwCursor* mask) {
return handle->backend.setCursor(handle, image, mask);
};
void MwLLDetach(MwLL handle, MwPoint* point) {
return handle->backend.detach(handle, point);
};