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
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 information about the host system.
Provides Win32 specific helper functions.
Definition win32sysfunc.h:23
static System::SystemInfo systemInfo
Definition win32sysfunc.h:45
static void DebugOut(const char *msg)
print a message on the debug console
Definition win32sysfunc.cc:232
static void Setup()
setup lowlevel static objects (must be called before spawning any threads)
Definition win32sysfunc.cc:41
static void Sleep(double sec)
sleep for a specified amount of seconds
Definition win32sysfunc.cc:221
static void Exit(int exitCode)
exit process, and to proper cleanup, memleak reporting, etc...
Definition win32sysfunc.cc:91
static const Core::ExitHandler * ExitHandlers
Definition win32sysfunc.h:44
static const Core::ExitHandler * RegisterExitHandler(const Core::ExitHandler *exitHandler)
register an exit handler which will be called from within Exit()
Definition win32sysfunc.cc:246
static bool volatile SetupCalled
Definition win32sysfunc.h:43
static void Error(const char *error)
display an error message box
Definition win32sysfunc.cc:137
static void MessageBox(const char *msg)
display a message box which needs to be confirmed by the user
Definition win32sysfunc.cc:203
Definition osxsysfunc.h:15
[TODO: Describe Win32 subsystem]