Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
osxsysfunc.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
11
#include "
core/types.h
"
12
#include "
core/exithandler.h
"
13
14
namespace
System
15
{
16
class
SystemInfo
;
17
}
18
19
//------------------------------------------------------------------------------
20
namespace
OSX
21
{
22
class
SysFunc
23
{
24
public
:
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);
38
static
const
System::SystemInfo*
GetSystemInfo
();
39
40
private
:
41
friend
class
Core::ExitHandler
;
43
static
const
Core::ExitHandler
*
RegisterExitHandler
(
const
Core::ExitHandler
* exitHandler);
44
45
static
bool
volatile
SetupCalled
;
46
static
const
Core::ExitHandler
*
ExitHandlers
;
// forward linked list of exit handlers
47
static
System::SystemInfo
systemInfo
;
48
};
49
50
}
// namespace OSX
51
//------------------------------------------------------------------------------
52
Core::ExitHandler
ExitHandlers are static objects which register themselves automatically once at startup and are calle...
Definition
exithandler.h:22
OSX::SysFunc
Lowest-level functions for OSX platform.
Definition
osxsysfunc.h:23
OSX::SysFunc::Error
static void Error(const char *error)
display an error message
OSX::SysFunc::MessageBox
static void MessageBox(const char *msg)
display a message which must be confirmed by the user
OSX::SysFunc::ExitHandlers
static const Core::ExitHandler * ExitHandlers
Definition
osxsysfunc.h:46
OSX::SysFunc::Setup
static void Setup()
setup lowlevel Nebula runtime (called before anything else)
OSX::SysFunc::DebugOut
static void DebugOut(const char *msg)
print a message on the debug concole
OSX::SysFunc::SetupCalled
static bool volatile SetupCalled
Definition
osxsysfunc.h:45
OSX::SysFunc::RegisterExitHandler
static const Core::ExitHandler * RegisterExitHandler(const Core::ExitHandler *exitHandler)
register an exit handler which will be called from within Exit()
OSX::SysFunc::Exit
static void Exit(int exitCode)
cleanly exit the process
OSX::SysFunc::Sleep
static void Sleep(double sec)
sleep for a specified amount of seconds
OSX::SysFunc::systemInfo
static System::SystemInfo systemInfo
Definition
osxsysfunc.h:47
OSX::SysFunc::GetSystemInfo
static const System::SystemInfo * GetSystemInfo()
get system information
SystemInfo
Provides information about the host system.
exithandler.h
OSX
Definition
osxsysfunc.h:21
System
Definition
osxsysfunc.h:15
types.h
code
foundation
core
osx
osxsysfunc.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.