Skip to content

Commit

Permalink
Fix doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
dklassic committed Oct 25, 2023
1 parent d13ca91 commit 6975de6
Show file tree
Hide file tree
Showing 14 changed files with 1,642 additions and 2,108 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ repository = "https://github.com/tauri-apps/javascriptcore-rs"
version = "1.1.1"

[package.metadata.docs.rs]
features = [ "dox" ]
all-features = true
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]

[lib]
name = "javascriptcore"
Expand All @@ -24,6 +26,5 @@ glib = "^0.18.0"

[features]
default = [ "v2_38" ]
dox = [ "ffi/dox" ]
v2_28 = [ "ffi/v2_28" ]
v2_38 = [ "ffi/v2_38", "v2_28" ]
84 changes: 44 additions & 40 deletions src/auto/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// from gir-files (https://github.com/tauri-apps/gir-files)
// DO NOT EDIT

use glib::translate::*;
use glib::{translate::*};

glib::wrapper! {
#[doc(alias = "JSCClass")]
Expand All @@ -14,51 +14,55 @@ glib::wrapper! {
}

impl Class {
//#[doc(alias = "jsc_class_add_constructor")]
//pub fn add_constructor<P: Fn() + 'static>(&self, name: Option<&str>, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_params: u32, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Option<Value> {
// unsafe { TODO: call ffi:jsc_class_add_constructor() }
//}
//#[doc(alias = "jsc_class_add_constructor")]
//pub fn add_constructor<P: Fn() + 'static>(&self, name: Option<&str>, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_params: u32, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Option<Value> {
// unsafe { TODO: call ffi:jsc_class_add_constructor() }
//}

//#[doc(alias = "jsc_class_add_constructor_variadic")]
//pub fn add_constructor_variadic<P: Fn() + 'static>(&self, name: Option<&str>, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type) -> Option<Value> {
// unsafe { TODO: call ffi:jsc_class_add_constructor_variadic() }
//}
//#[doc(alias = "jsc_class_add_constructor_variadic")]
//pub fn add_constructor_variadic<P: Fn() + 'static>(&self, name: Option<&str>, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type) -> Option<Value> {
// unsafe { TODO: call ffi:jsc_class_add_constructor_variadic() }
//}

//#[doc(alias = "jsc_class_add_constructorv")]
//pub fn add_constructorv<P: Fn() + 'static>(&self, name: Option<&str>, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_parameters: u32) -> Option<Value> {
// unsafe { TODO: call ffi:jsc_class_add_constructorv() }
//}
//#[doc(alias = "jsc_class_add_constructorv")]
//pub fn add_constructorv<P: Fn() + 'static>(&self, name: Option<&str>, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_parameters: u32) -> Option<Value> {
// unsafe { TODO: call ffi:jsc_class_add_constructorv() }
//}

//#[doc(alias = "jsc_class_add_method")]
//pub fn add_method<P: Fn() + 'static>(&self, name: &str, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_params: u32, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
// unsafe { TODO: call ffi:jsc_class_add_method() }
//}
//#[doc(alias = "jsc_class_add_method")]
//pub fn add_method<P: Fn() + 'static>(&self, name: &str, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_params: u32, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
// unsafe { TODO: call ffi:jsc_class_add_method() }
//}

//#[doc(alias = "jsc_class_add_method_variadic")]
//pub fn add_method_variadic<P: Fn() + 'static>(&self, name: &str, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type) {
// unsafe { TODO: call ffi:jsc_class_add_method_variadic() }
//}
//#[doc(alias = "jsc_class_add_method_variadic")]
//pub fn add_method_variadic<P: Fn() + 'static>(&self, name: &str, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type) {
// unsafe { TODO: call ffi:jsc_class_add_method_variadic() }
//}

//#[doc(alias = "jsc_class_add_methodv")]
//pub fn add_methodv<P: Fn() + 'static>(&self, name: &str, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_parameters: u32) {
// unsafe { TODO: call ffi:jsc_class_add_methodv() }
//}
//#[doc(alias = "jsc_class_add_methodv")]
//pub fn add_methodv<P: Fn() + 'static>(&self, name: &str, callback: P, user_data: /*Unimplemented*/Option<Basic: Pointer>, return_type: glib::types::Type, n_parameters: u32) {
// unsafe { TODO: call ffi:jsc_class_add_methodv() }
//}

//#[doc(alias = "jsc_class_add_property")]
//pub fn add_property(&self, name: &str, property_type: glib::types::Type, getter: Option<Box_<dyn FnOnce() + 'static>>, setter: Option<Box_<dyn Fn() + 'static>>, user_data: /*Unimplemented*/Option<Basic: Pointer>) {
// unsafe { TODO: call ffi:jsc_class_add_property() }
//}
//#[doc(alias = "jsc_class_add_property")]
//pub fn add_property(&self, name: &str, property_type: glib::types::Type, getter: Option<Box_<dyn FnOnce() + 'static>>, setter: Option<Box_<dyn Fn() + 'static>>, user_data: /*Unimplemented*/Option<Basic: Pointer>) {
// unsafe { TODO: call ffi:jsc_class_add_property() }
//}

#[doc(alias = "jsc_class_get_name")]
#[doc(alias = "get_name")]
pub fn name(&self) -> Option<glib::GString> {
unsafe { from_glib_none(ffi::jsc_class_get_name(self.to_glib_none().0)) }
}
#[doc(alias = "jsc_class_get_name")]
#[doc(alias = "get_name")]
pub fn name(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::jsc_class_get_name(self.to_glib_none().0))
}
}

#[doc(alias = "jsc_class_get_parent")]
#[doc(alias = "get_parent")]
#[must_use]
pub fn parent(&self) -> Option<Class> {
unsafe { from_glib_none(ffi::jsc_class_get_parent(self.to_glib_none().0)) }
}
#[doc(alias = "jsc_class_get_parent")]
#[doc(alias = "get_parent")]
#[must_use]
pub fn parent(&self) -> Option<Class> {
unsafe {
from_glib_none(ffi::jsc_class_get_parent(self.to_glib_none().0))
}
}
}
Loading

0 comments on commit 6975de6

Please sign in to comment.