Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
Adapt to addition of glib::Propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Biggio authored and bilelmoussaoui committed Aug 2, 2023
1 parent 41ca60f commit 5ecbdd9
Show file tree
Hide file tree
Showing 37 changed files with 194 additions and 194 deletions.
4 changes: 2 additions & 2 deletions atk/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
4 changes: 2 additions & 2 deletions atk/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
6 changes: 3 additions & 3 deletions examples/cairo_test/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn build_ui(application: &gtk::Application) {
cr.arc(0.5 + eye_dx, eye_y, 0.05, 0.0, PI * 2.);
cr.fill().expect("Invalid cairo surface state");

glib::ControlFlow::Break
glib::Propagation::Stop
});

drawable(application, 500, 500, |_, cr| {
Expand All @@ -82,7 +82,7 @@ fn build_ui(application: &gtk::Application) {
cr.arc(0.27, 0.65, 0.02, 0.0, PI * 2.);
cr.fill().expect("Invalid cairo surface state");

glib::ControlFlow::Break
glib::Propagation::Stop
});
}

Expand All @@ -99,7 +99,7 @@ fn main() {

pub fn drawable<F>(application: &gtk::Application, width: i32, height: i32, draw_fn: F)
where
F: Fn(&DrawingArea, &Context) -> glib::ControlFlow + 'static,
F: Fn(&DrawingArea, &Context) -> glib::Propagation + 'static,
{
let window = gtk::ApplicationWindow::new(application);
let drawing_area = DrawingArea::new();
Expand Down
4 changes: 2 additions & 2 deletions examples/cairo_threads/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fn build_ui(application: &gtk::Application) {
// Whenever the drawing area has to be redrawn, render the latest images in the correct
// locations
area.connect_draw(
glib::clone!(@weak workspace => @default-return glib::ControlFlow::Break, move |_, cr| {
glib::clone!(@weak workspace => @default-return glib::Propagation::Stop, move |_, cr| {
let (ref images, ref origins, _) = *workspace;

for (image, origin) in images.iter().zip(origins.iter()) {
Expand All @@ -113,7 +113,7 @@ fn build_ui(application: &gtk::Application) {
});
}

glib::ControlFlow::Break
glib::Propagation::Stop
}),
);

Expand Down
2 changes: 1 addition & 1 deletion examples/clipboard_simple/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn build_ui(application: &gtk::Application) {
window.set_title("gtk::Clipboard Simple Example");
window.connect_delete_event(|window, _| {
window.close();
glib::ControlFlow::Break
glib::Propagation::Stop
});

// Create the button grid
Expand Down
2 changes: 1 addition & 1 deletion examples/gtk_builder_basics/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn build_ui(application: &gtk::Application) {

dialog.connect_delete_event(|dialog, _| {
dialog.hide();
glib::ControlFlow::Continue
glib::Propagation::Proceed
});

bigbutton.connect_clicked(glib::clone!(@weak dialog => move |_| dialog.show_all()));
Expand Down
2 changes: 1 addition & 1 deletion examples/gtk_builder_signal/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn build_ui(application: &gtk::Application) {
.expect("Couldn't get messagedialog1");
dialog.connect_delete_event(|dialog, _| {
dialog.hide();
glib::ControlFlow::Continue
glib::Propagation::Proceed
});

builder.connect_signals(move |_, handler_name| {
Expand Down
6 changes: 3 additions & 3 deletions examples/gtk_test/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn build_ui(application: &gtk::Application) {
button_about.connect_clicked(move |x| about_clicked(x, &dialog));

window.connect_key_press_event(
glib::clone!(@weak entry => @default-return glib::ControlFlow::Break, move |_, key| {
glib::clone!(@weak entry => @default-return glib::Propagation::Stop, move |_, key| {
let keyval = key.keyval();
let keystate = key.state();

Expand All @@ -166,7 +166,7 @@ fn build_ui(application: &gtk::Application) {
println!("You pressed Ctrl!");
}

glib::ControlFlow::Break
glib::Propagation::Stop
}),
);

Expand All @@ -182,7 +182,7 @@ fn about_clicked(button: &Button, dialog: &AboutDialog) {
// as otherwise we can't show it again a second time.
dialog.connect_delete_event(|dialog, _| {
dialog.hide();
glib::ControlFlow::Continue
glib::Propagation::Proceed
});

println!("Authors: {:?}", dialog.authors());
Expand Down
4 changes: 2 additions & 2 deletions examples/multi_window/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ fn create_sub_window(
window.set_default_size(400, 200);

window.connect_delete_event(
glib::clone!(@weak windows => @default-return glib::ControlFlow::Break, move |_, _| {
glib::clone!(@weak windows => @default-return glib::Propagation::Stop, move |_, _| {
windows.borrow_mut().remove(&id);
glib::ControlFlow::Break
glib::Propagation::Stop
}),
);

Expand Down
2 changes: 1 addition & 1 deletion examples/progress_tracker/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Widgets {
window.set_default_size(500, 250);
window.connect_delete_event(move |window, _| {
window.close();
glib::ControlFlow::Break
glib::Propagation::Stop
});

Self {
Expand Down
4 changes: 2 additions & 2 deletions examples/transparent_main_window/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ fn set_visual(window: &ApplicationWindow, _screen: Option<&gdk::Screen>) {
}
}

fn draw(_window: &ApplicationWindow, ctx: &cairo::Context) -> glib::ControlFlow {
fn draw(_window: &ApplicationWindow, ctx: &cairo::Context) -> glib::Propagation {
// crucial for transparency
ctx.set_source_rgba(1.0, 0.0, 0.0, 0.4);
ctx.set_operator(cairo::Operator::Screen);
ctx.paint().expect("Invalid cairo surface state");
glib::ControlFlow::Break
glib::Propagation::Stop
}
4 changes: 2 additions & 2 deletions gdk/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
4 changes: 2 additions & 2 deletions gdk/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
4 changes: 2 additions & 2 deletions gdkx11/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
4 changes: 2 additions & 2 deletions gdkx11/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
2 changes: 1 addition & 1 deletion gir
Submodule gir updated 1 files
+1 −1 src/codegen/trampoline.rs
2 changes: 1 addition & 1 deletion gir-files
4 changes: 2 additions & 2 deletions gtk/src/auto/about_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -879,13 +879,13 @@ pub trait AboutDialogExt: IsA<AboutDialog> + sealed::Sealed + 'static {
}

#[doc(alias = "activate-link")]
fn connect_activate_link<F: Fn(&Self, &str) -> glib::ControlFlow + 'static>(
fn connect_activate_link<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn activate_link_trampoline<
P: IsA<AboutDialog>,
F: Fn(&P, &str) -> glib::ControlFlow + 'static,
F: Fn(&P, &str) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkAboutDialog,
uri: *mut libc::c_char,
Expand Down
12 changes: 6 additions & 6 deletions gtk/src/auto/entry_completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,14 +431,14 @@ pub trait EntryCompletionExt: IsA<EntryCompletion> + sealed::Sealed + 'static {

#[doc(alias = "cursor-on-match")]
fn connect_cursor_on_match<
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn cursor_on_match_trampoline<
P: IsA<EntryCompletion>,
F: Fn(&P, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
F: Fn(&P, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkEntryCompletion,
model: *mut ffi::GtkTreeModel,
Expand Down Expand Up @@ -467,13 +467,13 @@ pub trait EntryCompletionExt: IsA<EntryCompletion> + sealed::Sealed + 'static {
}

#[doc(alias = "insert-prefix")]
fn connect_insert_prefix<F: Fn(&Self, &str) -> glib::ControlFlow + 'static>(
fn connect_insert_prefix<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn insert_prefix_trampoline<
P: IsA<EntryCompletion>,
F: Fn(&P, &str) -> glib::ControlFlow + 'static,
F: Fn(&P, &str) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkEntryCompletion,
prefix: *mut libc::c_char,
Expand Down Expand Up @@ -501,14 +501,14 @@ pub trait EntryCompletionExt: IsA<EntryCompletion> + sealed::Sealed + 'static {

#[doc(alias = "match-selected")]
fn connect_match_selected<
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn match_selected_trampoline<
P: IsA<EntryCompletion>,
F: Fn(&P, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
F: Fn(&P, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkEntryCompletion,
model: *mut ffi::GtkTreeModel,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/gl_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,13 @@ pub trait GLAreaExt: IsA<GLArea> + sealed::Sealed + 'static {
}

#[doc(alias = "render")]
fn connect_render<F: Fn(&Self, &gdk::GLContext) -> glib::ControlFlow + 'static>(
fn connect_render<F: Fn(&Self, &gdk::GLContext) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn render_trampoline<
P: IsA<GLArea>,
F: Fn(&P, &gdk::GLContext) -> glib::ControlFlow + 'static,
F: Fn(&P, &gdk::GLContext) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkGLArea,
context: *mut gdk::ffi::GdkGLContext,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,13 +841,13 @@ pub trait LabelExt: IsA<Label> + sealed::Sealed + 'static {
}

#[doc(alias = "activate-link")]
fn connect_activate_link<F: Fn(&Self, &str) -> glib::ControlFlow + 'static>(
fn connect_activate_link<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn activate_link_trampoline<
P: IsA<Label>,
F: Fn(&P, &str) -> glib::ControlFlow + 'static,
F: Fn(&P, &str) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkLabel,
uri: *mut libc::c_char,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/link_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,13 @@ pub trait LinkButtonExt: IsA<LinkButton> + sealed::Sealed + 'static {
}

#[doc(alias = "activate-link")]
fn connect_activate_link<F: Fn(&Self) -> glib::ControlFlow + 'static>(
fn connect_activate_link<F: Fn(&Self) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn activate_link_trampoline<
P: IsA<LinkButton>,
F: Fn(&P) -> glib::ControlFlow + 'static,
F: Fn(&P) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkLinkButton,
f: glib::ffi::gpointer,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/menu_shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,13 @@ pub trait MenuShellExt: IsA<MenuShell> + sealed::Sealed + 'static {
}

#[doc(alias = "move-selected")]
fn connect_move_selected<F: Fn(&Self, i32) -> glib::ControlFlow + 'static>(
fn connect_move_selected<F: Fn(&Self, i32) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn move_selected_trampoline<
P: IsA<MenuShell>,
F: Fn(&P, i32) -> glib::ControlFlow + 'static,
F: Fn(&P, i32) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkMenuShell,
distance: libc::c_int,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ pub trait RangeExt: IsA<Range> + sealed::Sealed + 'static {
}

#[doc(alias = "change-value")]
fn connect_change_value<F: Fn(&Self, ScrollType, f64) -> glib::ControlFlow + 'static>(
fn connect_change_value<F: Fn(&Self, ScrollType, f64) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn change_value_trampoline<
P: IsA<Range>,
F: Fn(&P, ScrollType, f64) -> glib::ControlFlow + 'static,
F: Fn(&P, ScrollType, f64) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkRange,
scroll: ffi::GtkScrollType,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/switch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,13 @@ pub trait SwitchExt: IsA<Switch> + sealed::Sealed + 'static {
}

#[doc(alias = "state-set")]
fn connect_state_set<F: Fn(&Self, bool) -> glib::ControlFlow + 'static>(
fn connect_state_set<F: Fn(&Self, bool) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn state_set_trampoline<
P: IsA<Switch>,
F: Fn(&P, bool) -> glib::ControlFlow + 'static,
F: Fn(&P, bool) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkSwitch,
state: glib::ffi::gboolean,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/text_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1257,14 +1257,14 @@ pub trait TextTagExt: IsA<TextTag> + sealed::Sealed + 'static {

#[doc(alias = "event")]
fn connect_event<
F: Fn(&Self, &glib::Object, &gdk::Event, &TextIter) -> glib::ControlFlow + 'static,
F: Fn(&Self, &glib::Object, &gdk::Event, &TextIter) -> glib::Propagation + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn event_trampoline<
P: IsA<TextTag>,
F: Fn(&P, &glib::Object, &gdk::Event, &TextIter) -> glib::ControlFlow + 'static,
F: Fn(&P, &glib::Object, &gdk::Event, &TextIter) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkTextTag,
object: *mut glib::gobject_ffi::GObject,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/text_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1324,15 +1324,15 @@ pub trait TextViewExt: IsA<TextView> + sealed::Sealed + 'static {

#[doc(alias = "extend-selection")]
fn connect_extend_selection<
F: Fn(&Self, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::ControlFlow
F: Fn(&Self, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::Propagation
+ 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn extend_selection_trampoline<
P: IsA<TextView>,
F: Fn(&P, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::ControlFlow
F: Fn(&P, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::Propagation
+ 'static,
>(
this: *mut ffi::GtkTextView,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/tool_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,13 @@ pub trait ToolItemExt: IsA<ToolItem> + sealed::Sealed + 'static {
}

#[doc(alias = "create-menu-proxy")]
fn connect_create_menu_proxy<F: Fn(&Self) -> glib::ControlFlow + 'static>(
fn connect_create_menu_proxy<F: Fn(&Self) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn create_menu_proxy_trampoline<
P: IsA<ToolItem>,
F: Fn(&P) -> glib::ControlFlow + 'static,
F: Fn(&P) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkToolItem,
f: glib::ffi::gpointer,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/auto/toolbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,13 @@ pub trait ToolbarExt: IsA<Toolbar> + sealed::Sealed + 'static {
}

#[doc(alias = "popup-context-menu")]
fn connect_popup_context_menu<F: Fn(&Self, i32, i32, i32) -> glib::ControlFlow + 'static>(
fn connect_popup_context_menu<F: Fn(&Self, i32, i32, i32) -> glib::Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn popup_context_menu_trampoline<
P: IsA<Toolbar>,
F: Fn(&P, i32, i32, i32) -> glib::ControlFlow + 'static,
F: Fn(&P, i32, i32, i32) -> glib::Propagation + 'static,
>(
this: *mut ffi::GtkToolbar,
x: libc::c_int,
Expand Down
Loading

0 comments on commit 5ecbdd9

Please sign in to comment.