Skip to content

Commit e959c03

Browse files
committed
fix: make all structs public
1 parent 9220ec4 commit e959c03

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ crate-type = ["lib", "cdylib", "staticlib"]
2222

2323
[bindings.csharp]
2424
cdylib_name = "snapxrust"
25+
access_modifier = "public"

bindings/snapxrust.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public bool IsPanic()
218218
}
219219

220220
// Base class for all uniffi exceptions
221-
internal class UniffiException : System.Exception
221+
public class UniffiException : System.Exception
222222
{
223223
public UniffiException()
224224
: base() { }
@@ -227,43 +227,43 @@ public UniffiException(string message)
227227
: base(message) { }
228228
}
229229

230-
internal class UndeclaredErrorException : UniffiException
230+
public class UndeclaredErrorException : UniffiException
231231
{
232232
public UndeclaredErrorException(string message)
233233
: base(message) { }
234234
}
235235

236-
internal class PanicException : UniffiException
236+
public class PanicException : UniffiException
237237
{
238238
public PanicException(string message)
239239
: base(message) { }
240240
}
241241

242-
internal class AllocationException : UniffiException
242+
public class AllocationException : UniffiException
243243
{
244244
public AllocationException(string message)
245245
: base(message) { }
246246
}
247247

248-
internal class InternalException : UniffiException
248+
public class InternalException : UniffiException
249249
{
250250
public InternalException(string message)
251251
: base(message) { }
252252
}
253253

254-
internal class InvalidEnumException : InternalException
254+
public class InvalidEnumException : InternalException
255255
{
256256
public InvalidEnumException(string message)
257257
: base(message) { }
258258
}
259259

260-
internal class UniffiContractVersionException : UniffiException
260+
public class UniffiContractVersionException : UniffiException
261261
{
262262
public UniffiContractVersionException(string message)
263263
: base(message) { }
264264
}
265265

266-
internal class UniffiContractChecksumException : UniffiException
266+
public class UniffiContractChecksumException : UniffiException
267267
{
268268
public UniffiContractChecksumException(string message)
269269
: base(message) { }
@@ -1955,7 +1955,7 @@ public override void Write(byte[] value, BigEndianStream stream)
19551955
}
19561956
}
19571957

1958-
internal record ImageData(byte[] Image, uint Width, uint Height) { }
1958+
public record ImageData(byte[] Image, uint Width, uint Height) { }
19591959

19601960
class FfiConverterTypeImageData : FfiConverterRustBuffer<ImageData>
19611961
{
@@ -1986,7 +1986,7 @@ public override void Write(ImageData value, BigEndianStream stream)
19861986
}
19871987
}
19881988

1989-
internal record MonitorData(uint Width, uint Height, int X, int Y, string Name) { }
1989+
public record MonitorData(uint Width, uint Height, int X, int Y, string Name) { }
19901990

19911991
class FfiConverterTypeMonitorData : FfiConverterRustBuffer<MonitorData>
19921992
{
@@ -2023,7 +2023,7 @@ public override void Write(MonitorData value, BigEndianStream stream)
20232023
}
20242024
}
20252025

2026-
internal record WindowData(
2026+
public record WindowData(
20272027
string AppName,
20282028
string Title,
20292029
uint ProcessId,
@@ -2142,7 +2142,7 @@ public override void Write(WindowData[] value, BigEndianStream stream)
21422142
}
21432143
}
21442144
#pragma warning restore 8625
2145-
internal static class SnapxrustMethods
2145+
public static class SnapxrustMethods
21462146
{
21472147
public static ImageData CaptureFullscreen()
21482148
{

snapxrust.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<PackageProjectUrl>https://github.com/SnapXL/snapxrust</PackageProjectUrl>
1414
<RepositoryUrl>https://github.com/SnapXL/snapxrust.git</RepositoryUrl>
1515
<PackageId>BrycensRanch.SnapXL.SnapXRust</PackageId>
16+
<PackageVersion>1.0.1</PackageVersion>
1617
<RepositoryType>git</RepositoryType>
1718
<Description>XCap exposed for macOS only. Internal SnapX usage only.</Description>
1819
<Author>BrycensRanch</Author>

0 commit comments

Comments
 (0)