MeshLib C Docs
Loading...
Searching...
No Matches
MRSystem.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.h>
4#include <MRCMisc/exports.h>
5
6#include <stdbool.h>
7#include <stddef.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_std_filesystem_path MR_std_filesystem_path; // Defined in `#include <MRCMisc/std_filesystem_path.h>`.
14typedef struct MR_std_function_void MR_std_function_void; // Defined in `#include <MRCMisc/std_function_void.h>`.
15typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
16
17
21
22// sets debug name for the current thread
24MRC_API void MR_SetCurrentThreadName(const char *name);
25
26// return path to the folder with user config file(s)
30
31// returns path of config file in APPDATA
35
36// returns temp directory
40
41// returns home directory
45
46// returns version of MR
48MRC_API const char *MR_GetMRVersionString(void);
49
50// Opens given link in default browser
54MRC_API void MR_OpenLink(const char *url, const char *url_end);
55
56// Opens given file (or directory) in associated application
59MRC_API bool MR_OpenDocument(const char *path, const char *path_end);
60
61// returns string identification of the CPU
65
66// returns string with OS name with details
70
71// returns string identification of the OS
75
76// sets new handler for operator new if needed for some platforms
78MRC_API void MR_setNewHandlerIfNeeded(void);
79
84
90MRC_API const MR_uint64_t *MR_SystemMemory_Get_physicalTotal(const MR_SystemMemory *_this);
91
97MRC_API void MR_SystemMemory_Set_physicalTotal(MR_SystemMemory *_this, MR_uint64_t value);
98
105
111MRC_API const MR_uint64_t *MR_SystemMemory_Get_physicalAvailable(const MR_SystemMemory *_this);
112
118MRC_API void MR_SystemMemory_Set_physicalAvailable(MR_SystemMemory *_this, MR_uint64_t value);
119
126
130
135
141MRC_API MR_SystemMemory *MR_SystemMemory_ConstructFrom(MR_uint64_t physicalTotal, MR_uint64_t physicalAvailable);
142
145MRC_API const MR_SystemMemory *MR_SystemMemory_OffsetPtr(const MR_SystemMemory *ptr, ptrdiff_t i);
146
150
156
158MRC_API void MR_SystemMemory_Destroy(const MR_SystemMemory *_this);
159
162
170
175
186MRC_API void MR_setupLoggerByDefault(const MR_std_function_void *customLogSinkAdder);
187
188#ifdef __cplusplus
189} // extern "C"
190#endif
struct MR_std_string MR_std_string
Definition MRCtm.h:32
struct MR_std_filesystem_path MR_std_filesystem_path
Definition MRPly.h:20
struct MR_SystemMemory MR_SystemMemory
Definition MRSystem.h:20
MRC_API MR_std_filesystem_path * MR_GetTempDirectory(void)
MRC_API MR_std_string * MR_GetCpuId(void)
MRC_API void MR_SystemMemory_DestroyArray(const MR_SystemMemory *_this)
Destroys a heap-allocated array of MR_SystemMemory. Does nothing if the pointer is null.
MRC_API void MR_SetCurrentThreadName(const char *name)
Generated from function MR::SetCurrentThreadName.
MRC_API void MR_SystemMemory_Set_physicalTotal(MR_SystemMemory *_this, MR_uint64_t value)
MRC_API MR_std_filesystem_path * MR_getUserConfigDir(void)
MRC_API MR_SystemMemory * MR_SystemMemory_ConstructFromAnother(const MR_SystemMemory *_other)
MRC_API MR_SystemMemory * MR_SystemMemory_ConstructFrom(MR_uint64_t physicalTotal, MR_uint64_t physicalAvailable)
MRC_API MR_std_filesystem_path * MR_getUserConfigFilePath(void)
MRC_API void MR_setNewHandlerIfNeeded(void)
Generated from function MR::setNewHandlerIfNeeded.
MRC_API void MR_SystemMemory_Set_physicalAvailable(MR_SystemMemory *_this, MR_uint64_t value)
MRC_API MR_uint64_t * MR_SystemMemory_GetMutable_physicalTotal(MR_SystemMemory *_this)
MRC_API MR_SystemMemory * MR_SystemMemory_DefaultConstructArray(size_t num_elems)
MRC_API void MR_SystemMemory_Destroy(const MR_SystemMemory *_this)
Destroys a heap-allocated instance of MR_SystemMemory. Does nothing if the pointer is null.
MRC_API const MR_uint64_t * MR_SystemMemory_Get_physicalAvailable(const MR_SystemMemory *_this)
struct MR_std_function_void MR_std_function_void
Definition MRSystem.h:14
MRC_API MR_std_string * MR_GetDetailedOSName(void)
MRC_API MR_uint64_t * MR_SystemMemory_GetMutable_physicalAvailable(MR_SystemMemory *_this)
MRC_API const char * MR_GetMRVersionString(void)
Generated from function MR::GetMRVersionString.
MRC_API MR_SystemMemory * MR_SystemMemory_DefaultConstruct(void)
MRC_API void MR_OpenLink(const char *url, const char *url_end)
MRC_API const MR_uint64_t * MR_SystemMemory_Get_physicalTotal(const MR_SystemMemory *_this)
MRC_API MR_SystemMemory * MR_SystemMemory_AssignFromAnother(MR_SystemMemory *_this, const MR_SystemMemory *_other)
MRC_API void MR_setupLoggerByDefault(const MR_std_function_void *customLogSinkAdder)
MRC_API const MR_SystemMemory * MR_SystemMemory_OffsetPtr(const MR_SystemMemory *ptr, ptrdiff_t i)
MRC_API MR_SystemMemory * MR_SystemMemory_OffsetMutablePtr(MR_SystemMemory *ptr, ptrdiff_t i)
MRC_API MR_std_filesystem_path * MR_GetHomeDirectory(void)
MRC_API MR_SystemMemory * MR_getSystemMemory(void)
MRC_API MR_std_string * MR_getCurrentStacktrace(void)
MRC_API bool MR_OpenDocument(const char *path, const char *path_end)
MRC_API MR_std_string * MR_getOSNoSpaces(void)