-
Notifications
You must be signed in to change notification settings - Fork 36
/
Delegate.h
58 lines (40 loc) · 1.55 KB
/
Delegate.h
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
#ifndef System_Delegate_H__
#define System_Delegate_H__
#pragma once
#include <il2c.h>
#ifdef __cplusplus
extern "C" {
#endif
/////////////////////////////////////////////////////////////
// System.Delegate
typedef struct System_Delegate System_Delegate;
typedef System_Object_VTABLE_DECL__ System_Delegate_VTABLE_DECL__;
typedef const struct IL2C_METHOD_TABLE_DECL
{
System_Object* target;
intptr_t methodPtr;
} IL2C_METHOD_TABLE;
// We are surprised what be variable size for System.Delegate instance ;)
struct System_Delegate
{
System_Delegate_VTABLE_DECL__* vptr0__;
uintptr_t count__;
IL2C_METHOD_TABLE methodtbl__[1];
};
extern System_Delegate_VTABLE_DECL__ System_Delegate_VTABLE__;
IL2C_DECLARE_RUNTIME_TYPE(System_Delegate);
extern /* virtual */ int32_t System_Delegate_GetHashCode(System_Delegate* this__);
extern /* virtual */ bool System_Delegate_Equals(System_Delegate* this__, System_Object* obj);
extern /* static */ System_Delegate* System_Delegate_Combine(System_Delegate* a, System_Delegate* b);
extern /* static */ System_Delegate* System_Delegate_Remove(System_Delegate* source, System_Delegate* value);
/////////////////////////////////////////////////
// Delegate special functions
extern System_Delegate* il2c_new_delegate__(
IL2C_RUNTIME_TYPE delegateType, System_Object* object, intptr_t method);
#define il2c_new_delegate(typeName, object, method) \
il2c_new_delegate__(il2c_typeof(typeName), object, method)
extern void System_Delegate_MarkHandler__(System_Delegate* this__);
#ifdef __cplusplus
}
#endif
#endif