Remove src/dummy.m
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
1611635e5f
commit
d473b52f5a
3 changed files with 1 additions and 16 deletions
|
@ -5,7 +5,6 @@ fn main() {
|
||||||
println!("cargo:rustc-link-lib=framework=ScreenCaptureKit");
|
println!("cargo:rustc-link-lib=framework=ScreenCaptureKit");
|
||||||
println!("cargo:rustc-link-lib=framework=System");
|
println!("cargo:rustc-link-lib=framework=System");
|
||||||
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=12.3");
|
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=12.3");
|
||||||
println!("cargo:rustc-link-arg=-ObjC");
|
|
||||||
|
|
||||||
let sdk_path = String::from_utf8(
|
let sdk_path = String::from_utf8(
|
||||||
Command::new("xcrun")
|
Command::new("xcrun")
|
||||||
|
@ -36,10 +35,4 @@ fn main() {
|
||||||
bindings
|
bindings
|
||||||
.write_to_file(out_path.join("bindings.rs"))
|
.write_to_file(out_path.join("bindings.rs"))
|
||||||
.expect("couldn't write dispatch bindings");
|
.expect("couldn't write dispatch bindings");
|
||||||
|
|
||||||
println!("cargo:rerun-if-changed=src/dummy.m");
|
|
||||||
cc::Build::new()
|
|
||||||
.file("src/dummy.m")
|
|
||||||
.flag("-mmacosx-version-min=12.3")
|
|
||||||
.compile("dummy");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#import <ScreenCaptureKit/ScreenCaptureKit.h>
|
|
||||||
|
|
||||||
@interface MyClass : NSObject <SCStreamOutput, SCStreamDelegate>
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation MyClass
|
|
||||||
@end
|
|
|
@ -14,7 +14,7 @@ use objc::{
|
||||||
class,
|
class,
|
||||||
declare::ClassDecl,
|
declare::ClassDecl,
|
||||||
msg_send,
|
msg_send,
|
||||||
runtime::{Object, Protocol, Sel},
|
runtime::{Object, Sel},
|
||||||
sel, sel_impl,
|
sel, sel_impl,
|
||||||
};
|
};
|
||||||
use simplelog::SimpleLogger;
|
use simplelog::SimpleLogger;
|
||||||
|
@ -55,7 +55,6 @@ fn main() {
|
||||||
let display_height: usize = msg_send![display, height];
|
let display_height: usize = msg_send![display, height];
|
||||||
|
|
||||||
let mut decl = ClassDecl::new("CaptureOutput", class!(NSObject)).unwrap();
|
let mut decl = ClassDecl::new("CaptureOutput", class!(NSObject)).unwrap();
|
||||||
decl.add_protocol(Protocol::get("SCStreamOutput").unwrap());
|
|
||||||
decl.add_method(sel!(stream:didOutputSampleBuffer:ofType:), sample_output as extern "C" fn(&Object, Sel, id, id, SCStreamOutputType));
|
decl.add_method(sel!(stream:didOutputSampleBuffer:ofType:), sample_output as extern "C" fn(&Object, Sel, id, id, SCStreamOutputType));
|
||||||
let capture_output_class = decl.register();
|
let capture_output_class = decl.register();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue