@@ -65,6 +65,16 @@ impl HeaderLabelBuilder {
6565 }
6666 }
6767
68+ #[ cfg( feature = "v7_4" ) ]
69+ #[ cfg_attr( docsrs, doc( cfg( feature = "v7_4" ) ) ) ]
70+ pub fn mnemonic_widget ( self , mnemonic_widget : & impl IsA < gtk:: Widget > ) -> Self {
71+ Self {
72+ builder : self
73+ . builder
74+ . property ( "mnemonic-widget" , mnemonic_widget. clone ( ) . upcast ( ) ) ,
75+ }
76+ }
77+
6878 #[ cfg( feature = "v7_1" ) ]
6979 #[ cfg_attr( docsrs, doc( cfg( feature = "v7_1" ) ) ) ]
7080 pub fn secondary_text ( self , secondary_text : impl Into < glib:: GString > ) -> Self {
@@ -287,6 +297,30 @@ pub trait HeaderLabelExt: IsA<HeaderLabel> + sealed::Sealed + 'static {
287297 }
288298 }
289299
300+ #[ cfg( feature = "v7_4" ) ]
301+ #[ cfg_attr( docsrs, doc( cfg( feature = "v7_4" ) ) ) ]
302+ #[ doc( alias = "granite_header_label_get_mnemonic_widget" ) ]
303+ #[ doc( alias = "get_mnemonic_widget" ) ]
304+ fn mnemonic_widget ( & self ) -> Option < gtk:: Widget > {
305+ unsafe {
306+ from_glib_none ( ffi:: granite_header_label_get_mnemonic_widget (
307+ self . as_ref ( ) . to_glib_none ( ) . 0 ,
308+ ) )
309+ }
310+ }
311+
312+ #[ cfg( feature = "v7_4" ) ]
313+ #[ cfg_attr( docsrs, doc( cfg( feature = "v7_4" ) ) ) ]
314+ #[ doc( alias = "granite_header_label_set_mnemonic_widget" ) ]
315+ fn set_mnemonic_widget ( & self , value : Option < & impl IsA < gtk:: Widget > > ) {
316+ unsafe {
317+ ffi:: granite_header_label_set_mnemonic_widget (
318+ self . as_ref ( ) . to_glib_none ( ) . 0 ,
319+ value. map ( |p| p. as_ref ( ) ) . to_glib_none ( ) . 0 ,
320+ ) ;
321+ }
322+ }
323+
290324 #[ cfg( feature = "v7_1" ) ]
291325 #[ cfg_attr( docsrs, doc( cfg( feature = "v7_1" ) ) ) ]
292326 #[ doc( alias = "granite_header_label_get_secondary_text" ) ]
@@ -334,6 +368,34 @@ pub trait HeaderLabelExt: IsA<HeaderLabel> + sealed::Sealed + 'static {
334368 }
335369 }
336370
371+ #[ cfg( feature = "v7_4" ) ]
372+ #[ cfg_attr( docsrs, doc( cfg( feature = "v7_4" ) ) ) ]
373+ #[ doc( alias = "mnemonic-widget" ) ]
374+ fn connect_mnemonic_widget_notify < F : Fn ( & Self ) + ' static > ( & self , f : F ) -> SignalHandlerId {
375+ unsafe extern "C" fn notify_mnemonic_widget_trampoline <
376+ P : IsA < HeaderLabel > ,
377+ F : Fn ( & P ) + ' static ,
378+ > (
379+ this : * mut ffi:: GraniteHeaderLabel ,
380+ _param_spec : glib:: ffi:: gpointer ,
381+ f : glib:: ffi:: gpointer ,
382+ ) {
383+ let f: & F = & * ( f as * const F ) ;
384+ f ( HeaderLabel :: from_glib_borrow ( this) . unsafe_cast_ref ( ) )
385+ }
386+ unsafe {
387+ let f: Box_ < F > = Box_ :: new ( f) ;
388+ connect_raw (
389+ self . as_ptr ( ) as * mut _ ,
390+ b"notify::mnemonic-widget\0 " . as_ptr ( ) as * const _ ,
391+ Some ( std:: mem:: transmute :: < _ , unsafe extern "C" fn ( ) > (
392+ notify_mnemonic_widget_trampoline :: < Self , F > as * const ( ) ,
393+ ) ) ,
394+ Box_ :: into_raw ( f) ,
395+ )
396+ }
397+ }
398+
337399 #[ cfg( feature = "v7_1" ) ]
338400 #[ cfg_attr( docsrs, doc( cfg( feature = "v7_1" ) ) ) ]
339401 #[ doc( alias = "secondary-text" ) ]
0 commit comments