torque Torque Game Engine Documentation
TGE Version 1.5.2

engine/platformMacCarb/platformMacCarb.h File Reference

#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
#include <AGL/agl.h>
#include "platform/platform.h"
#include "math/mMath.h"

Data Structures

class  MacCarbPlatState
 NOTE: Placing system headers before Torque's platform.h will work around the Torque-Redefines-New problems. More...

Misc Mac Plat constants

#define IntToFixed(a)   ((Fixed)(a) <<16)
 earlier versions of OSX don't have these convinience macros, so manually stick them here.
#define FixedToInt(a)   ((short)(((Fixed)(a) + fixed1/2) >> 16))
const U32 kTAlertWindowLevel = CGShieldingWindowLevel() - 1
 window level constants
const U32 kTUtilityWindowLevel = CGShieldingWindowLevel() - 2
const U32 kTFullscreenWindowLevel = CGShieldingWindowLevel() - 3
const S32 kTMouseWheelMagnificationFactor = 25
 mouse wheel sensitivity factor

Functions

Misc Mac Plat Functions
Functions that are used by multiple files in the mac plat, but too trivial to require their own header file.

Fills gGLState with info about this gl renderer's capabilities.

void getGLCapabilities (void)
WindowPtr MacCarbCreateOpenGLWindow (GDHandle hDevice, U32 width, U32 height, bool fullScreen)
 Creates a new mac window, of a particular size, centered on the screen.
void MacCarbFadeInWindow (WindowPtr window)
 Asnychronously fade a window into existence, and set menu bar visibility.
void MacCarbFadeAndReleaseWindow (WindowPtr window)
 Asnychronously fade a window out of existence.
void MacCarbShowMenuBar (bool show)
 Manage Mac MenuBar visibility.
U8 TranslateOSKeyCode (U8 vcode)
 Translates a Mac keycode to a Torque keycode.

Variables

MacCarbPlatState platState
 Global singleton that encapsulates a lot of mac platform state & globals.


Define Documentation

#define IntToFixed (  )     ((Fixed)(a) <<16)

earlier versions of OSX don't have these convinience macros, so manually stick them here.

#define FixedToInt (  )     ((short)(((Fixed)(a) + fixed1/2) >> 16))


Function Documentation

void getGLCapabilities ( void   ) 

WindowPtr MacCarbCreateOpenGLWindow ( GDHandle  hDevice,
U32  width,
U32  height,
bool  fullScreen 
)

Creates a new mac window, of a particular size, centered on the screen.

If a fullScreen window is requested, then the window is created without decoration, in front of all other normal windows AND BEHIND asian text input methods. This path to a fullScreen window allows asian text input methods to work in full screen mode, because it avoids capturing the display.

void MacCarbFadeInWindow ( WindowPtr  window  ) 

Asnychronously fade a window into existence, and set menu bar visibility.

The fading can be turned off via the preference $pref::mac::fadeWindows. It also sends itself to the main thread if it is called on any other thread.

void MacCarbFadeAndReleaseWindow ( WindowPtr  window  ) 

Asnychronously fade a window out of existence.

The window will be destroyed when the fade is complete. The fading can be turned off via the preference $pref::mac::fadeWindows. It also sends itself to the main thread if it is called on any other thread.

void MacCarbShowMenuBar ( bool  show  ) 

Manage Mac MenuBar visibility.

If show is true the menubar is shown, if false the menubar is hidden. It sends itself to the main thread if it is called on any other thread.

U8 TranslateOSKeyCode ( U8  vcode  ) 

Translates a Mac keycode to a Torque keycode.


Variable Documentation

Global singleton that encapsulates a lot of mac platform state & globals.

const U32 kTAlertWindowLevel = CGShieldingWindowLevel() - 1

window level constants

const U32 kTUtilityWindowLevel = CGShieldingWindowLevel() - 2

const U32 kTFullscreenWindowLevel = CGShieldingWindowLevel() - 3

mouse wheel sensitivity factor




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen