-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
382 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Diagnostics; | ||
|
||
namespace ObsInterop; | ||
|
||
/// <summary> | ||
/// This method contains bindings generated form platform.h header file in the OBS library. | ||
/// <para /> | ||
/// [IMPORTANT] Please use with care and prefer .NET APIs whenever possible. | ||
/// <para /> | ||
/// For example, the os_cpu_usage_info_start() method returns a pointer to the struct that has different layout in different systems. | ||
/// </summary> | ||
public partial class ObsPlatform | ||
{ | ||
public static readonly unsafe int ARCH_BITS = sizeof(nint) * 8; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace ObsInterop; | ||
|
||
public partial struct os_cpu_usage_info | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace ObsInterop; | ||
|
||
public partial struct os_dir | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace ObsInterop; | ||
|
||
public unsafe partial struct os_dirent | ||
{ | ||
[NativeTypeName("char[256]")] | ||
public fixed sbyte d_name[256]; | ||
|
||
[NativeTypeName("bool")] | ||
public byte directory; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace ObsInterop; | ||
|
||
public unsafe partial struct os_glob_info | ||
{ | ||
[NativeTypeName("size_t")] | ||
public nuint gl_pathc; | ||
|
||
[NativeTypeName("struct os_globent *")] | ||
public os_globent* gl_pathv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace ObsInterop; | ||
|
||
public unsafe partial struct os_globent | ||
{ | ||
[NativeTypeName("char *")] | ||
public sbyte* path; | ||
|
||
[NativeTypeName("bool")] | ||
public byte directory; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace ObsInterop; | ||
|
||
public partial struct os_inhibit_info | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace ObsInterop; | ||
|
||
public partial struct os_proc_memory_usage | ||
{ | ||
[NativeTypeName("uint64_t")] | ||
public ulong resident_size; | ||
|
||
[NativeTypeName("uint64_t")] | ||
public ulong virtual_size; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ function Get-ObsClassName { | |
} | ||
|
||
$config = "multi-file", "generate-file-scoped-namespaces", "generate-helper-types", "exclude-funcs-with-body", "generate-macro-bindings", "latest-codegen" | ||
$replacements = "[email protected]", "[email protected]", "[email protected]", "half=@Half", "[email protected]<Single>", "[email protected]" | ||
$excludes = "blogva", "blog" | ||
$replacements = "[email protected]", "[email protected]", "[email protected]", "half=@Half", "[email protected]<Single>", "[email protected]", "_iobuf*=@nint","stat*=@nint" | ||
$excludes = "blogva", "blog", "ARCH_BITS" | ||
|
||
$obsModuleTracersals = @( | ||
".\obs-studio\libobs\obs-source.h", | ||
|
@@ -124,7 +124,8 @@ $utilLibraries = @( | |
".\obs-studio\libobs\util\text-lookup.h", | ||
".\obs-studio\libobs\util\profiler.h", | ||
".\obs-studio\libobs\util\base.h", | ||
".\obs-studio\libobs\util\bmem.h" | ||
".\obs-studio\libobs\util\bmem.h", | ||
".\obs-studio\libobs\util\platform.h" | ||
); | ||
|
||
foreach ($utilLibrary in $utilLibraries) | ||
|