Prepared OS X for the new uiArea functions.

This commit is contained in:
Pietro Gagliardi 2016-10-26 01:15:01 -04:00
parent 8819d9cd58
commit cc1942a929
3 changed files with 29 additions and 1 deletions

View File

@ -401,6 +401,16 @@ void uiAreaScrollTo(uiArea *a, double x, double y, double width, double height)
// don't worry about the return value; it just says whether scrolling was needed
}
void uiAreaBeginUserWindowMove(uiArea *a)
{
// TODO
}
void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge)
{
// TODO
}
uiArea *uiNewArea(uiAreaHandler *ah)
{
uiArea *a;

View File

@ -52,6 +52,10 @@ extern void finishNewTextField(NSTextField *, BOOL);
extern NSTextField *newEditableTextField(void);
// window.m
@interface libuiNSWindow : NSWindow
- (void)libui_doMove:(NSEvent *)initialEvent;
- (void)libui_doResize:(NSEvent *)initialEvent on:(uiWindowResizeEdge)edge;
@end
extern uiWindow *windowFromNSWindow(NSWindow *);
// alloc.m

View File

@ -18,6 +18,20 @@ struct uiWindow {
int borderless;
};
@implementation libuiNSWindow
- (void)libui_doMove:(NSEvent *)initialEvent
{
// TODO
}
- (void)libui_doResize:(NSEvent *)initialEvent on:(uiWindowResizeEdge)edge
{
// TODO
}
@end
@interface windowDelegateClass : NSObject<NSWindowDelegate> {
struct mapTable *windows;
}
@ -361,7 +375,7 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
uiDarwinNewControl(uiWindow, w);
w->window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, (CGFloat) width, (CGFloat) height)
w->window = [[libuiNSWindow alloc] initWithContentRect:NSMakeRect(0, 0, (CGFloat) width, (CGFloat) height)
styleMask:defaultStyleMask
backing:NSBackingStoreBuffered
defer:YES];