8.1.1.1 Contents
The root components of the MacOS/X port of Crystal Space are contained within
these directories:
CS/libs/cssys/macosx
CS/plugins/sound/driver/coreaudio
CS/plugins/video/canvas/macosx/cocoa
CS/plugins/video/canvas/macosx/common
CS/plugins/video/canvas/macosx/coregraphics
CS/plugins/video/canvas/macosx/opengl
Functionally, this port is comprised of two types of platform-specific modules:
-
The core components which provide low-level platform-specific functionality to
the Crystal Space engine. These files and resources are located in
`CS/libs/cssys/macosx'.
-
The platform-specific audio and video driver modules. The files and resources
comprising audio and video plugins reside in the appropriate subdirectories of
`CS/plugins', as indicated above.
The core components provide low-level, platform-specific functionality which
Crystal Space requires. This includes interfaces to the underlying operating
system as well as higher-level event-loop processing as provided by Cocoa's
`NSApplication' class. The files comprising this module are:
OSXAssistant.h
- Two files share this name. The first file resides in
`CS/include/cssys/macosx' and declares the abstract `iOSXAssistant'
interface. This interface declares methods which may be useful to canvases, as
well as methods which are used by the Objective-C application delegate. The
second file resides in `CS/libs/cssys/macosx' and declares
`OSXAssistant' which is a concrete subclass implementing the
`iOSXAssistant' interface.
OSXAssistant.cpp
- Concrete implementation of the `iOSXAssistant' interface.
OSXDelegate.m
OSXDelegate.h
- Implements an Objective-C application delegate. It is responsible for handling
application-wide Cocoa events and provides convenience facilities for event
interpretation on behalf of plugin modules such as 2D drivers which are the
focus of keyboard and mouse events.
OSXLoadLibrary.m
OSXLoadLibrary.h
- Functions which provide dynamic linking facilities of plugin modules.
OSXDynamicLibrary.cpp
- A thin C++ wrapper over the Objective-C plugin loading facilities. The
interface between the C++ and Objective-C facilities is implemented via a
pure-C bridge, thus allowing Crystal Space's C++ Shared Class Facility
(see section 6.4 Shared Class Facility (SCF)) to successfully load plugin modules via the Objective-C dynamic
linking facility.
OSXMenu.m
OSXMenu.h
- A utility which generates the application's main menu from information
contained in a configuration file (`CS/data/macosx.cfg').
OSXConfigFile.cpp
OSXConfigFile.h
- A thin pure-C wrapper over Crystal Space's C++ configuration file class. This
wrapper allows the Objective-C `OSXMenu' implementation to utilize the
C++ configuration class.
OSXTime.cpp
- Platform-specific implementation of
csGetTicks()
and csSleep()
.
OSXUsername.m
- Platform-specific functionality for retrieving the username of the logged-in
user.
OSXGetUsername.cpp
OSXGetUsername.h
- Implementation of Crystal Space's
csGetUsername()
function. This is a
C++ cover over the functionality provided by `OSXUsername.m'.
OSXInstPath.m
- Platform-specific functionality for retrieving and interpreting the
configuration option `CrystalSpaceRoot'.
OSXInstallPath.cpp
OSXInstallPath.h
- Implementation of Crystal Space's
csGetInstallPath()
function. This is
a C++ cover over `OSXInstPath.m', and also provides additional
functionality (such as checking the `CRYSTAL' environment variable).
csosdefs.h
- Platform-specific definition of operating system services which allows Crystal
Space to access such services in a uniform manner from platform to platform.
Located in `CS/include/cssys/macosx'.
macosx.cfg
- A configuration file which defines platform-specific settings such as the menu
layout appropriate for the application. This file is actually located in the
`CS/data/config' directory which is typically mounted at the virtual
location `/config/' (see section 7.2 Virtual File System (VFS)).
The directory `CS/plugins/video/canvas/macosx/cocoa' contains the MacOS/X
Cocoa-based 2D canvas which provides 2D graphics capability to the Crystal
Space engine. Unlike the lower-level CoreGraphics and OpenGL 2D drivers, this
driver employs only very high-level Cocoa API and is consequently more
portable, though slower. This module is responsible for providing a
hardware-specific frame-buffer into which Crystal Space can draw. It is also
responsible for actually displaying the frame-buffer in a manner which is
appropriate for the given platform. The files comprising the Cocoa 2D graphics
library are:
CocoaDriver2D.cpp
CocoaDriver2D.h
- Defines the class `CocoaDriver2D' which provides an Cocoa-based 2D drawing
surface to Crystal Space. This is the sole interface through which Crystal
Space communicates with the Cocoa 2D graphics services.
CocoaDelegate2D.m
CocoaDelegate2D.h
- Implements the Objective-C portion of the Cocoa-based 2D driver. This class
is responsible for managing the window and view into which Crystal Space draws.
It is also the window's delegate object.
CocoaView.m
CocoaView.h
- An Objective-C subclass of Cocoa's `NSView' class. This is the view where
the rendered scene from Crystal Space is actually displayed. This class also
forwards received keyboard and mouse events to the shared `iOSXAssistant'
instance for interpretation and handling.
CocoaFrameBuffer.h
- An abstract 2D frame buffer class which defines the interface of objects which
are capable of converting a raw Crystal Space frame buffer into an
NSImage
-format frame buffer.
CocoaFrameBuffer15.cpp
CocoaFrameBuffer15.h
- A concrete subclass of `CocoaFrameBuffer' which can convert Crystal Space
RGB:555 to MacOS/X RGBA:4444.
CocoaFrameBuffer32.cpp
CocoaFrameBuffer32.h
- A concrete subclass of `CocoaFrameBuffer' which can convert Crystal Space
RGB:888 to MacOS/X RGBA:8888.
CocoaMemory.m
CocoaMemory.h
- Utility functions for manipulation of page-aligned memory blocks for the
`CocoaFrameBuffer' subclasses.
This document was generated using
texi2html