Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Static Public Member Functions | List of all members
Platform Struct Reference

#include <platform.h>

Classes

struct  FileInfo
 
struct  LocalTime
 
struct  VolumeInformation
 

Public Types

enum  DFILE_STATUS { DFILE_OK = 1 }
 
typedef void * FILE_HANDLE
 

Static Public Member Functions

static void init ()
 Application. More...
 
static void initConsole ()
 
static void process ()
 
static void shutdown ()
 
static void sleep (U32 ms)
 
static void restartInstance ()
 
static void postQuitMessage (const U32 in_quitVal)
 
static void forceShutdown (S32 returnValue)
 
static StringTableEntry getUserHomeDirectory ()
 User. More...
 
static StringTableEntry getUserDataDirectory ()
 
static void initWindow (const Point2I &initialSize, const char *name)
 Window. More...
 
static void setWindowTitle (const char *title)
 
static void setWindowSize (U32 newWidth, U32 newHeight)
 
static const Point2IgetWindowSize ()
 
static void minimizeWindow ()
 
static void restoreWindow ()
 
static void setMouseLock (bool locked)
 
static void AlertOK (const char *windowTitle, const char *message)
 GUI. More...
 
static bool AlertOKCancel (const char *windowTitle, const char *message)
 
static bool AlertRetry (const char *windowTitle, const char *message)
 
static bool AlertYesNo (const char *windowTitle, const char *message)
 
static S32 messageBox (const UTF8 *title, const UTF8 *message, MBButtons buttons=MBOkCancel, MBIcons icon=MIInformation)
 
static void enableKeyboardTranslation (void)
 Input. More...
 
static void disableKeyboardTranslation (void)
 
static U32 getTime (void)
 Date & Time. More...
 
static U32 getVirtualMilliseconds (void)
 
static U32 getRealMilliseconds (void)
 
static void advanceTime (U32 delta)
 
static S32 getBackgroundSleepTime ()
 
static void getLocalTime (LocalTime &)
 
static S32 compareFileTimes (const FileTime &a, const FileTime &b)
 
static float getRandom ()
 Math. More...
 
static void debugBreak ()
 Debug. More...
 
static void outputDebugString (const char *string)
 
static void cprintf (const char *str)
 
static StringTableEntry getCurrentDirectory ()
 File IO. More...
 
static bool setCurrentDirectory (StringTableEntry newDir)
 
static StringTableEntry getTemporaryDirectory ()
 
static StringTableEntry getTemporaryFileName ()
 
static StringTableEntry getExecutableName ()
 
static StringTableEntry getExecutablePath ()
 
static void setMainDotCsDir (const char *dir)
 
static StringTableEntry getMainDotCsDir ()
 
static StringTableEntry getPrefsPath (const char *file=NULL)
 
static char * makeFullPathName (const char *path, char *buffer, U32 size, const char *cwd=NULL)
 
static StringTableEntry stripBasePath (const char *path)
 
static bool isFullPath (const char *path)
 
static StringTableEntry makeRelativePathName (const char *path, const char *to)
 
static bool dumpPath (const char *in_pBasePath, Vector< FileInfo > &out_rFileVector, S32 recurseDepth=-1)
 
static bool dumpDirectories (const char *path, Vector< StringTableEntry > &directoryVector, S32 depth=0, bool noBasePath=false)
 
static bool hasSubDirectory (const char *pPath)
 
static bool getFileTimes (const char *filePath, FileTime *createTime, FileTime *modifyTime)
 
static bool isFile (const char *pFilePath)
 
static S32 getFileSize (const char *pFilePath)
 
static bool hasExtension (const char *pFilename, const char *pExtension)
 
static bool isDirectory (const char *pDirPath)
 
static bool isSubDirectory (const char *pParent, const char *pDir)
 
static void addExcludedDirectory (const char *pDir)
 
static void clearExcludedDirectories ()
 
static bool isExcludedDirectory (const char *pDir)
 
static bool createPath (const char *path)
 
static bool deleteDirectory (const char *pPath)
 
static bool fileDelete (const char *name)
 
static bool fileRename (const char *oldName, const char *newName)
 
static bool fileTouch (const char *name)
 
static bool pathCopy (const char *fromName, const char *toName, bool nooverwrite=true)
 
static StringTableEntry osGetTemporaryDirectory ()
 
static StringTableEntry createUUID (void)
 Misc. More...
 
static bool openWebBrowser (const char *webAddress)
 
static void openFolder (const char *path)
 
static const char * getClipboard ()
 
static bool setClipboard (const char *text)
 

Member Typedef Documentation

typedef void* FILE_HANDLE

Member Enumeration Documentation

Enumerator
DFILE_OK 

