forked from SharpGenTools/SharpGenTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructNative.cpp
More file actions
91 lines (72 loc) · 3.4 KB
/
Copy pathStructNative.cpp
File metadata and controls
91 lines (72 loc) · 3.4 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include "StructNative.h"
#include <cstdio>
struct Implementation : public Interface
{
virtual int One() override
{
return 1;
}
};
STRUCTLIB_FUNC(SimpleStruct) GetSimpleStruct()
{
return { 10, 3 };
}
STRUCTLIB_FUNC(StructWithArray) PassThroughArray(StructWithArray param)
{
return param;
}
STRUCTLIB_FUNC(TestUnion) PassThroughUnion(TestUnion param)
{
return param;
}
STRUCTLIB_FUNC(UnionWithArray) PassThroughUnion2(UnionWithArray param)
{
return param;
}
STRUCTLIB_FUNC(BitField) PassThroughBitfield(BitField param)
{
return param;
}
STRUCTLIB_FUNC(AsciiTest) PassThroughAscii(AsciiTest param)
{
return param;
}
STRUCTLIB_FUNC(Utf16Test) PassThroughUtf(Utf16Test param)
{
return param;
}
STRUCTLIB_FUNC(NestedTest) PassThroughNested(NestedTest param)
{
return param;
}
STRUCTLIB_FUNC(BoolToInt2) PassThroughBoolToInt(BoolToInt2 param)
{
return param;
}
STRUCTLIB_FUNC(BoolArray) PassThroughBoolArray(BoolArray param)
{
return param;
}
STRUCTLIB_FUNC(bool) VerifyReservedBits(BitField2 param)
{
return param.reservedBits == 20;
}
STRUCTLIB_FUNC(void) CustomNativeNewTest(CustomNativeNew param)
{
}
STRUCTLIB_FUNC(StructWithInterface) GetStructWithInterface()
{
return {new Implementation()};
}
STRUCTLIB_FUNC(StructWithInterface) PassThroughStructWithInterface(StructWithInterface param)
{
return param;
}
STRUCTLIB_FUNC(PointerSizeMember) PassThroughPointerSizeMember(PointerSizeMember param)
{
return param;
}
STRUCTLIB_FUNC(bool) VerifyFlags(D2D1_DEVICE_CONTEXT_OPTIONS param)
{
return param == D2D1_DEVICE_CONTEXT_OPTIONS_NONE || param == D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS;
}