mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 00:50:53 +00:00
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:
53
GNUmakefile
53
GNUmakefile
@@ -37,33 +37,53 @@ L_OBJS += src/external/ds.o src/external/image.o
|
|||||||
L_OBJS += src/widget/window.o src/widget/button.o src/widget/frame.o src/widget/menu.o src/widget/submenu.o src/widget/image.o src/widget/scrollbar.o
|
L_OBJS += src/widget/window.o src/widget/button.o src/widget/frame.o src/widget/menu.o src/widget/submenu.o src/widget/image.o src/widget/scrollbar.o
|
||||||
L_OBJS += src/cursor/default.o src/cursor/cross.o
|
L_OBJS += src/cursor/default.o src/cursor/cross.o
|
||||||
|
|
||||||
|
FOUND_PLATFORM = 0
|
||||||
|
|
||||||
ifeq ($(TARGET),NetBSD)
|
ifeq ($(TARGET),NetBSD)
|
||||||
CFLAGS += -I/usr/X11R7/include -I/usr/pkg/include
|
CFLAGS += -I/usr/X11R7/include -I/usr/pkg/include
|
||||||
LDFLAGS += -L/usr/X11R7/lib -L/usr/pkg/lib -Wl,-R/usr/X11R7/lib -Wl,-R/usr/pkg/lib
|
LDFLAGS += -L/usr/X11R7/lib -L/usr/pkg/lib -Wl,-R/usr/X11R7/lib -Wl,-R/usr/pkg/lib
|
||||||
UNIX = 1
|
UNIX = 1
|
||||||
|
|
||||||
OPENGL = 1
|
OPENGL = 1
|
||||||
else ifeq ($(TARGET),Linux)
|
FOUND_PLATFORM = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TARGET),Linux)
|
||||||
L_LIBS += -ldl
|
L_LIBS += -ldl
|
||||||
UNIX = 1
|
UNIX = 1
|
||||||
|
|
||||||
OPENGL = 1
|
OPENGL = 1
|
||||||
VULKAN = 1
|
VULKAN = 1
|
||||||
else ifeq ($(TARGET),Windows)
|
FOUND_PLATFORM = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TARGET),Windows)
|
||||||
WINDOWS = 1
|
WINDOWS = 1
|
||||||
|
|
||||||
OPENGL = 1
|
OPENGL = 1
|
||||||
VULKAN = 1
|
VULKAN = 1
|
||||||
else ifeq ($(TARGET),SunOS)
|
FOUND_PLATFORM = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TARGET),SunOS)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
UNIX = 1
|
UNIX = 1
|
||||||
L_LIBS += -lsocket -lnsl
|
L_LIBS += -lsocket -lnsl
|
||||||
|
|
||||||
OPENGL = 1
|
OPENGL = 1
|
||||||
else
|
FOUND_PLATFORM = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TARGET),Darwin)
|
||||||
|
CC = gcc
|
||||||
|
DARWIN = 1
|
||||||
|
L_LIBS += -framework Carbon
|
||||||
|
FOUND_PLATFORM = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(FOUND_PLATFORM),0)
|
||||||
$(error Add your platform definition)
|
$(error Add your platform definition)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Standard gcc accepts this but we have to override this for Apple's gcc.
|
||||||
|
SHARED = -shared
|
||||||
|
|
||||||
ifeq ($(UNIX),1)
|
ifeq ($(UNIX),1)
|
||||||
L_CFLAGS += -DUSE_X11
|
L_CFLAGS += -DUSE_X11
|
||||||
L_OBJS += src/backend/x11.o
|
L_OBJS += src/backend/x11.o
|
||||||
@@ -76,7 +96,9 @@ E_LIBS += -lm
|
|||||||
LIB = lib
|
LIB = lib
|
||||||
SO = .so
|
SO = .so
|
||||||
EXEC =
|
EXEC =
|
||||||
else ifeq ($(WINDOWS),1)
|
endif
|
||||||
|
|
||||||
|
ifeq ($(WINDOWS),1)
|
||||||
L_CFLAGS += -DUSE_GDI
|
L_CFLAGS += -DUSE_GDI
|
||||||
L_LDFLAGS += -Wl,--out-implib,src/libMw.a -static-libgcc
|
L_LDFLAGS += -Wl,--out-implib,src/libMw.a -static-libgcc
|
||||||
L_OBJS += src/backend/gdi.o
|
L_OBJS += src/backend/gdi.o
|
||||||
@@ -89,6 +111,17 @@ SO = .dll
|
|||||||
EXEC = .exe
|
EXEC = .exe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(DARWIN),1)
|
||||||
|
L_CFLAGS += -DSTBI_NO_THREAD_LOCALS -DUSE_DARWIN
|
||||||
|
L_OBJS += src/backend/mac/mac.o src/backend/mac/carbon.o
|
||||||
|
|
||||||
|
LIB = lib
|
||||||
|
SO = .dylib
|
||||||
|
EXEC =
|
||||||
|
|
||||||
|
SHARED = -dynamiclib
|
||||||
|
endif
|
||||||
|
|
||||||
EXAMPLES = examples/example$(EXEC) examples/rotate$(EXEC) examples/image$(EXEC) examples/scrollbar$(EXEC)
|
EXAMPLES = examples/example$(EXEC) examples/rotate$(EXEC) examples/image$(EXEC) examples/scrollbar$(EXEC)
|
||||||
|
|
||||||
ifeq ($(OPENGL),1)
|
ifeq ($(OPENGL),1)
|
||||||
@@ -112,7 +145,7 @@ format:
|
|||||||
perltidy -b -bext='/' --paren-tightness=2 `find tools -name "*.pl"`
|
perltidy -b -bext='/' --paren-tightness=2 `find tools -name "*.pl"`
|
||||||
|
|
||||||
src/$(LIB)Mw$(SO): $(L_OBJS)
|
src/$(LIB)Mw$(SO): $(L_OBJS)
|
||||||
$(CC) $(L_LDFLAGS) -shared -o $@ $^ $(L_LIBS)
|
$(CC) $(L_LDFLAGS) $(SHARED) -o $@ $^ $(L_LIBS)
|
||||||
|
|
||||||
examples/gl%$(EXEC): examples/gl%.o src/$(LIB)Mw$(SO)
|
examples/gl%$(EXEC): examples/gl%.o src/$(LIB)Mw$(SO)
|
||||||
$(CC) $(E_LDFLAGS) -o $@ $< $(E_LIBS) $(GL)
|
$(CC) $(E_LDFLAGS) -o $@ $< $(E_LIBS) $(GL)
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ typedef void* MwLLPixmap;
|
|||||||
#ifdef USE_GDI
|
#ifdef USE_GDI
|
||||||
#include "../src/backend/gdi.h"
|
#include "../src/backend/gdi.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_DARWIN
|
||||||
|
#include "../src/backend/mac/mac.h"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include <Mw/TypeDefs.h>
|
#include <Mw/TypeDefs.h>
|
||||||
|
|
||||||
|
|||||||
76
src/backend/mac/carbon.c
Normal file
76
src/backend/mac/carbon.c
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/* $Id: carbon.c 154 2025-10-04 12:33:26Z nishi $ */
|
||||||
|
|
||||||
|
#include "mac.h"
|
||||||
|
#include "carbon.h"
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
void carbonBackendUserDataInit(mac_backend_userdata ud) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static MwLL carbon_create(MwLL parent, int x, int y, int width, int height) {
|
||||||
|
return NULL;
|
||||||
|
};
|
||||||
|
static void carbon_destroy(MwLL handle) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static void carbon_polygon(MwLL handle, MwPoint* points, int points_count, MwLLColor color) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static MwLLColor carbon_allocColor(MwLL handle, int r, int g, int b) {
|
||||||
|
return NULL;
|
||||||
|
};
|
||||||
|
static void carbon_freeColor(MwLLColor color) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static void carbon_getXYWH(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static void carbon_setXY(MwLL handle, int x, int y) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static void carbon_setWH(MwLL handle, int w, int h) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static void carbon_setTitle(MwLL handle, const char* title) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static int carbon_pending(MwLL handle) {
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
static void carbon_nextEvent(MwLL handle) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static MwLLPixmap carbon_createPixmap(MwLL handle, unsigned char* data, int width, int height) {
|
||||||
|
return NULL;
|
||||||
|
};
|
||||||
|
static void carbon_drawPixmap(MwLL handle, MwRect* rect, MwLLPixmap pixmap) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static void carbon_setIcon(MwLL handle, MwLLPixmap pixmap) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
static void carbon_forceRender(MwLL handle) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
static mac_backend carbon_backend = {
|
||||||
|
.create = carbon_create,
|
||||||
|
.destroy = carbon_destroy,
|
||||||
|
.polygon = carbon_polygon,
|
||||||
|
.allocColor = carbon_allocColor,
|
||||||
|
.freeColor = carbon_freeColor,
|
||||||
|
.getXYWH = carbon_getXYWH,
|
||||||
|
.setXY = carbon_setXY,
|
||||||
|
.setWH = carbon_setWH,
|
||||||
|
.setTitle = carbon_setTitle,
|
||||||
|
.pending = carbon_pending,
|
||||||
|
.nextEvent = carbon_nextEvent,
|
||||||
|
.createPixmap = carbon_createPixmap,
|
||||||
|
.drawPixmap = carbon_drawPixmap,
|
||||||
|
.setIcon = carbon_setIcon,
|
||||||
|
.forceRender = carbon_forceRender,
|
||||||
|
};
|
||||||
|
|
||||||
|
mac_backend getCarbonBackend(void) {
|
||||||
|
return carbon_backend;
|
||||||
|
};
|
||||||
12
src/backend/mac/carbon.h
Normal file
12
src/backend/mac/carbon.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef __QUICKDRAW_H__
|
||||||
|
#define __QUICKDRAW_H__
|
||||||
|
|
||||||
|
#include "mac.h"
|
||||||
|
|
||||||
|
struct mac_backend_userdata_t {
|
||||||
|
};
|
||||||
|
|
||||||
|
void carbonBackendUserDataInit(mac_backend_userdata);
|
||||||
|
mac_backend getCarbonBackend(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -2,25 +2,25 @@
|
|||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
#include "mac.h"
|
#include "mac.h"
|
||||||
#include "quickDraw.h"
|
#include "carbon.h"
|
||||||
|
|
||||||
MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
|
MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
|
||||||
void* library;
|
// void* library;
|
||||||
MwLL r = malloc(sizeof(*r));
|
// MwLL r = malloc(sizeof(*r));
|
||||||
MwLLCreateCommon(r);
|
// MwLLCreateCommon(r);
|
||||||
|
//
|
||||||
library = dlopen("CarbonLib", RTLD_NOW);
|
// library = dlopen("CarbonLib", RTLD_NOW);
|
||||||
if(library != NULL) {
|
// if(library != NULL) {
|
||||||
dlclose(library);
|
// dlclose(library);
|
||||||
r->backend = getQuickDrawBackend();
|
// r->backend = getQuickDrawBackend();
|
||||||
quickDrawBackendUserDataInit(r->userdata);
|
// quickDrawBackendUserDataInit(r->userdata);
|
||||||
return r;
|
// return r;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
printf("ERROR: No supported UI library found. (Searched for: CarbonLib)\n");
|
// printf("ERROR: No supported UI library found. (Searched for: CarbonLib)\n");
|
||||||
getchar();
|
// getchar();
|
||||||
raise(SIGTRAP);
|
// raise(SIGTRAP);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,3 +75,9 @@ void MwLLSetIcon(MwLL handle, MwLLPixmap pixmap) {
|
|||||||
void MwLLForceRender(MwLL handle) {
|
void MwLLForceRender(MwLL handle) {
|
||||||
return handle->backend.forceRender(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);
|
||||||
|
};
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ typedef struct mac_backend_t {
|
|||||||
void (*drawPixmap)(MwLL handle, MwRect* rect, MwLLPixmap pixmap);
|
void (*drawPixmap)(MwLL handle, MwRect* rect, MwLLPixmap pixmap);
|
||||||
void (*setIcon)(MwLL handle, MwLLPixmap pixmap);
|
void (*setIcon)(MwLL handle, MwLLPixmap pixmap);
|
||||||
void (*forceRender)(MwLL handle);
|
void (*forceRender)(MwLL handle);
|
||||||
|
void (*setCursor)(MwLL handle, MwCursor* image, MwCursor* mask);
|
||||||
|
void (*detach)(MwLL handle, MwPoint* point);
|
||||||
} mac_backend;
|
} mac_backend;
|
||||||
|
|
||||||
typedef struct mac_backend_userdata_t* mac_backend_userdata;
|
typedef struct mac_backend_userdata_t* mac_backend_userdata;
|
||||||
@@ -44,4 +46,9 @@ struct _MwLL {
|
|||||||
MwLLHandler handler;
|
MwLLHandler handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _MwLLPixmap {
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,406 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
#include "mac.h"
|
|
||||||
#include "quickDraw.h"
|
|
||||||
#include <dlfcn.h>
|
|
||||||
|
|
||||||
void quickDrawBackendUserDataInit(mac_backend_userdata ud) {
|
|
||||||
void* carbonLib = dlopen("CarbonLib", RTLD_LAZY | RTLD_LOCAL);
|
|
||||||
|
|
||||||
ud = malloc(sizeof(struct mac_backend_userdata_t));
|
|
||||||
|
|
||||||
#define LOAD_QD_FUNC(name) ud->name = dlsym(carbonLib, #name)
|
|
||||||
|
|
||||||
LOAD_QD_FUNC(GetPortCustomXFerProc);
|
|
||||||
LOAD_QD_FUNC(SetPortCustomXFerProc);
|
|
||||||
LOAD_QD_FUNC(OpenCursorComponent);
|
|
||||||
LOAD_QD_FUNC(CloseCursorComponent);
|
|
||||||
LOAD_QD_FUNC(SetCursorComponent);
|
|
||||||
LOAD_QD_FUNC(CursorComponentChanged);
|
|
||||||
LOAD_QD_FUNC(CursorComponentSetData);
|
|
||||||
LOAD_QD_FUNC(IsValidPort);
|
|
||||||
LOAD_QD_FUNC(GetPortPixMap);
|
|
||||||
LOAD_QD_FUNC(GetPortBitMapForCopyBits);
|
|
||||||
LOAD_QD_FUNC(GetPortBounds);
|
|
||||||
LOAD_QD_FUNC(GetPortForeColor);
|
|
||||||
LOAD_QD_FUNC(GetPortBackColor);
|
|
||||||
LOAD_QD_FUNC(GetPortOpColor);
|
|
||||||
LOAD_QD_FUNC(GetPortHiliteColor);
|
|
||||||
LOAD_QD_FUNC(GetPortGrafProcs);
|
|
||||||
LOAD_QD_FUNC(GetPortTextFont);
|
|
||||||
LOAD_QD_FUNC(GetPortTextFace);
|
|
||||||
LOAD_QD_FUNC(GetPortTextMode);
|
|
||||||
LOAD_QD_FUNC(GetPortTextSize);
|
|
||||||
LOAD_QD_FUNC(GetPortChExtra);
|
|
||||||
LOAD_QD_FUNC(GetPortFracHPenLocation);
|
|
||||||
LOAD_QD_FUNC(GetPortSpExtra);
|
|
||||||
LOAD_QD_FUNC(GetPortPenVisibility);
|
|
||||||
LOAD_QD_FUNC(GetPortVisibleRegion);
|
|
||||||
LOAD_QD_FUNC(GetPortClipRegion);
|
|
||||||
LOAD_QD_FUNC(GetPortBackPixPat);
|
|
||||||
LOAD_QD_FUNC(GetPortPenPixPat);
|
|
||||||
LOAD_QD_FUNC(GetPortFillPixPat);
|
|
||||||
LOAD_QD_FUNC(GetPortPenSize);
|
|
||||||
LOAD_QD_FUNC(GetPortPenMode);
|
|
||||||
LOAD_QD_FUNC(GetPortPenLocation);
|
|
||||||
LOAD_QD_FUNC(IsPortRegionBeingDefined);
|
|
||||||
LOAD_QD_FUNC(IsPortPictureBeingDefined);
|
|
||||||
LOAD_QD_FUNC(IsPortPolyBeingDefined);
|
|
||||||
LOAD_QD_FUNC(IsPortOffscreen);
|
|
||||||
LOAD_QD_FUNC(IsPortColor);
|
|
||||||
LOAD_QD_FUNC(SetPortBounds);
|
|
||||||
LOAD_QD_FUNC(SetPortOpColor);
|
|
||||||
LOAD_QD_FUNC(SetPortGrafProcs);
|
|
||||||
LOAD_QD_FUNC(SetPortVisibleRegion);
|
|
||||||
LOAD_QD_FUNC(SetPortClipRegion);
|
|
||||||
LOAD_QD_FUNC(SetPortPenPixPat);
|
|
||||||
LOAD_QD_FUNC(SetPortFillPixPat);
|
|
||||||
LOAD_QD_FUNC(SetPortBackPixPat);
|
|
||||||
LOAD_QD_FUNC(SetPortPenSize);
|
|
||||||
LOAD_QD_FUNC(SetPortPenMode);
|
|
||||||
LOAD_QD_FUNC(SetPortFracHPenLocation);
|
|
||||||
LOAD_QD_FUNC(GetPixBounds);
|
|
||||||
LOAD_QD_FUNC(GetPixDepth);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsRandomSeed);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsScreenBits);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsArrow);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsDarkGray);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsLightGray);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsGray);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsBlack);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsWhite);
|
|
||||||
LOAD_QD_FUNC(GetQDGlobalsThePort);
|
|
||||||
LOAD_QD_FUNC(SetQDGlobalsRandomSeed);
|
|
||||||
LOAD_QD_FUNC(SetQDGlobalsArrow);
|
|
||||||
LOAD_QD_FUNC(GetRegionBounds);
|
|
||||||
LOAD_QD_FUNC(IsRegionRectangular);
|
|
||||||
LOAD_QD_FUNC(CreateNewPort);
|
|
||||||
LOAD_QD_FUNC(DisposePort);
|
|
||||||
LOAD_QD_FUNC(SetQDError);
|
|
||||||
LOAD_QD_FUNC(QDIsPortBuffered);
|
|
||||||
LOAD_QD_FUNC(QDIsPortBufferDirty);
|
|
||||||
LOAD_QD_FUNC(QDFlushPortBuffer);
|
|
||||||
LOAD_QD_FUNC(QDGetDirtyRegion);
|
|
||||||
LOAD_QD_FUNC(QDSetDirtyRegion);
|
|
||||||
LOAD_QD_FUNC(CreateCGContextForPort);
|
|
||||||
LOAD_QD_FUNC(ClipCGContextToRegion);
|
|
||||||
LOAD_QD_FUNC(SyncCGContextOriginWithPort);
|
|
||||||
LOAD_QD_FUNC(CreateNewPortForCGDisplayID);
|
|
||||||
LOAD_QD_FUNC(QDDisplayWaitCursor);
|
|
||||||
LOAD_QD_FUNC(QDSetPatternOrigin);
|
|
||||||
LOAD_QD_FUNC(QDGetPatternOrigin);
|
|
||||||
LOAD_QD_FUNC(LMGetScrVRes);
|
|
||||||
LOAD_QD_FUNC(LMSetScrVRes);
|
|
||||||
LOAD_QD_FUNC(LMGetScrHRes);
|
|
||||||
LOAD_QD_FUNC(LMSetScrHRes);
|
|
||||||
LOAD_QD_FUNC(LMGetMainDevice);
|
|
||||||
LOAD_QD_FUNC(LMSetMainDevice);
|
|
||||||
LOAD_QD_FUNC(LMGetDeviceList);
|
|
||||||
LOAD_QD_FUNC(LMSetDeviceList);
|
|
||||||
LOAD_QD_FUNC(LMGetQDColors);
|
|
||||||
LOAD_QD_FUNC(LMSetQDColors);
|
|
||||||
LOAD_QD_FUNC(LMGetWidthListHand);
|
|
||||||
LOAD_QD_FUNC(LMSetWidthListHand);
|
|
||||||
LOAD_QD_FUNC(LMGetHiliteMode);
|
|
||||||
LOAD_QD_FUNC(LMSetHiliteMode);
|
|
||||||
LOAD_QD_FUNC(LMGetWidthPtr);
|
|
||||||
LOAD_QD_FUNC(LMSetWidthPtr);
|
|
||||||
LOAD_QD_FUNC(LMGetWidthTabHandle);
|
|
||||||
LOAD_QD_FUNC(LMSetWidthTabHandle);
|
|
||||||
LOAD_QD_FUNC(LMGetLastSPExtra);
|
|
||||||
LOAD_QD_FUNC(LMSetLastSPExtra);
|
|
||||||
LOAD_QD_FUNC(LMGetLastFOND);
|
|
||||||
LOAD_QD_FUNC(LMSetLastFOND);
|
|
||||||
LOAD_QD_FUNC(LMGetFractEnable);
|
|
||||||
LOAD_QD_FUNC(LMSetFractEnable);
|
|
||||||
LOAD_QD_FUNC(LMGetTheGDevice);
|
|
||||||
LOAD_QD_FUNC(LMSetTheGDevice);
|
|
||||||
LOAD_QD_FUNC(LMGetHiliteRGB);
|
|
||||||
LOAD_QD_FUNC(LMSetHiliteRGB);
|
|
||||||
LOAD_QD_FUNC(LMGetCursorNew);
|
|
||||||
LOAD_QD_FUNC(LMSetCursorNew);
|
|
||||||
LOAD_QD_FUNC(QDRegionToRects);
|
|
||||||
LOAD_QD_FUNC(SetPort);
|
|
||||||
LOAD_QD_FUNC(GetPort);
|
|
||||||
LOAD_QD_FUNC(GrafDevice);
|
|
||||||
LOAD_QD_FUNC(SetPortBits);
|
|
||||||
LOAD_QD_FUNC(PortSize);
|
|
||||||
LOAD_QD_FUNC(MovePortTo);
|
|
||||||
LOAD_QD_FUNC(SetOrigin);
|
|
||||||
LOAD_QD_FUNC(SetClip);
|
|
||||||
LOAD_QD_FUNC(GetClip);
|
|
||||||
LOAD_QD_FUNC(ClipRect);
|
|
||||||
LOAD_QD_FUNC(BackPat);
|
|
||||||
LOAD_QD_FUNC(InitCursor);
|
|
||||||
LOAD_QD_FUNC(SetCursor);
|
|
||||||
LOAD_QD_FUNC(HideCursor);
|
|
||||||
LOAD_QD_FUNC(ShowCursor);
|
|
||||||
LOAD_QD_FUNC(ObscureCursor);
|
|
||||||
LOAD_QD_FUNC(HidePen);
|
|
||||||
LOAD_QD_FUNC(ShowPen);
|
|
||||||
LOAD_QD_FUNC(GetPen);
|
|
||||||
LOAD_QD_FUNC(GetPenState);
|
|
||||||
LOAD_QD_FUNC(SetPenState);
|
|
||||||
LOAD_QD_FUNC(PenSize);
|
|
||||||
LOAD_QD_FUNC(PenMode);
|
|
||||||
LOAD_QD_FUNC(PenPat);
|
|
||||||
LOAD_QD_FUNC(PenNormal);
|
|
||||||
LOAD_QD_FUNC(MoveTo);
|
|
||||||
LOAD_QD_FUNC(Move);
|
|
||||||
LOAD_QD_FUNC(LineTo);
|
|
||||||
LOAD_QD_FUNC(Line);
|
|
||||||
LOAD_QD_FUNC(ForeColor);
|
|
||||||
LOAD_QD_FUNC(BackColor);
|
|
||||||
LOAD_QD_FUNC(ColorBit);
|
|
||||||
LOAD_QD_FUNC(SetRect);
|
|
||||||
LOAD_QD_FUNC(OffsetRect);
|
|
||||||
LOAD_QD_FUNC(InsetRect);
|
|
||||||
LOAD_QD_FUNC(SectRect);
|
|
||||||
LOAD_QD_FUNC(UnionRect);
|
|
||||||
LOAD_QD_FUNC(EqualRect);
|
|
||||||
LOAD_QD_FUNC(EmptyRect);
|
|
||||||
LOAD_QD_FUNC(FrameRect);
|
|
||||||
LOAD_QD_FUNC(PaintRect);
|
|
||||||
LOAD_QD_FUNC(EraseRect);
|
|
||||||
LOAD_QD_FUNC(InvertRect);
|
|
||||||
LOAD_QD_FUNC(FillRect);
|
|
||||||
LOAD_QD_FUNC(FrameOval);
|
|
||||||
LOAD_QD_FUNC(PaintOval);
|
|
||||||
LOAD_QD_FUNC(EraseOval);
|
|
||||||
LOAD_QD_FUNC(InvertOval);
|
|
||||||
LOAD_QD_FUNC(FillOval);
|
|
||||||
LOAD_QD_FUNC(FrameRoundRect);
|
|
||||||
LOAD_QD_FUNC(PaintRoundRect);
|
|
||||||
LOAD_QD_FUNC(EraseRoundRect);
|
|
||||||
LOAD_QD_FUNC(InvertRoundRect);
|
|
||||||
LOAD_QD_FUNC(FillRoundRect);
|
|
||||||
LOAD_QD_FUNC(FrameArc);
|
|
||||||
LOAD_QD_FUNC(PaintArc);
|
|
||||||
LOAD_QD_FUNC(EraseArc);
|
|
||||||
LOAD_QD_FUNC(InvertArc);
|
|
||||||
LOAD_QD_FUNC(FillArc);
|
|
||||||
LOAD_QD_FUNC(NewRgn);
|
|
||||||
LOAD_QD_FUNC(OpenRgn);
|
|
||||||
LOAD_QD_FUNC(CloseRgn);
|
|
||||||
LOAD_QD_FUNC(BitMapToRegion);
|
|
||||||
LOAD_QD_FUNC(HandleToRgn);
|
|
||||||
LOAD_QD_FUNC(RgnToHandle);
|
|
||||||
LOAD_QD_FUNC(DisposeRgn);
|
|
||||||
LOAD_QD_FUNC(CopyRgn);
|
|
||||||
LOAD_QD_FUNC(SetEmptyRgn);
|
|
||||||
LOAD_QD_FUNC(SetRectRgn);
|
|
||||||
LOAD_QD_FUNC(RectRgn);
|
|
||||||
LOAD_QD_FUNC(OffsetRgn);
|
|
||||||
LOAD_QD_FUNC(InsetRgn);
|
|
||||||
LOAD_QD_FUNC(SectRgn);
|
|
||||||
LOAD_QD_FUNC(UnionRgn);
|
|
||||||
LOAD_QD_FUNC(DiffRgn);
|
|
||||||
LOAD_QD_FUNC(XorRgn);
|
|
||||||
LOAD_QD_FUNC(RectInRgn);
|
|
||||||
LOAD_QD_FUNC(EqualRgn);
|
|
||||||
LOAD_QD_FUNC(EmptyRgn);
|
|
||||||
LOAD_QD_FUNC(FrameRgn);
|
|
||||||
LOAD_QD_FUNC(PaintRgn);
|
|
||||||
LOAD_QD_FUNC(EraseRgn);
|
|
||||||
LOAD_QD_FUNC(InvertRgn);
|
|
||||||
LOAD_QD_FUNC(FillRgn);
|
|
||||||
LOAD_QD_FUNC(ScrollRect);
|
|
||||||
LOAD_QD_FUNC(CopyBits);
|
|
||||||
LOAD_QD_FUNC(SeedFill);
|
|
||||||
LOAD_QD_FUNC(CalcMask);
|
|
||||||
LOAD_QD_FUNC(CopyMask);
|
|
||||||
LOAD_QD_FUNC(OpenPicture);
|
|
||||||
LOAD_QD_FUNC(PicComment);
|
|
||||||
LOAD_QD_FUNC(ClosePicture);
|
|
||||||
LOAD_QD_FUNC(DrawPicture);
|
|
||||||
LOAD_QD_FUNC(KillPicture);
|
|
||||||
LOAD_QD_FUNC(OpenPoly);
|
|
||||||
LOAD_QD_FUNC(ClosePoly);
|
|
||||||
LOAD_QD_FUNC(KillPoly);
|
|
||||||
LOAD_QD_FUNC(OffsetPoly);
|
|
||||||
LOAD_QD_FUNC(FramePoly);
|
|
||||||
LOAD_QD_FUNC(PaintPoly);
|
|
||||||
LOAD_QD_FUNC(ErasePoly);
|
|
||||||
LOAD_QD_FUNC(InvertPoly);
|
|
||||||
LOAD_QD_FUNC(FillPoly);
|
|
||||||
LOAD_QD_FUNC(SetPt);
|
|
||||||
LOAD_QD_FUNC(LocalToGlobal);
|
|
||||||
LOAD_QD_FUNC(GlobalToLocal);
|
|
||||||
LOAD_QD_FUNC(Random);
|
|
||||||
LOAD_QD_FUNC(StuffHex);
|
|
||||||
LOAD_QD_FUNC(GetPixel);
|
|
||||||
LOAD_QD_FUNC(ScalePt);
|
|
||||||
LOAD_QD_FUNC(MapPt);
|
|
||||||
LOAD_QD_FUNC(MapRect);
|
|
||||||
LOAD_QD_FUNC(MapRgn);
|
|
||||||
LOAD_QD_FUNC(MapPoly);
|
|
||||||
LOAD_QD_FUNC(SetStdProcs);
|
|
||||||
LOAD_QD_FUNC(StdRect);
|
|
||||||
LOAD_QD_FUNC(StdRRect);
|
|
||||||
LOAD_QD_FUNC(StdOval);
|
|
||||||
LOAD_QD_FUNC(StdArc);
|
|
||||||
LOAD_QD_FUNC(StdPoly);
|
|
||||||
LOAD_QD_FUNC(StdRgn);
|
|
||||||
LOAD_QD_FUNC(StdBits);
|
|
||||||
LOAD_QD_FUNC(StdComment);
|
|
||||||
LOAD_QD_FUNC(StdGetPic);
|
|
||||||
LOAD_QD_FUNC(StdPutPic);
|
|
||||||
LOAD_QD_FUNC(StdOpcode);
|
|
||||||
LOAD_QD_FUNC(AddPt);
|
|
||||||
LOAD_QD_FUNC(EqualPt);
|
|
||||||
LOAD_QD_FUNC(PtInRect);
|
|
||||||
LOAD_QD_FUNC(Pt2Rect);
|
|
||||||
LOAD_QD_FUNC(PtToAngle);
|
|
||||||
LOAD_QD_FUNC(SubPt);
|
|
||||||
LOAD_QD_FUNC(PtInRgn);
|
|
||||||
LOAD_QD_FUNC(StdLine);
|
|
||||||
LOAD_QD_FUNC(NewPixMap);
|
|
||||||
LOAD_QD_FUNC(DisposePixMap);
|
|
||||||
LOAD_QD_FUNC(CopyPixMap);
|
|
||||||
LOAD_QD_FUNC(NewPixPat);
|
|
||||||
LOAD_QD_FUNC(DisposePixPat);
|
|
||||||
LOAD_QD_FUNC(CopyPixPat);
|
|
||||||
LOAD_QD_FUNC(PenPixPat);
|
|
||||||
LOAD_QD_FUNC(BackPixPat);
|
|
||||||
LOAD_QD_FUNC(GetPixPat);
|
|
||||||
LOAD_QD_FUNC(MakeRGBPat);
|
|
||||||
LOAD_QD_FUNC(FillCRect);
|
|
||||||
LOAD_QD_FUNC(FillCOval);
|
|
||||||
LOAD_QD_FUNC(FillCRoundRect);
|
|
||||||
LOAD_QD_FUNC(FillCArc);
|
|
||||||
LOAD_QD_FUNC(FillCRgn);
|
|
||||||
LOAD_QD_FUNC(FillCPoly);
|
|
||||||
LOAD_QD_FUNC(RGBForeColor);
|
|
||||||
LOAD_QD_FUNC(RGBBackColor);
|
|
||||||
LOAD_QD_FUNC(SetCPixel);
|
|
||||||
LOAD_QD_FUNC(SetPortPix);
|
|
||||||
LOAD_QD_FUNC(GetCPixel);
|
|
||||||
LOAD_QD_FUNC(GetForeColor);
|
|
||||||
LOAD_QD_FUNC(GetBackColor);
|
|
||||||
LOAD_QD_FUNC(SeedCFill);
|
|
||||||
LOAD_QD_FUNC(CalcCMask);
|
|
||||||
LOAD_QD_FUNC(OpenCPicture);
|
|
||||||
LOAD_QD_FUNC(OpColor);
|
|
||||||
LOAD_QD_FUNC(HiliteColor);
|
|
||||||
LOAD_QD_FUNC(DisposeCTable);
|
|
||||||
LOAD_QD_FUNC(GetCTable);
|
|
||||||
LOAD_QD_FUNC(GetCCursor);
|
|
||||||
LOAD_QD_FUNC(SetCCursor);
|
|
||||||
LOAD_QD_FUNC(AllocCursor);
|
|
||||||
LOAD_QD_FUNC(DisposeCCursor);
|
|
||||||
LOAD_QD_FUNC(SetStdCProcs);
|
|
||||||
LOAD_QD_FUNC(GetMaxDevice);
|
|
||||||
LOAD_QD_FUNC(GetCTSeed);
|
|
||||||
LOAD_QD_FUNC(GetDeviceList);
|
|
||||||
LOAD_QD_FUNC(GetMainDevice);
|
|
||||||
LOAD_QD_FUNC(GetNextDevice);
|
|
||||||
LOAD_QD_FUNC(TestDeviceAttribute);
|
|
||||||
LOAD_QD_FUNC(SetDeviceAttribute);
|
|
||||||
LOAD_QD_FUNC(InitGDevice);
|
|
||||||
LOAD_QD_FUNC(NewGDevice);
|
|
||||||
LOAD_QD_FUNC(DisposeGDevice);
|
|
||||||
LOAD_QD_FUNC(SetGDevice);
|
|
||||||
LOAD_QD_FUNC(GetGDevice);
|
|
||||||
LOAD_QD_FUNC(Color2Index);
|
|
||||||
LOAD_QD_FUNC(Index2Color);
|
|
||||||
LOAD_QD_FUNC(InvertColor);
|
|
||||||
LOAD_QD_FUNC(RealColor);
|
|
||||||
LOAD_QD_FUNC(GetSubTable);
|
|
||||||
LOAD_QD_FUNC(MakeITable);
|
|
||||||
LOAD_QD_FUNC(AddSearch);
|
|
||||||
LOAD_QD_FUNC(AddComp);
|
|
||||||
LOAD_QD_FUNC(DelSearch);
|
|
||||||
LOAD_QD_FUNC(DelComp);
|
|
||||||
LOAD_QD_FUNC(SetClientID);
|
|
||||||
LOAD_QD_FUNC(ProtectEntry);
|
|
||||||
LOAD_QD_FUNC(ReserveEntry);
|
|
||||||
LOAD_QD_FUNC(SetEntries);
|
|
||||||
LOAD_QD_FUNC(SaveEntries);
|
|
||||||
LOAD_QD_FUNC(RestoreEntries);
|
|
||||||
LOAD_QD_FUNC(QDError);
|
|
||||||
LOAD_QD_FUNC(CopyDeepMask);
|
|
||||||
LOAD_QD_FUNC(DeviceLoop);
|
|
||||||
LOAD_QD_FUNC(GetMaskTable);
|
|
||||||
LOAD_QD_FUNC(GetPattern);
|
|
||||||
LOAD_QD_FUNC(GetCursor);
|
|
||||||
LOAD_QD_FUNC(GetPicture);
|
|
||||||
LOAD_QD_FUNC(DeltaPoint);
|
|
||||||
LOAD_QD_FUNC(ShieldCursor);
|
|
||||||
LOAD_QD_FUNC(ScreenRes);
|
|
||||||
LOAD_QD_FUNC(GetIndPattern);
|
|
||||||
LOAD_QD_FUNC(deltapoint);
|
|
||||||
LOAD_QD_FUNC(PackBits);
|
|
||||||
LOAD_QD_FUNC(UnpackBits);
|
|
||||||
LOAD_QD_FUNC(SlopeFromAngle);
|
|
||||||
LOAD_QD_FUNC(AngleFromSlope);
|
|
||||||
|
|
||||||
#undef LOAD_QD_FUNC
|
|
||||||
}
|
|
||||||
|
|
||||||
static MwLL quickdraw_create(MwLL parent, int x, int y, int width, int height) {
|
|
||||||
return NULL;
|
|
||||||
};
|
|
||||||
static void quickdraw_destroy(MwLL handle) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static void quickdraw_polygon(MwLL handle, MwPoint* points, int points_count, MwLLColor color) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static MwLLColor quickdraw_allocColor(MwLL handle, int r, int g, int b) {
|
|
||||||
return NULL;
|
|
||||||
};
|
|
||||||
static void quickdraw_freeColor(MwLLColor color) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static void quickdraw_getXYWH(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static void quickdraw_setXY(MwLL handle, int x, int y) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static void quickdraw_setWH(MwLL handle, int w, int h) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static void quickdraw_setTitle(MwLL handle, const char* title) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static int quickdraw_pending(MwLL handle) {
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
static void quickdraw_nextEvent(MwLL handle) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static MwLLPixmap quickdraw_createPixmap(MwLL handle, unsigned char* data, int width, int height) {
|
|
||||||
return NULL;
|
|
||||||
};
|
|
||||||
static void quickdraw_drawPixmap(MwLL handle, MwRect* rect, MwLLPixmap pixmap) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static void quickdraw_setIcon(MwLL handle, MwLLPixmap pixmap) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
static void quickdraw_forceRender(MwLL handle) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
|
|
||||||
static mac_backend quickdraw_backend = {
|
|
||||||
.create = quickdraw_create,
|
|
||||||
.destroy = quickdraw_destroy,
|
|
||||||
.polygon = quickdraw_polygon,
|
|
||||||
.allocColor = quickdraw_allocColor,
|
|
||||||
.freeColor = quickdraw_freeColor,
|
|
||||||
.getXYWH = quickdraw_getXYWH,
|
|
||||||
.setXY = quickdraw_setXY,
|
|
||||||
.setWH = quickdraw_setWH,
|
|
||||||
.setTitle = quickdraw_setTitle,
|
|
||||||
.pending = quickdraw_pending,
|
|
||||||
.nextEvent = quickdraw_nextEvent,
|
|
||||||
.createPixmap = quickdraw_createPixmap,
|
|
||||||
.drawPixmap = quickdraw_drawPixmap,
|
|
||||||
.setIcon = quickdraw_setIcon,
|
|
||||||
.forceRender = quickdraw_forceRender,
|
|
||||||
};
|
|
||||||
|
|
||||||
mac_backend getQuickDrawBackend(void) {
|
|
||||||
return quickdraw_backend;
|
|
||||||
};
|
|
||||||
@@ -1,335 +0,0 @@
|
|||||||
#ifndef __QUICKDRAW_H__
|
|
||||||
#define __QUICKDRAW_H__
|
|
||||||
|
|
||||||
#include "preQuartz.h"
|
|
||||||
#include "mac.h"
|
|
||||||
|
|
||||||
struct mac_backend_userdata_t {
|
|
||||||
PFN_GetPortCustomXFerProc GetPortCustomXFerProc;
|
|
||||||
PFN_SetPortCustomXFerProc SetPortCustomXFerProc;
|
|
||||||
PFN_OpenCursorComponent OpenCursorComponent;
|
|
||||||
PFN_CloseCursorComponent CloseCursorComponent;
|
|
||||||
PFN_SetCursorComponent SetCursorComponent;
|
|
||||||
PFN_CursorComponentChanged CursorComponentChanged;
|
|
||||||
PFN_CursorComponentSetData CursorComponentSetData;
|
|
||||||
PFN_IsValidPort IsValidPort;
|
|
||||||
PFN_GetPortPixMap GetPortPixMap;
|
|
||||||
PFN_GetPortBitMapForCopyBits GetPortBitMapForCopyBits;
|
|
||||||
PFN_GetPortBounds GetPortBounds;
|
|
||||||
PFN_GetPortForeColor GetPortForeColor;
|
|
||||||
PFN_GetPortBackColor GetPortBackColor;
|
|
||||||
PFN_GetPortOpColor GetPortOpColor;
|
|
||||||
PFN_GetPortHiliteColor GetPortHiliteColor;
|
|
||||||
PFN_GetPortGrafProcs GetPortGrafProcs;
|
|
||||||
PFN_GetPortTextFont GetPortTextFont;
|
|
||||||
PFN_GetPortTextFace GetPortTextFace;
|
|
||||||
PFN_GetPortTextMode GetPortTextMode;
|
|
||||||
PFN_GetPortTextSize GetPortTextSize;
|
|
||||||
PFN_GetPortChExtra GetPortChExtra;
|
|
||||||
PFN_GetPortFracHPenLocation GetPortFracHPenLocation;
|
|
||||||
PFN_GetPortSpExtra GetPortSpExtra;
|
|
||||||
PFN_GetPortPenVisibility GetPortPenVisibility;
|
|
||||||
PFN_GetPortVisibleRegion GetPortVisibleRegion;
|
|
||||||
PFN_GetPortClipRegion GetPortClipRegion;
|
|
||||||
PFN_GetPortBackPixPat GetPortBackPixPat;
|
|
||||||
PFN_GetPortPenPixPat GetPortPenPixPat;
|
|
||||||
PFN_GetPortFillPixPat GetPortFillPixPat;
|
|
||||||
PFN_GetPortPenSize GetPortPenSize;
|
|
||||||
PFN_GetPortPenMode GetPortPenMode;
|
|
||||||
PFN_GetPortPenLocation GetPortPenLocation;
|
|
||||||
PFN_IsPortRegionBeingDefined IsPortRegionBeingDefined;
|
|
||||||
PFN_IsPortPictureBeingDefined IsPortPictureBeingDefined;
|
|
||||||
PFN_IsPortPolyBeingDefined IsPortPolyBeingDefined;
|
|
||||||
PFN_IsPortOffscreen IsPortOffscreen;
|
|
||||||
PFN_IsPortColor IsPortColor;
|
|
||||||
PFN_SetPortBounds SetPortBounds;
|
|
||||||
PFN_SetPortOpColor SetPortOpColor;
|
|
||||||
PFN_SetPortGrafProcs SetPortGrafProcs;
|
|
||||||
PFN_SetPortVisibleRegion SetPortVisibleRegion;
|
|
||||||
PFN_SetPortClipRegion SetPortClipRegion;
|
|
||||||
PFN_SetPortPenPixPat SetPortPenPixPat;
|
|
||||||
PFN_SetPortFillPixPat SetPortFillPixPat;
|
|
||||||
PFN_SetPortBackPixPat SetPortBackPixPat;
|
|
||||||
PFN_SetPortPenSize SetPortPenSize;
|
|
||||||
PFN_SetPortPenMode SetPortPenMode;
|
|
||||||
PFN_SetPortFracHPenLocation SetPortFracHPenLocation;
|
|
||||||
PFN_GetPixBounds GetPixBounds;
|
|
||||||
PFN_GetPixDepth GetPixDepth;
|
|
||||||
PFN_GetQDGlobalsRandomSeed GetQDGlobalsRandomSeed;
|
|
||||||
PFN_GetQDGlobalsScreenBits GetQDGlobalsScreenBits;
|
|
||||||
PFN_GetQDGlobalsArrow GetQDGlobalsArrow;
|
|
||||||
PFN_GetQDGlobalsDarkGray GetQDGlobalsDarkGray;
|
|
||||||
PFN_GetQDGlobalsLightGray GetQDGlobalsLightGray;
|
|
||||||
PFN_GetQDGlobalsGray GetQDGlobalsGray;
|
|
||||||
PFN_GetQDGlobalsBlack GetQDGlobalsBlack;
|
|
||||||
PFN_GetQDGlobalsWhite GetQDGlobalsWhite;
|
|
||||||
PFN_GetQDGlobalsThePort GetQDGlobalsThePort;
|
|
||||||
PFN_SetQDGlobalsRandomSeed SetQDGlobalsRandomSeed;
|
|
||||||
PFN_SetQDGlobalsArrow SetQDGlobalsArrow;
|
|
||||||
PFN_GetRegionBounds GetRegionBounds;
|
|
||||||
PFN_IsRegionRectangular IsRegionRectangular;
|
|
||||||
PFN_CreateNewPort CreateNewPort;
|
|
||||||
PFN_DisposePort DisposePort;
|
|
||||||
PFN_SetQDError SetQDError;
|
|
||||||
PFN_QDIsPortBuffered QDIsPortBuffered;
|
|
||||||
PFN_QDIsPortBufferDirty QDIsPortBufferDirty;
|
|
||||||
PFN_QDFlushPortBuffer QDFlushPortBuffer;
|
|
||||||
PFN_QDGetDirtyRegion QDGetDirtyRegion;
|
|
||||||
PFN_QDSetDirtyRegion QDSetDirtyRegion;
|
|
||||||
PFN_CreateCGContextForPort CreateCGContextForPort;
|
|
||||||
PFN_ClipCGContextToRegion ClipCGContextToRegion;
|
|
||||||
PFN_SyncCGContextOriginWithPort SyncCGContextOriginWithPort;
|
|
||||||
PFN_CreateNewPortForCGDisplayID CreateNewPortForCGDisplayID;
|
|
||||||
PFN_QDDisplayWaitCursor QDDisplayWaitCursor;
|
|
||||||
PFN_QDSetPatternOrigin QDSetPatternOrigin;
|
|
||||||
PFN_QDGetPatternOrigin QDGetPatternOrigin;
|
|
||||||
PFN_LMGetScrVRes LMGetScrVRes;
|
|
||||||
PFN_LMSetScrVRes LMSetScrVRes;
|
|
||||||
PFN_LMGetScrHRes LMGetScrHRes;
|
|
||||||
PFN_LMSetScrHRes LMSetScrHRes;
|
|
||||||
PFN_LMGetMainDevice LMGetMainDevice;
|
|
||||||
PFN_LMSetMainDevice LMSetMainDevice;
|
|
||||||
PFN_LMGetDeviceList LMGetDeviceList;
|
|
||||||
PFN_LMSetDeviceList LMSetDeviceList;
|
|
||||||
PFN_LMGetQDColors LMGetQDColors;
|
|
||||||
PFN_LMSetQDColors LMSetQDColors;
|
|
||||||
PFN_LMGetWidthListHand LMGetWidthListHand;
|
|
||||||
PFN_LMSetWidthListHand LMSetWidthListHand;
|
|
||||||
PFN_LMGetHiliteMode LMGetHiliteMode;
|
|
||||||
PFN_LMSetHiliteMode LMSetHiliteMode;
|
|
||||||
PFN_LMGetWidthPtr LMGetWidthPtr;
|
|
||||||
PFN_LMSetWidthPtr LMSetWidthPtr;
|
|
||||||
PFN_LMGetWidthTabHandle LMGetWidthTabHandle;
|
|
||||||
PFN_LMSetWidthTabHandle LMSetWidthTabHandle;
|
|
||||||
PFN_LMGetLastSPExtra LMGetLastSPExtra;
|
|
||||||
PFN_LMSetLastSPExtra LMSetLastSPExtra;
|
|
||||||
PFN_LMGetLastFOND LMGetLastFOND;
|
|
||||||
PFN_LMSetLastFOND LMSetLastFOND;
|
|
||||||
PFN_LMGetFractEnable LMGetFractEnable;
|
|
||||||
PFN_LMSetFractEnable LMSetFractEnable;
|
|
||||||
PFN_LMGetTheGDevice LMGetTheGDevice;
|
|
||||||
PFN_LMSetTheGDevice LMSetTheGDevice;
|
|
||||||
PFN_LMGetHiliteRGB LMGetHiliteRGB;
|
|
||||||
PFN_LMSetHiliteRGB LMSetHiliteRGB;
|
|
||||||
PFN_LMGetCursorNew LMGetCursorNew;
|
|
||||||
PFN_LMSetCursorNew LMSetCursorNew;
|
|
||||||
PFN_QDRegionToRects QDRegionToRects;
|
|
||||||
PFN_SetPort SetPort;
|
|
||||||
PFN_GetPort GetPort;
|
|
||||||
PFN_GrafDevice GrafDevice;
|
|
||||||
PFN_SetPortBits SetPortBits;
|
|
||||||
PFN_PortSize PortSize;
|
|
||||||
PFN_MovePortTo MovePortTo;
|
|
||||||
PFN_SetOrigin SetOrigin;
|
|
||||||
PFN_SetClip SetClip;
|
|
||||||
PFN_GetClip GetClip;
|
|
||||||
PFN_ClipRect ClipRect;
|
|
||||||
PFN_BackPat BackPat;
|
|
||||||
PFN_InitCursor InitCursor;
|
|
||||||
PFN_SetCursor SetCursor;
|
|
||||||
PFN_HideCursor HideCursor;
|
|
||||||
PFN_ShowCursor ShowCursor;
|
|
||||||
PFN_ObscureCursor ObscureCursor;
|
|
||||||
PFN_HidePen HidePen;
|
|
||||||
PFN_ShowPen ShowPen;
|
|
||||||
PFN_GetPen GetPen;
|
|
||||||
PFN_GetPenState GetPenState;
|
|
||||||
PFN_SetPenState SetPenState;
|
|
||||||
PFN_PenSize PenSize;
|
|
||||||
PFN_PenMode PenMode;
|
|
||||||
PFN_PenPat PenPat;
|
|
||||||
PFN_PenNormal PenNormal;
|
|
||||||
PFN_MoveTo MoveTo;
|
|
||||||
PFN_Move Move;
|
|
||||||
PFN_LineTo LineTo;
|
|
||||||
PFN_Line Line;
|
|
||||||
PFN_ForeColor ForeColor;
|
|
||||||
PFN_BackColor BackColor;
|
|
||||||
PFN_ColorBit ColorBit;
|
|
||||||
PFN_SetRect SetRect;
|
|
||||||
PFN_OffsetRect OffsetRect;
|
|
||||||
PFN_InsetRect InsetRect;
|
|
||||||
PFN_SectRect SectRect;
|
|
||||||
PFN_UnionRect UnionRect;
|
|
||||||
PFN_EqualRect EqualRect;
|
|
||||||
PFN_EmptyRect EmptyRect;
|
|
||||||
PFN_FrameRect FrameRect;
|
|
||||||
PFN_PaintRect PaintRect;
|
|
||||||
PFN_EraseRect EraseRect;
|
|
||||||
PFN_InvertRect InvertRect;
|
|
||||||
PFN_FillRect FillRect;
|
|
||||||
PFN_FrameOval FrameOval;
|
|
||||||
PFN_PaintOval PaintOval;
|
|
||||||
PFN_EraseOval EraseOval;
|
|
||||||
PFN_InvertOval InvertOval;
|
|
||||||
PFN_FillOval FillOval;
|
|
||||||
PFN_FrameRoundRect FrameRoundRect;
|
|
||||||
PFN_PaintRoundRect PaintRoundRect;
|
|
||||||
PFN_EraseRoundRect EraseRoundRect;
|
|
||||||
PFN_InvertRoundRect InvertRoundRect;
|
|
||||||
PFN_FillRoundRect FillRoundRect;
|
|
||||||
PFN_FrameArc FrameArc;
|
|
||||||
PFN_PaintArc PaintArc;
|
|
||||||
PFN_EraseArc EraseArc;
|
|
||||||
PFN_InvertArc InvertArc;
|
|
||||||
PFN_FillArc FillArc;
|
|
||||||
PFN_NewRgn NewRgn;
|
|
||||||
PFN_OpenRgn OpenRgn;
|
|
||||||
PFN_CloseRgn CloseRgn;
|
|
||||||
PFN_BitMapToRegion BitMapToRegion;
|
|
||||||
PFN_HandleToRgn HandleToRgn;
|
|
||||||
PFN_RgnToHandle RgnToHandle;
|
|
||||||
PFN_DisposeRgn DisposeRgn;
|
|
||||||
PFN_CopyRgn CopyRgn;
|
|
||||||
PFN_SetEmptyRgn SetEmptyRgn;
|
|
||||||
PFN_SetRectRgn SetRectRgn;
|
|
||||||
PFN_RectRgn RectRgn;
|
|
||||||
PFN_OffsetRgn OffsetRgn;
|
|
||||||
PFN_InsetRgn InsetRgn;
|
|
||||||
PFN_SectRgn SectRgn;
|
|
||||||
PFN_UnionRgn UnionRgn;
|
|
||||||
PFN_DiffRgn DiffRgn;
|
|
||||||
PFN_XorRgn XorRgn;
|
|
||||||
PFN_RectInRgn RectInRgn;
|
|
||||||
PFN_EqualRgn EqualRgn;
|
|
||||||
PFN_EmptyRgn EmptyRgn;
|
|
||||||
PFN_FrameRgn FrameRgn;
|
|
||||||
PFN_PaintRgn PaintRgn;
|
|
||||||
PFN_EraseRgn EraseRgn;
|
|
||||||
PFN_InvertRgn InvertRgn;
|
|
||||||
PFN_FillRgn FillRgn;
|
|
||||||
PFN_ScrollRect ScrollRect;
|
|
||||||
PFN_CopyBits CopyBits;
|
|
||||||
PFN_SeedFill SeedFill;
|
|
||||||
PFN_CalcMask CalcMask;
|
|
||||||
PFN_CopyMask CopyMask;
|
|
||||||
PFN_OpenPicture OpenPicture;
|
|
||||||
PFN_PicComment PicComment;
|
|
||||||
PFN_ClosePicture ClosePicture;
|
|
||||||
PFN_DrawPicture DrawPicture;
|
|
||||||
PFN_KillPicture KillPicture;
|
|
||||||
PFN_OpenPoly OpenPoly;
|
|
||||||
PFN_ClosePoly ClosePoly;
|
|
||||||
PFN_KillPoly KillPoly;
|
|
||||||
PFN_OffsetPoly OffsetPoly;
|
|
||||||
PFN_FramePoly FramePoly;
|
|
||||||
PFN_PaintPoly PaintPoly;
|
|
||||||
PFN_ErasePoly ErasePoly;
|
|
||||||
PFN_InvertPoly InvertPoly;
|
|
||||||
PFN_FillPoly FillPoly;
|
|
||||||
PFN_SetPt SetPt;
|
|
||||||
PFN_LocalToGlobal LocalToGlobal;
|
|
||||||
PFN_GlobalToLocal GlobalToLocal;
|
|
||||||
PFN_Random Random;
|
|
||||||
PFN_StuffHex StuffHex;
|
|
||||||
PFN_GetPixel GetPixel;
|
|
||||||
PFN_ScalePt ScalePt;
|
|
||||||
PFN_MapPt MapPt;
|
|
||||||
PFN_MapRect MapRect;
|
|
||||||
PFN_MapRgn MapRgn;
|
|
||||||
PFN_MapPoly MapPoly;
|
|
||||||
PFN_SetStdProcs SetStdProcs;
|
|
||||||
PFN_StdRect StdRect;
|
|
||||||
PFN_StdRRect StdRRect;
|
|
||||||
PFN_StdOval StdOval;
|
|
||||||
PFN_StdArc StdArc;
|
|
||||||
PFN_StdPoly StdPoly;
|
|
||||||
PFN_StdRgn StdRgn;
|
|
||||||
PFN_StdBits StdBits;
|
|
||||||
PFN_StdComment StdComment;
|
|
||||||
PFN_StdGetPic StdGetPic;
|
|
||||||
PFN_StdPutPic StdPutPic;
|
|
||||||
PFN_StdOpcode StdOpcode;
|
|
||||||
PFN_AddPt AddPt;
|
|
||||||
PFN_EqualPt EqualPt;
|
|
||||||
PFN_PtInRect PtInRect;
|
|
||||||
PFN_Pt2Rect Pt2Rect;
|
|
||||||
PFN_PtToAngle PtToAngle;
|
|
||||||
PFN_SubPt SubPt;
|
|
||||||
PFN_PtInRgn PtInRgn;
|
|
||||||
PFN_StdLine StdLine;
|
|
||||||
PFN_NewPixMap NewPixMap;
|
|
||||||
PFN_DisposePixMap DisposePixMap;
|
|
||||||
PFN_CopyPixMap CopyPixMap;
|
|
||||||
PFN_NewPixPat NewPixPat;
|
|
||||||
PFN_DisposePixPat DisposePixPat;
|
|
||||||
PFN_CopyPixPat CopyPixPat;
|
|
||||||
PFN_PenPixPat PenPixPat;
|
|
||||||
PFN_BackPixPat BackPixPat;
|
|
||||||
PFN_GetPixPat GetPixPat;
|
|
||||||
PFN_MakeRGBPat MakeRGBPat;
|
|
||||||
PFN_FillCRect FillCRect;
|
|
||||||
PFN_FillCOval FillCOval;
|
|
||||||
PFN_FillCRoundRect FillCRoundRect;
|
|
||||||
PFN_FillCArc FillCArc;
|
|
||||||
PFN_FillCRgn FillCRgn;
|
|
||||||
PFN_FillCPoly FillCPoly;
|
|
||||||
PFN_RGBForeColor RGBForeColor;
|
|
||||||
PFN_RGBBackColor RGBBackColor;
|
|
||||||
PFN_SetCPixel SetCPixel;
|
|
||||||
PFN_SetPortPix SetPortPix;
|
|
||||||
PFN_GetCPixel GetCPixel;
|
|
||||||
PFN_GetForeColor GetForeColor;
|
|
||||||
PFN_GetBackColor GetBackColor;
|
|
||||||
PFN_SeedCFill SeedCFill;
|
|
||||||
PFN_CalcCMask CalcCMask;
|
|
||||||
PFN_OpenCPicture OpenCPicture;
|
|
||||||
PFN_OpColor OpColor;
|
|
||||||
PFN_HiliteColor HiliteColor;
|
|
||||||
PFN_DisposeCTable DisposeCTable;
|
|
||||||
PFN_GetCTable GetCTable;
|
|
||||||
PFN_GetCCursor GetCCursor;
|
|
||||||
PFN_SetCCursor SetCCursor;
|
|
||||||
PFN_AllocCursor AllocCursor;
|
|
||||||
PFN_DisposeCCursor DisposeCCursor;
|
|
||||||
PFN_SetStdCProcs SetStdCProcs;
|
|
||||||
PFN_GetMaxDevice GetMaxDevice;
|
|
||||||
PFN_GetCTSeed GetCTSeed;
|
|
||||||
PFN_GetDeviceList GetDeviceList;
|
|
||||||
PFN_GetMainDevice GetMainDevice;
|
|
||||||
PFN_GetNextDevice GetNextDevice;
|
|
||||||
PFN_TestDeviceAttribute TestDeviceAttribute;
|
|
||||||
PFN_SetDeviceAttribute SetDeviceAttribute;
|
|
||||||
PFN_InitGDevice InitGDevice;
|
|
||||||
PFN_NewGDevice NewGDevice;
|
|
||||||
PFN_DisposeGDevice DisposeGDevice;
|
|
||||||
PFN_SetGDevice SetGDevice;
|
|
||||||
PFN_GetGDevice GetGDevice;
|
|
||||||
PFN_Color2Index Color2Index;
|
|
||||||
PFN_Index2Color Index2Color;
|
|
||||||
PFN_InvertColor InvertColor;
|
|
||||||
PFN_RealColor RealColor;
|
|
||||||
PFN_GetSubTable GetSubTable;
|
|
||||||
PFN_MakeITable MakeITable;
|
|
||||||
PFN_AddSearch AddSearch;
|
|
||||||
PFN_AddComp AddComp;
|
|
||||||
PFN_DelSearch DelSearch;
|
|
||||||
PFN_DelComp DelComp;
|
|
||||||
PFN_SetClientID SetClientID;
|
|
||||||
PFN_ProtectEntry ProtectEntry;
|
|
||||||
PFN_ReserveEntry ReserveEntry;
|
|
||||||
PFN_SetEntries SetEntries;
|
|
||||||
PFN_SaveEntries SaveEntries;
|
|
||||||
PFN_RestoreEntries RestoreEntries;
|
|
||||||
PFN_QDError QDError;
|
|
||||||
PFN_CopyDeepMask CopyDeepMask;
|
|
||||||
PFN_DeviceLoop DeviceLoop;
|
|
||||||
PFN_GetMaskTable GetMaskTable;
|
|
||||||
PFN_GetPattern GetPattern;
|
|
||||||
PFN_GetCursor GetCursor;
|
|
||||||
PFN_GetPicture GetPicture;
|
|
||||||
PFN_DeltaPoint DeltaPoint;
|
|
||||||
PFN_ShieldCursor ShieldCursor;
|
|
||||||
PFN_ScreenRes ScreenRes;
|
|
||||||
PFN_GetIndPattern GetIndPattern;
|
|
||||||
PFN_deltapoint deltapoint;
|
|
||||||
PFN_PackBits PackBits;
|
|
||||||
PFN_UnpackBits UnpackBits;
|
|
||||||
PFN_SlopeFromAngle SlopeFromAngle;
|
|
||||||
PFN_AngleFromSlope AngleFromSlope;
|
|
||||||
};
|
|
||||||
|
|
||||||
void quickDrawBackendUserDataInit(mac_backend_userdata);
|
|
||||||
mac_backend getQuickDrawBackend(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -4,9 +4,12 @@
|
|||||||
#include "../external/stb_ds.h"
|
#include "../external/stb_ds.h"
|
||||||
|
|
||||||
static int create(MwWidget handle) {
|
static int create(MwWidget handle) {
|
||||||
|
/* todo: we should have a public "show" function here that is implemented per
|
||||||
|
platform, as opposed to just shoving it here. perchance. */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ShowWindow(handle->lowlevel->hWnd, SW_HIDE);
|
ShowWindow(handle->lowlevel->hWnd, SW_HIDE);
|
||||||
#else
|
#endif
|
||||||
|
#ifdef UNIX
|
||||||
XUnmapWindow(handle->lowlevel->display, handle->lowlevel->window);
|
XUnmapWindow(handle->lowlevel->display, handle->lowlevel->window);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -164,7 +167,7 @@ MwClass MwSubMenuClass = &MwSubMenuClassRec;
|
|||||||
|
|
||||||
void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) {
|
void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) {
|
||||||
int i, w = 0, h = 0;
|
int i, w = 0, h = 0;
|
||||||
#ifndef _WIN32
|
#ifdef UNIX
|
||||||
XSetWindowAttributes xswa;
|
XSetWindowAttributes xswa;
|
||||||
Atom wndtype = XInternAtom(handle->lowlevel->display, "_NET_WM_WINDOW_TYPE", False);
|
Atom wndtype = XInternAtom(handle->lowlevel->display, "_NET_WM_WINDOW_TYPE", False);
|
||||||
Atom wndmenu = XInternAtom(handle->lowlevel->display, "_NET_WM_WINDOW_TYPE_MENU", False);
|
Atom wndmenu = XInternAtom(handle->lowlevel->display, "_NET_WM_WINDOW_TYPE_MENU", False);
|
||||||
|
|||||||
Reference in New Issue
Block a user