blob: dc33098b510bf2f60dd32803b9922f20931a18f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/********************************************************
* *
* Copyright (C) Microsoft. All rights reserved. *
* *
********************************************************/
// Sentient Client System API
//
// Include this to get access to all System Sentient features.
#pragma once
#include "SenClientTypes.h"
namespace Sentient
{
/************************
***** System Types *****
************************/
// Standardized callback that all asynchronous functions call either on completion or on failure.
typedef void (*SenSysCompletedCallback)( HRESULT taskResult, void *userCallbackData );
typedef void *(*SenSysMemAllocCallback)( size_t size );
typedef void (*SenSysMemFreeCallback)( void *ptr );
typedef void (*SenSysOutputCallback)( const wchar_t *outputString );
/****************************
***** System Functions *****
****************************/
#ifdef _XBOX
// Call this to get the XDK version number that Sentient was compiled against
int SenSysGetXDKVersion();
#endif
#ifdef __WINLIVE__
// Call this to get the GFWL version number that Sentient was compiled against
int SenSysGetGFWLSDKVersion();
#endif
// Sentient calls this to get total allocated memory.
// (this is only tracked in debug mode - in release mode, this will return 0)
size_t SenSysMemAllocated();
// Redirects all of Sentient's internal memory allocs to a custom allocator.
void SenSysSetMemAllocCallback( SenSysMemAllocCallback callback );
// Redirects all of Sentient's internal memory frees to a custom allocator.
void SenSysSetMemFreeCallback( SenSysMemFreeCallback callback );
// Redirects all of Sentient's internal output to a custom routine.
void SenSysSetOutputCallback( SenSysOutputCallback callback );
} // namespace Sentient
|