Merge branch 'master' of github.com:LaurentGomila/SFML
@ -221,6 +221,6 @@ elseif(MACOSX)
|
|||||||
install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
|
install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
|
||||||
|
|
||||||
if(INSTALL_XCODE4_TEMPLATES)
|
if(INSTALL_XCODE4_TEMPLATES)
|
||||||
install(DIRECTORY tools/xcode/templates/SFML DESTINATION $ENV{HOME}/Library/Developer/Xcode/Templates)
|
install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
# add the examples subdirectories
|
# add the examples subdirectories
|
||||||
add_subdirectory(ftp)
|
add_subdirectory(ftp)
|
||||||
add_subdirectory(opengl)
|
add_subdirectory(opengl)
|
||||||
add_subdirectory(pong)
|
add_subdirectory(pong)
|
||||||
@ -12,5 +12,7 @@ add_subdirectory(window)
|
|||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
add_subdirectory(win32)
|
add_subdirectory(win32)
|
||||||
elseif(LINUX)
|
elseif(LINUX)
|
||||||
add_subdirectory(X11)
|
add_subdirectory(X11)
|
||||||
|
elseif(MACOSX)
|
||||||
|
add_subdirectory(cocoa)
|
||||||
endif()
|
endif()
|
||||||
|
63
examples/cocoa/CMakeLists.txt
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/cocoa)
|
||||||
|
|
||||||
|
# all source files
|
||||||
|
set(SRC ${SRCROOT}/CocoaAppDelegate.h
|
||||||
|
${SRCROOT}/CocoaAppDelegate.mm
|
||||||
|
${SRCROOT}/NSString+stdstring.h
|
||||||
|
${SRCROOT}/NSString+stdstring.mm
|
||||||
|
${SRCROOT}/main.m)
|
||||||
|
|
||||||
|
# all XIB files
|
||||||
|
set(XIBS MainMenu)
|
||||||
|
|
||||||
|
# all resource files
|
||||||
|
set(RESOURCES ${SRCROOT}/resources/logo.png
|
||||||
|
${SRCROOT}/resources/icon.icns
|
||||||
|
${SRCROOT}/resources/blue.png
|
||||||
|
${SRCROOT}/resources/green.png
|
||||||
|
${SRCROOT}/resources/red.png
|
||||||
|
${SRCROOT}/resources/Credits.rtf)
|
||||||
|
|
||||||
|
# define the cocoa target and customize it
|
||||||
|
add_executable(cocoa MACOSX_BUNDLE ${SRC} ${RESOURCES})
|
||||||
|
set_source_files_properties(${RESOURCES} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
set_target_properties(cocoa PROPERTIES
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST ${SRCROOT}/resources/Cocoa-Info.plist)
|
||||||
|
target_link_libraries(cocoa "-framework Cocoa -framework Foundation"
|
||||||
|
sfml-system sfml-window sfml-graphics)
|
||||||
|
|
||||||
|
# compile XIB files
|
||||||
|
find_program(IBTOOL ibtool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin")
|
||||||
|
if(${IBTOOL} STREQUAL "IBTOOL-NOTFOUND")
|
||||||
|
message(FATAL_ERROR "ibtool is required to compile .xib files but wasn't found.")
|
||||||
|
endif()
|
||||||
|
set(RESOURCE_PATH "cocoa.app/Contents/Resources")
|
||||||
|
set(XIB_OUTPUT_PATH "${RESOURCE_PATH}/")
|
||||||
|
set(XIB_INPUT_PATH "${SRCROOT}/")
|
||||||
|
foreach(XIB ${XIBS})
|
||||||
|
add_custom_command(TARGET cocoa
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${IBTOOL} --errors
|
||||||
|
--output-format human-readable-text
|
||||||
|
--compile ${XIB_OUTPUT_PATH}/${XIB}.nib
|
||||||
|
${XIB_INPUT_PATH}/${XIB}.xib
|
||||||
|
COMMENT "Compiling ${XIB}.xib")
|
||||||
|
# deactivated options : --warnings --notices
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# add install rule
|
||||||
|
install(TARGETS cocoa
|
||||||
|
BUNDLE DESTINATION ${INSTALL_MISC_DIR}/examples/cocoa
|
||||||
|
COMPONENT examples)
|
||||||
|
|
||||||
|
#
|
||||||
|
# define the cocoa target
|
||||||
|
# sfml_add_example is not compatible with application bundles !
|
||||||
|
#
|
||||||
|
#sfml_add_example(cocoa
|
||||||
|
# SOURCES ${SRC}
|
||||||
|
# DEPENDS sfml-system sfml-window sfml-graphics)
|
||||||
|
#
|
||||||
|
|
@ -44,6 +44,7 @@ struct SFMLmainWindow;
|
|||||||
SFMLmainWindow *_mainWindow;
|
SFMLmainWindow *_mainWindow;
|
||||||
NSTimer *_renderTimer;
|
NSTimer *_renderTimer;
|
||||||
BOOL _visible;
|
BOOL _visible;
|
||||||
|
BOOL _initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (retain) IBOutlet NSWindow *window;
|
@property (retain) IBOutlet NSWindow *window;
|
||||||
@ -57,3 +58,13 @@ struct SFMLmainWindow;
|
|||||||
-(IBAction)updateText:(NSButton *)sender;
|
-(IBAction)updateText:(NSButton *)sender;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This interface is used to prevent the system alert produced when the SFML view
|
||||||
|
* has the focus and the user press a key.
|
||||||
|
*/
|
||||||
|
@interface SilentWindow : NSWindow
|
||||||
|
|
||||||
|
-(void)keyDown:(NSEvent *)theEvent;
|
||||||
|
|
||||||
|
@end
|
@ -72,6 +72,8 @@ struct SFMLmainWindow
|
|||||||
@property (retain) NSTimer *renderTimer;
|
@property (retain) NSTimer *renderTimer;
|
||||||
@property (assign) BOOL visible;
|
@property (assign) BOOL visible;
|
||||||
|
|
||||||
|
@property (assign) BOOL initialized;
|
||||||
|
|
||||||
-(void)renderMainWindow:(NSTimer *)aTimer;
|
-(void)renderMainWindow:(NSTimer *)aTimer;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@ -88,31 +90,46 @@ struct SFMLmainWindow
|
|||||||
@synthesize renderTimer = _renderTimer;
|
@synthesize renderTimer = _renderTimer;
|
||||||
@synthesize visible = _visible;
|
@synthesize visible = _visible;
|
||||||
|
|
||||||
|
@synthesize initialized = _initialized;
|
||||||
|
|
||||||
|
- (id)init {
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
self.initialized = NO;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
-(void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
-(void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||||
{
|
{
|
||||||
// Init the 1st SFML render area.
|
if (!self.initialized)
|
||||||
self.mainWindow = new SFMLmainWindow(self.sfmlView);
|
{
|
||||||
self.mainWindow->text.SetString([self.textField.stringValue tostdwstring]);
|
// Init the 1st SFML render area.
|
||||||
self.visible = YES;
|
self.mainWindow = new SFMLmainWindow(self.sfmlView);
|
||||||
|
self.mainWindow->text.SetString([self.textField.stringValue tostdwstring]);
|
||||||
// Launch the timer to periodically display our stuff into the Cocoa view.
|
self.visible = YES;
|
||||||
self.renderTimer = [NSTimer timerWithTimeInterval:1.f/60.f
|
|
||||||
target:self
|
// Launch the timer to periodically display our stuff into the Cocoa view.
|
||||||
selector:@selector(renderMainWindow:)
|
self.renderTimer = [NSTimer timerWithTimeInterval:1.f/60.f
|
||||||
userInfo:nil
|
target:self
|
||||||
repeats:YES];
|
selector:@selector(renderMainWindow:)
|
||||||
[[NSRunLoop mainRunLoop] addTimer:self.renderTimer
|
userInfo:nil
|
||||||
forMode:NSDefaultRunLoopMode];
|
repeats:YES];
|
||||||
[[NSRunLoop mainRunLoop] addTimer:self.renderTimer
|
[[NSRunLoop mainRunLoop] addTimer:self.renderTimer
|
||||||
forMode:NSEventTrackingRunLoopMode];
|
forMode:NSDefaultRunLoopMode];
|
||||||
/*
|
[[NSRunLoop mainRunLoop] addTimer:self.renderTimer
|
||||||
* This is really some ugly code but in order to have the timer fired
|
forMode:NSEventTrackingRunLoopMode];
|
||||||
* periodically we need to add it to the two above runloop mode.
|
/*
|
||||||
*
|
* This is really some ugly code but in order to have the timer fired
|
||||||
* The default mode allows timer firing while the user doesn't do anything
|
* periodically we need to add it to the two above runloop mode.
|
||||||
* while the second mode allows timer firing while he is using a slider
|
*
|
||||||
* or a menu.
|
* The default mode allows timer firing while the user doesn't do anything
|
||||||
*/
|
* while the second mode allows timer firing while he is using a slider
|
||||||
|
* or a menu.
|
||||||
|
*/
|
||||||
|
|
||||||
|
self.initialized = YES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)dealloc
|
-(void)dealloc
|
||||||
@ -160,36 +177,44 @@ struct SFMLmainWindow
|
|||||||
|
|
||||||
-(IBAction)colorChanged:(NSPopUpButton *)sender
|
-(IBAction)colorChanged:(NSPopUpButton *)sender
|
||||||
{
|
{
|
||||||
// Convert title to color
|
if (self.initialized)
|
||||||
NSString *color = [[sender selectedItem] title];
|
|
||||||
if ([color isEqualToString:BLUE])
|
|
||||||
{
|
{
|
||||||
self.mainWindow->background = sf::Color::Blue;
|
// Convert title to color
|
||||||
}
|
NSString *color = [[sender selectedItem] title];
|
||||||
else if ([color isEqualToString:GREEN])
|
if ([color isEqualToString:BLUE])
|
||||||
{
|
{
|
||||||
self.mainWindow->background = sf::Color::Green;
|
self.mainWindow->background = sf::Color::Blue;
|
||||||
}
|
}
|
||||||
else
|
else if ([color isEqualToString:GREEN])
|
||||||
{
|
{
|
||||||
self.mainWindow->background = sf::Color::Red;
|
self.mainWindow->background = sf::Color::Green;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.mainWindow->background = sf::Color::Red;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-(IBAction)rotationChanged:(NSSlider *)sender
|
-(IBAction)rotationChanged:(NSSlider *)sender
|
||||||
{
|
{
|
||||||
float angle = [sender floatValue];
|
if (self.initialized)
|
||||||
self.mainWindow->sprite.SetRotation(angle);
|
{
|
||||||
|
float angle = [sender floatValue];
|
||||||
|
self.mainWindow->sprite.SetRotation(angle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-(IBAction)visibleChanged:(NSButton *)sender
|
-(IBAction)visibleChanged:(NSButton *)sender
|
||||||
{
|
{
|
||||||
self.visible = [sender state] == NSOnState;
|
if (self.initialized)
|
||||||
|
self.visible = [sender state] == NSOnState;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(IBAction)textChanged:(NSTextField *)sender
|
-(IBAction)textChanged:(NSTextField *)sender
|
||||||
{
|
{
|
||||||
self.mainWindow->text.SetString([[sender stringValue] tostdwstring]);
|
if (self.initialized)
|
||||||
|
self.mainWindow->text.SetString([[sender stringValue] tostdwstring]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)updateText:(NSButton *)sender
|
- (IBAction)updateText:(NSButton *)sender
|
||||||
@ -199,3 +224,12 @@ struct SFMLmainWindow
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@implementation SilentWindow
|
||||||
|
|
||||||
|
-(void)keyDown:(NSEvent *)theEvent
|
||||||
|
{
|
||||||
|
// Do nothing except preventing this alert.
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@ -1,14 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||||
<data>
|
<data>
|
||||||
<int key="IBDocument.SystemTarget">0</int>
|
<int key="IBDocument.SystemTarget">1070</int>
|
||||||
<string key="IBDocument.SystemVersion">10K540</string>
|
<string key="IBDocument.SystemVersion">11C74</string>
|
||||||
<string key="IBDocument.InterfaceBuilderVersion">1891</string>
|
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
|
||||||
<string key="IBDocument.AppKitVersion">1038.36</string>
|
<string key="IBDocument.AppKitVersion">1138.23</string>
|
||||||
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
<string key="IBDocument.HIToolboxVersion">567.00</string>
|
||||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="NS.object.0">1891</string>
|
<string key="NS.object.0">1938</string>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
@ -1328,8 +1328,9 @@
|
|||||||
<string key="NSWindowRect">{{232, 390}, {485, 379}}</string>
|
<string key="NSWindowRect">{{232, 390}, {485, 379}}</string>
|
||||||
<int key="NSWTFlags">1417150464</int>
|
<int key="NSWTFlags">1417150464</int>
|
||||||
<string key="NSWindowTitle">Cocoa</string>
|
<string key="NSWindowTitle">Cocoa</string>
|
||||||
<string key="NSWindowClass">NSWindow</string>
|
<string key="NSWindowClass">SilentWindow</string>
|
||||||
<nil key="NSViewClass"/>
|
<nil key="NSViewClass"/>
|
||||||
|
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||||
<object class="NSView" key="NSWindowView" id="439893737">
|
<object class="NSView" key="NSWindowView" id="439893737">
|
||||||
<reference key="NSNextResponder"/>
|
<reference key="NSNextResponder"/>
|
||||||
<int key="NSvFlags">256</int>
|
<int key="NSvFlags">256</int>
|
||||||
@ -1359,27 +1360,28 @@
|
|||||||
<string key="NSKeyEquivalent"/>
|
<string key="NSKeyEquivalent"/>
|
||||||
<int key="NSPeriodicDelay">400</int>
|
<int key="NSPeriodicDelay">400</int>
|
||||||
<int key="NSPeriodicInterval">75</int>
|
<int key="NSPeriodicInterval">75</int>
|
||||||
<nil key="NSMenuItem"/>
|
<object class="NSMenuItem" key="NSMenuItem" id="468569656">
|
||||||
|
<reference key="NSMenu" ref="526523505"/>
|
||||||
|
<string key="NSTitle">Blue</string>
|
||||||
|
<string key="NSKeyEquiv"/>
|
||||||
|
<int key="NSKeyEquivModMask">1048576</int>
|
||||||
|
<int key="NSMnemonicLoc">2147483647</int>
|
||||||
|
<int key="NSState">1</int>
|
||||||
|
<object class="NSCustomResource" key="NSImage">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">blue</string>
|
||||||
|
</object>
|
||||||
|
<reference key="NSOnImage" ref="35465992"/>
|
||||||
|
<reference key="NSMixedImage" ref="502551668"/>
|
||||||
|
<string key="NSAction">_popUpItemAction:</string>
|
||||||
|
<reference key="NSTarget" ref="939854878"/>
|
||||||
|
</object>
|
||||||
<bool key="NSMenuItemRespectAlignment">YES</bool>
|
<bool key="NSMenuItemRespectAlignment">YES</bool>
|
||||||
<object class="NSMenu" key="NSMenu" id="526523505">
|
<object class="NSMenu" key="NSMenu" id="526523505">
|
||||||
<string key="NSTitle">Color</string>
|
<string key="NSTitle">Color</string>
|
||||||
<object class="NSMutableArray" key="NSMenuItems">
|
<object class="NSMutableArray" key="NSMenuItems">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<object class="NSMenuItem" id="468569656">
|
<reference ref="468569656"/>
|
||||||
<reference key="NSMenu" ref="526523505"/>
|
|
||||||
<string key="NSTitle">Blue</string>
|
|
||||||
<string key="NSKeyEquiv"/>
|
|
||||||
<int key="NSKeyEquivModMask">1048576</int>
|
|
||||||
<int key="NSMnemonicLoc">2147483647</int>
|
|
||||||
<object class="NSCustomResource" key="NSImage">
|
|
||||||
<string key="NSClassName">NSImage</string>
|
|
||||||
<string key="NSResourceName">blue</string>
|
|
||||||
</object>
|
|
||||||
<reference key="NSOnImage" ref="35465992"/>
|
|
||||||
<reference key="NSMixedImage" ref="502551668"/>
|
|
||||||
<string key="NSAction">_popUpItemAction:</string>
|
|
||||||
<reference key="NSTarget" ref="939854878"/>
|
|
||||||
</object>
|
|
||||||
<object class="NSMenuItem" id="461530193">
|
<object class="NSMenuItem" id="461530193">
|
||||||
<reference key="NSMenu" ref="526523505"/>
|
<reference key="NSMenu" ref="526523505"/>
|
||||||
<string key="NSTitle">Green</string>
|
<string key="NSTitle">Green</string>
|
||||||
@ -1600,7 +1602,6 @@
|
|||||||
<string key="NSFrame">{{17, 2}, {451, 17}}</string>
|
<string key="NSFrame">{{17, 2}, {451, 17}}</string>
|
||||||
<reference key="NSSuperview" ref="439893737"/>
|
<reference key="NSSuperview" ref="439893737"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<reference key="NSNextKeyView"/>
|
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
<object class="NSTextFieldCell" key="NSCell" id="702743979">
|
<object class="NSTextFieldCell" key="NSCell" id="702743979">
|
||||||
<int key="NSCellFlags">68288064</int>
|
<int key="NSCellFlags">68288064</int>
|
||||||
@ -1622,10 +1623,11 @@
|
|||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<reference key="NSNextKeyView" ref="969295846"/>
|
<reference key="NSNextKeyView" ref="969295846"/>
|
||||||
</object>
|
</object>
|
||||||
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
|
<string key="NSScreenRect">{{0, 0}, {1920, 1058}}</string>
|
||||||
<string key="NSMaxSize">{1e+13, 1e+13}</string>
|
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||||
<bool key="NSAutorecalculatesContentBorderThicknessMinY">NO</bool>
|
<bool key="NSAutorecalculatesContentBorderThicknessMinY">NO</bool>
|
||||||
<double key="NSContentBorderThicknessMinY">22</double>
|
<double key="NSContentBorderThicknessMinY">22</double>
|
||||||
|
<bool key="NSWindowIsRestorable">YES</bool>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSCustomObject" id="976324537">
|
<object class="NSCustomObject" id="976324537">
|
||||||
<string key="NSClassName">CocoaAppDelegate</string>
|
<string key="NSClassName">CocoaAppDelegate</string>
|
||||||
@ -1637,6 +1639,30 @@
|
|||||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
<object class="NSMutableArray" key="connectionRecords">
|
<object class="NSMutableArray" key="connectionRecords">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">terminate:</string>
|
||||||
|
<reference key="source" ref="1050"/>
|
||||||
|
<reference key="destination" ref="632727374"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">449</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">orderFrontStandardAboutPanel:</string>
|
||||||
|
<reference key="source" ref="1021"/>
|
||||||
|
<reference key="destination" ref="238522557"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">142</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">delegate</string>
|
||||||
|
<reference key="source" ref="1021"/>
|
||||||
|
<reference key="destination" ref="976324537"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">495</int>
|
||||||
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">performMiniaturize:</string>
|
<string key="label">performMiniaturize:</string>
|
||||||
@ -1677,14 +1703,6 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">127</int>
|
<int key="connectionID">127</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBActionConnection" key="connection">
|
|
||||||
<string key="label">orderFrontStandardAboutPanel:</string>
|
|
||||||
<reference key="source" ref="1021"/>
|
|
||||||
<reference key="destination" ref="238522557"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">142</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">performClose:</string>
|
<string key="label">performClose:</string>
|
||||||
@ -1925,46 +1943,6 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">374</int>
|
<int key="connectionID">374</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBActionConnection" key="connection">
|
|
||||||
<string key="label">addFontTrait:</string>
|
|
||||||
<reference key="source" ref="755631768"/>
|
|
||||||
<reference key="destination" ref="305399458"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">421</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBActionConnection" key="connection">
|
|
||||||
<string key="label">addFontTrait:</string>
|
|
||||||
<reference key="source" ref="755631768"/>
|
|
||||||
<reference key="destination" ref="814362025"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">422</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBActionConnection" key="connection">
|
|
||||||
<string key="label">modifyFont:</string>
|
|
||||||
<reference key="source" ref="755631768"/>
|
|
||||||
<reference key="destination" ref="885547335"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">423</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBActionConnection" key="connection">
|
|
||||||
<string key="label">orderFrontFontPanel:</string>
|
|
||||||
<reference key="source" ref="755631768"/>
|
|
||||||
<reference key="destination" ref="159677712"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">424</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBActionConnection" key="connection">
|
|
||||||
<string key="label">modifyFont:</string>
|
|
||||||
<reference key="source" ref="755631768"/>
|
|
||||||
<reference key="destination" ref="158063935"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">425</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">raiseBaseline:</string>
|
<string key="label">raiseBaseline:</string>
|
||||||
@ -2093,14 +2071,6 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">441</int>
|
<int key="connectionID">441</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBActionConnection" key="connection">
|
|
||||||
<string key="label">terminate:</string>
|
|
||||||
<reference key="source" ref="1050"/>
|
|
||||||
<reference key="destination" ref="632727374"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">449</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">toggleAutomaticSpellingCorrection:</string>
|
<string key="label">toggleAutomaticSpellingCorrection:</string>
|
||||||
@ -2197,14 +2167,6 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">493</int>
|
<int key="connectionID">493</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBOutletConnection" key="connection">
|
|
||||||
<string key="label">delegate</string>
|
|
||||||
<reference key="source" ref="1021"/>
|
|
||||||
<reference key="destination" ref="976324537"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">495</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">alignCenter:</string>
|
<string key="label">alignCenter:</string>
|
||||||
@ -2309,6 +2271,54 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">530</int>
|
<int key="connectionID">530</int>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">initialFirstResponder</string>
|
||||||
|
<reference key="source" ref="972006081"/>
|
||||||
|
<reference key="destination" ref="969295846"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">559</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">addFontTrait:</string>
|
||||||
|
<reference key="source" ref="755631768"/>
|
||||||
|
<reference key="destination" ref="305399458"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">421</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">addFontTrait:</string>
|
||||||
|
<reference key="source" ref="755631768"/>
|
||||||
|
<reference key="destination" ref="814362025"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">422</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">modifyFont:</string>
|
||||||
|
<reference key="source" ref="755631768"/>
|
||||||
|
<reference key="destination" ref="885547335"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">423</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">orderFrontFontPanel:</string>
|
||||||
|
<reference key="source" ref="755631768"/>
|
||||||
|
<reference key="destination" ref="159677712"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">424</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">modifyFont:</string>
|
||||||
|
<reference key="source" ref="755631768"/>
|
||||||
|
<reference key="destination" ref="158063935"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">425</int>
|
||||||
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBOutletConnection" key="connection">
|
<object class="IBOutletConnection" key="connection">
|
||||||
<string key="label">window</string>
|
<string key="label">window</string>
|
||||||
@ -2333,14 +2343,6 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">558</int>
|
<int key="connectionID">558</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBOutletConnection" key="connection">
|
|
||||||
<string key="label">initialFirstResponder</string>
|
|
||||||
<reference key="source" ref="972006081"/>
|
|
||||||
<reference key="destination" ref="969295846"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">559</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">rotationChanged:</string>
|
<string key="label">rotationChanged:</string>
|
||||||
@ -4147,10 +4149,6 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="IBDocument.localizationMode">0</int>
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
|
||||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
|
|
||||||
<real value="0.0" key="NS.object.0"/>
|
|
||||||
</object>
|
|
||||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||||
<integer value="3000" key="NS.object.0"/>
|
<integer value="3000" key="NS.object.0"/>
|
@ -23,6 +23,7 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#import "NSString+stdstring.h"
|
||||||
#include <SFML/System/Utf.hpp>
|
#include <SFML/System/Utf.hpp>
|
||||||
|
|
||||||
@implementation NSString (NSString_stdstring)
|
@implementation NSString (NSString_stdstring)
|
@ -3,14 +3,6 @@ SFML IN COCOA APPLICATION
|
|||||||
|
|
||||||
This is a small example of the integration of SFML in a Cocoa application.
|
This is a small example of the integration of SFML in a Cocoa application.
|
||||||
|
|
||||||
System Requirements
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
In order to run this example project you need :
|
|
||||||
* SFML 2 compiled as shared libs (dylib)
|
|
||||||
and installed into /usr/local;
|
|
||||||
* Xcode 4 (thus you will need Mac OS X 10.6 or greater).
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@ -19,6 +11,9 @@ Features
|
|||||||
OpenGL code too, of course).
|
OpenGL code too, of course).
|
||||||
* It also provides tools for converting NSString to and from
|
* It also provides tools for converting NSString to and from
|
||||||
std::[w]string in an Objective-C Category of NSString.
|
std::[w]string in an Objective-C Category of NSString.
|
||||||
|
* Moreover, it shows how you can prevent annoying the system alerts
|
||||||
|
produced when the SFML view has focus and the user press a key
|
||||||
|
(see SilentWindow interface in CocoaAppDelegate.[h|mm]).
|
||||||
|
|
||||||
Special Considerations
|
Special Considerations
|
||||||
----------------------
|
----------------------
|
@ -5,15 +5,15 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>cocoa</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>logo.png</string>
|
<string>icon.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.sfml-dev.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>org.sfml-dev.cocoa</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>${PRODUCT_NAME}</string>
|
<string>cocoa</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
@ -23,9 +23,9 @@
|
|||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
<string>10.6</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright © 2007-2011 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License.</string>
|
<string>Copyright © 2007-2012 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License.</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
7
examples/cocoa/resources/Credits.rtf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
|
||||||
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qj
|
||||||
|
|
||||||
|
\f0\fs24 \cf0 See {\field{\*\fldinst{HYPERLINK "http://sfml-dev.org"}}{\fldrslt http://sfml-dev.org}} for more information}
|
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 112 B |
BIN
examples/cocoa/resources/icon.icns
Normal file
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 113 B |
@ -37,6 +37,7 @@ namespace sf
|
|||||||
namespace priv
|
namespace priv
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
SFContext::SFContext(SFContext* shared)
|
SFContext::SFContext(SFContext* shared)
|
||||||
: myView(0), myWindow(0)
|
: myView(0), myWindow(0)
|
||||||
@ -68,6 +69,7 @@ SFContext::SFContext(SFContext* shared, const ContextSettings& settings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
SFContext::SFContext(SFContext* shared, const ContextSettings& settings,
|
SFContext::SFContext(SFContext* shared, const ContextSettings& settings,
|
||||||
unsigned int width, unsigned int height)
|
unsigned int width, unsigned int height)
|
||||||
: myView(0), myWindow(0)
|
: myView(0), myWindow(0)
|
||||||
@ -175,7 +177,7 @@ void SFContext::CreateContext(SFContext* shared,
|
|||||||
// Prefer multisampling over supersampling
|
// Prefer multisampling over supersampling
|
||||||
attrs.push_back(NSOpenGLPFAMultisample);
|
attrs.push_back(NSOpenGLPFAMultisample);
|
||||||
|
|
||||||
// Only one buffer is currently available.
|
// Only one buffer is currently available
|
||||||
attrs.push_back(NSOpenGLPFASampleBuffers);
|
attrs.push_back(NSOpenGLPFASampleBuffers);
|
||||||
attrs.push_back((NSOpenGLPixelFormatAttribute)1);
|
attrs.push_back((NSOpenGLPixelFormatAttribute)1);
|
||||||
|
|
||||||
@ -183,8 +185,8 @@ void SFContext::CreateContext(SFContext* shared,
|
|||||||
attrs.push_back(NSOpenGLPFASamples);
|
attrs.push_back(NSOpenGLPFASamples);
|
||||||
attrs.push_back((NSOpenGLPixelFormatAttribute)settings.AntialiasingLevel);
|
attrs.push_back((NSOpenGLPixelFormatAttribute)settings.AntialiasingLevel);
|
||||||
|
|
||||||
// No software renderer
|
// No software renderer - only hardware renderer
|
||||||
attrs.push_back(NSOpenGLPFANoRecovery);
|
attrs.push_back(NSOpenGLPFAAccelerated);
|
||||||
}
|
}
|
||||||
|
|
||||||
attrs.push_back((NSOpenGLPixelFormatAttribute)0); // end of array
|
attrs.push_back((NSOpenGLPixelFormatAttribute)0); // end of array
|
||||||
|
@ -1,318 +0,0 @@
|
|||||||
// !$*UTF8*$!
|
|
||||||
{
|
|
||||||
archiveVersion = 1;
|
|
||||||
classes = {
|
|
||||||
};
|
|
||||||
objectVersion = 46;
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
4C5C378113CF64E1003655B8 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C5C378013CF64E1003655B8 /* Cocoa.framework */; };
|
|
||||||
4C5C378B13CF64E1003655B8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C5C378913CF64E1003655B8 /* InfoPlist.strings */; };
|
|
||||||
4C5C378D13CF64E1003655B8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C378C13CF64E1003655B8 /* main.m */; };
|
|
||||||
4C5C379113CF64E1003655B8 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4C5C378F13CF64E1003655B8 /* Credits.rtf */; };
|
|
||||||
4C5C379413CF64E1003655B8 /* CocoaAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C379313CF64E1003655B8 /* CocoaAppDelegate.mm */; };
|
|
||||||
4C5C379713CF64E1003655B8 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C5C379513CF64E1003655B8 /* MainMenu.xib */; };
|
|
||||||
4CD83D6713D0A29400A29530 /* blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD83D6413D0A29400A29530 /* blue.png */; };
|
|
||||||
4CD83D6813D0A29400A29530 /* green.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD83D6513D0A29400A29530 /* green.png */; };
|
|
||||||
4CD83D6913D0A29400A29530 /* red.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD83D6613D0A29400A29530 /* red.png */; };
|
|
||||||
4CDE97AB13CF94760071C912 /* libsfml-graphics-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CDE97A813CF94760071C912 /* libsfml-graphics-d.dylib */; };
|
|
||||||
4CDE97AC13CF94760071C912 /* libsfml-system-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CDE97A913CF94760071C912 /* libsfml-system-d.dylib */; };
|
|
||||||
4CDE97AD13CF94760071C912 /* libsfml-window-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CDE97AA13CF94760071C912 /* libsfml-window-d.dylib */; };
|
|
||||||
4CDE97CD13D0366D0071C912 /* NSString+stdstring.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4CDE97CC13D0366D0071C912 /* NSString+stdstring.mm */; };
|
|
||||||
4CEFC42F13D09CB500F92B14 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CEFC42E13D09CB500F92B14 /* logo.png */; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
4C5C377C13CF64E1003655B8 /* Cocoa.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Cocoa.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
4C5C378013CF64E1003655B8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
|
||||||
4C5C378313CF64E1003655B8 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
|
||||||
4C5C378413CF64E1003655B8 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
|
||||||
4C5C378513CF64E1003655B8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
|
||||||
4C5C378813CF64E1003655B8 /* Cocoa-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Cocoa-Info.plist"; sourceTree = "<group>"; };
|
|
||||||
4C5C378A13CF64E1003655B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
|
||||||
4C5C378C13CF64E1003655B8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
|
||||||
4C5C378E13CF64E1003655B8 /* Cocoa-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Cocoa-Prefix.pch"; sourceTree = "<group>"; };
|
|
||||||
4C5C379013CF64E1003655B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
|
|
||||||
4C5C379213CF64E1003655B8 /* CocoaAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CocoaAppDelegate.h; sourceTree = "<group>"; };
|
|
||||||
4C5C379313CF64E1003655B8 /* CocoaAppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CocoaAppDelegate.mm; sourceTree = "<group>"; };
|
|
||||||
4C5C379613CF64E1003655B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
|
||||||
4CD83D6413D0A29400A29530 /* blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blue.png; sourceTree = "<group>"; };
|
|
||||||
4CD83D6513D0A29400A29530 /* green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = green.png; sourceTree = "<group>"; };
|
|
||||||
4CD83D6613D0A29400A29530 /* red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = red.png; sourceTree = "<group>"; };
|
|
||||||
4CDE97A813CF94760071C912 /* libsfml-graphics-d.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libsfml-graphics-d.dylib"; path = "usr/local/lib/libsfml-graphics-d.dylib"; sourceTree = SDKROOT; };
|
|
||||||
4CDE97A913CF94760071C912 /* libsfml-system-d.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libsfml-system-d.dylib"; path = "usr/local/lib/libsfml-system-d.dylib"; sourceTree = SDKROOT; };
|
|
||||||
4CDE97AA13CF94760071C912 /* libsfml-window-d.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libsfml-window-d.dylib"; path = "usr/local/lib/libsfml-window-d.dylib"; sourceTree = SDKROOT; };
|
|
||||||
4CDE97CB13D0366D0071C912 /* NSString+stdstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+stdstring.h"; sourceTree = "<group>"; };
|
|
||||||
4CDE97CC13D0366D0071C912 /* NSString+stdstring.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSString+stdstring.mm"; sourceTree = "<group>"; };
|
|
||||||
4CEFC42E13D09CB500F92B14 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
|
||||||
4C5C377913CF64E1003655B8 /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
4CDE97AB13CF94760071C912 /* libsfml-graphics-d.dylib in Frameworks */,
|
|
||||||
4CDE97AC13CF94760071C912 /* libsfml-system-d.dylib in Frameworks */,
|
|
||||||
4CDE97AD13CF94760071C912 /* libsfml-window-d.dylib in Frameworks */,
|
|
||||||
4C5C378113CF64E1003655B8 /* Cocoa.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXFrameworksBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
4C5C377113CF64E1003655B8 = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
4C5C378613CF64E1003655B8 /* Cocoa */,
|
|
||||||
4C5C377F13CF64E1003655B8 /* Frameworks */,
|
|
||||||
4C5C377D13CF64E1003655B8 /* Products */,
|
|
||||||
);
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
4C5C377D13CF64E1003655B8 /* Products */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
4C5C377C13CF64E1003655B8 /* Cocoa.app */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
4C5C377F13CF64E1003655B8 /* Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
4CDE97A813CF94760071C912 /* libsfml-graphics-d.dylib */,
|
|
||||||
4CDE97A913CF94760071C912 /* libsfml-system-d.dylib */,
|
|
||||||
4CDE97AA13CF94760071C912 /* libsfml-window-d.dylib */,
|
|
||||||
4C5C378013CF64E1003655B8 /* Cocoa.framework */,
|
|
||||||
4C5C378213CF64E1003655B8 /* Other Frameworks */,
|
|
||||||
);
|
|
||||||
name = Frameworks;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
4C5C378213CF64E1003655B8 /* Other Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
4C5C378313CF64E1003655B8 /* AppKit.framework */,
|
|
||||||
4C5C378413CF64E1003655B8 /* CoreData.framework */,
|
|
||||||
4C5C378513CF64E1003655B8 /* Foundation.framework */,
|
|
||||||
);
|
|
||||||
name = "Other Frameworks";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
4C5C378613CF64E1003655B8 /* Cocoa */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
4C5C379213CF64E1003655B8 /* CocoaAppDelegate.h */,
|
|
||||||
4C5C379313CF64E1003655B8 /* CocoaAppDelegate.mm */,
|
|
||||||
4C5C379513CF64E1003655B8 /* MainMenu.xib */,
|
|
||||||
4CDE97CB13D0366D0071C912 /* NSString+stdstring.h */,
|
|
||||||
4CDE97CC13D0366D0071C912 /* NSString+stdstring.mm */,
|
|
||||||
4C5C378713CF64E1003655B8 /* Supporting Files */,
|
|
||||||
);
|
|
||||||
path = Cocoa;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
4C5C378713CF64E1003655B8 /* Supporting Files */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
4CEFC42E13D09CB500F92B14 /* logo.png */,
|
|
||||||
4CD83D6413D0A29400A29530 /* blue.png */,
|
|
||||||
4CD83D6513D0A29400A29530 /* green.png */,
|
|
||||||
4CD83D6613D0A29400A29530 /* red.png */,
|
|
||||||
4C5C378813CF64E1003655B8 /* Cocoa-Info.plist */,
|
|
||||||
4C5C378913CF64E1003655B8 /* InfoPlist.strings */,
|
|
||||||
4C5C378C13CF64E1003655B8 /* main.m */,
|
|
||||||
4C5C378E13CF64E1003655B8 /* Cocoa-Prefix.pch */,
|
|
||||||
4C5C378F13CF64E1003655B8 /* Credits.rtf */,
|
|
||||||
);
|
|
||||||
name = "Supporting Files";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
|
||||||
4C5C377B13CF64E1003655B8 /* Cocoa */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = 4C5C379A13CF64E1003655B8 /* Build configuration list for PBXNativeTarget "Cocoa" */;
|
|
||||||
buildPhases = (
|
|
||||||
4C5C377813CF64E1003655B8 /* Sources */,
|
|
||||||
4C5C377913CF64E1003655B8 /* Frameworks */,
|
|
||||||
4C5C377A13CF64E1003655B8 /* Resources */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
);
|
|
||||||
name = Cocoa;
|
|
||||||
productName = Cocoa;
|
|
||||||
productReference = 4C5C377C13CF64E1003655B8 /* Cocoa.app */;
|
|
||||||
productType = "com.apple.product-type.application";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
|
||||||
4C5C377313CF64E1003655B8 /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
buildConfigurationList = 4C5C377613CF64E1003655B8 /* Build configuration list for PBXProject "Cocoa" */;
|
|
||||||
compatibilityVersion = "Xcode 3.2";
|
|
||||||
developmentRegion = English;
|
|
||||||
hasScannedForEncodings = 0;
|
|
||||||
knownRegions = (
|
|
||||||
en,
|
|
||||||
);
|
|
||||||
mainGroup = 4C5C377113CF64E1003655B8;
|
|
||||||
productRefGroup = 4C5C377D13CF64E1003655B8 /* Products */;
|
|
||||||
projectDirPath = "";
|
|
||||||
projectRoot = "";
|
|
||||||
targets = (
|
|
||||||
4C5C377B13CF64E1003655B8 /* Cocoa */,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
/* End PBXProject section */
|
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
|
||||||
4C5C377A13CF64E1003655B8 /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
4C5C378B13CF64E1003655B8 /* InfoPlist.strings in Resources */,
|
|
||||||
4C5C379113CF64E1003655B8 /* Credits.rtf in Resources */,
|
|
||||||
4C5C379713CF64E1003655B8 /* MainMenu.xib in Resources */,
|
|
||||||
4CEFC42F13D09CB500F92B14 /* logo.png in Resources */,
|
|
||||||
4CD83D6713D0A29400A29530 /* blue.png in Resources */,
|
|
||||||
4CD83D6813D0A29400A29530 /* green.png in Resources */,
|
|
||||||
4CD83D6913D0A29400A29530 /* red.png in Resources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXResourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
|
||||||
4C5C377813CF64E1003655B8 /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
4C5C378D13CF64E1003655B8 /* main.m in Sources */,
|
|
||||||
4C5C379413CF64E1003655B8 /* CocoaAppDelegate.mm in Sources */,
|
|
||||||
4CDE97CD13D0366D0071C912 /* NSString+stdstring.mm in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXSourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
|
||||||
4C5C378913CF64E1003655B8 /* InfoPlist.strings */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
4C5C378A13CF64E1003655B8 /* en */,
|
|
||||||
);
|
|
||||||
name = InfoPlist.strings;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
4C5C378F13CF64E1003655B8 /* Credits.rtf */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
4C5C379013CF64E1003655B8 /* en */,
|
|
||||||
);
|
|
||||||
name = Credits.rtf;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
4C5C379513CF64E1003655B8 /* MainMenu.xib */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
4C5C379613CF64E1003655B8 /* en */,
|
|
||||||
);
|
|
||||||
name = MainMenu.xib;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXVariantGroup section */
|
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
|
||||||
4C5C379813CF64E1003655B8 /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
||||||
"DEBUG=1",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
||||||
GCC_VERSION = "";
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
SDKROOT = macosx;
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
4C5C379913CF64E1003655B8 /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
|
||||||
COPY_PHASE_STRIP = YES;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
|
||||||
GCC_VERSION = "";
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
SDKROOT = macosx;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
4C5C379B13CF64E1003655B8 /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
|
||||||
GCC_PREFIX_HEADER = "Cocoa/Cocoa-Prefix.pch";
|
|
||||||
INFOPLIST_FILE = "Cocoa/Cocoa-Info.plist";
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
WRAPPER_EXTENSION = app;
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
4C5C379C13CF64E1003655B8 /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
|
||||||
GCC_PREFIX_HEADER = "Cocoa/Cocoa-Prefix.pch";
|
|
||||||
INFOPLIST_FILE = "Cocoa/Cocoa-Info.plist";
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
WRAPPER_EXTENSION = app;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
/* End XCBuildConfiguration section */
|
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
|
||||||
4C5C377613CF64E1003655B8 /* Build configuration list for PBXProject "Cocoa" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
4C5C379813CF64E1003655B8 /* Debug */,
|
|
||||||
4C5C379913CF64E1003655B8 /* Release */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
4C5C379A13CF64E1003655B8 /* Build configuration list for PBXNativeTarget "Cocoa" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
4C5C379B13CF64E1003655B8 /* Debug */,
|
|
||||||
4C5C379C13CF64E1003655B8 /* Release */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
/* End XCConfigurationList section */
|
|
||||||
};
|
|
||||||
rootObject = 4C5C377313CF64E1003655B8 /* Project object */;
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "self:Cocoa.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
@ -1,7 +0,0 @@
|
|||||||
//
|
|
||||||
// Prefix header for all source files of the 'Cocoa' target in the 'Cocoa' project
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef __OBJC__
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
|
|
||||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
|
||||||
{\colortbl;\red255\green255\blue255;}
|
|
||||||
\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
|
|
||||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qj\pardirnatural
|
|
||||||
|
|
||||||
\f0\fs24 \cf0 See http://sfml-dev.org for more information}
|
|
@ -1,2 +0,0 @@
|
|||||||
/* Localized versions of Info.plist keys */
|
|
||||||
|
|