Set up visibility on OS X. This seems to work...

This commit is contained in:
Pietro Gagliardi 2015-05-07 18:38:47 -04:00
parent 4d21ba8127
commit 817e13ae61
2 changed files with 9 additions and 4 deletions

View File

@ -20,8 +20,13 @@ osMFILES = \
osHFILES = \
darwin/uipriv_darwin.h
osCFLAGS = -mmacosx-version-min=10.7 -DMACOSX_DEPLOYMENT_TARGET=10.7
osLDFLAGS = -mmacosx-version-min=10.7 -lobjc -framework Foundation -framework AppKit
osCFLAGS = \
-D_UI_EXTERN='__attribute__((visibility("default"))) extern' \
-fvisibility=hidden \
-mmacosx-version-min=10.7 -DMACOSX_DEPLOYMENT_TARGET=10.7
osLDFLAGS = \
-fvisibility=hidden \
-mmacosx-version-min=10.7 -lobjc -framework Foundation -framework AppKit
# the gcc flags don't work with Apple's linker
# fortunately, we don't need any; Apple's linker warns about undefined symbols in -shared builds!

View File

@ -11,10 +11,10 @@ This file assumes that you have imported <Cocoa/Cocoa.h> and "ui.h" beforehand.
// The second parameter should come from [RealControlType class].
// The two scrollView parameters allow placing scrollbars on the new control.
// The two onDestroy parameters define a function and its parameter to call when the widget is destroyed.
extern void uiDarwinMakeControl(uiControl *c, Class class, BOOL inScrollView, BOOL scrollViewHasBorder, void (*onDestroy)(void *), void *onDestroyData);
_UI_EXTERN void uiDarwinMakeControl(uiControl *c, Class class, BOOL inScrollView, BOOL scrollViewHasBorder, void (*onDestroy)(void *), void *onDestroyData);
// You can use this function from within your control implementations to return text strings that can be freed with uiFreeText().
extern char *uiDarwinNSStringToText(NSString *);
_UI_EXTERN char *uiDarwinNSStringToText(NSString *);
struct uiSizingSys {
// this structure currently left blank