Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 92fe92b

Browse files
Merge pull request #660 from EPashkin/regen
Regen
2 parents 8e14d40 + ac3e98f commit 92fe92b

16 files changed

+112
-19
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ purge-lgpl-docs = ["gtk-rs-lgpl-docs", "gdk/purge-lgpl-docs"]
3030
v3_22 = ["v3_20", "gtk-sys/v3_22", "gdk/v3_22"]
3131
v3_22_20 = ["v3_22", "gtk-sys/v3_22_26", "gdk/v3_22"]
3232
v3_22_26 = ["v3_22_20", "gtk-sys/v3_22_26", "gdk/v3_22"]
33+
v3_22_27 = ["v3_22_26", "gtk-sys/v3_22_27"]
34+
v3_22_29 = ["v3_22_27", "gtk-sys/v3_22_29"]
3335
v3_12 = ["v3_10", "gtk-sys/v3_12", "gdk/v3_12"]
3436
v3_8 = ["v3_6", "gtk-sys/v3_8", "gdk/v3_8"]
3537
embed-lgpl-docs = ["gtk-rs-lgpl-docs", "gdk/embed-lgpl-docs"]

Gir.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ generate = [
9696
"Gtk.IconViewDropPosition",
9797
"Gtk.ImageMenuItem",
9898
"Gtk.ImageType",
99-
"Gtk.InfoBar",
10099
"Gtk.Invisible",
101100
"Gtk.IMMulticontext",
102101
"Gtk.IMPreeditStyle",
@@ -906,6 +905,13 @@ status = "generate"
906905
name = "input-purpose"
907906
version = "3.6"
908907

908+
[[object]]
909+
name = "Gtk.InfoBar"
910+
status = "generate"
911+
[[object.property]]
912+
name = "revealed"
913+
version = "3.22.29"
914+
909915
[[object]]
910916
name = "Gtk.InputHints"
911917
status = "generate"

src/auto/entry.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,12 @@ pub trait EntryExt {
371371

372372
fn emit_insert_at_cursor(&self, string: &str);
373373

374+
#[cfg(any(feature = "v3_22_27", feature = "dox"))]
375+
fn connect_insert_emoji<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
376+
377+
#[cfg(any(feature = "v3_22_27", feature = "dox"))]
378+
fn emit_insert_emoji(&self);
379+
374380
fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool) + 'static>(&self, f: F) -> SignalHandlerId;
375381

376382
fn emit_move_cursor(&self, step: MovementStep, count: i32, extend_selection: bool);
@@ -1429,6 +1435,20 @@ impl<O: IsA<Entry> + IsA<glib::object::Object> + glib::object::ObjectExt> EntryE
14291435
let _ = self.emit("insert-at-cursor", &[&string]).unwrap();
14301436
}
14311437

1438+
#[cfg(any(feature = "v3_22_27", feature = "dox"))]
1439+
fn connect_insert_emoji<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1440+
unsafe {
1441+
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
1442+
connect(self.to_glib_none().0, "insert-emoji",
1443+
transmute(insert_emoji_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
1444+
}
1445+
}
1446+
1447+
#[cfg(any(feature = "v3_22_27", feature = "dox"))]
1448+
fn emit_insert_emoji(&self) {
1449+
let _ = self.emit("insert-emoji", &[]).unwrap();
1450+
}
1451+
14321452
fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool) + 'static>(&self, f: F) -> SignalHandlerId {
14331453
unsafe {
14341454
let f: Box_<Box_<Fn(&Self, MovementStep, i32, bool) + 'static>> = Box_::new(Box_::new(f));
@@ -1931,6 +1951,14 @@ where P: IsA<Entry> {
19311951
f(&Entry::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(string))
19321952
}
19331953

1954+
#[cfg(any(feature = "v3_22_27", feature = "dox"))]
1955+
unsafe extern "C" fn insert_emoji_trampoline<P>(this: *mut ffi::GtkEntry, f: glib_ffi::gpointer)
1956+
where P: IsA<Entry> {
1957+
callback_guard!();
1958+
let f: &&(Fn(&P) + 'static) = transmute(f);
1959+
f(&Entry::from_glib_borrow(this).downcast_unchecked())
1960+
}
1961+
19341962
unsafe extern "C" fn move_cursor_trampoline<P>(this: *mut ffi::GtkEntry, step: ffi::GtkMovementStep, count: libc::c_int, extend_selection: glib_ffi::gboolean, f: glib_ffi::gpointer)
19351963
where P: IsA<Entry> {
19361964
callback_guard!();

src/auto/enums.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2250,6 +2250,7 @@ pub enum License {
22502250
Lgpl21Only,
22512251
Lgpl30Only,
22522252
Agpl30,
2253+
Agpl30Only,
22532254
#[doc(hidden)]
22542255
__Unknown(i32),
22552256
}
@@ -2274,6 +2275,7 @@ impl ToGlib for License {
22742275
License::Lgpl21Only => ffi::GTK_LICENSE_LGPL_2_1_ONLY,
22752276
License::Lgpl30Only => ffi::GTK_LICENSE_LGPL_3_0_ONLY,
22762277
License::Agpl30 => ffi::GTK_LICENSE_AGPL_3_0,
2278+
License::Agpl30Only => ffi::GTK_LICENSE_AGPL_3_0_ONLY,
22772279
License::__Unknown(value) => value
22782280
}
22792281
}
@@ -2298,6 +2300,7 @@ impl FromGlib<ffi::GtkLicense> for License {
22982300
11 => License::Lgpl21Only,
22992301
12 => License::Lgpl30Only,
23002302
13 => License::Agpl30,
2303+
14 => License::Agpl30Only,
23012304
value => License::__Unknown(value),
23022305
}
23032306
}

src/auto/font_button.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ impl Default for FontButton {
5454
}
5555

5656
pub trait FontButtonExt {
57+
#[cfg_attr(feature = "v3_22", deprecated)]
5758
fn get_font_name(&self) -> Option<String>;
5859

5960
fn get_show_size(&self) -> bool;
@@ -66,6 +67,7 @@ pub trait FontButtonExt {
6667

6768
fn get_use_size(&self) -> bool;
6869

70+
#[cfg_attr(feature = "v3_22", deprecated)]
6971
fn set_font_name(&self, fontname: &str) -> bool;
7072

7173
fn set_show_size(&self, show_size: bool);
@@ -80,6 +82,7 @@ pub trait FontButtonExt {
8082

8183
fn connect_font_set<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
8284

85+
#[cfg_attr(feature = "v3_22", deprecated)]
8386
fn connect_property_font_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
8487

8588
fn connect_property_show_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;

src/auto/icon_info.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,20 +275,20 @@ impl<O: IsA<IconInfo> + IsA<glib::object::Object> + Clone + 'static> IconInfoExt
275275

276276
let fg = fg.clone();
277277
let success_color = success_color.into();
278-
let success_color = success_color.cloned();
278+
let success_color = success_color.map(ToOwned::to_owned);
279279
let warning_color = warning_color.into();
280-
let warning_color = warning_color.cloned();
280+
let warning_color = warning_color.map(ToOwned::to_owned);
281281
let error_color = error_color.into();
282-
let error_color = error_color.cloned();
282+
let error_color = error_color.map(ToOwned::to_owned);
283283
GioFuture::new(self, move |obj, send| {
284284
let cancellable = gio::Cancellable::new();
285285
let send = SendCell::new(send);
286286
let obj_clone = SendCell::new(obj.clone());
287287
obj.load_symbolic_async(
288288
&fg,
289-
success_color.as_ref(),
290-
warning_color.as_ref(),
291-
error_color.as_ref(),
289+
success_color.as_ref().map(::std::borrow::Borrow::borrow),
290+
warning_color.as_ref().map(::std::borrow::Borrow::borrow),
291+
error_color.as_ref().map(::std::borrow::Borrow::borrow),
292292
Some(&cancellable),
293293
move |res| {
294294
let obj = obj_clone.into_inner();

src/auto/icon_view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl<O: IsA<IconView> + IsA<glib::object::Object> + glib::object::ObjectExt> Ico
340340
let mut path = ptr::null_mut();
341341
let mut cell = ptr::null_mut();
342342
let ret = from_glib(ffi::gtk_icon_view_get_item_at_pos(self.to_glib_none().0, x, y, &mut path, &mut cell));
343-
if ret { Some((from_glib_full(path), from_glib_full(cell))) } else { None }
343+
if ret { Some((from_glib_full(path), from_glib_none(cell))) } else { None }
344344
}
345345
}
346346

src/auto/info_bar.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ pub trait InfoBarExt {
6464

6565
fn get_message_type(&self) -> MessageType;
6666

67+
#[cfg(any(feature = "v3_22_29", feature = "dox"))]
68+
fn get_revealed(&self) -> bool;
69+
6770
#[cfg(any(feature = "v3_10", feature = "dox"))]
6871
fn get_show_close_button(&self) -> bool;
6972

@@ -75,6 +78,9 @@ pub trait InfoBarExt {
7578

7679
fn set_response_sensitive(&self, response_id: i32, setting: bool);
7780

81+
#[cfg(any(feature = "v3_22_29", feature = "dox"))]
82+
fn set_revealed(&self, revealed: bool);
83+
7884
#[cfg(any(feature = "v3_10", feature = "dox"))]
7985
fn set_show_close_button(&self, setting: bool);
8086

@@ -86,6 +92,9 @@ pub trait InfoBarExt {
8692

8793
fn connect_property_message_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
8894

95+
#[cfg(any(feature = "v3_22_29", feature = "dox"))]
96+
fn connect_property_revealed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
97+
8998
#[cfg(any(feature = "v3_10", feature = "dox"))]
9099
fn connect_property_show_close_button_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
91100
}
@@ -125,6 +134,13 @@ impl<O: IsA<InfoBar> + IsA<glib::object::Object> + glib::object::ObjectExt> Info
125134
}
126135
}
127136

137+
#[cfg(any(feature = "v3_22_29", feature = "dox"))]
138+
fn get_revealed(&self) -> bool {
139+
unsafe {
140+
from_glib(ffi::gtk_info_bar_get_revealed(self.to_glib_none().0))
141+
}
142+
}
143+
128144
#[cfg(any(feature = "v3_10", feature = "dox"))]
129145
fn get_show_close_button(&self) -> bool {
130146
unsafe {
@@ -156,6 +172,13 @@ impl<O: IsA<InfoBar> + IsA<glib::object::Object> + glib::object::ObjectExt> Info
156172
}
157173
}
158174

175+
#[cfg(any(feature = "v3_22_29", feature = "dox"))]
176+
fn set_revealed(&self, revealed: bool) {
177+
unsafe {
178+
ffi::gtk_info_bar_set_revealed(self.to_glib_none().0, revealed.to_glib());
179+
}
180+
}
181+
159182
#[cfg(any(feature = "v3_10", feature = "dox"))]
160183
fn set_show_close_button(&self, setting: bool) {
161184
unsafe {
@@ -191,6 +214,15 @@ impl<O: IsA<InfoBar> + IsA<glib::object::Object> + glib::object::ObjectExt> Info
191214
}
192215
}
193216

217+
#[cfg(any(feature = "v3_22_29", feature = "dox"))]
218+
fn connect_property_revealed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
219+
unsafe {
220+
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
221+
connect(self.to_glib_none().0, "notify::revealed",
222+
transmute(notify_revealed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
223+
}
224+
}
225+
194226
#[cfg(any(feature = "v3_10", feature = "dox"))]
195227
fn connect_property_show_close_button_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
196228
unsafe {
@@ -222,6 +254,14 @@ where P: IsA<InfoBar> {
222254
f(&InfoBar::from_glib_borrow(this).downcast_unchecked())
223255
}
224256

257+
#[cfg(any(feature = "v3_22_29", feature = "dox"))]
258+
unsafe extern "C" fn notify_revealed_trampoline<P>(this: *mut ffi::GtkInfoBar, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
259+
where P: IsA<InfoBar> {
260+
callback_guard!();
261+
let f: &&(Fn(&P) + 'static) = transmute(f);
262+
f(&InfoBar::from_glib_borrow(this).downcast_unchecked())
263+
}
264+
225265
#[cfg(any(feature = "v3_10", feature = "dox"))]
226266
unsafe extern "C" fn notify_show_close_button_trampoline<P>(this: *mut ffi::GtkInfoBar, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
227267
where P: IsA<InfoBar> {

src/auto/list_box_row.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// from gir-files (https://github.com/gtk-rs/gir-files)
33
// DO NOT EDIT
44

5+
use Actionable;
56
use Bin;
67
use Buildable;
78
use Container;
@@ -10,18 +11,22 @@ use ffi;
1011
use glib;
1112
use glib::object::Downcast;
1213
use glib::object::IsA;
14+
#[cfg(any(feature = "v3_10", feature = "dox"))]
1315
use glib::signal::SignalHandlerId;
16+
#[cfg(any(feature = "v3_10", feature = "dox"))]
1417
use glib::signal::connect;
1518
use glib::translate::*;
1619
use glib_ffi;
1720
use gobject_ffi;
21+
#[cfg(any(feature = "v3_10", feature = "dox"))]
1822
use std::boxed::Box as Box_;
1923
use std::mem;
24+
#[cfg(any(feature = "v3_10", feature = "dox"))]
2025
use std::mem::transmute;
2126
use std::ptr;
2227

2328
glib_wrapper! {
24-
pub struct ListBoxRow(Object<ffi::GtkListBoxRow, ffi::GtkListBoxRowClass>): Bin, Container, Widget, Buildable;
29+
pub struct ListBoxRow(Object<ffi::GtkListBoxRow, ffi::GtkListBoxRowClass>): Bin, Container, Widget, Buildable, Actionable;
2530

2631
match fn {
2732
get_type => || ffi::gtk_list_box_row_get_type(),
@@ -73,8 +78,10 @@ pub trait ListBoxRowExt {
7378
#[cfg(any(feature = "v3_14", feature = "dox"))]
7479
fn set_selectable(&self, selectable: bool);
7580

81+
#[cfg(any(feature = "v3_10", feature = "dox"))]
7682
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
7783

84+
#[cfg(any(feature = "v3_10", feature = "dox"))]
7885
fn emit_activate(&self);
7986

8087
#[cfg(any(feature = "v3_14", feature = "dox"))]
@@ -150,6 +157,7 @@ impl<O: IsA<ListBoxRow> + IsA<glib::object::Object> + glib::object::ObjectExt> L
150157
}
151158
}
152159

160+
#[cfg(any(feature = "v3_10", feature = "dox"))]
153161
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
154162
unsafe {
155163
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
@@ -158,6 +166,7 @@ impl<O: IsA<ListBoxRow> + IsA<glib::object::Object> + glib::object::ObjectExt> L
158166
}
159167
}
160168

169+
#[cfg(any(feature = "v3_10", feature = "dox"))]
161170
fn emit_activate(&self) {
162171
let _ = self.emit("activate", &[]).unwrap();
163172
}
@@ -181,6 +190,7 @@ impl<O: IsA<ListBoxRow> + IsA<glib::object::Object> + glib::object::ObjectExt> L
181190
}
182191
}
183192

193+
#[cfg(any(feature = "v3_10", feature = "dox"))]
184194
unsafe extern "C" fn activate_trampoline<P>(this: *mut ffi::GtkListBoxRow, f: glib_ffi::gpointer)
185195
where P: IsA<ListBoxRow> {
186196
callback_guard!();

src/auto/status_icon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl StatusIcon {
7777
}
7878
}
7979

80-
#[cfg_attr(feature = "v3_10", deprecated)]
80+
#[cfg_attr(feature = "v3_14", deprecated)]
8181
pub fn new_from_stock(stock_id: &str) -> StatusIcon {
8282
assert_initialized_main_thread!();
8383
unsafe {

src/auto/tree_view.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub trait TreeViewExt {
176176

177177
//fn insert_column_with_data_func<P: IsA<CellRenderer>, Q: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, position: i32, title: &str, cell: &P, func: /*Unknown conversion*//*Unimplemented*/TreeCellDataFunc, data: Q, dnotify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> i32;
178178

179-
fn is_blank_at_pos(&self, x: i32, y: i32) -> Option<(TreePath, TreeViewColumn, i32, i32)>;
179+
fn is_blank_at_pos(&self, x: i32, y: i32) -> Option<(Option<TreePath>, Option<TreeViewColumn>, i32, i32)>;
180180

181181
fn is_rubber_banding_active(&self) -> bool;
182182

@@ -712,14 +712,14 @@ impl<O: IsA<TreeView> + IsA<glib::object::Object> + glib::object::ObjectExt> Tre
712712
// unsafe { TODO: call ffi::gtk_tree_view_insert_column_with_data_func() }
713713
//}
714714

715-
fn is_blank_at_pos(&self, x: i32, y: i32) -> Option<(TreePath, TreeViewColumn, i32, i32)> {
715+
fn is_blank_at_pos(&self, x: i32, y: i32) -> Option<(Option<TreePath>, Option<TreeViewColumn>, i32, i32)> {
716716
unsafe {
717717
let mut path = ptr::null_mut();
718718
let mut column = ptr::null_mut();
719719
let mut cell_x = mem::uninitialized();
720720
let mut cell_y = mem::uninitialized();
721721
let ret = from_glib(ffi::gtk_tree_view_is_blank_at_pos(self.to_glib_none().0, x, y, &mut path, &mut column, &mut cell_x, &mut cell_y));
722-
if ret { Some((from_glib_full(path), from_glib_full(column), cell_x, cell_y)) } else { None }
722+
if ret { Some((from_glib_full(path), from_glib_none(column), cell_x, cell_y)) } else { None }
723723
}
724724
}
725725

src/auto/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
All files in this directory
2-
were generated by gir (https://github.com/gtk-rs/gir @ 5ec9961)
3-
from gir-files (https://github.com/gtk-rs/gir-files @ 3fde76b)
2+
were generated by gir (https://github.com/gtk-rs/gir @ c530bb9)
3+
from gir-files (https://github.com/gtk-rs/gir-files @ a788da4)
44
DO NOT EDIT THEM

src/entry_buffer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ macro_rules! to_u16 {
2929
)
3030
}
3131

32+
#[cfg_attr(feature = "cargo-clippy", allow(cast_lossless))]
3233
impl EntryBuffer {
3334
pub fn new(initial_chars: Option<&str>) -> EntryBuffer {
3435
assert_initialized_main_thread!();

src/target_entry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ impl TargetEntry {
1919
assert_initialized_main_thread!();
2020
TargetEntry {
2121
target: target.to_owned(),
22-
flags: flags,
23-
info: info,
22+
flags,
23+
info,
2424
}
2525
}
2626

0 commit comments

Comments
 (0)