Member Function Documentation

void addExcludedDirectory ( const char *  pDir)
static
static void advanceTime ( U32  delta)
static
static void AlertOK ( const char *  windowTitle,
const char *  message 
)
static

GUI.

static bool AlertOKCancel ( const char *  windowTitle,
const char *  message 
)
static
static bool AlertRetry ( const char *  windowTitle,
const char *  message 
)
static
static bool AlertYesNo ( const char *  windowTitle,
const char *  message 
)
static
void clearExcludedDirectories ( )
static
static S32 compareFileTimes ( const FileTime a,
const FileTime b 
)
static
void cprintf ( const char *  str)
static
static bool createPath ( const char *  path)
static
static StringTableEntry createUUID ( void  )
static

Misc.

static void debugBreak ( )
static

Debug.

bool deleteDirectory ( const char *  pPath)
static
static void disableKeyboardTranslation ( void  )
static
static bool dumpDirectories ( const char *  path,
Vector< StringTableEntry > &  directoryVector,
S32  depth = 0,
bool  noBasePath = false 
)
static
static bool dumpPath ( const char *  in_pBasePath,
Vector< FileInfo > &  out_rFileVector,
S32  recurseDepth = -1 
)
static
static void enableKeyboardTranslation ( void  )
static
static bool fileDelete ( const char *  name)
static
static bool fileRename ( const char *  oldName,
const char *  newName 
)
static
static bool fileTouch ( const char *  name)
static
static void forceShutdown ( S32  returnValue)
static
S32 getBackgroundSleepTime ( )
static
static const char* getClipboard ( )
static
static StringTableEntry getCurrentDirectory ( )
static

File IO.

static StringTableEntry getExecutableName ( )
static
static StringTableEntry getExecutablePath ( )
static
static S32 getFileSize ( const char *  pFilePath)
static
static bool getFileTimes ( const char *  filePath,
FileTime createTime,
FileTime modifyTime 
)
static
static void getLocalTime ( LocalTime )
static
StringTableEntry getMainDotCsDir ( )
static
StringTableEntry getPrefsPath ( const char *  file = NULL)
static
static float getRandom ( )
static

Math.

static U32 getRealMilliseconds ( void  )
static
StringTableEntry getTemporaryDirectory ( )
static
StringTableEntry getTemporaryFileName ( )
static
static U32 getTime ( void  )
static

Date & Time.

static StringTableEntry getUserDataDirectory ( )
static
static StringTableEntry getUserHomeDirectory ( )
static

User.

static U32 getVirtualMilliseconds ( void  )
static
static const Point2I& getWindowSize ( )
static
bool hasExtension ( const char *  pFilename,
const char *  pExtension 
)
static
static bool hasSubDirectory ( const char *  pPath)
static
static void init ( )
static

Application.

void initConsole ( )
static
static void initWindow ( const Point2I initialSize,
const char *  name 
)
static

Window.

static bool isDirectory ( const char *  pDirPath)
static
bool isExcludedDirectory ( const char *  pDir)
static
static bool isFile ( const char *  pFilePath)
static
bool isFullPath ( const char *  path)
static
static bool isSubDirectory ( const char *  pParent,
const char *  pDir 
)
static
char * makeFullPathName ( const char *  path,
char *  buffer,
U32  size,
const char *  cwd = NULL 
)
static
Initial value:
{
char* argBuffer = Con::getArgBuffer( 512 )
StringTableEntry makeRelativePathName ( const char *  path,
const char *  to 
)
static
return messageBox ( const UTF8 *  title,
const UTF8 *  message,
MBButtons  buttons = MBOkCancel,
MBIcons  icon = MIInformation 
)
static
static void minimizeWindow ( )
static
static void openFolder ( const char *  path)
static
static bool openWebBrowser ( const char *  webAddress)
static
static StringTableEntry osGetTemporaryDirectory ( )
static
static void outputDebugString ( const char *  string)
static
static bool pathCopy ( const char *  fromName,
const char *  toName,
bool  nooverwrite = true 
)
static
static void postQuitMessage ( const U32  in_quitVal)
static
static void process ( )
static
static void restartInstance ( )
static
static void restoreWindow ( )
static
static bool setClipboard ( const char *  text)
static
static bool setCurrentDirectory ( StringTableEntry  newDir)
static
void setMainDotCsDir ( const char *  dir)
static
static void setMouseLock ( bool  locked)
static
static void setWindowSize ( U32  newWidth,
U32  newHeight 
)
static
static void setWindowTitle ( const char *  title)
static
static void shutdown ( )
static
static void sleep ( U32  ms)
static
StringTableEntry stripBasePath ( const char *  path)
static

The documentation for this struct was generated from the following files: