@@ -12,10 +12,8 @@ use glib::{prelude::*, subclass::prelude::*, translate::*};
12
12
13
13
use crate :: { ffi, Pixbuf , PixbufAnimationIter } ;
14
14
15
- pub trait PixbufAnimationIterImpl : ObjectImpl
16
- where
17
- <Self as ObjectSubclass >:: Type : IsA < glib:: Object > ,
18
- <Self as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
15
+ pub trait PixbufAnimationIterImpl :
16
+ ObjectImpl + ObjectSubclass < Type : IsA < PixbufAnimationIter > >
19
17
{
20
18
// rustdoc-stripper-ignore-next
21
19
/// Time in milliseconds, returning `None` implies showing the same pixbuf forever.
36
34
}
37
35
}
38
36
39
- pub trait PixbufAnimationIterImplExt : ObjectSubclass + PixbufAnimationIterImpl
40
- where
41
- <Self as ObjectSubclass >:: Type : IsA < glib:: Object > ,
42
- <Self as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
43
- {
37
+ pub trait PixbufAnimationIterImplExt : PixbufAnimationIterImpl {
44
38
fn parent_delay_time ( & self ) -> Option < Duration > {
45
39
unsafe {
46
40
let data = Self :: type_data ( ) ;
@@ -124,18 +118,9 @@ where
124
118
}
125
119
}
126
120
127
- impl < T : PixbufAnimationIterImpl > PixbufAnimationIterImplExt for T
128
- where
129
- <T as ObjectSubclass >:: Type : IsA < glib:: Object > ,
130
- <T as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
131
- {
132
- }
121
+ impl < T : PixbufAnimationIterImpl > PixbufAnimationIterImplExt for T { }
133
122
134
- unsafe impl < T : PixbufAnimationIterImpl > IsSubclassable < T > for PixbufAnimationIter
135
- where
136
- <T as ObjectSubclass >:: Type : IsA < glib:: Object > ,
137
- <T as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
138
- {
123
+ unsafe impl < T : PixbufAnimationIterImpl > IsSubclassable < T > for PixbufAnimationIter {
139
124
fn class_init ( class : & mut :: glib:: Class < Self > ) {
140
125
Self :: parent_class_init :: < T > ( class) ;
141
126
@@ -149,11 +134,7 @@ where
149
134
150
135
unsafe extern "C" fn animation_iter_get_delay_time < T : PixbufAnimationIterImpl > (
151
136
ptr : * mut ffi:: GdkPixbufAnimationIter ,
152
- ) -> i32
153
- where
154
- <T as ObjectSubclass >:: Type : IsA < glib:: Object > ,
155
- <T as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
156
- {
137
+ ) -> i32 {
157
138
let instance = & * ( ptr as * mut T :: Instance ) ;
158
139
let imp = instance. imp ( ) ;
159
140
@@ -162,11 +143,7 @@ where
162
143
163
144
unsafe extern "C" fn animation_iter_get_pixbuf < T : PixbufAnimationIterImpl > (
164
145
ptr : * mut ffi:: GdkPixbufAnimationIter ,
165
- ) -> * mut ffi:: GdkPixbuf
166
- where
167
- <T as ObjectSubclass >:: Type : IsA < glib:: Object > ,
168
- <T as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
169
- {
146
+ ) -> * mut ffi:: GdkPixbuf {
170
147
let instance = & * ( ptr as * mut T :: Instance ) ;
171
148
let imp = instance. imp ( ) ;
172
149
@@ -182,11 +159,7 @@ where
182
159
183
160
unsafe extern "C" fn animation_iter_on_currently_loading_frame < T : PixbufAnimationIterImpl > (
184
161
ptr : * mut ffi:: GdkPixbufAnimationIter ,
185
- ) -> glib:: ffi:: gboolean
186
- where
187
- <T as ObjectSubclass >:: Type : IsA < glib:: Object > ,
188
- <T as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
189
- {
162
+ ) -> glib:: ffi:: gboolean {
190
163
let instance = & * ( ptr as * mut T :: Instance ) ;
191
164
let imp = instance. imp ( ) ;
192
165
@@ -196,11 +169,7 @@ where
196
169
unsafe extern "C" fn animation_iter_advance < T : PixbufAnimationIterImpl > (
197
170
ptr : * mut ffi:: GdkPixbufAnimationIter ,
198
171
current_time_ptr : * const glib:: ffi:: GTimeVal ,
199
- ) -> glib:: ffi:: gboolean
200
- where
201
- <T as ObjectSubclass >:: Type : IsA < glib:: Object > ,
202
- <T as ObjectSubclass >:: Type : IsA < PixbufAnimationIter > ,
203
- {
172
+ ) -> glib:: ffi:: gboolean {
204
173
let instance = & * ( ptr as * mut T :: Instance ) ;
205
174
let imp = instance. imp ( ) ;
206
175
0 commit comments