Nebula
Loading...
Searching...
No Matches
win32sysfunc.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
12#include "core/types.h"
13#include "core/exithandler.h"
14namespace System
15{
16 class SystemInfo;
17}
18
19//------------------------------------------------------------------------------
20namespace Win32
21{
23{
24public:
26 static void Setup();
28 static void Exit(int exitCode);
30 static void Error(const char* error);
32 static void MessageBox(const char* msg);
34 static void DebugOut(const char* msg);
36 static void Sleep(double sec);
37
38private:
39 friend class Core::ExitHandler;
41 static const Core::ExitHandler* RegisterExitHandler(const Core::ExitHandler* exitHandler);
42
43 static bool volatile SetupCalled;
44 static const Core::ExitHandler* ExitHandlers; // forward linked list of exit handlers
45 static System::SystemInfo systemInfo;
46};
47
48} // namespace Win32
49//------------------------------------------------------------------------------
ExitHandlers are static objects which register themselves automatically once at startup and are calle...
Definition exithandler.h:22
Provides Posix specific helper functions.
Definition posixsysfunc.h:25
static System::SystemInfo systemInfo
Definition win32sysfunc.h:45
static void DebugOut(const char *msg)
print a message on the debug console
static void Sleep(double sec)
sleep for a specified amount of seconds
static void Error(const char *error)
display an error message box
static bool volatile SetupCalled
Definition win32sysfunc.h:43
static const Core::ExitHandler * ExitHandlers
Definition win32sysfunc.h:44
static void Setup()
setup lowlevel static objects (must be called before spawning any threads)
static const Core::ExitHandler * RegisterExitHandler(const Core::ExitHandler *exitHandler)
register an exit handler which will be called from within Exit()
static void MessageBox(const char *msg)
display a message box which needs to be confirmed by the user
static void Exit(int exitCode)
exit process, and to proper cleanup, memleak reporting, etc...
Definition osxsysfunc.h:15
[TODO: Describe Win32 subsystem]