Commit fb3899c5 authored by mredlek's avatar mredlek

Move all dependencies to a new crate which reexports all the dependencies the generated macro uses.

This way, the user only has to include the macro and this dependency crate.
parent f91fa25f
......@@ -130,6 +130,19 @@ dependencies = [
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gobject-class"
version = "0.1.0"
dependencies = [
"glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-subclass 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gobject-gen"
version = "0.1.0"
......@@ -138,6 +151,7 @@ dependencies = [
"difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-class 0.1.0",
"gobject-gen-test 0.1.0",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -163,6 +177,17 @@ dependencies = [
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gobject-subclass"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gobject-sys"
version = "0.7.0"
......@@ -539,6 +564,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "591f8be1674b421644b6c030969520bc3fa12114d2eb467471982ed3e9584e71"
"checksum glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740f7fda8dde5f5e3944dabdb4a73ac6094a8a7fdf0af377468e98ca93733e61"
"checksum glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3573351e846caed9f11207b275cd67bc07f0c2c94fb628e5d7c92ca056c7882d"
"checksum gobject-subclass 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d9779ce804d2fb1cbe2df538224e9c4f541d208e9d7a30f6f2813c953930ff3"
"checksum gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08475e4a08f27e6e2287005950114735ed61cec2cb8c1187682a5aec8c69b715"
"checksum hprof 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17b42e67c01ef27237e424783538a0bc45721ecd53438fab5c3f8bbf5dfd8516"
"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e"
......
......@@ -29,6 +29,7 @@ single-test-override = [ "single-test" ]
single-test-properties = [ "single-test" ]
single-test-signals = [ "single-test" ]
single-test-variant = [ "single-test" ]
single-test-works-in-2015 = [ "single-test"]
[dependencies]
glib = "0.6.0"
......@@ -41,6 +42,7 @@ syn = { version="0.15.3", features=["full", "extra-traits"] }
unicode-xid = "0.0.4"
xml-rs = "0.8.0"
difference = "2.0" #Used to compare a generated content with a file on disk
gobject-class = { path = "./gobject-class" }
[patch.crates-io]
# Needed for now until https://github.com/dtolnay/syn/pull/538 is published
......@@ -57,7 +59,7 @@ gobject-gen-test = { path = "./mixed_tests" }
libc = "0.2"
[workspace]
members=["mixed_tests" ]
members=["mixed_tests","gobject-class" ]
[[test]]
name = "works-in-2015"
......
[dependencies]
libc = "0.2"
glib-sys = "0.7.0"
gobject-sys = "0.7.0"
glib = "0.6.0"
gobject-subclass = "*"
[dev-dependencies]
shell-words = "0.1.0"
tempdir = "0.3"
[features]
dox = []
[lib]
path = "lib.rs"
test = false
[package]
authors = ["mredlek <mredlek@users.noreply.github.com>"]
name = "gobject-class"
version = "0.1.0"
edition="2018"
/// ! This crates reexportes all the dependencies of the code generated by gobject-gen.
pub use glib;
pub use glib_sys;
pub use gobject_sys;
pub use libc;
......@@ -95,22 +95,23 @@ impl<'ast, T: Boilerplate<'ast>> BoilerplateExt<'ast> for T {
};
quote! {
extern crate glib_sys as glib_ffi;
extern crate gobject_sys as gobject_ffi;
use ::gobject_class::glib_sys as glib_ffi;
use ::gobject_class::gobject_sys as gobject_ffi;
// #[macro_use]
extern crate glib;
use ::gobject_class::glib;
use ::gobject_class::glib::glib_wrapper;
use ::gobject_class::glib::glib_object_wrapper;
extern crate libc;
use ::gobject_class::libc;
#[allow(unused_imports)]
use glib::IsA;
use ::gobject_class::glib::IsA;
#[allow(unused_imports)]
use glib::object::Downcast;
use ::gobject_class::glib::object::Downcast;
// use glib::signal::connect;
use glib::translate::*;
use ::gobject_class::glib::translate::*;
use std::mem;
use std::ptr;
......@@ -164,10 +165,10 @@ impl<'ast, T: Boilerplate<'ast>> BoilerplateExt<'ast> for T {
use super::libc;
#[allow(unused_imports)]
use glib::translate::*;
use glib::object::ObjectExt;
use ::gobject_class::glib::translate::*;
use ::gobject_class::glib::object::ObjectExt;
#[allow(unused_imports)]
use glib::IsA;
use ::gobject_class::glib::IsA;
#[allow(unused_imports)]
use std::ffi::CString;
......
......@@ -67,7 +67,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>> Private<'lt, '
#signal_emit_methods_declarations
}
impl<T: IsA<#name> #(+ IsA<#ancestors>)* + IsA<::glib::Object> + ::glib::value::SetValue> #instance_ext_priv for T
impl<T: IsA<#name> #(+ IsA<#ancestors>)* + IsA<::gobject_class::glib::Object> + ::gobject_class::glib::value::SetValue> #instance_ext_priv for T
{
#get_priv_impl
......
......@@ -138,7 +138,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
let parent_vtable = self.boilerplate.parent_names().vtable();
quote! {
{
PRIV.private.parent_vtable = gobject_ffi::g_type_class_peek_parent(vtable) as *const #parent_vtable;
PRIV.private.parent_vtable = ::gobject_class::gobject_sys::g_type_class_peek_parent(vtable) as *const #parent_vtable;
}
}
}
......@@ -150,7 +150,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
::glib::Type::BaseObject /* Parent type is GObject */ =>
quote! {
{
let gobject_class = &mut *(vtable as *mut gobject_ffi::GObjectClass);
let gobject_class = &mut *(vtable as *mut ::gobject_class::gobject_sys::GObjectClass);
gobject_class.finalize = Some(#instance_ffi::finalize);
gobject_class.set_property = Some(#instance_ffi::set_property);
gobject_class.get_property = Some(#instance_ffi::get_property);
......@@ -164,7 +164,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
quote! {
{
if PRIV.private_offset > 0 {
gobject_ffi::g_type_class_adjust_private_offset(vtable, &mut PRIV.private_offset);
::gobject_class::gobject_sys::g_type_class_adjust_private_offset(vtable, &mut PRIV.private_offset);
}
}
}
......@@ -259,7 +259,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
quote! {
impl #vtable {
unsafe extern "C" fn init(vtable: glib_ffi::gpointer, klass_data: glib_ffi::gpointer) {
unsafe extern "C" fn init(vtable: ::gobject_class::glib_sys::gpointer, klass_data: ::gobject_class::glib_sys::gpointer) {
#callback_guard
PrivateStatic::vtable_init(vtable, klass_data);
......@@ -313,8 +313,8 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
assert!(instance_size <= u16::MAX as usize);
unsafe {
let g_object_id = gobject_ffi::g_type_register_static_simple(
<#parent_instance as glib::StaticType>::static_type().to_glib(),
let g_object_id = ::gobject_class::gobject_sys::g_type_register_static_simple(
<#parent_instance as ::gobject_class::glib::StaticType>::static_type().to_glib(),
#instance_name_literal,
class_size as u32,
Some(#vtable::init),
......@@ -345,8 +345,8 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
assert!(class_size <= u16::MAX as usize);
unsafe {
gobject_ffi::g_type_register_static_simple(
gobject_ffi::G_TYPE_INTERFACE,
::gobject_class::gobject_sys::g_type_register_static_simple(
::gobject_class::gobject_sys::G_TYPE_INTERFACE,
#instance_name_literal,
class_size as u32,
Some(#vtable::init),
......
......@@ -115,7 +115,7 @@ where
let type_ = prop.type_;
quote! {
fn #name(&self, v: #type_) -> Result<(), ::glib::error::BoolError> {
fn #name(&self, v: #type_) -> Result<(), ::gobject_class::glib::error::BoolError> {
::glib::ObjectExt::set_property(self, #name_str, &v)
}
}
......@@ -138,7 +138,7 @@ where
quote! {
fn #name(&self) -> #type_ {
::glib::ObjectExt::get_property(self, #name_str).unwrap().get::<#type_>().unwrap()
::gobject_class::glib::ObjectExt::get_property(self, #name_str).unwrap().get::<#type_>().unwrap()
}
}
})
......@@ -158,7 +158,7 @@ where
let type_ = prop.type_;
quote! {
fn #name(&self, v: #type_) -> Result<(), ::glib::error::BoolError>;
fn #name(&self, v: #type_) -> Result<(), ::gobject_class::glib::error::BoolError>;
}
})
}
......@@ -221,7 +221,7 @@ pub fn properties_registration<'this, 'ast: 'this>(properties: &[Property<'ast>]
// g_object_class_install_properties() skips the first one, as
// it would have id 0, so we check for the number of
// properties plus our dummy item from above
gobject_ffi::g_object_class_install_properties(
::gobject_class::gobject_sys::g_object_class_install_properties(
gobject_class,
PRIV.private.properties.len() as u32,
PRIV.private.properties.as_mut_ptr() as *mut *mut _,
......@@ -241,7 +241,7 @@ where
properties.map(|prop| {
let register_prop = prop.gen_paramspec();
quote! {
gobject_ffi:: g_object_interface_install_property(gobject_class, #register_prop);
::gobject_class::gobject_sys::g_object_interface_install_property(gobject_class, #register_prop);
}
})
}
......
......@@ -171,7 +171,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
#(#set_properties_fn)*
}
impl<T: IsA<#name> #(+ IsA<#ancestors>)* + IsA<::glib::Object> + ::glib::value::SetValue> #instance_ext for T
impl<T: IsA<#name> #(+ IsA<#ancestors>)* + IsA<::gobject_class::glib::Object> + ::gobject_class::glib::value::SetValue> #instance_ext for T
{
#(#slot_impl)*
......
......@@ -46,7 +46,7 @@ Test<'lt, 'ast, Boilerplate>
//Test
let mut parents = vec![ Type::BaseObject #(, <#ancestors as ::glib::types::StaticType>::static_type())* ];
let mut interfaces = vec![];
let mut current = <#name_instance as ::glib::types::StaticType>::static_type();
let mut current = <#name_instance as ::gobject_class::glib::types::StaticType>::static_type();
while let Some(parent) = current.parent() {
current = parent;
......@@ -57,7 +57,7 @@ Test<'lt, 'ast, Boilerplate>
}
}
current = <#name_instance as ::glib::types::StaticType>::static_type();
current = <#name_instance as ::gobject_class::glib::types::StaticType>::static_type();
for interface in current.interfaces() {
if let Some(pos) = interfaces.iter().position(|x: &::glib::Type| x == &current) {
interfaces.swap_remove(pos);
......
......@@ -18,56 +18,56 @@ pub fn tokens_GObjectClassFfi() -> TokenStream {
pub fn tokens_glib_type(gtype: &::glib::Type) -> TokenStream {
match gtype {
::glib::Type::Invalid => quote!{ ::glib::Type::Invalid },
::glib::Type::Unit => quote!{ ::glib::Type::Unit },
::glib::Type::BaseInterface => quote!{ ::glib::Type::BaseInterface },
::glib::Type::I8 => quote!{ ::glib::Type::I8 },
::glib::Type::U8 => quote!{ ::glib::Type::U8 },
::glib::Type::Bool => quote!{ ::glib::Type::Bool},
::glib::Type::I32 => quote!{ ::glib::Type::I32 },
::glib::Type::U32 => quote!{ ::glib::Type::U32 },
::glib::Type::ILong => quote!{ ::glib::Type::ILong },
::glib::Type::ULong => quote!{ ::glib::Type::ULong },
::glib::Type::I64 => quote!{ ::glib::Type::I64 },
::glib::Type::U64 => quote!{ ::glib::Type::U64 },
::glib::Type::BaseEnum => quote!{ ::glib::Type::BaseEnum },
::glib::Type::BaseFlags => quote!{ ::glib::Type::BaseFlags },
::glib::Type::F32 => quote!{ ::glib::Type::F32 },
::glib::Type::F64 => quote!{ ::glib::Type::F64 },
::glib::Type::String => quote!{ ::glib::Type::String },
::glib::Type::Pointer => quote!{ ::glib::Type::Pointer },
::glib::Type::BaseBoxed => quote!{ ::glib::Type::BaseBoxed },
::glib::Type::BaseParamSpec => quote!{ ::glib::Type::BaseParamSpec },
::glib::Type::BaseObject => quote!{ ::glib::Type::BaseObject },
::glib::Type::Variant => quote!{ ::glib::Type::Variant },
::glib::Type::Other(x) => quote! { ::glib::Type::Other(#x) },
::glib::Type::Invalid => quote!{ ::gobject_class::glib::Type::Invalid },
::glib::Type::Unit => quote!{ ::gobject_class::glib::Type::Unit },
::glib::Type::BaseInterface => quote!{ ::gobject_class::glib::Type::BaseInterface },
::glib::Type::I8 => quote!{ ::gobject_class::glib::Type::I8 },
::glib::Type::U8 => quote!{ ::gobject_class::glib::Type::U8 },
::glib::Type::Bool => quote!{ ::gobject_class::glib::Type::Bool},
::glib::Type::I32 => quote!{ ::gobject_class::glib::Type::I32 },
::glib::Type::U32 => quote!{ ::gobject_class::glib::Type::U32 },
::glib::Type::ILong => quote!{ ::gobject_class::glib::Type::ILong },
::glib::Type::ULong => quote!{ ::gobject_class::glib::Type::ULong },
::glib::Type::I64 => quote!{ ::gobject_class::glib::Type::I64 },
::glib::Type::U64 => quote!{ ::gobject_class::glib::Type::U64 },
::glib::Type::BaseEnum => quote!{ ::gobject_class::glib::Type::BaseEnum },
::glib::Type::BaseFlags => quote!{ ::gobject_class::glib::Type::BaseFlags },
::glib::Type::F32 => quote!{ ::gobject_class::glib::Type::F32 },
::glib::Type::F64 => quote!{ ::gobject_class::glib::Type::F64 },
::glib::Type::String => quote!{ ::gobject_class::glib::Type::String },
::glib::Type::Pointer => quote!{ ::gobject_class::glib::Type::Pointer },
::glib::Type::BaseBoxed => quote!{ ::gobject_class::glib::Type::BaseBoxed },
::glib::Type::BaseParamSpec => quote!{ ::gobject_class::glib::Type::BaseParamSpec },
::glib::Type::BaseObject => quote!{ ::gobject_class::glib::Type::BaseObject },
::glib::Type::Variant => quote!{ ::gobject_class::glib::Type::Variant },
::glib::Type::Other(x) => quote! { ::gobject_class::glib::Type::Other(#x) },
}
}
pub fn tokens_glib_ffi_type(gtype: &::glib::Type) -> TokenStream {
match gtype {
::glib::Type::Invalid => quote! { gobject_ffi::G_TYPE_INVALID },
::glib::Type::Unit => quote! { gobject_ffi::G_TYPE_NONE },
::glib::Type::BaseInterface => quote! { gobject_ffi::G_TYPE_INTERFACE },
::glib::Type::I8 => quote! { gobject_ffi::G_TYPE_CHAR },
::glib::Type::U8 => quote! { gobject_ffi::G_TYPE_UCHAR },
::glib::Type::Bool => quote! { gobject_ffi::G_TYPE_BOOLEAN },
::glib::Type::I32 => quote! { gobject_ffi::G_TYPE_INT },
::glib::Type::U32 => quote! { gobject_ffi::G_TYPE_UINT },
::glib::Type::ILong => quote! { gobject_ffi::G_TYPE_LONG },
::glib::Type::ULong => quote! { gobject_ffi::G_TYPE_ULONG },
::glib::Type::I64 => quote! { gobject_ffi::G_TYPE_INT64 },
::glib::Type::U64 => quote! { gobject_ffi::G_TYPE_UINT64 },
::glib::Type::BaseEnum => quote! { gobject_ffi::G_TYPE_ENUM },
::glib::Type::BaseFlags => quote! { gobject_ffi::G_TYPE_FLAGS },
::glib::Type::F32 => quote! { gobject_ffi::G_TYPE_FLOAT },
::glib::Type::F64 => quote! { gobject_ffi::G_TYPE_DOUBLE },
::glib::Type::String => quote! { gobject_ffi::G_TYPE_STRING },
::glib::Type::Pointer => quote! { gobject_ffi::G_TYPE_POINTER },
::glib::Type::BaseBoxed => quote! { gobject_ffi::G_TYPE_BOXED },
::glib::Type::BaseParamSpec => quote! { gobject_ffi::G_TYPE_PARAM },
::glib::Type::BaseObject => quote! { gobject_ffi::G_TYPE_OBJECT },
::glib::Type::Variant => quote! { gobject_ffi::G_TYPE_VARIANT },
::glib::Type::Invalid => quote! { ::gobject_class::gobject_sys::G_TYPE_INVALID },
::glib::Type::Unit => quote! { ::gobject_class::gobject_sys::G_TYPE_NONE },
::glib::Type::BaseInterface => quote! { ::gobject_class::gobject_sys::G_TYPE_INTERFACE },
::glib::Type::I8 => quote! { ::gobject_class::gobject_sys::G_TYPE_CHAR },
::glib::Type::U8 => quote! { ::gobject_class::gobject_sys::G_TYPE_UCHAR },
::glib::Type::Bool => quote! { ::gobject_class::gobject_sys::G_TYPE_BOOLEAN },
::glib::Type::I32 => quote! { ::gobject_class::gobject_sys::G_TYPE_INT },
::glib::Type::U32 => quote! { ::gobject_class::gobject_sys::G_TYPE_UINT },
::glib::Type::ILong => quote! { ::gobject_class::gobject_sys::G_TYPE_LONG },
::glib::Type::ULong => quote! { ::gobject_class::gobject_sys::G_TYPE_ULONG },
::glib::Type::I64 => quote! { ::gobject_class::gobject_sys::G_TYPE_INT64 },
::glib::Type::U64 => quote! { ::gobject_class::gobject_sys::G_TYPE_UINT64 },
::glib::Type::BaseEnum => quote! { ::gobject_class::gobject_sys::G_TYPE_ENUM },
::glib::Type::BaseFlags => quote! { ::gobject_class::gobject_sys::G_TYPE_FLAGS },
::glib::Type::F32 => quote! { ::gobject_class::gobject_sys::G_TYPE_FLOAT },
::glib::Type::F64 => quote! { ::gobject_class::gobject_sys::G_TYPE_DOUBLE },
::glib::Type::String => quote! { ::gobject_class::gobject_sys::G_TYPE_STRING },
::glib::Type::Pointer => quote! { ::gobject_class::gobject_sys::G_TYPE_POINTER },
::glib::Type::BaseBoxed => quote! { ::gobject_class::gobject_sys::G_TYPE_BOXED },
::glib::Type::BaseParamSpec => quote! { ::gobject_class::gobject_sys::G_TYPE_PARAM },
::glib::Type::BaseObject => quote! { ::gobject_class::gobject_sys::G_TYPE_OBJECT },
::glib::Type::Variant => quote! { ::gobject_class::gobject_sys::G_TYPE_VARIANT },
::glib::Type::Other(_) => panic!("Cannot know type of non-fundamental gtype"),
}
}
......@@ -87,14 +87,14 @@ pub fn tokens_ParentInstance(class: &ast::Class) -> TokenStream {
pub fn tokens_ParentInstanceFfi(class: &ast::Class) -> TokenStream {
let ParentInstance = tokens_ParentInstance(class);
quote! {
<#ParentInstance as glib::wrapper::Wrapper>::GlibType
<#ParentInstance as ::gobject_class::glib::wrapper::Wrapper>::GlibType
}
}
pub fn tokens_ParentClassFfi(class: &ast::Class) -> TokenStream {
let ParentInstance = tokens_ParentInstance(class);
quote! {
<#ParentInstance as glib::wrapper::Wrapper>::GlibClassType
<#ParentInstance as ::gobject_class::glib::wrapper::Wrapper>::GlibClassType
}
}
......@@ -104,7 +104,7 @@ pub fn glib_callback_guard() -> TokenStream {
// glib::CallbackGuard obsolete.
quote! {
#[allow(deprecated)]
let _guard = glib::CallbackGuard::new();
let _guard = ::gobject_class::glib::CallbackGuard::new();
}
}
......
extern crate proc_macro;
use crate::proc_macro;
use proc_macro2::TokenStream;
use syn::parse::{Parse, ParseStream, Result};
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-argument-types"))]
#![deny(warnings)]
extern crate gobject_class;
extern crate gobject_gen;
extern crate libc;
#[macro_use]
extern crate glib;
#[allow(dead_code)]
#[cfg(not(feature = "test-generated"))]
use gobject_gen::gobject_gen;
extern crate glib_sys;
#[cfg(feature = "test-generated")]
include!("generated/arguments-types-gen.rs");
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-basic"))]
#![deny(warnings)]
extern crate gobject_class;
extern crate gobject_gen;
extern crate gobject_gen_test;
extern crate libc;
#[macro_use]
extern crate glib;
#[allow(dead_code)]
#[cfg(not(feature = "test-generated"))]
use gobject_gen::gobject_gen;
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-c_derive"))]
//#![feature(trace_macros)]
#![deny(warnings)]
//#![deny(warnings)]
extern crate glib_sys;
extern crate gobject_class;
extern crate gobject_gen;
extern crate gobject_gen_test;
extern crate libc;
#[macro_use]
extern crate glib;
extern crate gobject_sys;
// use glib_sys as glib_ffi;
#[allow(dead_code)]
#[cfg(not(feature = "test-generated"))]
use gobject_gen::gobject_gen;
#[cfg(feature = "test-generated")]
include!("generated/c_derive.rs");
use glib::translate::ToGlibPtr;
use gobject_class::glib::translate::ToGlibPtr;
use gobject_gen_test::auto::ffi;
use gobject_gen_test::auto::{Counter, CounterExt};
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-counter_c_impl"))]
extern crate glib_sys;
extern crate gobject_class;
extern crate gobject_gen;
extern crate gobject_gen_test;
extern crate libc;
use gobject_gen_test::auto::ffi;
use gobject_gen_test::auto::{CounterImpl, MutableCounter, MutableCounterExt};
//#[macro_use]
extern crate glib;
extern crate gobject_sys;
//#[cfg(not(feature = "test-generated"))]
// use gobject_gen::gobject_gen;
use ::gobject_gen_test::auto::ffi;
use ::gobject_gen_test::auto::{CounterImpl, MutableCounter, MutableCounterExt};
use glib::translate::ToGlibPtr;
use glib::Cast;
use ::gobject_class::glib::translate::ToGlibPtr;
use ::gobject_class::glib::Cast;
mod test;
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-drop"))]
#![deny(warnings)]
extern crate gobject_class;
extern crate gobject_gen;
#[macro_use]
extern crate glib;
#[allow(dead_code)]
#[cfg(not(feature = "test-generated"))]
use gobject_gen::gobject_gen;
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-floating-refs"))]
extern crate glib_sys;
extern crate gobject_class;
extern crate gobject_gen;
#[macro_use]
extern crate glib;
#[allow(dead_code)]
#[cfg(not(feature = "test-generated"))]
use gobject_gen::gobject_gen;
extern crate gobject_sys;
use gobject_class::glib::glib_object_wrapper;
use gobject_class::glib::glib_wrapper;
// glib_wrapper! wants these bindings
use glib_sys as glib_ffi;
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-gir"))]
#![deny(warnings)]
extern crate gobject_class;
extern crate gobject_gen;
#[macro_use]
extern crate glib;
#[allow(dead_code)]
#[cfg(not(feature = "test-generated"))]
use gobject_gen::gobject_gen;
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-interfaces"))]
//#![feature(extern_prelude)]
extern crate gobject_gen;
extern crate gobject_sys;
#[macro_use]
extern crate glib;
extern crate glib_sys;
extern crate libc;
extern crate gobject_class;
extern crate gobject_gen;
#[allow(dead_code)]
#[cfg(not(feature = "test-generated"))]
use gobject_gen::gobject_gen;
......
#![cfg(any(not(feature = "single-test"), feature = "single-test-memory-layout"))]
#![deny(warnings)]
extern crate gobject_class;
extern crate gobject_gen;
#[macro_use]
extern crate glib;