2014-07-08 15:47:28 -05:00
|
|
|
/* 8 july 2014 */
|
|
|
|
|
|
|
|
/* cgo will include this file multiple times */
|
|
|
|
#ifndef __GO_UI_OBJC_DARWIN_H__
|
|
|
|
#define __GO_UI_OBJC_DARWIN_H__
|
|
|
|
|
2014-07-20 20:22:10 -05:00
|
|
|
#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
|
|
|
|
|
2014-07-08 15:47:28 -05:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <objc/message.h>
|
|
|
|
#include <objc/objc.h>
|
|
|
|
#include <objc/runtime.h>
|
|
|
|
|
|
|
|
/* uitask_darwin.m */
|
|
|
|
extern id getAppDelegate(void); /* used by the other .m files */
|
|
|
|
extern BOOL uiinit(void);
|
|
|
|
extern void uimsgloop(void);
|
2014-07-13 20:31:13 -05:00
|
|
|
extern void uistop(void);
|
2014-07-08 15:47:28 -05:00
|
|
|
extern void issue(void *);
|
|
|
|
|
|
|
|
/* window_darwin.m */
|
|
|
|
extern id newWindow(intptr_t, intptr_t);
|
2014-07-08 16:43:50 -05:00
|
|
|
extern void windowSetDelegate(id, void *);
|
2014-08-04 16:28:53 -05:00
|
|
|
extern void windowSetContentView(id, id);
|
2014-07-08 15:47:28 -05:00
|
|
|
extern const char *windowTitle(id);
|
|
|
|
extern void windowSetTitle(id, const char *);
|
|
|
|
extern void windowShow(id);
|
|
|
|
extern void windowHide(id);
|
|
|
|
extern void windowClose(id);
|
2014-07-25 22:11:41 -05:00
|
|
|
extern id windowContentView(id);
|
2014-07-23 16:09:08 -05:00
|
|
|
extern void windowRedraw(id);
|
2014-07-08 15:47:28 -05:00
|
|
|
|
2014-07-30 11:50:45 -05:00
|
|
|
/* basicctrls_darwin.m */
|
2014-07-25 19:10:09 -05:00
|
|
|
extern void parent(id, id);
|
|
|
|
extern void controlSetHidden(id, BOOL);
|
2014-07-26 09:05:18 -05:00
|
|
|
extern void setStandardControlFont(id);
|
2014-07-30 12:10:19 -05:00
|
|
|
extern void setSmallControlFont(id);
|
2014-07-22 22:32:32 -05:00
|
|
|
extern id newButton(void);
|
2014-07-17 11:02:39 -05:00
|
|
|
extern void buttonSetDelegate(id, void *);
|
2014-07-16 12:25:09 -05:00
|
|
|
extern const char *buttonText(id);
|
|
|
|
extern void buttonSetText(id, char *);
|
2014-07-22 22:32:32 -05:00
|
|
|
extern id newCheckbox(void);
|
2014-08-03 19:08:25 -05:00
|
|
|
extern void checkboxSetDelegate(id, void *);
|
2014-07-22 22:32:32 -05:00
|
|
|
extern BOOL checkboxChecked(id);
|
|
|
|
extern void checkboxSetChecked(id, BOOL);
|
2014-07-26 08:20:33 -05:00
|
|
|
extern id newTextField(void);
|
|
|
|
extern id newPasswordField(void);
|
|
|
|
extern const char *textFieldText(id);
|
|
|
|
extern void textFieldSetText(id, char *);
|
2014-07-29 12:48:31 -05:00
|
|
|
extern id newLabel(void);
|
2014-07-16 12:25:09 -05:00
|
|
|
|
2014-07-17 10:24:58 -05:00
|
|
|
/* sizing_darwin.m */
|
|
|
|
extern void moveControl(id, intptr_t, intptr_t, intptr_t, intptr_t);
|
|
|
|
|
2014-08-02 21:35:58 -05:00
|
|
|
/* tab_darwin.m */
|
2014-08-04 16:07:06 -05:00
|
|
|
extern id newTab(void);
|
2014-08-04 16:03:07 -05:00
|
|
|
extern void tabAppend(id, char *, id);
|
2014-07-25 22:11:41 -05:00
|
|
|
|
2014-07-29 09:32:49 -05:00
|
|
|
/* table_darwin.m */
|
|
|
|
extern id newTable(void);
|
|
|
|
extern void tableAppendColumn(id, char *);
|
|
|
|
extern void tableUpdate(id);
|
2014-07-29 09:54:52 -05:00
|
|
|
extern void tableMakeDataSource(id, void *);
|
2014-07-29 09:32:49 -05:00
|
|
|
|
2014-07-30 11:50:45 -05:00
|
|
|
/* control_darwin.m */
|
|
|
|
extern id newScrollView(id);
|
|
|
|
|
2014-08-01 22:16:43 -05:00
|
|
|
/* xsizing_darwin.m */
|
|
|
|
struct xsize {
|
|
|
|
intptr_t width;
|
|
|
|
intptr_t height;
|
|
|
|
};
|
|
|
|
struct xrect {
|
|
|
|
intptr_t x;
|
|
|
|
intptr_t y;
|
|
|
|
intptr_t width;
|
|
|
|
intptr_t height;
|
|
|
|
};
|
|
|
|
struct xalignment {
|
|
|
|
struct xrect rect;
|
|
|
|
intptr_t baseline;
|
|
|
|
};
|
|
|
|
extern struct xsize controlPrefSize(id);
|
2014-08-02 07:04:44 -05:00
|
|
|
extern struct xsize tabPrefSize(id);
|
2014-08-01 22:16:43 -05:00
|
|
|
extern struct xsize areaPrefSize(id);
|
|
|
|
extern struct xalignment alignmentInfo(id, struct xrect);
|
2014-08-02 08:47:57 -05:00
|
|
|
extern struct xrect frame(id);
|
2014-08-01 22:16:43 -05:00
|
|
|
|
2014-08-04 16:03:07 -05:00
|
|
|
/* container_darwin.m */
|
|
|
|
extern id newContainerView(void *);
|
|
|
|
|
2014-07-08 15:47:28 -05:00
|
|
|
#endif
|