File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -837,6 +837,17 @@ concurrency = "send+sync"
837
837
# parameter type
838
838
ignore = true
839
839
840
+ [[object .function ]]
841
+ name = " dup_context"
842
+ # implemented as the normal getter
843
+ manual = true
844
+
845
+ [[object .function ]]
846
+ name = " get_context"
847
+ # implemented conditionally around this or
848
+ # dup_context() (see above)
849
+ manual = true
850
+
840
851
[[object ]]
841
852
name = " GLib.ThreadPool"
842
853
status = " manual"
Original file line number Diff line number Diff line change @@ -1270,4 +1270,18 @@ impl Source {
1270
1270
) )
1271
1271
}
1272
1272
}
1273
+
1274
+ #[ doc( alias = "g_source_get_context" ) ]
1275
+ #[ doc( alias = "get_context" ) ]
1276
+ #[ doc( alias = "g_source_dup_context" ) ]
1277
+ pub fn context ( & self ) -> Option < MainContext > {
1278
+ #[ cfg( feature = "v2_86" ) ]
1279
+ unsafe {
1280
+ from_glib_full ( ffi:: g_source_dup_context ( self . to_glib_none ( ) . 0 ) )
1281
+ }
1282
+ #[ cfg( not( feature = "v2_86" ) ) ]
1283
+ unsafe {
1284
+ from_glib_none ( ffi:: g_source_get_context ( self . to_glib_none ( ) . 0 ) )
1285
+ }
1286
+ }
1273
1287
}
You can’t perform that action at this time.
0 commit comments