File: test.cs.ref

package info (click to toggle)
mono-tools 4.2-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 13,868 kB
  • sloc: cs: 100,909; sh: 3,845; makefile: 2,040; javascript: 1,557; xml: 126
file content (251 lines) | stat: -rw-r--r-- 7,137 bytes parent folder | download | duplicates (3)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/*
 * This file was automatically generated by create-native-map from TestMap.dll.
 *
 * DO NOT MODIFY.
 */

using System;
using System.Runtime.InteropServices;
using Mono.Unix.Native;

namespace Mono.Unix.Native {

	public sealed /* static */ partial class NativeConvert
	{
		private NativeConvert () {}

		private const string LIB = "NativeLib";

		private static void ThrowArgumentException (object value)
		{
			throw new ArgumentOutOfRangeException ("value", value,
				Locale.GetText ("Current platform doesn't support this value."));
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromChild")]
		private static extern int FromChild (Child source, IntPtr destination);

		public static bool TryCopy (Child source, IntPtr destination)
		{
			return FromChild (source, destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToChild")]
		private static extern int ToChild (IntPtr source, Child destination);

		public static bool TryCopy (IntPtr source, Child destination)
		{
			return ToChild (source, destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromFlagsEnum")]
		private static extern int FromFlagsEnum (FlagsEnum value, out Int32 rval);

		public static bool TryFromFlagsEnum (FlagsEnum value, out Int32 rval)
		{
			return FromFlagsEnum (value, out rval) == 0;
		}

		public static Int32 FromFlagsEnum (FlagsEnum value)
		{
			Int32 rval;
			if (FromFlagsEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToFlagsEnum")]
		private static extern int ToFlagsEnum (Int32 value, out FlagsEnum rval);

		public static bool TryToFlagsEnum (Int32 value, out FlagsEnum rval)
		{
			return ToFlagsEnum (value, out rval) == 0;
		}

		public static FlagsEnum ToFlagsEnum (Int32 value)
		{
			FlagsEnum rval;
			if (ToFlagsEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromFoo")]
		private static extern int FromFoo (ref Foo source, IntPtr destination);

		public static bool TryCopy (ref Foo source, IntPtr destination)
		{
			return FromFoo (ref source, destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToFoo")]
		private static extern int ToFoo (IntPtr source, out Foo destination);

		public static bool TryCopy (IntPtr source, out Foo destination)
		{
			return ToFoo (source, out destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromFooHolder")]
		private static extern int FromFooHolder (ref FooHolder source, IntPtr destination);

		public static bool TryCopy (ref FooHolder source, IntPtr destination)
		{
			return FromFooHolder (ref source, destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToFooHolder")]
		private static extern int ToFooHolder (IntPtr source, out FooHolder destination);

		public static bool TryCopy (IntPtr source, out FooHolder destination)
		{
			return ToFooHolder (source, out destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromInternalEnum")]
		private static extern int FromInternalEnum (InternalEnum value, out Int64 rval);

		internal static bool TryFromInternalEnum (InternalEnum value, out Int64 rval)
		{
			return FromInternalEnum (value, out rval) == 0;
		}

		internal static Int64 FromInternalEnum (InternalEnum value)
		{
			Int64 rval;
			if (FromInternalEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToInternalEnum")]
		private static extern int ToInternalEnum (Int64 value, out InternalEnum rval);

		internal static bool TryToInternalEnum (Int64 value, out InternalEnum rval)
		{
			return ToInternalEnum (value, out rval) == 0;
		}

		internal static InternalEnum ToInternalEnum (Int64 value)
		{
			InternalEnum rval;
			if (ToInternalEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromParent")]
		private static extern int FromParent (Parent source, IntPtr destination);

		public static bool TryCopy (Parent source, IntPtr destination)
		{
			return FromParent (source, destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToParent")]
		private static extern int ToParent (IntPtr source, Parent destination);

		public static bool TryCopy (IntPtr source, Parent destination)
		{
			return ToParent (source, destination) == 0;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromSimpleFlagsEnum")]
		private static extern int FromSimpleFlagsEnum (SimpleFlagsEnum value, out Int32 rval);

		public static bool TryFromSimpleFlagsEnum (SimpleFlagsEnum value, out Int32 rval)
		{
			return FromSimpleFlagsEnum (value, out rval) == 0;
		}

		public static Int32 FromSimpleFlagsEnum (SimpleFlagsEnum value)
		{
			Int32 rval;
			if (FromSimpleFlagsEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToSimpleFlagsEnum")]
		private static extern int ToSimpleFlagsEnum (Int32 value, out SimpleFlagsEnum rval);

		public static bool TryToSimpleFlagsEnum (Int32 value, out SimpleFlagsEnum rval)
		{
			return ToSimpleFlagsEnum (value, out rval) == 0;
		}

		public static SimpleFlagsEnum ToSimpleFlagsEnum (Int32 value)
		{
			SimpleFlagsEnum rval;
			if (ToSimpleFlagsEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_FromTestEnum")]
		private static extern int FromTestEnum (TestEnum value, out Int64 rval);

		public static bool TryFromTestEnum (TestEnum value, out Int64 rval)
		{
			return FromTestEnum (value, out rval) == 0;
		}

		public static Int64 FromTestEnum (TestEnum value)
		{
			Int64 rval;
			if (FromTestEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Test_ToTestEnum")]
		private static extern int ToTestEnum (Int64 value, out TestEnum rval);

		public static bool TryToTestEnum (Int64 value, out TestEnum rval)
		{
			return ToTestEnum (value, out rval) == 0;
		}

		public static TestEnum ToTestEnum (Int64 value)
		{
			TestEnum rval;
			if (ToTestEnum (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Rename_FromColors")]
		private static extern int FromColors (Colors value, out Int32 rval);

		public static bool TryFromColors (Colors value, out Int32 rval)
		{
			return FromColors (value, out rval) == 0;
		}

		public static Int32 FromColors (Colors value)
		{
			Int32 rval;
			if (FromColors (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

		[DllImport (LIB, EntryPoint="MakeMap_Rename_ToColors")]
		private static extern int ToColors (Int32 value, out Colors rval);

		public static bool TryToColors (Int32 value, out Colors rval)
		{
			return ToColors (value, out rval) == 0;
		}

		public static Colors ToColors (Int32 value)
		{
			Colors rval;
			if (ToColors (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}

	}
}