@@ -3232,12 +3232,13 @@ fn validate_signal_arguments(type_: Type, signal_query: &SignalQuery, args: &mut
3232
3232
}
3233
3233
}
3234
3234
3235
- impl ObjectClass {
3235
+ /// Trait for class methods on `Object` and subclasses of it.
3236
+ pub unsafe trait ObjectClassExt {
3236
3237
// rustdoc-stripper-ignore-next
3237
3238
/// Check if the object class has a property `property_name` of the given `type_`.
3238
3239
///
3239
3240
/// If no type is provided then only the existence of the property is checked.
3240
- pub fn has_property ( & self , property_name : & str , type_ : Option < Type > ) -> bool {
3241
+ fn has_property ( & self , property_name : & str , type_ : Option < Type > ) -> bool {
3241
3242
let ptype = self . property_type ( property_name) ;
3242
3243
3243
3244
match ( ptype, type_) {
@@ -3252,15 +3253,15 @@ impl ObjectClass {
3252
3253
///
3253
3254
/// This returns `None` if the property does not exist.
3254
3255
#[ doc( alias = "get_property_type" ) ]
3255
- pub fn property_type ( & self , property_name : & str ) -> Option < Type > {
3256
+ fn property_type ( & self , property_name : & str ) -> Option < Type > {
3256
3257
self . find_property ( property_name)
3257
3258
. map ( |pspec| pspec. value_type ( ) )
3258
3259
}
3259
3260
3260
3261
// rustdoc-stripper-ignore-next
3261
3262
/// Get the [`ParamSpec`](crate::ParamSpec) of the property `property_name` of this object class.
3262
3263
#[ doc( alias = "g_object_class_find_property" ) ]
3263
- pub fn find_property ( & self , property_name : & str ) -> Option < crate :: ParamSpec > {
3264
+ fn find_property ( & self , property_name : & str ) -> Option < crate :: ParamSpec > {
3264
3265
unsafe {
3265
3266
let klass = self as * const _ as * const gobject_ffi:: GObjectClass ;
3266
3267
@@ -3276,7 +3277,7 @@ impl ObjectClass {
3276
3277
// rustdoc-stripper-ignore-next
3277
3278
/// Return all [`ParamSpec`](crate::ParamSpec) of the properties of this object class.
3278
3279
#[ doc( alias = "g_object_class_list_properties" ) ]
3279
- pub fn list_properties ( & self ) -> PtrSlice < crate :: ParamSpec > {
3280
+ fn list_properties ( & self ) -> PtrSlice < crate :: ParamSpec > {
3280
3281
unsafe {
3281
3282
let klass = self as * const _ as * const gobject_ffi:: GObjectClass ;
3282
3283
@@ -3289,6 +3290,8 @@ impl ObjectClass {
3289
3290
}
3290
3291
}
3291
3292
3293
+ unsafe impl < T : ObjectType + IsClass > ObjectClassExt for Class < T > { }
3294
+
3292
3295
wrapper ! {
3293
3296
#[ doc( alias = "GInitiallyUnowned" ) ]
3294
3297
pub struct InitiallyUnowned ( Object <gobject_ffi:: GInitiallyUnowned , gobject_ffi:: GInitiallyUnownedClass >) ;
0 commit comments