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

Remove callback guard #58

Merged
merged 3 commits into from
Jun 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sourceview-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 @ 1825132)
Generated by gir (https://github.com/gtk-rs/gir @ 6e42588)
from gir-files (https://github.com/gtk-rs/gir-files @ 47c69e6)
13 changes: 0 additions & 13 deletions src/auto/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,92 +528,79 @@ impl<O: IsA<Buffer> + IsA<glib::object::Object>> BufferExt for O {

unsafe extern "C" fn highlight_updated_trampoline<P>(this: *mut ffi::GtkSourceBuffer, start: *mut gtk_ffi::GtkTextIter, end: *mut gtk_ffi::GtkTextIter, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P, &gtk::TextIter, &gtk::TextIter) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(start), &from_glib_borrow(end))
}

unsafe extern "C" fn redo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn source_mark_updated_trampoline<P>(this: *mut ffi::GtkSourceBuffer, mark: *mut gtk_ffi::GtkTextMark, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P, &gtk::TextMark) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(mark))
}

unsafe extern "C" fn undo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_can_redo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_can_undo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_highlight_matching_brackets_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_highlight_syntax_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_14", feature = "dox"))]
unsafe extern "C" fn notify_implicit_trailing_newline_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_language_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_max_undo_levels_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_style_scheme_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_undo_manager_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}
15 changes: 0 additions & 15 deletions src/auto/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,105 +455,90 @@ impl<O: IsA<Completion> + IsA<glib::object::Object> + glib::object::ObjectExt> C

unsafe extern "C" fn activate_proposal_trampoline<P>(this: *mut ffi::GtkSourceCompletion, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn hide_trampoline<P>(this: *mut ffi::GtkSourceCompletion, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn move_cursor_trampoline<P>(this: *mut ffi::GtkSourceCompletion, step: gtk_ffi::GtkScrollStep, num: libc::c_int, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P, gtk::ScrollStep, i32) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked(), from_glib(step), num)
}

unsafe extern "C" fn move_page_trampoline<P>(this: *mut ffi::GtkSourceCompletion, step: gtk_ffi::GtkScrollStep, num: libc::c_int, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P, gtk::ScrollStep, i32) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked(), from_glib(step), num)
}

unsafe extern "C" fn populate_context_trampoline<P>(this: *mut ffi::GtkSourceCompletion, context: *mut ffi::GtkSourceCompletionContext, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P, &CompletionContext) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(context))
}

unsafe extern "C" fn show_trampoline<P>(this: *mut ffi::GtkSourceCompletion, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_accelerators_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_auto_complete_delay_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_proposal_page_size_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_provider_page_size_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_remember_info_visibility_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_select_on_show_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_show_headers_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_show_icons_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_view_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}
3 changes: 0 additions & 3 deletions src/auto/completion_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,18 @@ impl<O: IsA<CompletionContext> + IsA<glib::object::Object> + glib::object::Objec

unsafe extern "C" fn cancelled_trampoline<P>(this: *mut ffi::GtkSourceCompletionContext, f: glib_ffi::gpointer)
where P: IsA<CompletionContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionContext::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_activation_trampoline<P>(this: *mut ffi::GtkSourceCompletionContext, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionContext::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_completion_trampoline<P>(this: *mut ffi::GtkSourceCompletionContext, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionContext::from_glib_borrow(this).downcast_unchecked())
}
1 change: 0 additions & 1 deletion src/auto/completion_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ impl<O: IsA<CompletionInfo> + IsA<glib::object::Object> + glib::object::ObjectEx

unsafe extern "C" fn before_show_trampoline<P>(this: *mut ffi::GtkSourceCompletionInfo, f: glib_ffi::gpointer)
where P: IsA<CompletionInfo> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionInfo::from_glib_borrow(this).downcast_unchecked())
}
7 changes: 0 additions & 7 deletions src/auto/completion_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,50 +300,43 @@ impl<O: IsA<CompletionItem> + IsA<glib::object::Object>> CompletionItemExt for O
#[cfg(any(feature = "v3_18", feature = "dox"))]
unsafe extern "C" fn notify_gicon_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_icon_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_18", feature = "dox"))]
unsafe extern "C" fn notify_icon_name_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_info_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_label_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_markup_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_text_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}
1 change: 0 additions & 1 deletion src/auto/completion_proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ impl<O: IsA<CompletionProposal> + IsA<glib::object::Object> + glib::object::Obje

unsafe extern "C" fn changed_trampoline<P>(this: *mut ffi::GtkSourceCompletionProposal, f: glib_ffi::gpointer)
where P: IsA<CompletionProposal> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionProposal::from_glib_borrow(this).downcast_unchecked())
}
8 changes: 0 additions & 8 deletions src/auto/completion_words.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,56 +245,48 @@ impl<O: IsA<CompletionWords> + IsA<glib::object::Object>> CompletionWordsExt for
#[cfg(any(feature = "v3_10", feature = "dox"))]
unsafe extern "C" fn notify_activation_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_icon_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_interactive_delay_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_minimum_word_size_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_name_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_priority_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_proposals_batch_size_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_scan_batch_size_trampoline<P>(this: *mut ffi::GtkSourceCompletionWords, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionWords> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionWords::from_glib_borrow(this).downcast_unchecked())
}
5 changes: 0 additions & 5 deletions src/auto/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,39 +247,34 @@ impl<O: IsA<File> + IsA<glib::object::Object>> FileExt for O {
#[cfg(any(feature = "v3_14", feature = "dox"))]
unsafe extern "C" fn notify_compression_type_trampoline<P>(this: *mut ffi::GtkSourceFile, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<File> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&File::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_14", feature = "dox"))]
unsafe extern "C" fn notify_encoding_trampoline<P>(this: *mut ffi::GtkSourceFile, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<File> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&File::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_14", feature = "dox"))]
unsafe extern "C" fn notify_location_trampoline<P>(this: *mut ffi::GtkSourceFile, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<File> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&File::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_14", feature = "dox"))]
unsafe extern "C" fn notify_newline_type_trampoline<P>(this: *mut ffi::GtkSourceFile, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<File> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&File::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_18", feature = "dox"))]
unsafe extern "C" fn notify_read_only_trampoline<P>(this: *mut ffi::GtkSourceFile, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<File> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&File::from_glib_borrow(this).downcast_unchecked())
}
Loading