@@ -37,38 +37,12 @@ use std::ffi::CString;
3737use std:: marker:: PhantomData ;
3838use std:: ptr;
3939
40- use crate :: core_types:: { GodotString , ToVariant , Variant } ;
41- use crate :: nativescript :: { class_registry , emplace } ;
42- use crate :: nativescript :: { user_data :: UserData , NativeClass , NativeClassMethods } ;
40+ use crate :: core_types:: { GodotString , Variant } ;
41+ use crate :: export :: user_data :: UserData ;
42+ use crate :: export :: * ;
4343use crate :: object:: { GodotObject , NewRef , RawObject , TRef } ;
4444use crate :: private:: get_api;
4545
46- pub use method:: * ;
47- pub use property:: * ;
48-
49- mod method;
50- mod property;
51-
52- //pub use self::method::{
53- // Method, MethodBuilder, RpcMode, ScriptMethod, ScriptMethodAttributes, ScriptMethodFn, Varargs,
54- //};
55- //pub use self::property::{ExportInfo, PropertyBuilder, Usage as PropertyUsage};
56-
57- /// Trait for exportable types.
58- pub trait Export : ToVariant {
59- /// A type-specific hint type that is valid for the type being exported.
60- ///
61- /// If this type shows up as `NoHint`, a private, uninhabitable type indicating
62- /// that there are no hints available for the time being, users *must* use `None`
63- /// for properties of this type. This ensures that it will not be a breaking change
64- /// to add a hint for the type later, since it supports no operations and cannot
65- /// be named directly in user code.
66- type Hint ;
67-
68- /// Returns `ExportInfo` given an optional typed hint.
69- fn export_info ( hint : Option < Self :: Hint > ) -> ExportInfo ;
70- }
71-
7246/// A handle that can register new classes to the engine during initialization.
7347///
7448/// See [`godot_nativescript_init`](macro.godot_nativescript_init.html) and
@@ -221,7 +195,7 @@ impl InitHandle {
221195 ( get_api ( ) . godot_nativescript_set_type_tag ) (
222196 self . handle as * mut _ ,
223197 class_name. as_ptr ( ) as * const _ ,
224- crate :: nativescript :: type_tag:: create :: < C > ( ) ,
198+ crate :: export :: type_tag:: create :: < C > ( ) ,
225199 ) ;
226200
227201 let builder = ClassBuilder {
@@ -240,8 +214,8 @@ impl InitHandle {
240214
241215#[ derive( Debug ) ]
242216pub struct ClassBuilder < C > {
243- init_handle : * mut libc:: c_void ,
244- class_name : CString ,
217+ pub ( super ) init_handle : * mut libc:: c_void ,
218+ pub ( super ) class_name : CString ,
245219 _marker : PhantomData < C > ,
246220}
247221
@@ -306,7 +280,7 @@ impl<C: NativeClass> ClassBuilder<C> {
306280 /// Basic usage:
307281 /// ```
308282 /// use gdnative::prelude::*;
309- /// use gdnative::nativescript:: export::{RpcMode, Varargs};
283+ /// use gdnative::export::{RpcMode, Varargs};
310284 ///
311285 /// #[derive(NativeClass)]
312286 /// #[register_with(Self::my_register)]
0 commit comments