Cocoa Application Wrapper

Apple platforms (Mac OS X & iOS) are built with a special wrapper. This wrapper enables the application to interface with OS specific features easily without having to alter the GemRB core. The meat of the wrapper is simply an NSApplication Delegate object that can be dynamically extended using categories loaded from the various GemRB plugins. The application delegate has an Objective-C++ interface to the GemRB core so it is possible to map system specific features to trigger action inside the core or get core status.

Currently the wrapper doesnt do much, it does allow gemrb to be built as a proper application bundle instead of a command line executable and it overrides application quit (on Mac) to allow GemRB to handle a quit event in its own way (currently GemRB simply quits, but it should have a popup warning about loosing progress etc).

The iOS version of the wrapper runs a configuration utility prior to running gemrb (Download samplie configuration). It also attaches an accessory view to the keyboard for toggling modifier keys.

Apple specific features that could be implemented with the wrapper:

  • Using NSUserDefaults to dynamically set engine options at runtime
  • GUI interface for editing the config (iOS prefpane or simple preference interface for Mac)
  • a quick launch GUI to prompt for game type on launch.
  • setup special environments (ex. Python for iOS)
 
cocoa.txt · Last modified: 2011/11/09 17:51 by brada
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki