Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebKit bindings #1

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions WebKit/DOM.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::WebKit::*;
28 changes: 28 additions & 0 deletions WebKit/DOMAbstractView.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::WebKit::*;

extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "WebKit_DOMAbstractView")]
#[deprecated]
pub struct DOMAbstractView;

#[cfg(feature = "WebKit_DOMAbstractView")]
unsafe impl ClassType for DOMAbstractView {
#[inherits(WebScriptObject, NSObject)]
type Super = DOMObject;
}
);

extern_methods!(
#[cfg(feature = "WebKit_DOMAbstractView")]
unsafe impl DOMAbstractView {
#[cfg(feature = "WebKit_DOMDocument")]
#[method_id(@__retain_semantics Other document)]
pub unsafe fn document(&self) -> Option<Id<DOMDocument, Shared>>;
}
);
47 changes: 47 additions & 0 deletions WebKit/DOMAttr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::WebKit::*;

extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "WebKit_DOMAttr")]
#[deprecated]
pub struct DOMAttr;

#[cfg(feature = "WebKit_DOMAttr")]
unsafe impl ClassType for DOMAttr {
#[inherits(DOMObject, WebScriptObject, NSObject)]
type Super = DOMNode;
}
);

extern_methods!(
#[cfg(feature = "WebKit_DOMAttr")]
unsafe impl DOMAttr {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Id<NSString, Shared>;

#[method(specified)]
pub unsafe fn specified(&self) -> bool;

#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other value)]
pub unsafe fn value(&self) -> Id<NSString, Shared>;

#[cfg(feature = "Foundation_NSString")]
#[method(setValue:)]
pub unsafe fn setValue(&self, value: Option<&NSString>);

#[cfg(feature = "WebKit_DOMElement")]
#[method_id(@__retain_semantics Other ownerElement)]
pub unsafe fn ownerElement(&self) -> Option<Id<DOMElement, Shared>>;

#[cfg(feature = "WebKit_DOMCSSStyleDeclaration")]
#[method_id(@__retain_semantics Other style)]
pub unsafe fn style(&self) -> Option<Id<DOMCSSStyleDeclaration, Shared>>;
}
);
27 changes: 27 additions & 0 deletions WebKit/DOMBlob.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::WebKit::*;

extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "WebKit_DOMBlob")]
#[deprecated]
pub struct DOMBlob;

#[cfg(feature = "WebKit_DOMBlob")]
unsafe impl ClassType for DOMBlob {
#[inherits(WebScriptObject, NSObject)]
type Super = DOMObject;
}
);

extern_methods!(
#[cfg(feature = "WebKit_DOMBlob")]
unsafe impl DOMBlob {
#[method(size)]
pub unsafe fn size(&self) -> c_ulonglong;
}
);
24 changes: 24 additions & 0 deletions WebKit/DOMCDATASection.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::WebKit::*;

extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "WebKit_DOMCDATASection")]
#[deprecated]
pub struct DOMCDATASection;

#[cfg(feature = "WebKit_DOMCDATASection")]
unsafe impl ClassType for DOMCDATASection {
#[inherits(DOMCharacterData, DOMNode, DOMObject, WebScriptObject, NSObject)]
type Super = DOMText;
}
);

extern_methods!(
#[cfg(feature = "WebKit_DOMCDATASection")]
unsafe impl DOMCDATASection {}
);
Loading