sysfunc.h File Reference
Common system functions. More...
#include <stdarg.h>
#include <stdio.h>
#include "csextern.h"
#include "iutil/cfgfile.h"
Go to the source code of this file.
System functions | |
bool | csDefaultRunLoop (iObjectRegistry *) |
Implements a default run-loop for stand-alone applications. | |
int | csFPrintf (FILE *file, const char *str,...) |
CS version of fprintf (file, str, . | |
int | csFPrintfV (FILE *file, const char *str, va_list arg) |
CS version of vfprintf (stderr, str, . | |
csPtr< iConfigFile > | csGetPlatformConfig (const char *key) |
Get a platform-specific per-user config object. | |
csString | csGetPlatformConfigPath (const char *key, bool local=false) |
Get a platform-specific path to store per-user configuration data. | |
csTicks | csGetTicks () |
Get the current tick count. | |
csString | csGetUsername () |
Get the username of the account running the program. | |
bool | csPlatformShutdown (iObjectRegistry *) |
Platform-specific shutdown. | |
bool | csPlatformStartup (iObjectRegistry *) |
Platform-specific startup. | |
int | csPrintf (const char *str,...) |
CS version of printf. | |
int | csPrintfErr (const char *str,...) |
CS version of fprintf (stderr, str, . | |
int | csPrintfErrV (const char *str, va_list arg) |
CS version of vfprintf (stderr, str, . | |
int | csPrintfV (const char *str, va_list arg) |
CS version of vprintf. | |
void | csSleep (int) |
This function will freeze your application for given number of 1/1000 seconds. |
Detailed Description
Common system functions.
Definition in file sysfunc.h.
Function Documentation
|
Implements a default run-loop for stand-alone applications. This function implements a run-loop for stand-alone applications which do not provide their own run-loop. You only need to call this function if your application does not otherwise implement its own run-loop. For example, an existing Microsoft Windows-based application will already have a run-loop which processes the Windows event-queue, among other tasks. Such an application should not call this function, since doing so would interrupt the existing run-loop and prevent it from running. For each iteration of the run-loop, this function increments the Crystal Space virtual clock (if it is present in the shared-object registry at the time of the call to this function) and processes the Crystal Space event queue (which must be present in the shared-object registry at the time of the call to this function). This function only returns after a csevBroadcast message has been received in the Crystal Space event queue with command code cscmdQuit. The return value of this function indicates whether or not the run-loop was actually able to run. If there was a problem starting the run-loop, then `false' is returned, otherwise `true' is returned. Referenced by csApplicationFramework::Run(). |
|
CS version of fprintf (file, str, . ..). It accepts UTF-8 strings and converts it, if required, to the platforms native codepage.
|
|
CS version of vfprintf (stderr, str, . ..). It accepts UTF-8 strings and converts it, if required, to the platforms native codepage.
|
|
Get a platform-specific per-user config object. The data is stored in a platform-specific manner - e.g. in "Documents and Settings\Application Data" on Windows, or $HOME on Unix.
|
|
Get a platform-specific path to store per-user configuration data. The path is in a platform-specific place - e.g. in "Documents and Settings\Application Data" on Windows, or $HOME on Unix.
|
|
Get the current tick count. Warning! Do NOT use this function for controlling game logic speed. To do that you should use the virtual clock (iVirtualClock) which you can get from the object registry. By using the virtual clock it will be possible to control the speed of your game and also to pause it if needed. |
|
Get the username of the account running the program. Returns the username of the owner of the process running the program. If the username can not be determined, then an empty string is returned. |
|
Platform-specific shutdown. Some platforms on which Crystal Space runs need to perform their own shutdown processing. Typically, this function is automatically called by the higher-level csInitializer::DestroyApplication(), however if you are performing application shutdown manually, you should call it yourself. Returns `true' if shutdown processing was successful, otherwise `false'. |
|
Platform-specific startup. Some platforms on which Crystal Space runs need to perform their own startup processing. For instance, on some platforms, platform-specific "helper" objects may be placed in the shared-object registry for use by other platform-specific components. Typically, this function is automatically called by the higher-level csInitializer::CreateEnvironment(), however if you are performing application initialization manually, you should call it yourself. Returns `true' if startup initialization was successful, otherwise `false'. |
|
CS version of printf. It accepts UTF-8 strings and converts it, if required, to the platforms native codepage. Referenced by csReporterHelper::ReportV(). |
|
CS version of fprintf (stderr, str, . ..). It accepts UTF-8 strings and converts it, if required, to the platforms native codepage.
Referenced by csBlockAllocator< csBSPTree >::Alloc(), and csBlockAllocator< csBSPTree >::DestroyObject(). |
|
CS version of vfprintf (stderr, str, . ..). It accepts UTF-8 strings and converts it, if required, to the platforms native codepage.
|
|
CS version of vprintf. It accepts UTF-8 strings and converts it, if required, to the platforms native codepage. Referenced by csReporterHelper::ReportV(). |
|
This function will freeze your application for given number of 1/1000 seconds. The function is very inaccurate, so don't use it for accurate timing. It may be useful when the application is idle, to explicitly release CPU for other tasks in multi-tasking operating systems. |
Generated for Crystal Space by doxygen 1.4.4