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

Regen with GQuark #684

Merged
merged 3 commits into from Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Gir.toml
Expand Up @@ -290,6 +290,7 @@ manual = [
"Gio.MountOperation",
"Gio.Permission",
"GLib.Error",
"GLib.Quark",
"GLib.KeyFile",
"GLib.Variant",
"GLib.VariantType",
Expand Down
2 changes: 1 addition & 1 deletion gir
10 changes: 6 additions & 4 deletions src/auto/accel_group.rs
Expand Up @@ -51,7 +51,7 @@ impl Default for AccelGroup {
}

pub trait AccelGroupExt {
//fn activate<P: IsA<glib::Object>>(&self, accel_quark: /*Ignored*/glib::Quark, acceleratable: &P, accel_key: u32, accel_mods: gdk::ModifierType) -> bool;
fn activate<P: IsA<glib::Object>>(&self, accel_quark: glib::Quark, acceleratable: &P, accel_key: u32, accel_mods: gdk::ModifierType) -> bool;

fn connect(&self, accel_key: u32, accel_mods: gdk::ModifierType, accel_flags: AccelFlags, closure: &glib::Closure);

Expand Down Expand Up @@ -81,9 +81,11 @@ pub trait AccelGroupExt {
}

impl<O: IsA<AccelGroup> + IsA<glib::object::Object>> AccelGroupExt for O {
//fn activate<P: IsA<glib::Object>>(&self, accel_quark: /*Ignored*/glib::Quark, acceleratable: &P, accel_key: u32, accel_mods: gdk::ModifierType) -> bool {
// unsafe { TODO: call ffi::gtk_accel_group_activate() }
//}
fn activate<P: IsA<glib::Object>>(&self, accel_quark: glib::Quark, acceleratable: &P, accel_key: u32, accel_mods: gdk::ModifierType) -> bool {
unsafe {
from_glib(ffi::gtk_accel_group_activate(self.to_glib_none().0, accel_quark.to_glib(), acceleratable.to_glib_none().0, accel_key, accel_mods.to_glib()))
}
}

fn connect(&self, accel_key: u32, accel_mods: gdk::ModifierType, accel_flags: AccelFlags, closure: &glib::Closure) {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion src/auto/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ bec7561)
Generated by gir (https://github.com/gtk-rs/gir @ 3e102be)
from gir-files (https://github.com/gtk-rs/gir-files @ b8f5ef1)
32 changes: 20 additions & 12 deletions src/auto/widget_path.rs
Expand Up @@ -152,18 +152,26 @@ impl WidgetPath {
}
}

//pub fn iter_has_qclass(&self, pos: i32, qname: /*Ignored*/glib::Quark) -> bool {
// unsafe { TODO: call ffi::gtk_widget_path_iter_has_qclass() }
//}

//pub fn iter_has_qname(&self, pos: i32, qname: /*Ignored*/glib::Quark) -> bool {
// unsafe { TODO: call ffi::gtk_widget_path_iter_has_qname() }
//}

//#[cfg_attr(feature = "v3_14", deprecated)]
//pub fn iter_has_qregion(&self, pos: i32, qname: /*Ignored*/glib::Quark) -> Option<RegionFlags> {
// unsafe { TODO: call ffi::gtk_widget_path_iter_has_qregion() }
//}
pub fn iter_has_qclass(&self, pos: i32, qname: glib::Quark) -> bool {
unsafe {
from_glib(ffi::gtk_widget_path_iter_has_qclass(self.to_glib_none().0, pos, qname.to_glib()))
}
}

pub fn iter_has_qname(&self, pos: i32, qname: glib::Quark) -> bool {
unsafe {
from_glib(ffi::gtk_widget_path_iter_has_qname(self.to_glib_none().0, pos, qname.to_glib()))
}
}

#[cfg_attr(feature = "v3_14", deprecated)]
pub fn iter_has_qregion(&self, pos: i32, qname: glib::Quark) -> Option<RegionFlags> {
unsafe {
let mut flags = mem::uninitialized();
let ret = from_glib(ffi::gtk_widget_path_iter_has_qregion(self.to_glib_none().0, pos, qname.to_glib(), &mut flags));
if ret { Some(from_glib(flags)) } else { None }
}
}

#[cfg_attr(feature = "v3_14", deprecated)]
pub fn iter_has_region(&self, pos: i32, name: &str) -> Option<RegionFlags> {
Expand Down