File tree Expand file tree Collapse file tree 5 files changed +34
-13
lines changed Expand file tree Collapse file tree 5 files changed +34
-13
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,6 @@ generate = [
103103 " Gtk.EditableProperties" ,
104104 " Gtk.EmojiChooser" ,
105105 " Gtk.EntryIconPosition" ,
106- " Gtk.EventController" ,
107106 " Gtk.EventControllerFocus" ,
108107 " Gtk.EventControllerMotion" ,
109108 " Gtk.EventControllerScrollFlags" ,
@@ -1174,6 +1173,14 @@ status = "generate"
11741173 rename = " entry"
11751174 manual = true # upcast to Entry
11761175
1176+ [[object ]]
1177+ name = " Gtk.EventController"
1178+ status = " generate"
1179+ manual_traits = [" EventControllerExtManual" ]
1180+ [[object .function ]]
1181+ name = " set_static_name"
1182+ manual = true # to make use of a static lifetimed string
1183+
11771184[[object ]]
11781185name = " Gtk.EventControllerKey"
11791186status = " generate"
Original file line number Diff line number Diff line change @@ -142,18 +142,6 @@ pub trait EventControllerExt: IsA<EventController> + 'static {
142142 }
143143 }
144144
145- #[ cfg( feature = "v4_8" ) ]
146- #[ cfg_attr( docsrs, doc( cfg( feature = "v4_8" ) ) ) ]
147- #[ doc( alias = "gtk_event_controller_set_static_name" ) ]
148- fn set_static_name ( & self , name : Option < & str > ) {
149- unsafe {
150- ffi:: gtk_event_controller_set_static_name (
151- self . as_ref ( ) . to_glib_none ( ) . 0 ,
152- name. to_glib_none ( ) . 0 ,
153- ) ;
154- }
155- }
156-
157145 #[ doc( alias = "name" ) ]
158146 fn connect_name_notify < F : Fn ( & Self ) + ' static > ( & self , f : F ) -> SignalHandlerId {
159147 unsafe extern "C" fn notify_name_trampoline <
Original file line number Diff line number Diff line change 1+ // Take a look at the license at the top of the repository in the LICENSE file.
2+
3+ #[ cfg( feature = "v4_8" ) ]
4+ use glib:: translate:: * ;
5+
6+ #[ cfg( feature = "v4_8" ) ]
7+ use crate :: ffi;
8+ use crate :: { prelude:: * , EventController } ;
9+
10+ pub trait EventControllerExtManual : IsA < EventController > + ' static {
11+ #[ cfg( feature = "v4_8" ) ]
12+ #[ cfg_attr( docsrs, doc( cfg( feature = "v4_8" ) ) ) ]
13+ #[ doc( alias = "gtk_event_controller_set_static_name" ) ]
14+ fn set_static_name ( & self , name : Option < & ' static glib:: GStr > ) {
15+ unsafe {
16+ ffi:: gtk_event_controller_set_static_name (
17+ self . as_ref ( ) . to_glib_none ( ) . 0 ,
18+ name. to_glib_none ( ) . 0 ,
19+ ) ;
20+ }
21+ }
22+ }
23+
24+ impl < O : IsA < EventController > > EventControllerExtManual for O { }
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ mod entry;
139139mod entry_buffer;
140140mod entry_completion;
141141mod enums;
142+ mod event_controller;
142143mod event_controller_key;
143144mod expression_watch;
144145mod file_chooser;
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ pub use crate::{
2121 editable:: EditableExtManual ,
2222 entry:: EntryExtManual ,
2323 entry_buffer:: EntryBufferExtManual ,
24+ event_controller:: EventControllerExtManual ,
2425 expression:: { GObjectPropertyExpressionExt , IsExpression } ,
2526 file_chooser:: FileChooserExtManual ,
2627 font_chooser:: FontChooserExtManual ,
You can’t perform that action at this time.
0 commit comments