forked from pyrite-dev/milsko
significant macos progress, now compiles/runs on monetery
This commit is contained in:
parent
11fec984cf
commit
efa43456c1
3 changed files with 450 additions and 385 deletions
|
|
@ -6,8 +6,10 @@ distributions and building instructions for Milsko GUI Toolkit.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
|
|
||||||
Milsko requires the Windows environment with GDI (so anything NT or 9x) or
|
Milsko requires either
|
||||||
the Unix-like environment with X11 for runtime.
|
* A Windows environment with GDI (so anything NT or 9x)
|
||||||
|
* A Mac OS environment with Cocoa (10.4 is the minimum tested)
|
||||||
|
* Unix-like environment with X11 for runtime.
|
||||||
|
|
||||||
To build Milsko for Windows, you must have one of following compilers:
|
To build Milsko for Windows, you must have one of following compilers:
|
||||||
* Visual C++ 6.0 or newer
|
* Visual C++ 6.0 or newer
|
||||||
|
|
@ -15,7 +17,7 @@ the Unix-like environment with X11 for runtime.
|
||||||
* Open Watcom 2.0 or newer
|
* Open Watcom 2.0 or newer
|
||||||
* MinGW-w64
|
* MinGW-w64
|
||||||
|
|
||||||
and for Unix-like:
|
and for Unix-like/Mac OS:
|
||||||
* GNU C Compiler
|
* GNU C Compiler
|
||||||
* Clang
|
* Clang
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,9 @@
|
||||||
#include <Mw/TypeDefs.h>
|
#include <Mw/TypeDefs.h>
|
||||||
|
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
|
|
||||||
#import <Foundation/NSGeometry.h>
|
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <Foundation/NSGeometry.h>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#import <CoreServices/CoreServices.h>
|
#import <CoreServices/CoreServices.h>
|
||||||
|
|
@ -23,38 +22,45 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@interface MilskoCocoaPixmap : NSObject {
|
@interface MilskoCocoaPixmap : NSObject {
|
||||||
|
MwBool valid;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
NSData *data;
|
NSData *data;
|
||||||
NSImage *image;
|
NSImage *image;
|
||||||
|
NSBitmapImageRep *rep;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (MilskoCocoaPixmap *)newWithWidth:(int)width height:(int)height;
|
+ (MilskoCocoaPixmap *)newWithWidth:(int)width height:(int)height;
|
||||||
- (void)updateWithData:(void*)data;
|
- (void)updateWithData:(unsigned char *)data;
|
||||||
- (void)destroy;
|
- (void)destroy;
|
||||||
|
|
||||||
/* using @property to create instance variables fucks up 10.4 gcc for some reason? */
|
/* using @property to create instance variables fucks up 10.4 gcc for some
|
||||||
|
* reason? */
|
||||||
- (NSImage *)image;
|
- (NSImage *)image;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface MilskoCocoaView : NSView {
|
@interface MilskoCocoaView : NSView {
|
||||||
CGContextRef cg;
|
NSBitmapImageRep *rep;
|
||||||
|
NSGraphicsContext *context;
|
||||||
|
MwBool valid;
|
||||||
CGColorSpaceRef space;
|
CGColorSpaceRef space;
|
||||||
CGDataProviderRef provider;
|
CGDataProviderRef provider;
|
||||||
MwU32* buf;
|
unsigned char *buf;
|
||||||
float width;
|
float width;
|
||||||
float height;
|
float height;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CGContextRef)context;
|
- (NSGraphicsContext *)context;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface MilskoCocoa : NSObject {
|
@interface MilskoCocoa : NSObject {
|
||||||
NSApplication *application;
|
NSApplication *application;
|
||||||
|
NSEvent *lastEvent;
|
||||||
NSWindow *window;
|
NSWindow *window;
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
MilskoCocoaView *view;
|
MilskoCocoaView *view;
|
||||||
|
MwLL parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (MilskoCocoa *)newWithParent:(MwLL)parent
|
+ (MilskoCocoa *)newWithParent:(MwLL)parent
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <AppKit/NSGraphicsContext.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "../../external/stb_ds.h"
|
|
||||||
|
|
||||||
@implementation MilskoCocoaPixmap
|
@implementation MilskoCocoaPixmap
|
||||||
|
|
||||||
|
|
@ -13,14 +11,30 @@
|
||||||
p->height = height;
|
p->height = height;
|
||||||
p->data = NULL;
|
p->data = NULL;
|
||||||
p->image = NULL;
|
p->image = NULL;
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
- (void)updateWithData:(void*)_data {
|
- (void)updateWithData:(unsigned char *)_data {
|
||||||
[self destroy];
|
[self destroy];
|
||||||
|
|
||||||
self->data = [NSData dataWithBytes:_data length:self->width * self->height * 4];
|
self->rep =
|
||||||
self->image = [[NSImage alloc] initWithData:self->data];
|
[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&_data
|
||||||
|
pixelsWide:(int)width
|
||||||
|
pixelsHigh:(int)height
|
||||||
|
bitsPerSample:8
|
||||||
|
samplesPerPixel:4
|
||||||
|
hasAlpha:YES
|
||||||
|
isPlanar:NO
|
||||||
|
colorSpaceName:NSDeviceRGBColorSpace
|
||||||
|
bytesPerRow:(int)width * 4
|
||||||
|
bitsPerPixel:32];
|
||||||
|
|
||||||
|
assert(self->rep);
|
||||||
|
self->data = [NSData dataWithBytes:[self->rep bitmapData]
|
||||||
|
length:self->width * self->height * 4];
|
||||||
|
assert(self->data);
|
||||||
|
self->image = [[NSImage alloc] initWithSize:NSMakeSize(width, height)];
|
||||||
|
assert(self->image);
|
||||||
|
[self->image addRepresentation:self->rep];
|
||||||
}
|
}
|
||||||
- (void)destroy {
|
- (void)destroy {
|
||||||
if (self->data != NULL) {
|
if (self->data != NULL) {
|
||||||
|
|
@ -57,15 +71,27 @@
|
||||||
|
|
||||||
c->rect = NSMakeRect(x, y, width, height);
|
c->rect = NSMakeRect(x, y, width, height);
|
||||||
|
|
||||||
|
if (parent == NULL) {
|
||||||
c->window = [[NSWindow alloc]
|
c->window = [[NSWindow alloc]
|
||||||
initWithContentRect:c->rect
|
initWithContentRect:c->rect
|
||||||
styleMask:parent == NULL
|
styleMask:(NSTitledWindowMask | NSClosableWindowMask |
|
||||||
? (NSTitledWindowMask | NSClosableWindowMask |
|
NSMiniaturizableWindowMask | NSResizableWindowMask)
|
||||||
NSMiniaturizableWindowMask |
|
|
||||||
NSResizableWindowMask)
|
|
||||||
: NSBorderlessWindowMask
|
|
||||||
backing:NSBackingStoreBuffered
|
backing:NSBackingStoreBuffered
|
||||||
defer:NO];
|
defer:NO];
|
||||||
|
} else {
|
||||||
|
NSWindow *parentWindow = parent->cocoa.real->window;
|
||||||
|
|
||||||
|
c->rect = [parentWindow frameRectForContentRect:c->rect];
|
||||||
|
c->rect.origin.y =
|
||||||
|
y -
|
||||||
|
[parentWindow contentRectForFrameRect:parentWindow.frame].size.height;
|
||||||
|
|
||||||
|
c->window = [[NSWindow alloc] initWithContentRect:c->rect
|
||||||
|
styleMask:NSBorderlessWindowMask
|
||||||
|
backing:NSBackingStoreBuffered
|
||||||
|
defer:NO];
|
||||||
|
}
|
||||||
|
|
||||||
[c->window makeKeyAndOrderFront:c->application];
|
[c->window makeKeyAndOrderFront:c->application];
|
||||||
|
|
||||||
if (parent != NULL) {
|
if (parent != NULL) {
|
||||||
|
|
@ -78,6 +104,8 @@
|
||||||
c->view = [[MilskoCocoaView alloc] initWithFrame:c->rect];
|
c->view = [[MilskoCocoaView alloc] initWithFrame:c->rect];
|
||||||
[c->window setContentView:c->view];
|
[c->window setContentView:c->view];
|
||||||
|
|
||||||
|
c->parent = parent;
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
- (void)polygonWithPoints:(MwPoint *)points
|
- (void)polygonWithPoints:(MwPoint *)points
|
||||||
|
|
@ -86,7 +114,11 @@
|
||||||
int i;
|
int i;
|
||||||
CGContextRef cg = [self->view context];
|
CGContextRef cg = [self->view context];
|
||||||
|
|
||||||
CGContextSetRGBFillColor(cg, color->common.red / 255., color->common.blue / 255., color->common.green / 255., 1);
|
[self->view lockFocus];
|
||||||
|
|
||||||
|
CGContextSetRGBFillColor(cg, color->common.red / 255.,
|
||||||
|
color->common.blue / 255.,
|
||||||
|
color->common.green / 255., 1);
|
||||||
CGContextBeginPath(cg);
|
CGContextBeginPath(cg);
|
||||||
for (i = 0; i < points_count; i++) {
|
for (i = 0; i < points_count; i++) {
|
||||||
CGContextMoveToPoint(cg, points[i].x, points[i].y);
|
CGContextMoveToPoint(cg, points[i].x, points[i].y);
|
||||||
|
|
@ -95,8 +127,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CGContextFillPath(cg);
|
CGContextFillPath(cg);
|
||||||
|
[self->view unlockFocus];
|
||||||
|
|
||||||
// [self->view setNeedsDisplay:true];
|
[self->view setNeedsDisplay:true];
|
||||||
};
|
};
|
||||||
- (void)lineWithPoints:(MwPoint *)points color:(MwLLColor)color {
|
- (void)lineWithPoints:(MwPoint *)points color:(MwLLColor)color {
|
||||||
};
|
};
|
||||||
|
|
@ -104,41 +137,54 @@
|
||||||
NSRect frame = [self->window frame];
|
NSRect frame = [self->window frame];
|
||||||
|
|
||||||
*x = frame.origin.x;
|
*x = frame.origin.x;
|
||||||
*y = frame.origin.y;
|
*y = frame.origin.y - frame.size.height;
|
||||||
*w = frame.size.width;
|
*w = frame.size.width;
|
||||||
*h = frame.size.height;
|
*h = frame.size.height;
|
||||||
};
|
};
|
||||||
- (void)setX:(int)x Y:(int)y {
|
- (void)setX:(int)x Y:(int)y {
|
||||||
NSPoint p;
|
|
||||||
p.x = x;
|
|
||||||
p.y = y;
|
|
||||||
NSRect frame = [self->window frame];
|
NSRect frame = [self->window frame];
|
||||||
|
|
||||||
frame.origin.x = x;
|
frame.origin.x = x;
|
||||||
frame.origin.y = y;
|
frame.origin.y = y;
|
||||||
[self->window setFrame:frame display:YES animate:true];
|
|
||||||
|
if (self->parent) {
|
||||||
|
NSWindow *parentWindow = self->parent->cocoa.real->window;
|
||||||
|
frame = [parentWindow contentRectForFrameRect:frame];
|
||||||
|
frame.origin.y =
|
||||||
|
[parentWindow contentRectForFrameRect:parentWindow.frame].size.height -
|
||||||
|
y;
|
||||||
|
}
|
||||||
|
|
||||||
|
[self->window setFrame:frame display:YES animate:false];
|
||||||
};
|
};
|
||||||
- (void)setW:(int)w H:(int)h {
|
- (void)setW:(int)w H:(int)h {
|
||||||
NSRect frame = [self->window frame];
|
NSRect frame = [self->window frame];
|
||||||
frame.size.width = w;
|
frame.size.width = w;
|
||||||
frame.size.height = h;
|
frame.size.height = h;
|
||||||
[self->window setFrame:frame display:YES animate:true];
|
|
||||||
|
if (self->parent) {
|
||||||
|
NSWindow *parentWindow = self->parent->cocoa.real->window;
|
||||||
|
// frame = [parentWindow contentRectForFrameRect:frame];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self->window setFrame:frame display:YES animate:false];
|
||||||
};
|
};
|
||||||
- (int)pending {
|
- (int)pending {
|
||||||
return 1;
|
self->lastEvent =
|
||||||
|
[self->application nextEventMatchingMask:NSAnyEventMask
|
||||||
|
untilDate:nil
|
||||||
|
inMode:NSDefaultRunLoopMode
|
||||||
|
dequeue:YES];
|
||||||
|
return self->lastEvent != NULL;
|
||||||
};
|
};
|
||||||
- (void)getNextEvent {
|
- (void)getNextEvent {
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
NSEvent* event = [self->application nextEventMatchingMask:NSAnyEventMask
|
if (self->lastEvent != nil) {
|
||||||
untilDate:nil
|
// printf("got event: %ld\n", self->lastEvent.type);
|
||||||
inMode:NSDefaultRunLoopMode
|
|
||||||
dequeue:YES];
|
|
||||||
|
|
||||||
if(event != nil) {
|
|
||||||
printf("got event: %p\n", event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[self->application sendEvent:event];
|
[self->application sendEvent:self->lastEvent];
|
||||||
|
|
||||||
/* this should be in the draw functions but it's here for now for testing */
|
/* this should be in the draw functions but it's here for now for testing */
|
||||||
[self->view setNeedsDisplay:true];
|
[self->view setNeedsDisplay:true];
|
||||||
|
|
@ -153,7 +199,24 @@
|
||||||
};
|
};
|
||||||
- (void)drawPixmap:(MwLLPixmap)pixmap rect:(MwRect *)_rect {
|
- (void)drawPixmap:(MwLLPixmap)pixmap rect:(MwRect *)_rect {
|
||||||
MilskoCocoaPixmap *p = pixmap->cocoa.real;
|
MilskoCocoaPixmap *p = pixmap->cocoa.real;
|
||||||
[[p image] drawAtPoint:NSMakePoint(_rect->x, _rect->y) fromRect:NSMakeRect(_rect->x, _rect->y, _rect->width, _rect->height) operation:NSCompositeClear fraction:1.0];
|
NSGraphicsContext *ctx = [self->view context];
|
||||||
|
if (ctx) {
|
||||||
|
[NSGraphicsContext saveGraphicsState];
|
||||||
|
[NSGraphicsContext setCurrentContext:ctx];
|
||||||
|
|
||||||
|
[[NSColor redColor] setFill];
|
||||||
|
[[p image] drawInRect:NSMakeRect(_rect->x, _rect->y, _rect->width,
|
||||||
|
_rect->height)
|
||||||
|
fromRect:NSZeroRect
|
||||||
|
operation:NSCompositeSourceOver
|
||||||
|
fraction:1.0
|
||||||
|
respectFlipped:NO
|
||||||
|
hints:nil];
|
||||||
|
|
||||||
|
[NSGraphicsContext restoreGraphicsState];
|
||||||
|
|
||||||
|
[self->view setNeedsDisplay:YES];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
- (void)setIcon:(MwLLPixmap)pixmap {
|
- (void)setIcon:(MwLLPixmap)pixmap {
|
||||||
};
|
};
|
||||||
|
|
@ -224,40 +287,48 @@
|
||||||
self->height = frame.size.height;
|
self->height = frame.size.height;
|
||||||
self->buf = malloc(self->width * self->height * 4);
|
self->buf = malloc(self->width * self->height * 4);
|
||||||
self->space = CGColorSpaceCreateDeviceRGB();
|
self->space = CGColorSpaceCreateDeviceRGB();
|
||||||
self->cg = CGBitmapContextCreate(self->buf,
|
|
||||||
self->width,
|
if (width == 0 || height == 0) {
|
||||||
self->height,
|
self->rep = NULL;
|
||||||
CHAR_BIT,
|
self->context = NULL;
|
||||||
self->width * sizeof(MwU32),
|
} else {
|
||||||
self->space, kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedLast);
|
self->rep =
|
||||||
assert(self->cg);
|
[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
|
||||||
printf("%p\n", self->cg);
|
pixelsWide:width
|
||||||
|
pixelsHigh:height
|
||||||
|
bitsPerSample:8
|
||||||
|
samplesPerPixel:4
|
||||||
|
hasAlpha:YES
|
||||||
|
isPlanar:NO
|
||||||
|
colorSpaceName:NSDeviceRGBColorSpace
|
||||||
|
bytesPerRow:width * 4
|
||||||
|
bitsPerPixel:32];
|
||||||
|
assert(self->rep);
|
||||||
|
|
||||||
|
self->context =
|
||||||
|
[NSGraphicsContext graphicsContextWithBitmapImageRep:self->rep];
|
||||||
|
assert(self->context);
|
||||||
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CGContextRef)context {
|
- (NSGraphicsContext *)context {
|
||||||
return self->cg;
|
return self->context;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)drawRect:(NSRect)dirtyRect {
|
- (void)drawRect:(NSRect)dirtyRect {
|
||||||
[super drawRect:dirtyRect];
|
[super drawRect:dirtyRect];
|
||||||
if(self) {
|
if (!self->rep) {
|
||||||
|
|
||||||
CGImageRef img = CGBitmapContextCreateImage(self->cg);
|
|
||||||
if(!img) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("printed image\n");
|
[self->rep drawInRect:NSMakeRect(0, 0, self->width, self->height)];
|
||||||
|
|
||||||
CGContextDrawImage([[NSGraphicsContext currentContext] graphicsPort], CGRectMake(0, 0, self->width, self->height), img);
|
unsigned char *pixels = [self->rep bitmapData];
|
||||||
CGImageRelease(img);
|
|
||||||
}
|
|
||||||
// printf("%0.2f %0.2f %0.2f %0.2f\n", dirtyRect.origin.x, dirtyRect.origin.y, dirtyRect.size.width, dirtyRect.size.height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)destroy {
|
- (void)destroy {
|
||||||
free(self->buf);
|
free(self->buf);
|
||||||
CGContextRelease(self->cg);
|
|
||||||
CGColorSpaceRelease(self->space);
|
CGColorSpaceRelease(self->space);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -275,11 +346,7 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
|
||||||
MwLLCreateCommon(r);
|
MwLLCreateCommon(r);
|
||||||
|
|
||||||
MilskoCocoa *o =
|
MilskoCocoa *o =
|
||||||
[MilskoCocoa newWithParent:parent
|
[MilskoCocoa newWithParent:parent x:x y:y width:width height:height];
|
||||||
x:x
|
|
||||||
y:y
|
|
||||||
width:width
|
|
||||||
height:height];
|
|
||||||
r->cocoa.real = o;
|
r->cocoa.real = o;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|
@ -295,13 +362,9 @@ static void MwLLDestroyImpl(MwLL handle) {
|
||||||
free(handle);
|
free(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MwLLBeginDrawImpl(MwLL handle) {
|
static void MwLLBeginDrawImpl(MwLL handle) { (void)handle; }
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void MwLLEndDrawImpl(MwLL handle) {
|
static void MwLLEndDrawImpl(MwLL handle) { (void)handle; }
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void MwLLPolygonImpl(MwLL handle, MwPoint *points, int points_count,
|
static void MwLLPolygonImpl(MwLL handle, MwPoint *points, int points_count,
|
||||||
MwLLColor color) {
|
MwLLColor color) {
|
||||||
|
|
@ -344,13 +407,14 @@ static void MwLLSetWHImpl(MwLL handle, int w, int height) {
|
||||||
[h setW:w H:height];
|
[h setW:w H:height];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MwLLFreeColorImpl(MwLLColor color) {
|
static void MwLLFreeColorImpl(MwLLColor color) { free(color); }
|
||||||
free(color);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int MwLLPendingImpl(MwLL handle) {
|
static int MwLLPendingImpl(MwLL handle) {
|
||||||
MilskoCocoa *h = handle->cocoa.real;
|
MilskoCocoa *h = handle->cocoa.real;
|
||||||
return [h pending];
|
if ([h pending]) {
|
||||||
|
MwLLDispatch(handle, draw, NULL);
|
||||||
|
return 1;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MwLLNextEventImpl(MwLL handle) {
|
static void MwLLNextEventImpl(MwLL handle) {
|
||||||
|
|
@ -396,6 +460,7 @@ static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) {
|
||||||
static void MwLLDrawPixmapImpl(MwLL handle, MwRect *rect, MwLLPixmap pixmap) {
|
static void MwLLDrawPixmapImpl(MwLL handle, MwRect *rect, MwLLPixmap pixmap) {
|
||||||
MilskoCocoa *h = handle->cocoa.real;
|
MilskoCocoa *h = handle->cocoa.real;
|
||||||
[h drawPixmap:pixmap rect:rect];
|
[h drawPixmap:pixmap rect:rect];
|
||||||
|
MwLLForceRender(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) {
|
static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) {
|
||||||
|
|
@ -454,9 +519,7 @@ static void MwLLSetClipboardImpl(MwLL handle, const char* text) {
|
||||||
[h setClipboard:text];
|
[h setClipboard:text];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MwLLGetClipboardImpl(MwLL handle) {
|
static void MwLLGetClipboardImpl(MwLL handle) { (void)handle; }
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void MwLLMakeToolWindowImpl(MwLL handle) {
|
static void MwLLMakeToolWindowImpl(MwLL handle) {
|
||||||
|
|
||||||
|
|
@ -474,17 +537,11 @@ static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) {
|
||||||
[h getScreenSize:rect];
|
[h getScreenSize:rect];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MwLLBeginStateChangeImpl(MwLL handle) {
|
static void MwLLBeginStateChangeImpl(MwLL handle) { MwLLShow(handle, 0); }
|
||||||
MwLLShow(handle, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void MwLLEndStateChangeImpl(MwLL handle) {
|
static void MwLLEndStateChangeImpl(MwLL handle) { MwLLShow(handle, 1); }
|
||||||
MwLLShow(handle, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int MwLLCocoaCallInitImpl(void) {
|
static int MwLLCocoaCallInitImpl(void) { return 0; }
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "call.c"
|
#include "call.c"
|
||||||
CALL(Cocoa);
|
CALL(Cocoa);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue