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 = [
103
103
" Gtk.EditableProperties" ,
104
104
" Gtk.EmojiChooser" ,
105
105
" Gtk.EntryIconPosition" ,
106
- " Gtk.EventController" ,
107
106
" Gtk.EventControllerFocus" ,
108
107
" Gtk.EventControllerMotion" ,
109
108
" Gtk.EventControllerScrollFlags" ,
@@ -1174,6 +1173,14 @@ status = "generate"
1174
1173
rename = " entry"
1175
1174
manual = true # upcast to Entry
1176
1175
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
+
1177
1184
[[object ]]
1178
1185
name = " Gtk.EventControllerKey"
1179
1186
status = " generate"
Original file line number Diff line number Diff line change @@ -142,18 +142,6 @@ pub trait EventControllerExt: IsA<EventController> + 'static {
142
142
}
143
143
}
144
144
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
-
157
145
#[ doc( alias = "name" ) ]
158
146
fn connect_name_notify < F : Fn ( & Self ) + ' static > ( & self , f : F ) -> SignalHandlerId {
159
147
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;
139
139
mod entry_buffer;
140
140
mod entry_completion;
141
141
mod enums;
142
+ mod event_controller;
142
143
mod event_controller_key;
143
144
mod expression_watch;
144
145
mod file_chooser;
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ pub use crate::{
21
21
editable:: EditableExtManual ,
22
22
entry:: EntryExtManual ,
23
23
entry_buffer:: EntryBufferExtManual ,
24
+ event_controller:: EventControllerExtManual ,
24
25
expression:: { GObjectPropertyExpressionExt , IsExpression } ,
25
26
file_chooser:: FileChooserExtManual ,
26
27
font_chooser:: FontChooserExtManual ,
You can’t perform that action at this time.
0 commit comments