This repository was archived by the owner on Mar 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 13 files changed +123
-43
lines changed Expand file tree Collapse file tree 13 files changed +123
-43
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ mod imp_win {
40
40
const NAME : & ' static str = "SimpleWindow" ;
41
41
type Type = super :: SimpleWindow ;
42
42
type ParentType = gtk:: ApplicationWindow ;
43
+ type Interfaces = ( ) ;
43
44
type Instance = subclass:: simple:: InstanceStruct < Self > ;
44
45
type Class = subclass:: simple:: ClassStruct < Self > ;
45
46
@@ -128,6 +129,7 @@ mod imp_app {
128
129
const NAME : & ' static str = "SimpleApplication" ;
129
130
type Type = super :: SimpleApplication ;
130
131
type ParentType = gtk:: Application ;
132
+ type Interfaces = ( ) ;
131
133
type Instance = subclass:: simple:: InstanceStruct < Self > ;
132
134
type Class = subclass:: simple:: ClassStruct < Self > ;
133
135
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ mod imp {
29
29
const NAME : & ' static str = "ExApplicationWindow" ;
30
30
type Type = super :: ExApplicationWindow ;
31
31
type ParentType = gtk:: ApplicationWindow ;
32
+ type Interfaces = ( ) ;
32
33
type Instance = subclass:: simple:: InstanceStruct < Self > ;
33
34
type Class = subclass:: simple:: ClassStruct < Self > ;
34
35
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ mod imp {
27
27
const NAME : & ' static str = "FileSize" ;
28
28
type ParentType = glib:: Object ;
29
29
type Instance = subclass:: simple:: InstanceStruct < Self > ;
30
+ type Interfaces = ( ) ;
30
31
type Class = subclass:: simple:: ClassStruct < Self > ;
31
32
type Type = super :: FileSize ;
32
33
glib:: object_subclass!( ) ;
Original file line number Diff line number Diff line change @@ -34,17 +34,12 @@ mod model {
34
34
const NAME : & ' static str = "Model" ;
35
35
type Type = super :: Model ;
36
36
type ParentType = glib:: Object ;
37
+ type Interfaces = ( gio:: ListModel , ) ;
37
38
type Instance = subclass:: simple:: InstanceStruct < Self > ;
38
39
type Class = subclass:: simple:: ClassStruct < Self > ;
39
40
40
41
glib:: object_subclass!( ) ;
41
42
42
- // Called right before class_init and allows a GObject to specify
43
- // which interfaces it implement, in this case gio::ListModel
44
- fn type_init ( type_ : & mut subclass:: InitializingType < Self > ) {
45
- type_. add_interface :: < gio:: ListModel > ( ) ;
46
- }
47
-
48
43
// Called once at the very beginning of instantiation
49
44
fn new ( ) -> Self {
50
45
Self ( RefCell :: new ( Vec :: new ( ) ) )
@@ -311,6 +306,7 @@ mod row_data {
311
306
const NAME : & ' static str = "RowData" ;
312
307
type Type = super :: RowData ;
313
308
type ParentType = glib:: Object ;
309
+ type Interfaces = ( ) ;
314
310
type Instance = subclass:: simple:: InstanceStruct < Self > ;
315
311
type Class = subclass:: simple:: ClassStruct < Self > ;
316
312
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ mod imp {
25
25
const NAME : & ' static str = "ReadInputStream" ;
26
26
type Type = super :: ReadInputStream ;
27
27
type ParentType = InputStream ;
28
+ type Interfaces = ( crate :: Seekable , ) ;
28
29
type Instance = subclass:: simple:: InstanceStruct < Self > ;
29
30
type Class = subclass:: simple:: ClassStruct < Self > ;
30
31
@@ -35,10 +36,6 @@ mod imp {
35
36
read : RefCell :: new ( None ) ,
36
37
}
37
38
}
38
-
39
- fn type_init ( type_ : & mut subclass:: InitializingType < Self > ) {
40
- type_. add_interface :: < crate :: Seekable > ( ) ;
41
- }
42
39
}
43
40
44
41
impl ObjectImpl for ReadInputStream { }
Original file line number Diff line number Diff line change @@ -493,6 +493,7 @@ mod tests {
493
493
const NAME : & ' static str = "SimpleApplication" ;
494
494
type Type = super :: SimpleApplication ;
495
495
type ParentType = Application ;
496
+ type Interfaces = ( ) ;
496
497
type Instance = subclass:: simple:: InstanceStruct < Self > ;
497
498
type Class = subclass:: simple:: ClassStruct < Self > ;
498
499
Original file line number Diff line number Diff line change @@ -269,6 +269,7 @@ mod tests {
269
269
const NAME : & ' static str = "SimpleInputStream" ;
270
270
type Type = super :: SimpleInputStream ;
271
271
type ParentType = InputStream ;
272
+ type Interfaces = ( crate :: Seekable , ) ;
272
273
type Instance = subclass:: simple:: InstanceStruct < Self > ;
273
274
type Class = subclass:: simple:: ClassStruct < Self > ;
274
275
@@ -279,10 +280,6 @@ mod tests {
279
280
pos : RefCell :: new ( 0 ) ,
280
281
}
281
282
}
282
-
283
- fn type_init ( type_ : & mut subclass:: InitializingType < Self > ) {
284
- type_. add_interface :: < crate :: Seekable > ( ) ;
285
- }
286
283
}
287
284
288
285
impl ObjectImpl for SimpleInputStream { }
Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ mod tests {
331
331
const NAME : & ' static str = "SimpleOutputStream" ;
332
332
type Type = super :: SimpleOutputStream ;
333
333
type ParentType = OutputStream ;
334
+ type Interfaces = ( ) ;
334
335
type Instance = subclass:: simple:: InstanceStruct < Self > ;
335
336
type Class = subclass:: simple:: ClassStruct < Self > ;
336
337
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ mod test {
129
129
const NAME : & ' static str = "MySimpleObjectPrivate" ;
130
130
type ParentType = glib:: Object ;
131
131
type Instance = subclass:: simple:: InstanceStruct < Self > ;
132
+ type Interfaces = ( ) ;
132
133
type Class = subclass:: simple:: ClassStruct < Self > ;
133
134
type Type = MySimpleObject ;
134
135
glib:: object_subclass!( ) ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ mod imp {
27
27
const NAME : & ' static str = "WriteOutputStream" ;
28
28
type Type = super :: WriteOutputStream ;
29
29
type ParentType = OutputStream ;
30
+ type Interfaces = ( crate :: Seekable , ) ;
30
31
type Instance = subclass:: simple:: InstanceStruct < Self > ;
31
32
type Class = subclass:: simple:: ClassStruct < Self > ;
32
33
@@ -37,10 +38,6 @@ mod imp {
37
38
write : RefCell :: new ( None ) ,
38
39
}
39
40
}
40
-
41
- fn type_init ( type_ : & mut subclass:: InitializingType < Self > ) {
42
- type_. add_interface :: < crate :: Seekable > ( ) ;
43
- }
44
41
}
45
42
46
43
impl ObjectImpl for WriteOutputStream { }
You can’t perform that action at this time.
0 commit comments