cocoa: move interfaces to header (guarded by ifdef __OBJC__)

This commit is contained in:
IoIxD 2026-01-14 13:47:49 -07:00
commit a710967115
2 changed files with 59 additions and 53 deletions

View file

@ -12,14 +12,6 @@
#include "../../external/stb_ds.h"
@interface MilskoCocoaPixmap : NSObject {
NSImage* image;
}
+ (MilskoCocoaPixmap*)newWithWidth:(int)width height:(int)height;
- (void)updateWithData:(void*)data;
- (void)destroy;
@end
@implementation MilskoCocoaPixmap
+ (MilskoCocoaPixmap*)newWithWidth:(int)width height:(int)height {
@ -40,49 +32,6 @@
}
@end
@interface MilskoCocoa : NSObject {
NSApplication* application;
NSWindow* window;
NSRect rect;
}
+ (MilskoCocoa*)newWithParent:(MwLL)parent
x:(int)x
y:(int)y
width:(int)width
height:(int)height;
- (void)polygonWithPoints:(MwPoint*)points
points_count:(int)points_count
color:(MwLLColor)color;
- (void)lineWithPoints:(MwPoint*)points color:(MwLLColor)color;
- (void)getX:(int*)x Y:(int*)y W:(unsigned int*)w H:(unsigned int*)h;
- (void)setX:(int)x Y:(int)y;
- (void)setW:(int)w H:(int)h;
- (int)pending;
- (void)getNextEvent;
- (void)setTitle:(const char*)title;
- (void)drawPixmap:(MwLLPixmap)pixmap rect:(MwRect*)rect;
- (void)setIcon:(MwLLPixmap)pixmap;
- (void)forceRender;
- (void)setCursor:(MwCursor*)image mask:(MwCursor*)mask;
- (void)detachWithPoint:(MwPoint*)point;
- (void)show:(int)show;
- (void)makePopupWithParent:(MwLL)parent;
- (void)setSizeHintsWithMinX:(int)minx
MinY:(int)miny
MaxX:(int)maxx
MaxY:(int)maxy;
- (void)makeBorderless:(int)toggle;
- (void)focus;
- (void)grabPointer:(int)toggle;
- (void)setClipboard:(const char*)text;
- (void)makeToolWindow;
- (void)getCursorCoord:(MwPoint*)point;
- (void)getScreenSize:(MwRect*)rect;
- (void)destroy;
@end
@implementation MilskoCocoa
+ (MilskoCocoa*)newWithParent:(MwLL)parent