SFML/examples/cocoa
Chris Thrasher ab109cd3cd Use ON and OFF for CMake booleans
CMake supports a number of strings for truthy and falsey values.
ON/OFF and TRUE/FALSE are the most popular but 1/0 is also supported.
This is mostly a style choice but I'm inclined to believe that ON/OFF
is the most popular option and I'm generally in favor of style
choices that better align with the community at large.
2024-09-11 14:36:13 -06:00
..
resources Update copyright year 2024-01-26 12:00:22 -07:00
CMakeLists.txt Use ON and OFF for CMake booleans 2024-09-11 14:36:13 -06:00
CocoaAppDelegate.h Update copyright year 2024-01-26 12:00:22 -07:00
CocoaAppDelegate.mm Replace factory functions with throwing constructors 2024-08-08 09:19:32 -06:00
main.m Update copyright year 2024-01-26 12:00:22 -07:00
MainMenu.xib SFML-Cocoa is now part of the cmake-based examples 2012-01-30 12:23:18 +01:00
NSString+stdstring.h Update copyright year 2024-01-26 12:00:22 -07:00
NSString+stdstring.mm Add clang-tidy readability-else-after-return check 2024-06-27 12:17:03 -06:00
readme.txt Fix whitespace: Convert tabs to spaces and remove trailing whitespace. 2015-04-15 01:53:43 +02:00

SFML IN COCOA APPLICATION
=========================

This is a small example of the integration of SFML in a Cocoa application.

Features
--------

 * This example shows how basic UI elements can interact with SFML
   render areas such as sf::RenderWindow (you can use sf::Window and
   OpenGL code too, of course).
 * It also provides tools for converting NSString to and from
   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
----------------------

While mixing SFML into a Cocoa application you have to deal with mixing
C++ and Objective-C. In order to proceed you should use .mm extension for
Objective-C++ files.

Be aware of the limitations of Objective-C++. Please refer to the official
documentation provided by Apple for more information.

You can also work around these limitations by using CSFML.