File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -837,6 +837,17 @@ concurrency = "send+sync"
837837 # parameter type
838838 ignore = true
839839
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+
840851[[object ]]
841852name = " GLib.ThreadPool"
842853status = " manual"
Original file line number Diff line number Diff line change @@ -1270,4 +1270,18 @@ impl Source {
12701270 ) )
12711271 }
12721272 }
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+ }
12731287}
You can’t perform that action at this time.
0 commit comments