File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ // Take a look at the license at the top of the repository in the LICENSE file.
2+
3+ #![ deny( unsafe_op_in_unsafe_fn) ]
4+
5+ use glib:: { prelude:: * , subclass:: prelude:: * } ;
6+
7+ use crate :: DBusInterface ;
8+
9+ pub trait DBusInterfaceImpl : ObjectImpl + ObjectSubclass < Type : IsA < DBusInterface > > { }
10+
11+ pub trait DBusInterfaceImplExt : DBusInterfaceImpl { }
12+
13+ impl < T : DBusInterfaceImpl > DBusInterfaceImplExt for T { }
14+
15+ unsafe impl < T : DBusInterfaceImpl > IsImplementable < T > for DBusInterface {
16+ fn interface_init ( _iface : & mut glib:: Interface < Self > ) { }
17+ }
Original file line number Diff line number Diff line change 1+ // Take a look at the license at the top of the repository in the LICENSE file.
2+
3+ #![ deny( unsafe_op_in_unsafe_fn) ]
4+
5+ use glib:: { prelude:: * , subclass:: prelude:: * } ;
6+
7+ use crate :: subclass:: prelude:: DBusInterfaceImpl ;
8+ use crate :: DBusProxy ;
9+
10+ pub trait DBusProxyImpl :
11+ ObjectImpl + DBusInterfaceImpl + ObjectSubclass < Type : IsA < DBusProxy > >
12+ {
13+ }
14+
15+ pub trait DBusProxyImplExt : DBusProxyImpl { }
16+
17+ impl < T : DBusProxyImpl > DBusProxyImplExt for T { }
18+
19+ unsafe impl < T : DBusProxyImpl > IsSubclassable < T > for DBusProxy {
20+ fn class_init ( class : & mut glib:: Class < Self > ) {
21+ Self :: parent_class_init :: < T > ( class) ;
22+ }
23+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ mod action_group;
44mod action_map;
55mod application;
66mod async_initable;
7+ mod dbus_interface;
8+ mod dbus_proxy;
79mod file_enumerator;
810mod file_monitor;
911mod initable;
@@ -26,6 +28,8 @@ pub mod prelude {
2628 action_map:: { ActionMapImpl , ActionMapImplExt } ,
2729 application:: { ApplicationImpl , ApplicationImplExt } ,
2830 async_initable:: { AsyncInitableImpl , AsyncInitableImplExt } ,
31+ dbus_interface:: { DBusInterfaceImpl , DBusInterfaceImplExt } ,
32+ dbus_proxy:: { DBusProxyImpl , DBusProxyImplExt } ,
2933 file_enumerator:: { FileEnumeratorImpl , FileEnumeratorImplExt } ,
3034 file_monitor:: { FileMonitorImpl , FileMonitorImplExt } ,
3135 initable:: { InitableImpl , InitableImplExt } ,
You can’t perform that action at this time.
0 commit comments