Started working on uiControl.

This commit is contained in:
Pietro Gagliardi 2015-04-06 21:53:31 -04:00
parent e08a9c0492
commit 58da9ce2bd
4 changed files with 22 additions and 3 deletions

View File

@ -6,7 +6,7 @@
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7
#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7
#import <Cocoa/Cocoa.h>
#import "ui.h"
#import "uipriv.h"
#define toNSString(str) [NSString stringWithUTF8String:(str)]

View File

@ -8,6 +8,6 @@
#define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_4
#define GDK_VERSION_MAX_ALLOWED GDK_VERSION_3_4
#include <gtk/gtk.h>
#include "ui.h"
#include "uipriv.h"
#endif

View File

@ -29,7 +29,7 @@
#include <stdarg.h>
#include <oleacc.h>
#include <stdio.h>
#include "ui.h"
#include "uipriv.h"
// alloc_windows.c
extern void *uiAlloc(size_t);

19
uipriv.h Normal file
View File

@ -0,0 +1,19 @@
// 6 april 2015
#include "ui.h"
typedef struct uiSize uiSize;
typedef struct uiSizing uiSizing;
struct uiSize {
intmax_t width;
intmax_t height;
};
struct uiControl {
uintptr_t (*handle)(uiControl *);
void (*setParent)(uiControl *, uintptr_t);
uiSize (*preferredSize)(uiControl *, uiSizing *);
void (*resizing)(uiControl *, intmax_t, intmax_t, intmax_t, intmax_t, uiSizing *);
void (*containerShow)(uiControl *);
void (*containerHide)(uiControl *);
};