2015-04-07 13:42:52 -05:00
|
|
|
// 7 april 2015
|
|
|
|
|
|
|
|
/*
|
|
|
|
This file assumes that you have imported <Cocoa/Cocoa.h> and "ui.h" beforehand. It provides API-specific functions for interfacing with foreign controls on Mac OS X.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UI_UI_DARWIN_H__
|
|
|
|
#define __UI_UI_DARWIN_H__
|
|
|
|
|
2015-04-16 12:04:46 -05:00
|
|
|
// uiDarwinNewControl() initializes the given uiControl with the given Cocoa control inside.
|
|
|
|
// The second parameter should come from [RealControlType class].
|
2015-04-07 13:42:52 -05:00
|
|
|
// The two scrollView parameters allow placing scrollbars on the new control.
|
2015-04-17 17:11:03 -05:00
|
|
|
// The two onDestroy parameters define a function and its parameter to call when the widget is destroyed.
|
2015-04-17 17:54:17 -05:00
|
|
|
extern void uiDarwinNewControl(uiControl *c, Class class, BOOL inScrollView, BOOL scrollViewHasBorder, void (*onDestroy)(void *), void *onDestroyData);
|
2015-04-07 13:42:52 -05:00
|
|
|
|
2015-04-10 12:24:34 -05:00
|
|
|
// You can use this function from within your control implementations to return text strings that can be freed with uiTextFree().
|
|
|
|
extern char *uiDarwinNSStringToText(NSString *);
|
|
|
|
|
2015-04-09 17:39:21 -05:00
|
|
|
struct uiSizingSys {
|
|
|
|
// this structure currently left blank
|
|
|
|
};
|
|
|
|
|
2015-04-07 13:42:52 -05:00
|
|
|
#endif
|